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 |
#52
|
|||
|
|||
Quote:
It is a great hack. Thanks TWT! |
#53
|
||||
|
||||
Um, I might possibly be a dope, but I installed the hack (with the latest updated admin_glossary.php) fully, but not the extras (yet). However, I don't see the glossary, or know where to populate it. :s
Can someone help me out? I'm not getting any errors or anything, I'm just, uh, momentarily blind. |
#54
|
||||
|
||||
The glossary.php file is in your root forums directory. You need to access that file with your browser. You need to add the change to admin/index.php so you can access admin_glossary.php. Then you can populate it from there.
|
#55
|
||||
|
||||
Thanks FWC -- he's right, Rose. Once you've made the code change in the /admin/index.php file, you'll be able to add/edit/delete glossary terms from your CP...it's all the way on the bottom of the menu, beneath the links to manage your templates.
I HIGHLY recommend adding the random term add-on...I had the Glossary up, and even stuck it in the forumjump template...but no one took much interest. It was too "hidden." Now that it's referenced on the page everytime someone posts a reply or new thread, though, people have paid attention to it, and seem to be enjoying it. KevinG: I'll see what I can do. If I get enough together, I'll probably update the archive file with a simple script to let people add a bunch of miscellaneous ones automatically. |
#56
|
||||
|
||||
Quote:
IMO > category chat language moderator > category vbulletin terms vbcode > category vbulletin terms Hotsync > category Palm (specific for my site) The glossary itself would then be displayed like this: term ---------------------- explanation --------------- category imo ----------------------- in my opinion -------------- chat language moderator -------------- board supervisor --------- vbulletin term Hotsync ----------------- synchronization ----------- PalmOS You could extend this feature to let users filter on glossary terms only in a specific category. Hope you like the idea, if not: implement it anyway By the way: did I say I already I like the concept and the implementation of this hack VERY VERY much! A big thank you of a happy user of vbGlossary! :up: - djr |
#57
|
||||
|
||||
I like that suggestion. Good one. Thanks! I'll take a look and see if I could do it easily. Unless it's a major pain, I don't see what would stop me, though...'cept that it might be overkill.
Any other suggestions from anyone here? I'm trying to come up with other ways to make it visible to people using the forums...more places in which it's appropriate and useful. |
#58
|
||||
|
||||
The ultimate in visibility would be ofcourse to parse each post for terms in the glossary list and display the matched terms with a small [?]-link to the matched glossary term, like this:
How do I upload my own avatar [?] or djr is moderator [?] of this forum, please pay respect to him LOL [?] - djr |
#59
|
||||
|
||||
Yes, that would be pretty dang cool...but I'd want to avoid a query for each post if I could help it. That'd be a bit of a burden. I suppose I could store the data in a template...but even then we'd be talking about a loop, basically, for every single post. I'll mess around with it and see how it goes...if it slows it down big time, though, obviously I won't bother much. Another good idea nonetheless, though.
|
#60
|
||||
|
||||
That was one of my biggest concerns too (although I didn't post that). Well, maybe you could look into it and post the findings here. It was just a first thought actually. I think it's indeed a too big strain on the server, but you'll never know :-)
I keep thinking of other ways to make it more visible. I like it very much and it's a great support tool! - djr |
#61
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|