This forum is for assistance with theme development.

Disabling author pictures on some pages

Hi !

I've enabled the author's pictures for posts and comments on my theme to display the author's picture in the forum nodes but now, they are displayed on top of each pages and other nodes.

How can I display them on the forum nodes only and disable them on the other pages and nodes ?

Thank you.

Display forum titles on top of the lists

HI !
I'm looking for a way to display the name of the current forum on top of the topic listing, just as the forum container names are displayed on the 'front page' of the forum.

Could you tell me how to do it please ?

I think it has to deal with this part of the code in forum.module.


/**
* Format the topic listing.
*
* @ingroup themeable
*/
function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) {
global $forum_topic_list_header;

if ($topics) {

foreach ($topics as $topic) {
// folder is new if topic is new or there are new comments since last visit
if ($topic->tid != $tid) {
$rows[] = array(
array('data' => theme('forum_icon', $topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'),
array('data' => check_plain($topic->title), 'class' => 'title'),
array('data' => l(t('This topic has been moved'), "forum/$topic->tid"), 'colspan' => '3')
);
}
else {
$rows[] = array(
array('data' => theme('forum_icon', $topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'),
array('data' => l($topic->title, "node/$topic->nid"), 'class' => 'topic'),
array('data' => $topic->num_comments . ($topic->new_replies ? '
'. l(format_plural($topic->new_replies, '1 new', '%count new'), "node/$topic->nid", NULL, NULL, 'new') : ''), 'class' => 'replies'),

Display forum login in a block

Hi !
Is there a way to display the forum login in a block instead of having it on top of the forum ?

I'm also looking for a way the forum title just on top of the topics listing as the "td.container" titles on the forum front page. Do you think it's possible ?
The Drupal forum layout is a bit hard to customize... :)

Thank you.

related flexinodes by taxonomy term and with selected fields

Hi !

I need some help of a PHP coder to write a code that will display in a block the related flexinodes to the current one by taxonomy term and with the ability to choose which fields of the custom content type are displayed

On the website I've created, I've made a flexinode for discs chronicles whith many fields such as "name of the artist", "cover of the disc" etc. Each music style has its own subterm after the main term "discs"

So, when the current node belongs to the subterm "jazz" for e.g. I'd like to display in a block all the covers of the discs that belongs to this category with link to the full node.

I've found a code to display the "related nodes by term" which may be modified and I have a code to "display the last (x) flexinodes with custom layout".

The first one is...


<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && is_null(arg(2))) {
$nid = (int)arg(1);
$terms = taxonomy_node_get_terms($nid);
$output = "

    ";
    foreach($terms as $term){
    $sql = "SELECT n.title, n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid = $term->tid AND n.nid != $nid LIMIT 5";
    $result = db_query(db_rewrite_sql($sql));
    if (db_num_rows($result)) {
    $output .="
  • $term->name
    • ";
      while ($anode = db_fetch_object($result)) {
      $output .= "
    • ".l($anode->title, "node/$anode->nid")."
    • ";

Theming CCK Node problems using node-content.tpl.php

Hey there,

I have finally managed to get my own node template file working (node-artist.tpl.php) for a CCK content type called "Artists".

Now in the CCK node type, there is the title, body an attached image using the image_attach.module, this has been previously uploaded as a seperate image, and 4 extra link fields that I have added to the content type.

The $content field is of course made up of all of these items, which looks ugly so I am trying to theme this. I have tried the below to extract just the body text, but cannot seem to get it to work

Where is the forum layout created ?

hi!
I'm modifying the forum layout and I experience problems with it. I'd like to know where the tables are created. I can't find the TR TD and TH in the forum.module file. These

and
are drivin' me mad :)

I want to separate each container, to add a bottom margin between'em, I can't do it directly in the CSS, it doesn't work.

Do you know where it is ?

Thank you :)

Pages

Subscribe with RSS Subscribe to RSS - Theme development