Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
vBGlossary Details »»
vBGlossary
Mod Version: 1.00, by TWTCommish (Coder) TWTCommish is offline
Developer Last Online: Apr 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (8 votes - 4.38 average) Installs: 34
Released: 23 Jan 2002 Last Update: Never Downloads: 6
Not Supported  

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.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Attched to the post right after this one is an archive: files.zip. This archive contains two files: glossary.php and admin_glossary.php. The first goes in your main forums directory. The second should be uploaded into your /admin/ directory.

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):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right after that, add this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There, it should work now! Now, on to the extras (well worth installing, in my opinion):

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):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right after it, add this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Yeah, that last line is a little messy -- I like saving space, though.

Save and upload. Next, open newthread.php and find the same bit of code (duplicated below) around line 368 or so:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

After that, add the same bit of code above.

Next: the templates. Find the below in both templates...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

...and in both templates, replace it with this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There, you're done!


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):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right after it, add this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Next (and last) step: open the forumjump template and add this bit of code somewhere amongst the other options...where you put it depends on where you want it in the menu.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That's it! All done. Enjoy.

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
vBGlossary Basics SS9267547 vBulletin 3.0 Full Releases 12 27 Jun 2008 01:03

Comments
  #2  
Old 23 Jan 2002, 02:05
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Real name: Chris
Thumbs up

Here's the archive. Enjoy.
Attached Files
File Type: zip files.zip (2.2 KB, 516 views)
__________________
Ask me about how to purchase vB Quiz for vBulletin 3.7 (works with 3.8, too)!

Websites: Movie Forums | Go Quiz

Last edited by TWTCommish : 24 Jan 2002 at 21:42.
Reply With Quote
  #3  
Old 23 Jan 2002, 02:08
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Real name: Chris
Another attachment: a small screenshot of what the random term display looks like. It's right under the clickable smilies. Clicking on the term (in this case, the word "Avatar") brings up a JavaScript alert message containing the description of the term. It's probably my favorite part of the hack.
Attached Images
File Type: gif example.gif (6.1 KB, 951 views)
__________________
Ask me about how to purchase vB Quiz for vBulletin 3.7 (works with 3.8, too)!

Websites: Movie Forums | Go Quiz

Last edited by TWTCommish : 23 Jan 2002 at 02:11.
Reply With Quote
  #4  
Old 23 Jan 2002, 03:28
SaintDog SaintDog is offline
 
Join Date: Nov 2001
Location: Tennessee
Real name: Jonathan
I could not get this to work, it returned an internal server error when I went to add a term to the glossary. Below is what I did in order:

- Run the query
- Created the templates
- Added the makenav and options to /admin/index.php
- Uploaded glossary.php to base forum dir, the other to admin/

I click on "Add" under glossary, type in the term and description, click submit, an internal server error pops up.

Any ideas as to what is wrong?

Would be a nice hack if I could get it to work :supwink:
Reply With Quote
  #5  
Old 23 Jan 2002, 03:59
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
I'm getting a 404 error when I try to add a term. Everything else works. I added a term manually and it's there. It shows up on the glossary page. If I try to edit it, I also get a 404 error. I'm looking at the admin_glossary.php file trying to figure out what's wrong. No luck yet. I'd really like to get this working. We have an online dictionary for our board that's HTML and a pain to maintain.
__________________
FWC
F5 Hosting
White Sox Interactive Forums
Reply With Quote
  #6  
Old 23 Jan 2002, 04:25
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Real name: Chris
Odd. What does the email with the query error tell you?

Anyway, I think the problem may have had something to do with my use of the $PHP_SELF variable in the admin_glossary.php file. I've corrected this (I think), and am attaching the updated file. Please let me know if it works.
Attached Files
File Type: php admin_glossary.php (4.1 KB, 117 views)
__________________
Ask me about how to purchase vB Quiz for vBulletin 3.7 (works with 3.8, too)!

Websites: Movie Forums | Go Quiz

Last edited by TWTCommish : 23 Jan 2002 at 12:53.
Reply With Quote
  #7  
Old 23 Jan 2002, 04:39
Lucky Lucky is offline
 
Join Date: Dec 2001
I've been screwing with this since the time of release and I had to add the following in the glossary.php:

error_reporting(7);

after:

<?php

Good, so no errors now, or so I thought.

In both newreply.php and newthread.php you have to find:

getforumrules($foruminfo,$permissions);

Right after it, add this:

$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)));

Now when ever I add the above it get warning errors.

I can see the admin cp for adding a term, but when I click add term I get cgi errors

Any ideas how to squash these bugs?
Reply With Quote
  #8  
Old 23 Jan 2002, 04:42
Lucky Lucky is offline
 
Join Date: Dec 2001
I have tried the new amin_glossary.php and I still get the errors.

Any more ideas?
Reply With Quote
  #9  
Old 23 Jan 2002, 04:55
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Originally posted by TWTCommish
I've corrected this (I think), and am attaching the updated file. Please let me know if it works.
I still get a 404 Page Not Found error if I try to add or edit an entry.
__________________
FWC
F5 Hosting
White Sox Interactive Forums
Reply With Quote
  #10  
Old 23 Jan 2002, 05:40
SaintDog SaintDog is offline
 
Join Date: Nov 2001
Location: Tennessee
Real name: Jonathan
Nothing here either, still receiving errors when trying to add.
Reply With Quote
  #11  
Old 23 Jan 2002, 06:10
Lucky Lucky is offline
 
Join Date: Dec 2001
Did any of you notice that the newreply.php and newthread.php get an error when you try to add what is said to be added to both?

Just wondering?

BTW:
I too am unable to add in admin cp.
Reply With Quote
  #12  
Old 23 Jan 2002, 06:28
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Originally posted by Lucky
Did any of you notice that the newreply.php and newthread.php get an error when you try to add what is said to be added to both?

Just wondering?

BTW:
I too am unable to add in admin cp.
I never went that far. I just ran the query, uploaded the files and modified admin/index.php. I wanted to test it out first. But, it doesn't work. I feel like a moron. I've been messing with it all night and I can't figure out what's wrong with the admin file. I can add entries manually using the exact same query that's in the admin file. I'm missing something totally obvious.
__________________
FWC
F5 Hosting
White Sox Interactive Forums
Reply With Quote
  #13  
Old 23 Jan 2002, 07:10
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
I am also getting 404 with both admin. Never went past that.
Reply With Quote
  #14  
Old 23 Jan 2002, 07:16
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
found problem

in doformheader you put glossary. It should be admin_glossary.
Reply With Quote
  #15  
Old 23 Jan 2002, 07:21
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
Thumbs up great hack

thanks.
You should replace every instance of doformheader with admin_glossary, since this is what you are posting, not glossary. Now up to the second part.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 02:48.

Layout Options | Width: Wide Color: