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

Two Zen Theme Questions

I'm a PHP and CSS novice, trying to tweak a 5.1 install using the Zen theme.

I have two questions, if anyone is inclined to help.

1. I'd like to use the service_links module, but I'm having problems understanding the installation instructions.

From the README:

   Include service links in your theme:
   -----------------------------------
   In the included template.php file there are an example how to insert
   the service links in to a PHPTemplate theme. Remember to place the
   template.php file in the folder of your theme.

Zen includes a template.php file in the theme folder already, so I can't just overwrite with the service_links version. And I've tried inserting selected text from the service_links template.php into the zen template.php, but I'm not having any luck. Any guidance as to exactly how I should move forward with installation is greatly appreciated.

2. The default "posted by..." information for the Zen theme includes the date of content creation, but not a timestamp. For example, on a blog-entry or comment, it reads: "Posted February 15th, 2007 by..."

How can I modify that to include a timestamp as well, so that it will read "Posted February 15th, 2007 at 10:14:00 AM by..."?

I've looked in node.tpl.php, and I've tried to tweak this line:

Another 403 Forbidden error

Guys, I have successfully installed Drupal on my WAMP configured computer. I am able to get to http://localhost/drupal fine locally. I cannot however from another computer access that machine. i.e. http://192.168.2.2/drupal I'm gonna be honest here. Right now I have no clue what I am doing. Anyone have some good troubleshooting ideas?

Custom login bar

Hi guys

I followed http://drupal.org/node/92657 but did not succeed. In themes/garland/page.tpl.php I did not find
div ID Navigation at line 16.

I placed the function instead at 17

No luck. Any suggestions. I use 5.0 Many thanks

Autosubscribe users to simplenews newsletter

Trevor Twining originally posted code for a module that automatically subscribed users to a specified newsletter on login - http://drupal.org/node/56368#comment-118414. I've modified Trevor's code to work with Drupal 5 and the more recent version of SimpleNews. Please correct any mistakes I may have made, as this is my first module posting! Here's the code for the info file, which of course is now required for the module to be seen by Drupal 5:

aic_mailer.info

; $Id $ 
name = Simplenews auto-subscribe
description = Automatically subscribe users logging in to the site newsletter.
package = Simplenews

and here's the module code:

aic_mailer.module
<?php
/**
* Implementation of hook_user().
*
*/
function aic_mailer_user($op, &$edit, &$account, $category = NULL) {
global $user;
switch ($op):
case "login":
aic_mailer_check_subscriptions($user);
break;
case "logout":
aic_mailer_check_subscriptions($user);
break;
endswitch;
}

function aic_mailer_check_subscriptions($user, $debug='false') {
if($user && $user->uid > 0){
/* Change this number to your newsletter ID */
$newsletter = 13;
$sql = "SELECT * FROM {simplenews_subscriptions} a, {simplenews_snid_tid} b WHERE a.uid={$user->uid} AND b.snid=a.snid AND b.tid=".$newsletter;

Menu Items Unique ID or Class

Hi all,

I am in need of some code to be able to produce unique ID's or classes menu items, this doesnt have to happen manually, the BIG problem I have is IE6's problem with the last-child pseudo class.

I cannot use css specificity to apply a style or remove a style from the last menu item, this is fine in the primary navigation as it assigns each link uniqe classes and/or ID's.

Is there some way to have this code output on every menu? I know its surplus code but its gives better control over the list items.

URL Redirect

Hi,
When a user types in http://example.com/node, my site lists all the nodes that have been created. Is there a good way to just direct them back to http://example.com?...or display a "page not found".

thanks,
mike

Pages

Subscribe with RSS Subscribe to RSS - Post installation