Drupal is up and running but how do I ...?

Disable commenting after certain amount of time

Since checking comments is a lot of work (and I hate checking comments for old posts), I would like the ability to disable comment for nodes that are older than two weeks. The existing comments should still be readable.

So I would guess a simple hack could hide and disable the commentform when the publishtime + "comment time" is reached.

Cached Links Like Google

I am going to start caching pages like Goggle when I link to a news item. I hunted around the downloads and forums but did not see any mention of this in anyway. Can anyone point me to Module or snippet that does This. Looks like flexinode my be my best bet.

Table Manager Import?

Is there a way to import data into a Table Manager table (Drupal 4.6.x), for example from a .csv file?

help needed with a specific template.php file problem

HI there, I'm trying to add a new section to my template.php files. But the messages error I get is this:

Fatal error: Cannot redeclare _phptemplate_variables() (previously declared in /homepages/46/d117124046/htdocs/jedebogue/www/chiens/themes/chien3col/template.php:2) in /homepages/46/d117124046/htdocs/jedebogue/www/chiens/themes/chien3col/template.php on line 137

So it's true that the function is already declared, and the new function i'm trying to add is the following:

<?php
// $Id: template.php,v 1.4 2006/08/02 11:18:12 frjo Exp $

function _phptemplate_variables($hook, $vars) {
switch($hook) {
case 'node':
$vars['storylink_url'] = check_url($vars['node']->vote_storylink_url);
if (arg(1) != 'add' && arg(1) != 'edit') {
$style = variable_get('vote_up_down_widget_style_node', 0) == 1 ? '_alt' : '';
$vars['vote_up_down_widget'] = theme("vote_up_down_widget$style", $vars['node']->nid, 'node');
$vars['vote_up_down_points'] = theme("vote_up_down_points$style", $vars['node']->nid, 'node');
}
$vars['vote_storylink_via'] = theme('vote_storylink_via', $vars['node']->vote_storylink_url);
if (arg(1) == 'top') {
static $count;
$count = is_array($count) ? $count : array();
$count[$hook] = is_int($count[$hook]) ? $count[$hook] : 1;
$vars['seqid'] = $count[$hook]++;
}

Put a story in a sidebar... is it really this hard?

Okay, I've gone round and round in the handbook and the forum and actual books and I'm coming across all kinds of snippet stuff here and there and moding tpl's etc.

I just want to be able to have the main content in the content column area on the home page, and place a story (maybe others in the future) in the left sidebar. It seems that I can go into blocks and select a number of different module content to go into any number of different regions... but no way am I finding a way to just say place "this" story on the home page in the left sidebar.

new (4.7) modules have a .install file, how to use it?

I noticed in 4.7 modules there's a file with some php and sql commands that comes with a .install suffix. Oddly enough i haven't noticed anything in 4.7 that lets me easily install new modules by running that file. What am i missing?

Thanks

Pages

Subscribe with RSS Subscribe to RSS - Post installation