![]() |
Any way to display or print list of forum id's
Is there any simple way to display or print list of forum id's? The reason I ask is that some mods require forum id's or other pertinent data which would be easy to input if one had a printout or a text file for reference.
Maybe I'm dumber than a store-full of Stanley hammers but the only way I can get forum id's from within the Admincp is to manually open each forum or sub-forum. Any suggestions greatly appreciated. |
On your forumhome, if you hover over one of the link's, it should say something like this :
http://www.yoursite.com/forumdisplay.php?f=9 9 is the id That's the quick way of being able to see your categories ID |
Quote:
It's not that I can't see them or can't find them easily enough by clicking through the AdminCP Forum Manager, but rather that I would like a way to print out a list of forum and sub-forum id's. Some sites may have a large number of forums and sub-forums and having a way to print-out a list of id's would perhaps make life a little easier for them. |
You could make a mysql query something like :
$result = mysql_query("SELECT forumid, title FROM forums order by forumid desc"); while($row = mysql_fetch_array($result)) { echo "ForumID=".$row['forumid'] . " " . $row['title']; echo "<br />"; }; It would come up like ForumID=1 My First Forum ForumID=2 My Second Forum ForumID=3 My Third Forum This way also, your mods could load the page up and see it themselves, and if anything changes, the script changes obviously. |
Quote:
|
in your include/config.php file, find the following
Code:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ****** |
Quote:
Changed config - which worked like a charm - but when I ran query I got this error: An error occurred while attempting to execute your query. The following information was returned. error number: 1064 error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$result = mysql_query("SELECT forumid, title FROM forums order by forumid desc")' at line 1 The mysql version running the site is 4.1.22 and core tables haven't been changed. Site is running vbulletin 3.7.4. |
because that code isnt an sql query... i believe its a php script that needs to be run from vbulletin?!?!
you would need to add some includes i think, like global.php but im not sure about this, so i'll wait until someone who knows steps in :) |
Just open a text editor, and put in (small change in query from above since the name of the table is 'forum', not 'forums'):
Code:
<?php |
Quote:
$result = mysql_query("SELECT forumid, title FROM forums order by forumid desc"); while($row = mysql_fetch_array($result)) { echo "ForumID=".$row['forumid'] . " " . $row['title']; echo "<br />"; }; _______ The error reported by vbulletin - in previous post - when running the "Execute SQL Query" from AdminCP is for the first line: $result = mysql_query("SELECT forumid, title FROM forums order by forumid desc"); |
All times are GMT. The time now is 08:43 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|