Info
- 7 posts
- 3 voices
- Started 3 years ago by salemw
- Latest reply from nicholaszen
- This topic is resolved
navigation using forum_id
-
- Posted 3 years ago #
Hello,
I recently transfered my forum from phpbb3 to bbpress and i really enjoy it
there is only one thing I cannot reproduce with bbpress. I used to have a different style for each category or forums and an image include on top of each. I can do it with forum_id but the variable do not follow in topics
ex:
if ($forum_id == 1) echo 'blabla';
How could I keep it in topics ?Thank you
-
- Posted 3 years ago #
Sounds like you need to get the forum ID from the topic or the post. How about this:
http://bbpress.org/forums/topic/retrieving-forum-id-from-post-id#post-21521 -
- Posted 3 years ago #
yes, i did went to that topic earlier, I searched the whole forum but I just don't get how i should use it I tried : global $topic_id, $forum_id; include('../nav/'.$forum_id.'.php');
it works fine but only on forum pages. not on topics. The same with an earlier post asking for different stylesheets:
<link rel="stylesheet" href="<?php if ($forum_id == 1) bb_stylesheet_uri(); elseif ($forum_id == 2) echo '/my-templates/kakumei-blue/style.css'; ?>" type="text/css" />
It"s ok on forum but not on topics.So in my header if I do the routine:
global $topic; echo "$topic->topic_title"; I get the topic title ok but nothing with
global $bb_post; echo "$bb_post->forum_id"; -
- Posted 3 years ago #
So, for example, you might have a different header on this forum page:
http://bbpress.org/forums/forum/installationBut you'd want to use that header on any of the topics when you click through to them, too?
Like on this page you would still use the installation header image?
http://bbpress.org/forums/topic/bbpress-and-lighttpd-url-rewrite-rules -
- Posted 3 years ago #
I was able to get the forum ID on a topic page by using this (and nothing else) in header.php:
<?php echo (get_forum_id()); ?>Works on forum pages too.
-
- Posted 3 years ago #
Amazing, and so simple
Thank you chrishajer
-
- Posted 1 year ago #
Hi,
I have looked through the whole forum, searching for an answer, how I can add another theme/design/css per forum category.
And this is the closest topic I could find, but I think you guys were further in your discussions, than I could understand. So is it possible, you explain to a n00b like me, how I can do this?
Thank you!
-
You must log in to post.