Output forum titles on all pages
Posted by stephanR
|
Output forum titles on all pages August 12, 2013 03:59AM |
Registered: 12 years ago Posts: 4 |
Hi,
I am new to phorum and have a problem with my template / view:
I want to show the main forum titles on all (some) pages.
So I looked at the index.tpl how it is done there and I copied the LOOP FORUMS into list.tpl, but that doesn't work.
I couldn't find where the variable FORUMS is build.
Is my request possible or must I create a module?
Thank you for help,
Stephan
I am new to phorum and have a problem with my template / view:
I want to show the main forum titles on all (some) pages.
So I looked at the index.tpl how it is done there and I copied the LOOP FORUMS into list.tpl, but that doesn't work.
I couldn't find where the variable FORUMS is build.
Is my request possible or must I create a module?
Thank you for help,
Stephan
|
Re: Output forum titles on all pages August 12, 2013 02:01PM |
Admin Registered: 23 years ago Posts: 9,240 |
that's build in index.php or the dependant functions. All data is only loaded for the views where its expected to be used.
Well, there are some modules which load the data and show them. jumpmenu module for example which shows a menu with the titles of the forums.
So a module would be the way to go but you could start with an existing one.
Thomas Seifert
Edited 1 time(s). Last edit at 08/12/2013 02:16PM by Thomas Seifert.
Well, there are some modules which load the data and show them. jumpmenu module for example which shows a menu with the titles of the forums.
So a module would be the way to go but you could start with an existing one.
Thomas Seifert
Edited 1 time(s). Last edit at 08/12/2013 02:16PM by Thomas Seifert.
|
Re: Output forum titles on all pages August 14, 2013 02:57AM |
Registered: 12 years ago Posts: 4 |
|
August 15, 2013 03:28AM |
Admin Registered: 20 years ago Posts: 746 |
Hi Stephan,
perhaps this module is the right one:
Module: Pervasive Forum
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
perhaps this module is the right one:
Module: Pervasive Forum
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
|
Re: Output forum titles on all pages August 15, 2013 09:14AM |
Registered: 12 years ago Posts: 4 |
Hi Oliver,
thank you for the hint!
I installed it, enabled it and defined the settings - but it doesn't seem to work.
Maybe it is not what I am looking for?
I managed it with a quick and very dirty solution: I put some PHP-Code with SQL-Queries in the template files, where I want it to show. :-)
I know, this is not a good solution, but it works. And if I have enough time one day, I will try it again with a module.
Stephan
thank you for the hint!
I installed it, enabled it and defined the settings - but it doesn't seem to work.
Maybe it is not what I am looking for?
I managed it with a quick and very dirty solution: I put some PHP-Code with SQL-Queries in the template files, where I want it to show. :-)
I know, this is not a good solution, but it works. And if I have enough time one day, I will try it again with a module.
Stephan
|
August 15, 2013 09:22AM |
Admin Registered: 20 years ago Posts: 746 |
Hi Stephan,
Were can we see it? Can you contribute the URL to your forum?
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Quote
stephanR
I managed it with a quick and very dirty solution: I put some PHP-Code with SQL-Queries in the template files, where I want it to show. :-)
Were can we see it? Can you contribute the URL to your forum?
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
|
Re: Output forum titles on all pages August 16, 2013 02:55AM |
Registered: 12 years ago Posts: 4 |
Sorry, it is under development and just on my local machine. When it is online, I post the URL.
Here is the code snippet to show the forum titles:
Here is the code snippet to show the forum titles:
Language: PHP<?php $user_name = "###"; $password = "###"; $database = "###"; $server = "###"; $db_handle = mysql_connect($server, $user_name, $password); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $SQL = "SELECT forum_id, name FROM phorum_forums ORDER BY display_order"; $result = mysql_query($SQL); while ($db_field = mysql_fetch_assoc($result)) { echo "<tr><td><a href=\"list.php?" . $db_field[';forum_id';] . "\">" . $db_field[';name';] . "</a></td></tr>"; } mysql_close($db_handle); } else { print "Database NOT Found"; } ?>
Sorry, only registered users may post in this forum.