The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
I must pay homage to user/moderator wluke for this idea. I must also thank him for allowing me to run with it, and release it publicly. Thanks Wayne!
What's it do? Simple: creates a glossary of terms. They're sorted alphabetically much in the same way the Memberlist is. I find this is extremely useful for most forums, which surely have a lot of their own lingo. For my site, it's a few acronyms and goofy phrases. My members get a kick out of referring newbies to the glossary to learn about the phrases. It's really helped the whole place seem less like a clique...because others can catch up easily with a reference like this. Here's a live demo What's it take? This hack involves a MySQL command, the uploading of two files, the modification of one, and the creation of five templates. It also requires the modification of a second file, and of two templates, if you want to display a random glossary term on the New Reply/New Thread pages. It'll require a bit more still if you want to add the Glossary to your forum jump menu. First off, run the following query in MySQL. This is the table that will store the glossary data. Code:
CREATE TABLE `glossary` ( `glossaryid` int(11) NOT NULL auto_increment, `text` text NOT NULL, `description` text NOT NULL, PRIMARY KEY (`glossaryid`) ) TYPE=MyISAM; Next, you'll need to create five templates. I've attached a text file containing all five to this post. Should be pretty straightforward. Mess with the formatting as you see fit, of course. After that, you'll probably want to open (back it up!!!) your /admin/index.php file. Find the code below (around line 340): Code:
makenavselect("Templates"); // *** Code:
makenavoption("Add", "admin_glossary.php?action=add", "|"); makenavoption("Edit", "admin_glossary.php?action=edit", "|"); makenavoption("Delete", "admin_glossary.php?action=delete"); makenavselect("Glossary", "<hr><br>"); Display a random glossary term on new thread/new reply pages Open newreply.php and find the following code (around line 468...it should be right near the end of the file): Code:
getforumrules($foruminfo,$permissions); Code:
$rand_term = $DB_site->query_first("SELECT text AS term_text, description AS term_description FROM glossary ORDER BY RAND()"); extract($rand_term); $term_description = str_replace("'", "\\'", htmlspecialchars(strip_tags($term_description))); Save and upload. Next, open newthread.php and find the same bit of code (duplicated below) around line 368 or so: Code:
getforumrules($foruminfo,$permissions); Next: the templates. Find the below in both templates... Code:
$vbcode_smilies</td> Code:
$vbcode_smilies<br><center><smallfont><b>Random Term: <a href="#" onclick="alert('$term_description'); return false;">$term_text</a></b></smallfont><br> <smallfont><a href="$bburl/glossary.php" target="_blank">More Glossary Terms!</a></smallfont><br></td> Add vBGlossary to the forum jump menu Open forumdisplay.php in your main forums directory. Find this, near the top of the file (line 13 or so): Code:
case 'cp': $goto = 'usercp'; break; Code:
case 'gl': $goto = 'glossary'; break; Code:
<option value="gl" $frmjmpsel[glossary]>The Glossary</option> I hope you all enjoy this hack. It didn't take nearly as much time/effort as I thought it would...I really love it, though. Show Your Support
|
Comments |
#152
|
|||
|
|||
Sounds like a plan
|
#153
|
||||
|
||||
Yep. You can use FireFly's hack (which is in beta, mind you): Add Who's Online locations from Admin CP. Once that's installed, just enter "/glossary.php" in the one field, and something like this in the other:
Code:
Viewing <a href="glossary.php">The Glossary</a> |
#154
|
||||
|
||||
thanks!
|
#155
|
|||
|
|||
THANK YOU - THANK YOU - THANK YOU!!!
We needed this on our site for the terms used in the Home Theater field. Now...Need that interface so others can add to it (or select users can). Please. Even if just the MODS could enter them would be a big help. Oh, did I say thanks? David Bott http://www.avsforum.com (One of the largest Vb's on the web.) |
#156
|
||||
|
||||
Hmm...I think you can merely upload the admin_glossary.php file to your /mod/ directory and apply the same code changes to THAT index.php file as you did to the ones in your /admin/ directory. That ought to work...should allow Mods to add/edit/delete terms the same as Admins, then.
BTW: no need to thank me...I am genuinely honored that a forum the size and significance would find use for this. |
#157
|
|||
|
|||
>>BONK<< Never thought of that. Will just modify that mod index to something else and then be able to give it to a few people I would think in a secure directory.
|
#158
|
||||
|
||||
I do think you're right on some public submission thing, though...but I'd have to add some field for approval and as such provide a simple import script for those who've already installed vBGlossary. I assume you picture it as a link leading to a simple form, allowing the user to enter both a term and description, for which you can approve via the CP?
|
#159
|
|||
|
|||
BINGO - Right on!
More or less when they go into the Glossary their would be an option to "Add a Term". They click this and it they then are give the boxes to add the term and the description. At that point when submitted, it will tell them thank you and that it was added for consideration and will be apear once appoved. Data collected is the Term, Description, and the User who submitted it. The admin can then APPROVE OR DELETE the entry. The way I see it is two fields would be needed. One is a flag...for use (1) or not use (0). The other would be for the user name who submittied it. All the words that can be shown would have a flag field of 1 and thus already approved (the code only shows terms with a 1). The others with 0 have yet to be approved can then be looked at via the admin. Click a link in the admin panel for "Aprovels" and the admin is shown a screen with the term, description, and user who submitted it with a check box. The admin then just need to check a box for APPROVE or DELETE. (default being approve.) (User ID not really needed, but though it would be a nice touch to see who it came from.) Terms approved are set to a flag of 1 and the other are either stored or deleated. Hope this sums it up. On our site you can see how this can get large...so a search would also be nice. THANKS again! David Bott AVS Forum |
#160
|
||||
|
||||
Where is the text file for this?
|
#161
|
||||
|
||||
Ok let's just ignore Rad on that one...He just realized that it's attached to the first post...Whatta moron I am...hahaha
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|