Hey,

I'm trying to get the description of each container to be above the forum list when the user navigates into the container. Any ideas?

Thanks!

Comments

michelle’s picture

Title: Container description above list » Show container description on container specific forum list pages
Assigned: Unassigned » michelle
Category: feature » task

I've made $container_description to the forum list template but haven't worked it into any of the included styles or added it to the documentation. Leaving this active as there is still more work to do. Will be after the alpha, though.

Michelle

ktonini’s picture

awesome, thanks!

michelle’s picture

Status: Active » Postponed

Postponing to 2.x.

Michelle

michelle’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Assigned: michelle » Unassigned
Category: task » feature
Status: Postponed » Active
michelle’s picture

Status: Active » Fixed

Got this in, finally.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fabrizioprocopio’s picture

I too need that feature.
I did not understand well:
Can I find it in the 2 dev ?

Treesong’s picture

2.x is still under development though, so the fact that it's going to be in 2.x doesn't help me. Is 2.x stable enough yet to use on a production site? If not, can you give us a snippet of code to inject into 1.x to do this?

michelle’s picture

That was 1.5 years ago so I don't remember much about it... Reading the issue, it looks like you'd need <?php print $container_description; ?>

I wouldn't recommend using 2.x, yet, if you don't know even basic PHP. It works pretty well but it's still alpha.

Michelle

Treesong’s picture

I was able to fix this in 1.x with the following simple hack. It involves editing advanced_forum.module though so do it at your own risk.

STEP 1:

Find the function advanced_forum_preprocess_forums() in advanced_forum.module by searching for "advanced_forum_preprocess_forums".

STEP 2:

Within this function, just a few lines below the function declaration, you should see a line like this:

    $variables['forum_description'] = '';

Delete this line and replace it with the following three lines (which are located a few lines below the code mentioned above):

    // Grab the forum description and make it available to the template file
    $forum = taxonomy_get_term($variables['tid']);
    $variables['forum_description'] = $forum->description;

Save your changes and upload to server. Voila!

fabrizioprocopio’s picture

I'm not a coder
I don't know php
can have some instructions about that do not need knoledge?

thanks

bloke_zero’s picture

Or you can do the same thing in your own theme without making fairies die

Add to your template.php file

function YOUR_THEME_NAME_preprocess_forums(&$vars){
  $forum = taxonomy_get_term($vars['tid']);
  $vars['forum_description'] = $forum->description;
}
fabrizioprocopio’s picture

can I add it at the end of the file or I have to put in some particular point of template.php?