This forum is for assistance with theme development.

Forum link question

I open my drupal forum using the following link:

http://localhost/drupal/forum

Now I see all container. One container is called "General discussions". I click on "General discussions" and the browser is redirected to :

http://localhost/drupal/?q=forum/2

Ok is good. Now I see all topic (thread), I click on first topic and my browser is redirected to :

Accessing node variables from page.tpl.php

Hi,

I'm theming a blog. I want to put the blog writer's picture at the top of the page. The node template has got a picture variable to do this, but the node template repeats for each blog entry and i don't want the writer's picture displayed more than once. So, i need to spit out the picture variable from the page.tpl.php.

Any ideas?! Thanks

where is the node.tpl.php file?

I am trying to follow the advice contained in this post (http://drupal.org/node/69545#comment-130459).

But I can't figure out where my node.tpl.php file is in my theme directory (UNIX).

Anybody know where it is (or the equivalent file for drupal 4.7.x) is?

thanks!

______________

Drupal tip #2: Sprinkling ads throughout your blog

Today's tip is simple, but potentially very useful to someone. One of the things you might notice if you visit some of the popular commercial blogs is that they sprinkle ads throughout their list of blog entries. For example, on your blog page, you might have a row of ads after the 2nd and 6th blog entries or something. Tweaking your ad placement is one sure way to increase your click-throughs. Doing this in Drupal is easy.

In your PHP Template theme, the node.tpl.php file controls the display of your nodes listing (e.g. node/ and blog/ pages). If we wanted to put an ad after the 2nd and 6th blog entries, we can put this code at the top of that file:

if ( !$page && ($id == 2 || $id == 6)) :
[replace this comment with your ad code]
endif;

The first part of the if statement (!$page) checks to make sure we're not looking at a single node page, e.g. node/view/1. The second part ($seqid = = 2 || $seqid = = 6) says to apply this code only to the 2nd and 6th entries on the page. Just change the numbers to wherever you want the ads to appear.

Vote up/down doesn't work with Garland Theme

I want to make digg.com clone using vote up/down module, it works fine for drupal4.7.4 but I want to use "garland" theme which is provided with drupal5.0, so I follow the instructions from http://drupal.org/node/92284 to make the theme available for drupal4.7.4 and everything is okay, but vote up/down arrow are invisible when I do this :/
does anyone knows how to change template.php file which comes with Vote up/down module to be compatible with "garland" theme ???

changing width of main content area and block for selected pages

Hi all,
I am trying to increase the width of main content area and decrease the width of blocks on one page.

Is that possible?

I can design the blocks for that page, which can fit in with smaller width. But I am not able to figure out a way to change the layout itself for that one page.

Appreciate any help,
z.

How can I add an edit or outline link to each title?

I can see how to tweak function theme_menu_local_tasks() to control how the primary (view, edit, outline) tabs appear when you are viewing a particular node. I'd like to push an edit and outline link into the title of each node, so that a pager page might come out looking like:

Title of Some Node (e, o)
Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text. Read More ...

Title of Some Other Node (e, o)
Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text. Read More ...

Title of Another Node (e, o)
Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text.Teaser text teaser text teaser text. Read More ...

Pages

Subscribe with RSS Subscribe to RSS - Theme development