i've just moved from mdpro (+mdforum - phpbb2 fork) to drupal... and my users are moaning about the forums of course. I am reading lots of theming docs now, but for now i can only share one small hack...
Drupal puts previous and next topic links just in #content of node... my users pointed out that it looks ugly, and i agreed... what can i do about it? I managed to do it without modyfying core files, but maybe there is some other way?
my hack is
1) in node-forum.tpl.php add just above first div new div that looks like
<div id="forumnextprevlinks">
<?php print theme('forum_topic_navigation', $node); ?>
</div>
2) in your theme css add
#content .forum-topic-navigation
{
display:none;
}
#forumnextprevlinks .forum-topic-navigation
{
display:block;
}
With this the navigation for next/prev topic disappears from below the first post and appears on the top, just below topic name.
I know it is only fooling the browser, but i dont see other way to do it right... anyone?
Comments
boo
i cant edit my own post... strange...
I know my site looks like s#@t , but here you can preview the result of this code :
http://basoofka.net/2007/node/1166
regards...
I don't see any code in the
I don't see any code in the node-forum.tpl.php :-
--
Ixis (UK): Drupal support, Drupal hosting.
because it is not here
you must edit this file to add this code in place you want navigation links to appear, in my case it was just above first post , not in content... so you have to actually add thic quoted code to the template file.
and after you add this you will have 2 navigations - above and in content... next step is set display of the secondary (unwanted) navigation to none, as i described above
My whole node-forum.tpl.php file looks now like that:
That's a much nicer way to
That's a much nicer way to do it. Might try that on the site I'm working on tomorrow when I can actually access the stupid server (it dies after 10pm which annoys me) and let you know then how it goes :P
I don't think it matters at this time whether it's "just fooling the browser" or whatever, as long as the users see what they want to see and it works how they expect it to work. What would be nice is being able to have the option of placing it at the top and/or the bottom or leaving it where it is :)
ps- i had to use
div.content .forum-topic-navigation { display: none; }to get just the one in the forum post to disappear and leave the one on the top, in the unlikely event other people have the same weird issues I did with it :)works at bekandloz | plays at technonaturalist
thanx mate :)
just the QnD fix i was looking for, i had hoped it were possible to create somekind of fix through template.php but my knowledge of drupal isn't what it should be ;) -and well the end user cant se the difference so *cough* ...well hope its something that will be fixed in the 5.0 version -so we can get a cleaner approach to the templating
/morten.dk
/morten.dk
http://geekroyale.com | http://morten.dk
Cleaner way
I know this post is over a year old but I thought I'd add this for anyone that might come across it while searching:
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.