Reducing server resource utilization for busy sites by implementing fast 404s in Drupal... - 3 views
-
// List of extensions for static files $exts = 'txt|png|gif|jpe?g|shtml?|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp|xml'; // It is not an imagecache path, which we allow to go through Drupal if (!strpos($_SERVER['QUERY_STRING'], 'imagecache')) { // It is not our main feed page if ($_SERVER['QUERY_STRING'] != 'rss.xml') { // Is it a static file? if (preg_match('/\.(' . $exts . ')$/', $_SERVER['QUERY_STRING'])) // Just send a 404 right now ... { header('HTTP/1.0 404 Not Found'); print '<html>'; print '<head><title>404 Not Found</title></head>'; print '<body><h1>Not Found</h1>'; print '<p>The requested URL was not found on this server.</p>'; print '</body></html>'; exit(); } } }
Drupal Developer's Toolbox - Smashing Magazine - 4 views
Programatic CCK Now Possible! | groups.drupal.org - 2 views
-
<?phpfunction mymodule_enable() { // Get the files content $filename = drupal_get_path('module','mymodule') . "/mymodule.cck"; $content = implode ('', file ($filename)); // Build form state $form_state = array( 'values' => array( 'type_name' => '<create>', 'macro' => $content, ), ); // Put it in there drupal_execute("content_copy_import_form", $form_state);}?>
Free your content of PHP: Moving PHP code out of blocks, views and nodes | 2bits.com, I... - 2 views
-
From the early days, Drupal had the ability to embed PHP code in its content. This provides flexibility and functionality, most importantly, nodes and blocks can contain dynamically fetched data from the database using custom queries and displayed them in other content. This is an easy approach to get such data without writing a module. All you need to do is assign the PHP input format filter to the node or block and paste your PHP code in it, and voila, you have dynamic content. Code in Content: the issues However, this approach is suboptimal and has serious drawbacks, including:
-
From the early days, Drupal had the ability to embed PHP code in its content. This provides flexibility and functionality, most importantly, nodes and blocks can contain dynamically fetched data from the database using custom queries and displayed them in other content. This is an easy approach to get such data without writing a module. All you need to do is assign the PHP input format filter to the node or block and paste your PHP code in it, and voila, you have dynamic content.
Drupal modules api site - 2 views
best free drupal 6 themes - 2 views
‹ Previous
21 - 40
Next ›
Last »
Showing 20▼ items per page