[Skip Header and Navigation] [Jump to Main Content]

Drupal 6.x

Drupal 6.x Performance Guide

Found great article about Drupal 6.x performance

must read & keep
http://www.morningtime.com/Drupal-6x-Performance-Guide/513

Adding template for a node

If you need to theme the node.tpl.php for a specific node, create node-[nid].tpl.php file from node.tpl.php

add to your template.php file

function THEMENAME_preprocess_node(&$variables) {
  
  $node  = $variables['node'];
  if (!empty($node)) {
    $variables['template_files'][] = "node-" . $node->nid;
  }
  
}

PHP Fatal error: Cannot redeclare

one of our hosted sites, has start making problems an refused to load the homepage, giving a "not found" error to the browser
looking in the logs, we found this line:

PHP Fatal error: Cannot redeclare product_has_images() ...

after we looked into it, and tried all sort of hooks to catch the cause
of the error, we got a prime-suspect:
the PHP Cache APC

so we restarted apache... and it fixed everything

What is the best next-step course for a beginner-drupalist: PHP, Databases, or CSS

 A young drupalist, that has recently learned Drupal, asked me what do I recommend for him as the next course he'll take:

PHP, Databases, or CSS ?

 

So I went and asked my friends and drupal colegues on LinkedIn, here is a link to the question What is the best next-step course for a beginner-drupalist: PHP, Databases, or CSS ?

 

here are the answers by the drupal experts:

Solving Cron run exceeded the time limit and was aborted Error

Recently i got this error in my log
Cron run exceeded the time limit and was aborted.

so why does cron, shouted this ?

I have found nice snipet to track the source of the error

<?php
// redirect only if this is not cron script  
if ($_SERVER['SCRIPT_NAME'] != '/cron.php') {
  drupal_goto('<front>');
}
?>

apparently it was because i have added a redirect page to keep an old path and avoid 404 error
so i have added a page with php code with a simple drupal_goto()

having this problem ?

Drupal website read-only mode to lock site from updates while upgrading

Having a live drupal website, that needs to be upgraded, or just a simple task such as adding Languages or changing a Themes, we would like to hold all content changes, till the work is done.

 

We found a nice module to set the site for Read-Only mode

http://drupal.org/project/readonlymode

 

Using the module is simple, just need to check the box, and the site moves to a Read-Only mode

 

The only thing missing in that module was that it still allows to add comments.

 

New module postiteverywhere

gmaps markers problemon interner-explorer

 

Dark Shaddows on Internet Explorer :-)

We built a drupal site with google maps, and it worked fine on our browsers. However, our customer pointed for us on a big & scarry shaddow where the markers should have seen

 

Aperently he was using ie7, and we found a javascript error in the markers. Doing some research and changes, we returned to the default settings, and suddenly it worked fine.

Talk Module

If you wonder "How to separate user generated content from editorial content", and

build your wiki-style discussion page,

we found a Drupal module - Talk that you can use for building a discussion page from the users' comments

 

 

Here is the link to module Talk

  

Liked it? Have a Question on it?

Write a comment

The Devart Team

function return filepath from file id

We had to use the filepath instead of fid more then once,

Here is a small function we wrote, returning the filepath from the fid

 


/**  * Get filepath by fid  */ 
function filepath($fid) {   
if (is_numeric($fid)) {     
  $filepath = db_fetch_object(db_query("SELECT filepath FROM files WHERE fid = '%s'", $fid));     
if (is_string($filepath->filepath))       
    return $filepath->filepath;     
  else return FALSE;   
} else return FALSE; 
}

<p>
CMS -Content Management Systems
What is a CMS website
Drupal CMS
The Benefits of a Drupal website
DevArt- drupal websites
DevArt the website you need

Latest Tweets

checking if we should replace our java-app with Scala + Lift 2 days 15 hours ago
I'm hiring a senior Java programmer 4 days 12 hours ago
got our new website on air - http://t.co/NsV6xFLI tell me if you like it or not 5 weeks 2 days ago
בואו לראות את האתר חדש שהעלינו היום- http://lnkd.in/dm6TVj 1 year 1 day ago
פורמייקה פסים אפור kitchen-stock.co.il/content/פורמייקה-פסים-אפור 1 year 7 weeks ago

Testimony

I have worked with DevArt for over a year and I highly recommend them for any drupal needs.

 

What has impressed me most about Avior, is his loyalty and integrity. He has always been there for my company and because I was a start up company even helped me out on a payment plan. He's also a very hard worker and worked many late nights before my launch

 

Andrew Gitt

Principal & CMO

Story Time For Me, Inc.