drupal-6

Custom template for specific node in Drupal 6?

可紊 提交于 2019-12-10 15:12:07
问题 I know there are a ton of different custom template files like page.tpl.php and node.tpl.php etc. But is there a way to make a custom template for a specific node ID? This doesn't work node-3.tpl.php, but is there a way to accomplish this? UPDATE CODE function phptemplate_preprocess_node(&$vars) { $vars['template_files'][] = 'node-' . $vars['nid']; } 回答1: For Drupal 6, the page template is 'page-node-3.tpl.php' and read the manual at http://drupal.org/node/1089642 Drupal 7, page--node--3.tpl

Clean URL's not working, mod_rewrite module installed

亡梦爱人 提交于 2019-12-10 09:49:21
问题 I just installed a fresh copy of Drupal 6.19 to get to speed on how to write modules. But for some reason the rewrite module isn't working for Drupal. What I have checked: $ apachectl -M >> it is installed php_info() on current server >> says rewrite is installed also I also double-checked the .htaccess file in my Drupal root folder UPDATE: checked httpd.conf for AllowOverride All I'm out options here. Looked everywhere but the Drupal settings aren't letting me to enable the settings and

Include OpenId in drupal

半世苍凉 提交于 2019-12-10 07:14:22
问题 i want to create a OpenId login system like stackoverflow :) in drupal..By default, drupal doesn't offer this..is there any plugin that does this job? EDIT:the user should ALSO be able to login with their yahoo, gmail, aol or blogger account..u guys can't understand my pro.. it's simple..i've openID enabled in my drupal 6. When i try to use my gmail or yahoo account, it doesn't login. What should i do for that? 回答1: Yes, there's a module for that. But you added a drupal-6 tag, which suggests

Why is document.body == null in Firefox but not Safari

我的梦境 提交于 2019-12-09 18:24:03
问题 I have a problem with a page where I am trying to get colorbox (a kind of lightbox for jQuery) working. It doesn't work apparently due to the document.body being null in FireFox (3.5.3). This is not the case in Safari (4.0.3) where the colorbox works. Something that jumps out at me is that (I'm using Drupal 6) drupal has appended a script tag to set some JavaScript variables at the very bottom of the page, below the closing body and html tags. Otherwise I don't see a problem. Unfortunately I

Hook into Drupal registration and validate user info against business logic

坚强是说给别人听的谎言 提交于 2019-12-09 04:45:02
问题 I want to hook into the registration module. I already have a database of 50000 users who use my old website. Now I am migrating to Drupal. I still haven't migrated the entries to drupal database. I will be checking against my old database. When a user tries to register in Drupal, I need to check whether the username he gave is already present in that list of 50000 (and growing) entries. If it exists, I need to cancel the registration showing an error msg saying username exists.. Which hook

Is it possible to change the content type on nodes in Drupal 6?

强颜欢笑 提交于 2019-12-08 20:33:42
问题 I have inherited a Drupal site on which (for some reason) there are two different content types for news: one for press releases and one for everything else. I would like to combine the two and use a taxonomy to categorize the press releases and other news types. Is it even possible to do this? The site is using a number of modules, including Views and CCK, and I don't know how much a change like this would affect module data. 回答1: http://drupal.org/project/node_convert The module linked

Passing arguments using drupal_get_form()

醉酒当歌 提交于 2019-12-08 17:43:45
问题 Here is my custom module using hook, Assume if I want to pass argument to custom1_default_form function call, how should i pass the argument? <?php function custom1_block($op,$delta=0){ if($op=='list'){ $block = array(); $block[0]['info']=t('hello world'); return $block; }else if($op=='view'){ $block_content = '<p>THIS IS MY FIRST BLOCK</p>'; $block['subject'] = 'HELLO WORLD'; $block['content'] =drupal_get_form('custom1_default_form'); return $block; } } function custom1_default_form () {

Fatal error: Call to undefined function lock_acquire()

﹥>﹥吖頭↗ 提交于 2019-12-08 14:48:24
I'm using Drupal Version 6.25. I duplicated an existing drupal page and tried to install it locally on my system. After the Step where I entered the database information I got this fatal error: Fatal error: Call to undefined function lock_acquire() it seems to be located in: modules/system/system.module on line 810 but unfortunately I couldn't figure out how to fix it. Hopefully somebody of you know how to fix it because I can't go any further and I need this duplication locally. At the top of the PHP in system.module add: include_once './includes/lock.inc'; Then run update.php and clear your

drupal image path

前提是你 提交于 2019-12-08 12:46:25
问题 i created a page content type, and put this code in it. and set the input style to php.why the image can't show. i test it on my localhost. <img src="<?php echo $bath_path; ?>/images/1.jpg"> 回答1: Drupal way: $path2file = base_path().'/images/1.jpg'; // If image located in {drupal root}/images. If image located in files directory, use file_directory_path() to get this path print theme('image', $path_to_file, t('Image altername name'), t('Image title')); 来源: https://stackoverflow.com/questions

Fatal error: Call to undefined function lock_acquire()

人盡茶涼 提交于 2019-12-08 08:23:13
问题 I'm using Drupal Version 6.25. I duplicated an existing drupal page and tried to install it locally on my system. After the Step where I entered the database information I got this fatal error: Fatal error: Call to undefined function lock_acquire() it seems to be located in: modules/system/system.module on line 810 but unfortunately I couldn't figure out how to fix it. Hopefully somebody of you know how to fix it because I can't go any further and I need this duplication locally. 回答1: At the