tag:blogger.com,1999:blog-74347004383446910692024-03-13T23:47:42.380+05:30mujuonlyEvery day make someone smile :) ~ #mujuonlyUnknownnoreply@blogger.comBlogger16125tag:blogger.com,1999:blog-7434700438344691069.post-11710234931664900072024-01-31T22:37:00.001+05:302024-01-31T22:37:18.368+05:30WordPress 6.4.3 MacOS Compressed Zip plugin archives "Incompatible Archive" on upload<p> <span style="background-color: #f9f9f9; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px;">If I zip a plugin folder using MacOS right-click Compress command in the contextual menu, those archives are no longer accepted when using upload plugin ( </span><span style="color: #1e1e1e; font-family: Open Sans, sans-serif;"><span style="font-size: 14px;">WordPress 6.4.3 )</span></span><span style="background-color: #f9f9f9; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px;">. It returns "<b>Incompatible Archive</b>". This has worked up until now. The issue is related to the recent security updates for the plugin and theme uploader.</span></p><p style="background-color: #f9f9f9; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">If I create a zip on the command line of the same folder that works correctly.</p><p style="background-color: #f9f9f9; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;"><br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">In short: The <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">ZIPARCHIVE::CHECKCONS</code> flag causes checks to use a "pedantic" mode, which Apple's Archive too fails.<br />(For some internals from an Apple dev, see <a class="ext-link" href="https://wordpress.org/support/topic/macos-zip-files-made-with-the-built-in-archive-utility-arent-accepted/#post-15815401" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: none;">https://wordpress.org/support/topic/macos-zip-files-made-with-the-built-in-archive-utility-arent-accepted/#post-15815401</a> ).<br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">This has previously affected WordPress (<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12637" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: line-through;" title="#12637: defect (bug): OS X-generated theme zips won't upload properly (closed: fixed)">#12637</a>) and WP-CLI (<a class="ext-link" href="https://github.com/wp-cli/extension-command/issues/362" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: none;">https://github.com/wp-cli/extension-command/issues/362</a>).<br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">It looks like libzip has a solution already (<a class="ext-link" href="https://github.com/nih-at/libzip/issues/341" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: none;">https://github.com/nih-at/libzip/issues/341</a> and <a class="ext-link" href="https://github.com/nih-at/libzip/commit/b3e3b19e2e4b7d4651d01148f123129429ecc69b" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: none;">https://github.com/nih-at/libzip/commit/b3e3b19e2e4b7d4651d01148f123129429ecc69b</a>) but that will probably still need to make its way to servers...<br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">One solution for Core could be to just repeat the call to <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">$archive->open( $file['file'] )</code> (but without the <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">ZIPARCHIVE::CHECKCONS</code> flag) or to try a fallback check with <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">PclZip</code> on failure as well (and not just if the <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">ZipArchive</code> class is not available).</p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">Lowering the severity since there is currently a workaround on both the zip creation side ( use the command line) and the individual site side ( <code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">add_filter( 'unzip_file_use_ziparchive', '_return_false' );</code> ).</p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;"><br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">creating your zip file manually works.<br />(using terminal on MacOS, instead of right-click > compress in finder)<br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;"><code style="background: rgb(250, 250, 250); border-radius: 0.25em; border: 1px solid rgb(238, 221, 204); color: black; font-family: Consolas, Monaco, "Courier New", Courier, monospace; padding: 0px 0.3em;">zip -vr theme.zip your_theme/</code><br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">see: <a class="ext-link" href="https://superuser.com/q/505034/415143" style="border-bottom: 1px dotted rgb(187, 187, 187); color: #21759b; text-decoration-line: none;">https://superuser.com/q/505034/415143</a><br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">p.s. use the zip command, not ditto (since that is the same as compress in finder)</p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;"><br /></p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;">The workaround here where impacted plugin authors can STOP using the MacOS UI for generating ZIPs and START using the command line to do so. Like below</p><p style="background-color: white; color: #1e1e1e; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 1em 0px; padding: 0px;"><span style="background-color: rgba(29, 28, 29, 0.04); color: #e01e5a; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; font-variant-ligatures: none; white-space-collapse: preserve;">zip -r webtoffee-product-feed.zip webtoffee-product-feed</span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-39799713602167519242015-12-31T11:35:00.001+05:302015-12-31T11:35:34.876+05:30Hook Drupal Ajax Function on Webform Submit<div dir="ltr" style="text-align: left;" trbidi="on">
(function($) {<br />
<br />
Drupal.subscribeAjax = {<br />
form_id: 'webform-client-form-34' // your webform id<br />
};<br />
<br />
Drupal.behaviors.subscribeAjax = {<br />
attach: function(context, settings) {<br />
// Extend Drupal.ajax object<br />
for (ajax_el in settings.ajax) {<br />
if (typeof Drupal.ajax[ajax_el] != 'undefined' && Drupal.ajax[ajax_el].element.form) {<br />
if (Drupal.ajax[ajax_el].element.form.id === Drupal.subscribeAjax.form_id) {<br />
Drupal.ajax[ajax_el].beforeSend = Drupal.subscribeAjax.beforeSend;<br />
Drupal.ajax[ajax_el].success = Drupal.subscribeAjax.success;<br />
Drupal.ajax[ajax_el].error = Drupal.subscribeAjax.error;<br />
}<br />
}<br />
}<br />
}<br />
};<br />
<br />
Drupal.subscribeAjax.beforeSend = function(first, second) {<br />
console.log("before submit");<br />
Drupal.ajax.prototype.beforeSend.call(this, first, second);<br />
}<br />
Drupal.subscribeAjax.success = function(response, status) {<br />
console.log("on success");<br />
//console.log(JSON.stringify(response));<br />
Drupal.ajax.prototype.success.call(this, response, status);<br />
}<br />
Drupal.subscribeAjax.error = function(response, uri) {<br />
console.log("on error");<br />
Drupal.subscribeAjax.enableForm(this.element.form);<br />
Drupal.ajax.prototype.error.call(this, response, uri);<br />
}<br />
<br />
})(jQuery);<br />
// ajaxComplete<br />
(function($) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$(document).ajaxComplete(function(event, xhr, options) {<br />
var data = $.httpData(xhr,options.dataType);<br />
//console.log(JSON.stringify(data));<br />
$('#webform-ajax-wrapper-34 .error').delay(5000).fadeOut(400);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>});<br />
}(jQuery));</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7434700438344691069.post-44273386900726251722015-09-09T12:13:00.002+05:302015-09-09T12:16:10.178+05:30Programmatically Creating a new Content Type in Drupal7<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">To create a module, in
the <b>sites/all/modules</b> directory
of your Drupal installation create a new directory named <b>mymodule.<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> Create following three files in <b>mymodule</b> folder:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin: 0in 0in 0.0001pt 18.75pt; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="color: #4a4a4a; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">mymodule.info</span></b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">– will contain the information about the
module so that Drupal will recognize it and show it in the list.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin: 0in 0in 0.0001pt 18.75pt; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="color: #4a4a4a; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">mymodule.install</span></b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> – will have details about things you are
going to install or uninstall for the module.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin: 0in 0in 0.0001pt 18.75pt; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="color: #4a4a4a; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">mymodule.module</span></b><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> – will contain code to implement the Drupal
hooks used by the module.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Once you have made the
directory, open <b>mymodule.info</b> and
add the following code to it:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">name = mymodule<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">description = A new custom content type creation by mujuonly<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">package = mymodule Custom node Type<o:p></o:p></span><br />
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif;">version = "7.x-1.12"</span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">core = 7.x<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">files[] = mymodule.install <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: #4a4a4a; font-family: "Arial Unicode MS",sans-serif; font-size: 12.0pt;">files[] = mymodule.module <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">The above simply
defines some parameters for our module (<i>mymodule</i>)
so Drupal can use it and display the information about <i>mymodule</i>.
Once this is done we should see <i>mymodule</i>
in the module list as shown below. <o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE5-ELnuPtsnMCdfDp0lZxmM6DzC80_Xqq8H18J9rIpNsOKYBn76I3yEM8Z_wA60-5YylOC59Fb3FCtzihRtK-kpsD3tWu1HpTF5dMI7TGsCUNldj9Oiv1eFKPvYj-JjZOau3-ouTy5vw/s1600/cutom_module_drupal_mujuonly.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE5-ELnuPtsnMCdfDp0lZxmM6DzC80_Xqq8H18J9rIpNsOKYBn76I3yEM8Z_wA60-5YylOC59Fb3FCtzihRtK-kpsD3tWu1HpTF5dMI7TGsCUNldj9Oiv1eFKPvYj-JjZOau3-ouTy5vw/s640/cutom_module_drupal_mujuonly.PNG" width="640" /></a></div>
<div class="MsoNormal" style="background: white; margin-bottom: 12pt;">
<span style="color: #262626; font-family: "Helvetica",sans-serif; font-size: 25.5pt; letter-spacing: -.25pt; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 12pt;">
<span style="color: #262626; font-family: "Helvetica",sans-serif; font-size: 25.5pt; letter-spacing: -.25pt; mso-fareast-font-family: "Times New Roman";">Installing
and Uninstalling Content Type<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Once we have the basic
files for the module in place, we can start writing code for installing the
custom node type. The first hook we need to implement is <b>hook_node_info</b>. Using this hook, a module can define one or more
node types in Drupal. The hook implementation returns an array defining the new
node type which the module is going to add.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">To implement this hook,
add the following code to <b>mymodule.module</b><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">/**<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> * Implements </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">hook_node_info</span><span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">()<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> */</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">function</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">mymodule_node_info</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">()</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">{</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">return</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">array</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">'news'
</span><span style="color: #a67f59; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">=></span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">array</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> 'name' => t('News'),<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> 'base' => 'news',<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> 'description' => t('You can add News here'),<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> 'has_title' => TRUE,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> 'title_label' => t('News title')<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">)</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">);</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">}</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">The implementation
returns an array defining a new node type news along with some of its properties, such as its
name, description, title, and base. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">As we have defined
that this node type has a title, we need to show the title text field when the
form for this node is displayed to add content. To do this, we will have to
implement the hook </span><span style="background: rgb(232, 232, 232); font-family: Consolas; font-size: 10pt;">hook_form</span><span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">The <b>hook_form</b> is used to show the form for
create/edit nodes. The hook is implemented in <b>mymodule.module</b> as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">/**<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> * Implement </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">hook_form</span><span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">()<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> */</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">function</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">mymodule_form</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #7f6000; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #7F6000; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent4; mso-themecolor: accent4; mso-themeshade: 128;">$node, $form_state</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">)</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">{</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">return</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_content_form</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #7f6000; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #7F6000; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent4; mso-themecolor: accent4; mso-themeshade: 128;">$node, $form_state</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">);</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">}</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">We simply use the
Drupal API which gives an implementation of <b>hook_form</b> and adds a title field provided the node definition has
the <b><i>has_title</i></b>
attribute set .Once we have got this done, we need to implement the <b>hook_install</b> hook to add the body field
to the new node type.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Add the implementation
to <b>mymodule.install</b> is as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">/**<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> * Implements </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">hook_install</span><span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">().<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> */</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">function</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">mymodule_install</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">()</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">{</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_types_rebuild</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">();</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #7f6000; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #7F6000; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent4; mso-themecolor: accent4; mso-themeshade: 128;">$types </span><span style="color: #a67f59; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">=</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_type_get_types</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">();</span><span style="color: #a67f59; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">|</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_add_body_field</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #7f6000; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #7F6000; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent4; mso-themecolor: accent4; mso-themeshade: 128;">$types</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">[</span><span style="color: #669900; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">'news'</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">]);</span><span style="font-family: Consolas; font-size: 12pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">}</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">We first save all of
the new node types created by different modules by calling the Drupal API <b>node_types_rebuild()</b> function. Then we
get all of the node types and call <b>node_add_body_field()</b>
on our type to add the body field.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Once we have done this
we can enable mymodule which will install our new node type. Then we should be
able to see our new type when we click on <i>add content</i> as follows:<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurS2LreDvy1R_khdVWxddciS0l91t0b9ZgccB2iYFY9w3IRWPTC4L_2XACSj3XkgycrDqDRKLIvfg4TuJ_VU42YMU1JugjZr57ZgX4PVeo3v4kB5w1Su4UVNqqLkG6ma1D-lbcqc43-M/s1600/drupal_ctype_mujuonly.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurS2LreDvy1R_khdVWxddciS0l91t0b9ZgccB2iYFY9w3IRWPTC4L_2XACSj3XkgycrDqDRKLIvfg4TuJ_VU42YMU1JugjZr57ZgX4PVeo3v4kB5w1Su4UVNqqLkG6ma1D-lbcqc43-M/s640/drupal_ctype_mujuonly.PNG" width="640" /></a></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">If we add a new news,
it will also be seen on the Drupal front page.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">All modules in Drupal
should clean up any data they create in the database or any types they have
added when it is uninstalled by the user. To support this, we have to implement
the <b>hook_uninstall</b> in ou mymodule.install file
as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">/**<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> * Implements </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">hook_uninstall</span><span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">().<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: slategrey; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> */</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #0077aa; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">function</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">mymodule_uninstall</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">()</span><span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">{</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> $customtype = 'news';<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> $sql = 'SELECT nid FROM {node} n WHERE
n.type = :type';<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> $result = db_query($sql, array(':type' =>
$customtype));<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> $nodeids = array();<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> foreach ($result as $row) {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> $nodeids[] = $row->nid;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: red; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_delete_multiple</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #385723; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #385723; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent6; mso-themecolor: accent6; mso-themeshade: 128;">$nodeids</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">);</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="font-family: Consolas; font-size: 12pt;"> </span><span style="color: #8faadc; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #8FAADC; mso-style-textfill-fill-colortransforms: "lumm=60000 lumo=40000"; mso-style-textfill-fill-themecolor: accent5; mso-themecolor: accent5; mso-themetint: 153;">node_type_delete</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #385723; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #385723; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: accent6; mso-themecolor: accent6; mso-themeshade: 128;">$customtype</span><span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">);</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: rgb(249, 249, 250); margin-bottom: 24pt;">
<span style="color: #999999; font-family: Consolas; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">}</span><span style="font-family: Consolas; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">We first find out all
of the node IDs which are nodes of our installed content type. Once we have
collected the IDs, we use the API function <b>node_delete_multiple</b>()
to delete multiple nodes. Then we use the <b>node_type_delete</b>()
function to delete our node type.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="background: white; line-height: 21.6pt; margin-bottom: 24.0pt;">
<span style="color: #4a4a4a; font-family: "Helvetica",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Now if we uninstall
our module, all of the nodes of our type and our type itself should be deleted.<o:p></o:p></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-20144549969693644782015-09-08T22:50:00.002+05:302015-09-08T22:50:18.312+05:30Resetting the admin password of Drupal 7<div dir="ltr" style="text-align: left;" trbidi="on">
Frequently we come across Drupal sites where admin
password is not known to the owner of the site. You can retrieve the
password by changing the email address of user 1 to your email address
and then use the forgot password option to reset your password. But if
you don't want to change the user 1 email address but instead just want
to change the password of user 1 there is an easier alternative<br />
<br />
Use below PHP Code in index.php of drupa with URL paramas as <code><span style="color: black;"><span style="color: #dd0000;"><code><span style="color: black;"><span style="color: #dd0000;">?pass=</span></span></code>PASSWORD</span></span></code> and run. After that roll back to old index.php <br />
<pre><code><span style="color: black;"><span style="color: #dd0000;"> </span></span></code></pre>
It Will set your admin password to <code><span style="color: black;"><span style="color: #dd0000;"><code><span style="color: black;"><span style="color: #dd0000;"></span></span></code>PASSWORD</span></span></code><br />
<br />
<div class="codeblock">
<pre><code><span style="color: black;"><span style="color: #0000bb;">define</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'DRUPAL_ROOT'</span><span style="color: #007700;">, </span><span style="color: #0000bb;">getcwd</span><span style="color: #007700;">());
require_once </span><span style="color: #0000bb;">DRUPAL_ROOT </span><span style="color: #007700;">. </span><span style="color: #dd0000;">'/includes/bootstrap.inc'</span><span style="color: #007700;">;</span><span style="color: #0000bb;">drupal_bootstrap</span><span style="color: #007700;">(</span><span style="color: #0000bb;">DRUPAL_BOOTSTRAP_FULL</span><span style="color: #007700;">);
require_once </span><span style="color: #0000bb;">DRUPAL_ROOT </span><span style="color: #007700;">. </span><span style="color: #dd0000;">'/includes/password.inc'</span><span style="color: #007700;">;
if (isset(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'pass'</span><span style="color: #007700;">]) && !empty(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'pass'</span><span style="color: #007700;">])) {
</span><span style="color: #0000bb;">$newhash </span><span style="color: #007700;">= </span><span style="color: #0000bb;">user_hash_password</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'pass'</span><span style="color: #007700;">]);
}
else {
die(</span><span style="color: #dd0000;">'Retry with ?pass=PASSWORD set in the URL'</span><span style="color: #007700;">);
}
</span><span style="color: #0000bb;">$updatepass </span><span style="color: #007700;">= </span><span style="color: #0000bb;">db_update</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'users'</span><span style="color: #007700;">)
-></span><span style="color: #0000bb;">fields</span><span style="color: #007700;">(array(
</span><span style="color: #dd0000;">'pass' </span><span style="color: #007700;">=> </span><span style="color: #0000bb;">$newhash</span><span style="color: #007700;">,</span><span style="color: #ff8000;">// 'name' => 'admin',
// 'mail' => 'yourmail@example.com'
</span><span style="color: #007700;">))
-></span><span style="color: #0000bb;">condition</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'uid'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'1'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'='</span><span style="color: #007700;">)
-></span><span style="color: #0000bb;">execute</span><span style="color: #007700;">();
print </span><span style="color: #dd0000;">"Done. Please delete this file immediately!"</span><span style="color: #007700;">;</span><span style="color: #0000bb;">drupal_exit</span><span style="color: #007700;">();</span><span style="color: #0000bb;">?></span></span></code></pre>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-14103796156294843742015-09-06T11:53:00.002+05:302015-09-06T11:53:32.279+05:30Simple SEO things with Google Webmaster Tools<div dir="ltr" style="text-align: left;" trbidi="on">
Below are some points that makes your website indexed in google search results with help of google webmaster tools<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUu2AVSUceS7Xc1h7nX0VcHZqF6DWOVzP_4NJ0pcYhuj_1NwZs0mhlWrmBpSYdiJDo8_DNoSBt-KLnUGs_bJzmCuI9Q4agyxu0WbywqFeU-yHi5TTgYmjRaCB2k1LzR_vWLgQbUsGqjW8/s1600/search-mujuonly.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUu2AVSUceS7Xc1h7nX0VcHZqF6DWOVzP_4NJ0pcYhuj_1NwZs0mhlWrmBpSYdiJDo8_DNoSBt-KLnUGs_bJzmCuI9Q4agyxu0WbywqFeU-yHi5TTgYmjRaCB2k1LzR_vWLgQbUsGqjW8/s640/search-mujuonly.PNG" width="640" /></a></div>
<br />
<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-24616774732386503962015-09-06T11:43:00.001+05:302015-09-06T11:43:15.639+05:30Check Gzip compression enabled in website<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="st">Below is an online tool to <em>test</em> if <em>Gzip</em> compression is working on your webpage.</span><br />
<br />
<span class="st">https://varvy.com/tools/gzip/</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUV98ofUo1YQujJUDoJJPPD3D6PTgl4pGE1hi3VZpLpUl1X-_n-sEnYlkDb2VH5bp4fnRIXfCJ8x5umL0kc-I3tEq5Y8_cH2txbYv_ipNaKIuk_jNELA-MOmLHZbdC5Ikao1EThkROYOo/s1600/gzip.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUV98ofUo1YQujJUDoJJPPD3D6PTgl4pGE1hi3VZpLpUl1X-_n-sEnYlkDb2VH5bp4fnRIXfCJ8x5umL0kc-I3tEq5Y8_cH2txbYv_ipNaKIuk_jNELA-MOmLHZbdC5Ikao1EThkROYOo/s640/gzip.PNG" width="640" /></a></div>
<span class="st"> </span><br />
<br />
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-49133158692826242372015-09-06T11:33:00.002+05:302015-09-06T11:33:50.626+05:30Use Google PageSpeed Insights to check speed of your website.<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7lDJoseeSuOlyTVNqoq13FRb8EnVYzkvAxuBWlRG2Mejarn8athHpRe59GMpXRgiq_UFC_LYYIKbtjucyXIuRJSShYEK1l-FkvK9Ff5gpxfpHAlrE5Xpt6Un6JymHluxWPDwSWovoOag/s1600/pagespeed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7lDJoseeSuOlyTVNqoq13FRb8EnVYzkvAxuBWlRG2Mejarn8athHpRe59GMpXRgiq_UFC_LYYIKbtjucyXIuRJSShYEK1l-FkvK9Ff5gpxfpHAlrE5Xpt6Un6JymHluxWPDwSWovoOag/s640/pagespeed.png" width="640" /></a></div>
<br />
You can check your website speed here<br />
<br />
https://developers.google.com/speed/pagespeed/insights/?url=<br />
<br />
There is mobile and desktop view checking in one go.<br />
<br />
CSS , JS and Image optimization tips are there , if not optimized.<br />
<br />
Also Googlechrome plugin is available in chrome store</div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7434700438344691069.post-1885881352346516822015-09-06T11:07:00.001+05:302015-09-06T11:07:25.183+05:30Drupal 7 reset password programmatically<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="post-text" itemprop="text">
You can use the <a href="http://api.drupal.org/api/drupal/modules%21user%21user.module/function/_user_mail_notify/7"><code>_user_mail_notify()</code></a> function, along with a user object, to invoke the password reset email:<br />
<pre class="default prettyprint prettyprinted"><code><span class="com">// Load a user (admin in this case).</span><span class="pln">
$account </span><span class="pun">=</span><span class="pln"> user_load</span><span class="pun">(</span><span class="lit">1</span><span class="pun">);</span><span class="pln">
</span><span class="com">// Invoke the email. It will be queued along with other system mail to be sent during cron</span><span class="pln">
_user_mail_notify</span><span class="pun">(</span><span class="str">'password_reset'</span><span class="pun">,</span><span class="pln"> $account</span><span class="pun">);</span></code></pre>
A one time login URL with a 24 hour expiry is included by default with that particular email.<br />
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-59314674953311369352015-09-04T12:29:00.000+05:302015-09-04T14:00:53.257+05:30Drupal - tune speed and performance<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #343434; font-family: proxima-nova, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.389999985694885px; line-height: 1.6em; margin-bottom: 1.6em; padding: 0px;">
Drupal is really good for a lot of things when it comes to websites. One thing that can sometimes get overlooked or can lag behind (if you don't hire the right team) is the speed of your site. With all of the modules being added and configured, some things are forgotten that help to fine tune speed and performance.</div>
<div style="background-color: white; color: #343434; font-family: proxima-nova, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.389999985694885px; line-height: 1.6em; margin-bottom: 1.6em; padding: 0px;">
This situation is not uncommon for websites. If you're stuck with a slow site, and think you have to fork over more money to fix it, think again. Before you spend more money on additional server resources or hire a consultant, here are some tips and tricks you can do to help speed up your site. I've done my best to order these by complexity.</div>
<ul style="background-color: white; color: #343434; font-family: proxima-nova, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.389999985694885px; line-height: 1.5em; margin: 0px 0px 1.6em; padding: 0px 0px 0px 2em;">
<li style="margin: 0px; padding: 0px;"><strong style="margin: 0px; padding: 0px;">Drupal Performance</strong> - Drupal 7 comes with some pretty good tools for increasing the performance of your site. Enabling these is always a good first step in increasing your site performance. You can find these configuration options on the admin/configuration/development/performance page.<ul style="line-height: 1.5em; margin: 0px 0px 1.6em; padding: 0px 0px 0px 2em;">
<li style="margin: 0px; padding: 0px;">Page Caching for Anonymous users</li>
<li style="margin: 0px; padding: 0px;">Block Caching</li>
<li style="margin: 0px; padding: 0px;">Aggregate/Optimize Stylesheets and Scripts</li>
</ul>
</li>
<li style="margin: 0px; padding: 0px;"><strong style="margin: 0px; padding: 0px;"><a class="ext" href="https://drupal.org/project/css_emimage" style="color: #5aaed9; margin: 0px; padding: 0px; text-decoration: none;" target="_blank">CSS Emimage<span class="ext" style="background: url(data:image/png; height: 10px; margin: 0px; padding: 0px 12px 0px 0px; width: 10px;"><span class="element-invisible" style="clip: rect(1px 1px 1px 1px); height: 1px; margin: 0px; overflow: hidden; padding: 0px; position: absolute !important;">(link is external)</span></span></a></strong> - This is a contributed Drupal module which helps speed the rendering of background images from your site's CSS files. It's a plug-and-play module that you enable from the modules page and then activate from the performance page (mentioned above) - that's it.</li>
<li style="margin: 0px; padding: 0px;"><strong style="margin: 0px; padding: 0px;">Views Cache</strong> (If your site isn't views-heavy this won't help you much.) By default, views within Drupal aren't cached. Therefore, these pages (and blocks) are exempted from the cache settings you configured above. This is because views are intended to be dynamic aggregations of content and, therefore, by definition, excluded from cache. However, if you have a complex view, it might be good to have some cache settings on your view to help that page load more quickly. NOTE: if you enable views caching, make sure you configure the expiration settings so that new content is shown on the view when rendered.<ul style="line-height: 1.5em; margin: 0px 0px 1.6em; padding: 0px 0px 0px 2em;">
<li style="margin: 0px; padding: 0px;">Here are some modules that can help with Views Cache configuration so that it expires more gracefully and is more aware of content changes that affect the view.<ul style="line-height: 1.5em; margin: 0px 0px 1.6em; padding: 0px 0px 0px 2em;">
<li style="margin: 0px; padding: 0px;"><a class="ext" href="https://drupal.org/project/views_content_cache" style="color: #5aaed9; margin: 0px; padding: 0px; text-decoration: none;">Views Content Cache<span class="ext" style="background: url(data:image/png; height: 10px; margin: 0px; padding: 0px 12px 0px 0px; width: 10px;"><span class="element-invisible" style="clip: rect(1px 1px 1px 1px); height: 1px; margin: 0px; overflow: hidden; padding: 0px; position: absolute !important;">(link is external)</span></span></a></li>
<li style="margin: 0px; padding: 0px;"><a class="ext" href="https://drupal.org/project/cache_graceful" style="color: #5aaed9; margin: 0px; padding: 0px; text-decoration: none;">Cache Graceful<span class="ext" style="background: url(data:image/png; height: 10px; margin: 0px; padding: 0px 12px 0px 0px; width: 10px;"><span class="element-invisible" style="clip: rect(1px 1px 1px 1px); height: 1px; margin: 0px; overflow: hidden; padding: 0px; position: absolute !important;">(link is external)</span></span></a></li>
<li style="margin: 0px; padding: 0px;"><a class="ext" href="https://drupal.org/project/views_cache_bully" style="color: #5aaed9; margin: 0px; padding: 0px; text-decoration: none;">Views Cache Bully</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-48836940458678149662015-09-03T18:03:00.001+05:302015-09-03T18:03:59.516+05:30Thoughts<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3sylQflxnSWld0HU7W2Y4s915AcMRUF3hZBCgjdrPD6IQRsGluZnyUzLOxKm1f2v47EYjSaGlMTR4TWmW3GW_Gyfqq3WxHpl3b_Ik1N037BkxdtB4v34yw9VxbnCQc7iDrXwPKAQM6E4/s1600/11038014_906016159464731_3447183624723186505_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3sylQflxnSWld0HU7W2Y4s915AcMRUF3hZBCgjdrPD6IQRsGluZnyUzLOxKm1f2v47EYjSaGlMTR4TWmW3GW_Gyfqq3WxHpl3b_Ik1N037BkxdtB4v34yw9VxbnCQc7iDrXwPKAQM6E4/s320/11038014_906016159464731_3447183624723186505_n.jpg" width="307" /></a></div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-45550985434087454822011-02-24T11:39:00.002+05:302015-09-06T11:56:49.069+05:30Twitter widget for You site<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRlJxVJEcn-OsgSp0fBNLI5jTd6NDxG4agrAsqV4LjaUQ-8ljfKz_Rn7KxfRU8Mynsen5WV5XqrtsX03avQuaqHywEpYfgpYL7XvzU4_Z30eTay0Umes8oedlxyREC9ybqtPCxuZQ7vuE/s1600/twitterwidget.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5577134734943334450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRlJxVJEcn-OsgSp0fBNLI5jTd6NDxG4agrAsqV4LjaUQ-8ljfKz_Rn7KxfRU8Mynsen5WV5XqrtsX03avQuaqHywEpYfgpYL7XvzU4_Z30eTay0Umes8oedlxyREC9ybqtPCxuZQ7vuE/s320/twitterwidget.png" style="cursor: pointer; float: left; height: 320px; margin: 0pt 10px 10px 0pt; width: 243px;" /></a><br />
Grab your own twitter widget like this here<br />
<br />
<a href="https://twitter.com/settings/widgets" target="_blank">https://twitter.com/settings/widgets</a></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-20429032297366663092010-12-06T17:44:00.003+05:302010-12-06T17:48:10.511+05:30Google cheat sheetGoogle search Techniqs<br /><br />http://img.labnol.org/files/Google-Cheat-Sheet.pdfUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-65735635417719747732010-11-01T16:43:00.001+05:302010-11-01T16:43:50.343+05:30Enabling CURL in UBUNTU<pre class="prettyprint"><code><span class="pln">apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install php5</span><span class="pun">-</span><span class="pln">curl<br /></span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">init</span><span class="pun">.</span><span class="pln">d</span><span class="pun">/</span><span class="pln">apache2 restart</span></code></pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-8396688201808008072010-06-11T15:20:00.000+05:302010-06-11T15:21:15.278+05:30cURL related<p>When I am trying to run my application which was developed using “CURL” concept, while I am running my application, it has given an error like “<strong>Call to undefined function curl_init()</strong>“, I am annoyed by seeing that error…</p> <p><span id="more-949"></span></p> <p><img src="http://www.developersnippets.com/wp-content/uploads/2009/04/xampp_server.jpg" alt="XAMPP" title="XAMPP" class="aligncenter size-full wp-image-950" width="376" height="393" /></p><h2>How to resolve it:</h2> <p>I got the solution for you, just goto your installed folder – I have installed in C:\ drive in Windows Vista, goto <strong>php</strong> folder that is “<strong>C:\xampp\php</strong>” in that search for “<strong>php.ini</strong>” open it. After opening search for “<strong>extension=php_curl.dll</strong>” just uncomment that one. After doing that, just restart your Apache. Job is done!</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7434700438344691069.post-26412265008346452712010-06-10T09:18:00.001+05:302010-06-10T09:18:53.863+05:30Getting started with facebook connect in PHPhttp://wiki.developers.facebook.com/index.php/Getting_Started_with_Facebook_Connect#How_It_WorksUnknownnoreply@blogger.com1tag:blogger.com,1999:blog-7434700438344691069.post-51523978172444232742010-06-09T11:08:00.001+05:302015-09-04T10:20:31.437+05:30First Post<div dir="ltr" style="text-align: left;" trbidi="on">
My First Blogpost</div>
Unknownnoreply@blogger.com1