The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
in your include/config.php file, find the following
Code:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ****** // The users specified here will be allowed to run queries from the control panel. // See the above entries for more information on the format. // Please note that the ability to run queries is quite powerful. You may wish // to remove all user IDs from this list for security reasons. $config['SpecialUsers']['canrunqueries'] = ''; |
#7
|
|||
|
|||
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. |
#8
|
||||
|
||||
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 |
#9
|
||||
|
||||
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 require_once('./global.php'); $result = mysql_query("SELECT forumid, title FROM forum order by forumid desc"); while ($row = mysql_fetch_array($result)) { echo "ForumID=".$row['forumid'] . " " . $row['title']; echo "<br />"; }; ?> |
#10
|
|||
|
|||
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"); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|