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 |
#62
|
||||
|
||||
Good idea. I was writing down ideas for various hacks and things last night, and thought that some form of search for the glossary would make sense. I'll see what I can do. Too many ideas! This'll take forever.
|
#63
|
||||
|
||||
Thank you, FWC and TWT!
I did forget to make the changes in the admin/index.php. Now that I've made them, I can access the glossary and add to it. I've also added the random function, but not the forum jump, yet. In the random function, I'm not getting a random term,t hough. In the newreply or newthread I can see "Random Term:" and under it a link for more terms, but there's no random term. Did I miss something again? Rose |
#64
|
||||
|
||||
If that's the case, then you probably forgot to add the code to your newthread.php and newreply.php files...it should be in the instructions. That's my guess, at least, because omitting that code, I believe, will produce exactly the the result you're talking about.
|
#65
|
||||
|
||||
Quote:
Thank you, TWT. I made the changes, but I forgot to upload the new files. I have it working now. It's a great hack, I can't wait to populate the glossary! And I'm looking forward to any search features you come up with. |
#66
|
|||
|
|||
Great hack.
Quick thing, maybe i missed this but how about one for ALL Terms. Would make a list with the headers like in the admin cp but for registered users so they could view all the terms |
#67
|
|||
|
|||
User submission?
Maybe someway to make a forum for glossary submission. here's what i figure(I know nothing about hacking but i think this would work if only i knew how to do it) Create a forum name glossary or what ever The subject is the word and where you normally type your spam would be the definitiion. You'd have to write some code that selected the forumid that took the words. Then it would be via moderation. Which can be set in the admin panel for forums. So if you accept a word it puts it in the glossary and maybe deletes the post. Just thought that'd be cool. Somethin like that would definitely be a cool add on! |
#68
|
||||
|
||||
Hey guys: I've written a simple script to add some default terms to the DB. It's for 31 in all...things like Lurker, vB Code, Message Tracking, Ignore List, etc. The attached script, when uploaded to your main forum directory, should, when run, install all 30 terms for you easily. Enjoy.
|
#69
|
||||
|
||||
In regards to those ideas: I think it'd make more sense to have a simple form on the actual glossary page somewhere for submissions. But even that's pushing it -- I don't wanna get too specialized. I do think a "View All" option might be good. What's everyone else thing? I wouldn't mind adding it.
|
#70
|
||||
|
||||
Great attachment to install the definitions! A quick idea - maybe a 'delete' term feature instead of having to edit it, clear out the field and submit, you can just delete (or edit, delete). The reason I say this is because when I installed your terms, a couple were duplicated so I had to delete them. Not many and it was nothing big, but the delete feature might be nice.
Another thing - is there a way to add this to the 'top links' such as next to the faq button, for instance? |
#71
|
||||
|
||||
Yeah, you can link to the glossary. I don't have a button made up, if that's what you mean, though. I'm not sure if I understand the other question, though: there is a delete option to delete individual terms. What are you referring to?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|