This forum is for assistance with theme development.

This code,in mysql5.x is normal,trades on mysql4.x,appears wrong,is what reason?

This code,in mysql5.x is normal,trades on mysql4.x,appears wrong,is what reason?

Block only show for teaser,How to do writes the php code?

I knew this code May let block only show for specific content type

if ((arg(0) == 'node') && is_numeric(arg(1))) {
};

but this code show for the full content page,

Block only show for teaser,How to do writes the php code?

thanks

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")."
    • ";

Pages

Subscribe with RSS Subscribe to RSS - Theme development