PDA

View Full Version : vBGlossary


TWTCommish
01-22-2002, 10:00 PM
I must pay homage to user/moderator wluke (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=255) 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 (http://www.movieforums.net/glossary.php)


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.

CREATE TABLE `glossary` (
`glossaryid` int(11) NOT NULL auto_increment,
`text` text NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`glossaryid`)
) TYPE=MyISAM;

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

makenavselect("Templates");
// ***
Right after that, add this:

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

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:

getforumrules($foruminfo,$permissions);
After that, add the same bit of code above.

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

$vbcode_smilies</td>
...and in both templates, replace it with this:



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

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

case 'cp': $goto = 'usercp'; break;
Right after it, add this:

case 'gl': $goto = 'glossary'; break;
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.

<option value="gl" $frmjmpsel[glossary]>The Glossary</option>
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. :)

TWTCommish
01-23-2002, 01:05 AM
Here's the archive. Enjoy. :)

TWTCommish
01-23-2002, 01:08 AM
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.

SaintDog
01-23-2002, 02:28 AM
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:

FWC
01-23-2002, 02:59 AM
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. :)

TWTCommish
01-23-2002, 03:25 AM
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. :)

Lucky
01-23-2002, 03:39 AM
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?

Lucky
01-23-2002, 03:42 AM
I have tried the new amin_glossary.php and I still get the errors.

Any more ideas?

FWC
01-23-2002, 03:55 AM
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. :(

SaintDog
01-23-2002, 04:40 AM
Nothing here either, still receiving errors when trying to add.

Lucky
01-23-2002, 05:10 AM
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.

FWC
01-23-2002, 05:28 AM
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. :(

Lionel
01-23-2002, 06:10 AM
I am also getting 404 with both admin. Never went past that.

Lionel
01-23-2002, 06:16 AM
in doformheader you put glossary. It should be admin_glossary.

Lionel
01-23-2002, 06:21 AM
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.

FWC
01-23-2002, 06:36 AM
Originally posted by Lionel
in doformheader you put glossary. It should be admin_glossary. You rule, Lionel! That did the trick. I'm still used to simple forms. Now I understand the vB admin ones a whole lot better. :)

Lionel
01-23-2002, 06:36 AM
but you should fix your instructions in newthread and newreply templates. You should not replace the smilies code, but add next to it or you disappear smilies.... Great!
now up to last part

Lucky
01-23-2002, 06:43 AM
Originally posted by Lionel
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.

Ok.

I have replaced every instance of doformheader with admin_glossary instead of glossary and I am still getting the following:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Any ideas?

BTW:
Which admin_glossary were you using?
The one from the 1st post or the update?

Lionel
01-23-2002, 06:43 AM
Installed on 2.21. Works great. Now we have to poulate it. Who is going to be nice and give us some texts startup boost? :supwink:

Lionel
01-23-2002, 06:44 AM
I used the second one. After problems, I downloaded it and never replaced it.

Lucky
01-23-2002, 06:49 AM
Thanks Lionel,

I used the 2nd one and all is good now.

Great hack!

This will really come in handy!

On another note I would hope that this will be incorporated in 2.2.2

Lionel
01-23-2002, 06:55 AM
you are welcome Lucky.

Now I placed this on top of glossary.php

error_reporting(7);
require("./global.php");
if ($bbuserinfo[userid]==0)
show_nopermission();

and since I want to place a link out for glossary, it is protected. Only members can see it.

I love that vbulletin. I am beginning to understand it more and more.

For example, I placed that code above (with the proper path) in many other php and they are all protected. :)

Lucky
01-23-2002, 08:45 AM
Originally posted by Lionel
Installed on 2.21. Works great. Now we have to poulate it. Who is going to be nice and give us some texts startup boost? :supwink:

Would be nice.:)

Lesane
01-23-2002, 10:24 AM
Great hack, gonna install this one later. Thanks.

TWTCommish
01-23-2002, 12:07 PM
Whew, I'm back! Sorry guys, I'm on EST, so I just woke up. :) I've re-uploaded admin_glossary.php to post #6 of this thread (https://vborg.vbsupport.ru/showthread.php?postid=215153#post215153) and fixed the doformheader() values. My bad! :) Wasn't paying attention. I've also fixed the problems with the first post...re-uploaded files.zip and fixed the instructions. My apologies for the problems, guys.

I am flattered, though, that so many people are interested in this.

Now when ever I add the above it get warning errors.
I don't know that anyone else is having problems with that code. Are you running PHP on a Windows box, or are you running an older version of PHP, by any chance? Don't forget everyone: upload admin_glossary.php to your /admin/ directory, too.

but you should fix your instructions in newthread and newreply templates. You should not replace the smilies code, but add next to it or you disappear smilies.... Great!
I've fixed this in the original post. How could I have missed that? D'oh!

On another note I would hope that this will be incorporated in 2.2.2
That'd be beyond cool. :)

Who is going to be nice and give us some texts startup boost?
Here's a few all-purpose ones that should apply to most boards:


Avatar - The small image that some posters have underneath their username on each of their posts. This is available to all members with at least a certain number of posts.
bbCode - See "vBCode."
BTW - An acronym for "by the way."
BRB - An acronym for "be right back."
IMO - An ancronym for "in my opinion."
IMHO - An acronym for "in my humble opinion."
IRL - An acronym for "in real life."
Lurker - Someone, registered or not, who visits fairly regularly, but does not post.
LOL - An acronym for "laugh out loud."
Mod - See "Moderator."
Moderator - A forum member who has certain administrative powers, such as the power to open/close threads, move them to other forums, delete threads, edit posts, and other similar things.
PM - Short for "Private Message," a popular feature that allows forum members to send, well, private messages to each other.
ROFL - An acronym for "rolling on the floor, laughing."
Semi-Lurker - Someone who posts, yet chooses to remain "invisible" to other members viewing their Buddy Lists, or the "Who's Online?" page.
Smilie - A small image representing some emotion in the form of a little face.
Thread - Has the same basic meaning as "topic." A thread is a string of (hopefully) related posts placed in a forum. Any registered member can create new threads.
vBCode - A term describing the HTML-esque codes that people can use while posting on the forums to format text, quote others, create links, and do other such things.There ya go -- that'll get ya started. :)

Lionel
01-23-2002, 12:10 PM
Originally posted by TWTCommish

Here's a few all-purpose ones that should apply to most boards:

There ya go -- that'll get ya started. :) [/B]

thanks

Lionel
01-23-2002, 12:51 PM
I added it to my index.php and it shows for the registered users ;)

TWTCommish
01-23-2002, 01:02 PM
Originally posted by Lionel
I added it to my index.php and it shows for the registered users ;)
Yeah, I saw that...registered and it looks great on your site. Thanks for installing it. :) I just decided to have it "officially" on the reply/thread pages, though, since it makes sense to have it there while someone's posting, and the forum home page is so crowded already. D

xware
01-23-2002, 02:55 PM
thanks.
but where is the five templates?I can't see it. ;)

TWTCommish
01-23-2002, 03:02 PM
D'oh. Sorry. Ok, now the templates.txt file is attached to the original post, and the updated files.zip to the second. Sorry about that. I'm a bonehead today. :)

xware
01-23-2002, 03:31 PM
works well.
thank you! :pleased:

SaintDog
01-23-2002, 07:45 PM
Thank you for a great hack, I was just wondering if it would be possible for one addition to be added to the hack though?

You know when you go to edit/delete the terms, they are all grouped together? How about making it to where they are sorted under headers? (see below if you are not sure what I mean):

---------------------------------------------------------------------
A
---------------------------------------------------------------------
Animal
AOL
ect..

---------------------------------------------------------------------
B
---------------------------------------------------------------------
Bald
Bird
ect..

and so on.....

This would make it look a little nicer, imo. (note: this would be for admin_glossary.php).

Do you think you could do this or add it to the hack?

I think it would be a nice addition to the hack.

Again, thanks for a great hack!

TWTCommish
01-23-2002, 07:52 PM
Yeah, give me a little bit of time. Doing some other work now. I can do that, though. Won't be long, I don't think. :)

TWTCommish
01-23-2002, 08:56 PM
Here we go. Attached is the new admin_glossary.php file. It create the aforementioned headers for each letter/number/whatever, and even features a handy drop-down menu to quickly jump to various areas, as I'm sure some glossaries will get quite large!

I'll also be updating files.zip with this new file. Enjoy. :)

TWTCommish
01-23-2002, 08:56 PM
Here's a screenshot to show you what the new format looks like.

Lionel
01-23-2002, 09:12 PM
excellent. Admin has a good glance.

afterlab
01-23-2002, 09:39 PM
For some reason, i'm getting this in newreply.php:

Warning: extract() expects first argument to be an array in /home/sites/site1/web/newreply.php on line 479

TWTCommish
01-23-2002, 09:41 PM
My bad: I forgot to mention...if you want a random term to show up, you've got to add a term to the DB. Otherwise it can't find anything. :)

afterlab
01-23-2002, 09:45 PM
Yeah.. I figured that out.. :o

SaintDog
01-23-2002, 10:00 PM
Thanks for the speedy fix, imo, it looks nicer now and saves me some time. You even managed to save me some time by adding that drop down box to it with only the letters being used at the time.

Once again, thanks, great hack!

TWTCommish
01-23-2002, 10:02 PM
Yeah, that was the idea. I figured some terms might have symbols or numbers in front, anyway, and I wasn't gonna loop through a bunch of junk that wasn't likely to be used. Glad you like it. :)

Lucky
01-24-2002, 01:12 AM
I would have to nominate this hack for hack of the month.

Thanks you very much, especially for the new addon.

Works perfect in 2.2.1 :)

TWTCommish
01-24-2002, 01:26 AM
Wow -- quite an honor! I'm so glad you like it. If anyone else has any other suggestions to improve it, let me know. I'd be more than glad to consider them.

Lucky
01-24-2002, 06:53 AM
An an honor it is to have this hack!

My users love it!

Lionel
01-24-2002, 06:58 AM
Not just to mention that the glossary as it is was a must! and all those little extras...popup, random etc... :D

KevinG
01-24-2002, 07:20 PM
Originally posted by TWTCommish
Here we go. Attached is the new admin_glossary.php file. It create the aforementioned headers for each letter/number/whatever, and even features a handy drop-down menu to quickly jump to various areas, as I'm sure some glossaries will get quite large!

I'll also be updating files.zip with this new file. Enjoy. :)

Careful with this new admin_glossary.php
Under the edit section, the pulldown to go to letters has an incorrect link. It has delete as it's action, not edit. Change the two places in the edit section to 'edit'.

Original within the edit section (starts at line 66):

$menu_text = '<option value="admin_glossary.php?action=delete&s='.$session[sessionhash].'">-----</option>';

for ($i = 0; $i < count($menu_array); $i++) {
$menu_text .= '<option value="admin_glossary.php?action=delete&s='.$session[sessionhash].'#'.$menu_array[$i].'">'.$menu_array[$i].'</option>';
}

Lionel
01-24-2002, 07:30 PM
Originally posted by KevinG


Careful with this new admin_glossary.php
Under the edit section, the pulldown to go to letters has an incorrect link. It has delete as it's action, not edit. Change the two places in the edit section to 'edit'.
[/PHP]

hey you are right!

TWTCommish
01-24-2002, 08:41 PM
More TWT screwups. :D I've attached the fixed version, and am re-uploading the files.zip file. Sorry again.

FWC
01-24-2002, 09:04 PM
Originally posted by TWTCommish
More TWT screwups. :D Yeah, but it's such a cool hack we don't mind. :D

TWTCommish
01-25-2002, 02:10 PM
Originally posted by FWC
Yeah, but it's such a cool hack we don't mind. :D
Gracias. Thanks so much -- I'm so glad that people seem to actually like it. :pleased: If you guys have any suggestions, please let me know...I'd love to improve this hack further.

KevinG
01-25-2002, 03:42 PM
Originally posted by TWTCommish

Gracias. Thanks so much -- I'm so glad that people seem to actually like it. :pleased: If you guys have any suggestions, please let me know...I'd love to improve this hack further.
;) Post more terms to add to the glossary ;)

It is a great hack. Thanks TWT!

Rose
01-25-2002, 04:54 PM
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. :D

FWC
01-25-2002, 05:00 PM
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.

TWTCommish
01-25-2002, 06:05 PM
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.

djr
01-25-2002, 10:10 PM
Originally posted by TWTCommish

If you guys have any suggestions, please let me know...I'd love to improve this hack further.

I have one for you, and I hope it's not giving you nightmares already :rolleyes: I'd love to have category support, whereas I could put words into a certain category. Like:
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 :D

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

TWTCommish
01-25-2002, 10:16 PM
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.

djr
01-25-2002, 10:36 PM
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 [? (http://www.movieforums.net/glossary.php?s=&ltr=A)]

or

djr is moderator [? (http://www.movieforums.net/glossary.php?s=&ltr=M)] of this forum, please pay respect to him LOL [? (http://www.movieforums.net/glossary.php?s=&ltr=L)]

- djr

TWTCommish
01-25-2002, 10:56 PM
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.

djr
01-25-2002, 11:02 PM
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

Lionel
01-26-2002, 02:23 AM
Originally posted by TWTCommish
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. [/B]

Most like likely, we will be making the glossary specific to our site (like djr with palm). Why not make them searchable? Say someone looks for palm. the first word that comes up will be a glossary term. That will attract attention and people will want to see what the glossary is all about. :greedy:

TWTCommish
01-26-2002, 02:20 PM
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. :D

Rose
01-26-2002, 03:44 PM
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

TWTCommish
01-26-2002, 04:39 PM
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.

Rose
01-26-2002, 05:12 PM
Originally posted by TWTCommish
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.



:) Thank you, TWT. I made the changes, but I forgot to upload the new files. http://www.simpsonsboard.com/images/smilies/doh.gif

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. :D

Snake~eyes
01-30-2002, 08:02 PM
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

Snake~eyes
01-30-2002, 08:52 PM
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!

TWTCommish
01-31-2002, 02:38 PM
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. :)

TWTCommish
01-31-2002, 02:40 PM
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.

Rose
01-31-2002, 03:19 PM
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?

TWTCommish
01-31-2002, 03:25 PM
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?

KevinG
01-31-2002, 04:51 PM
Thanks TWT for the terms! :up:

Anyone need a button?

Snake~eyes
01-31-2002, 06:52 PM
Okay

well a Show all would be good and i could reall yuse a submit feature. LoL.. just somthing like that would be cool.

Anything!

thx

TWTCommish
02-04-2002, 02:51 PM
Thanks Kevin -- awesome button. :up: I think I'll modify this shortly to allow people to view all terms, and maybe even a quick search or something. Anyone think a search would be useful? How do you think the submission thing should be handled, everyone?

SaintDog
02-04-2002, 03:02 PM
Well, I like the idea of members being able to search, if it turns our you have a huge database of terms, this would be ideal. I think allowing those to view all terms would be a nice idea, but if you are going to implement the search feature, there is not much of a reason to implement a "View All", imo.

In regards to allowing "Term Submissions" I think that would be great, but they would have to be moderated in a way, you would not want loads of trash filling up your glossary for you to later have to delete.

Maybe have a form where only members can fill it out, once they fill it out, it is directly sent to the webmaster/administrator with the term and it's difinition. Once the admin/webmaster reviews it, he/she can then add it to the database (this would take away the time it takes to moderate them, instead, it directly goes to the admin/webmaster).

Just my thoughts. :) - Still a nice hack

SaintDog
02-04-2002, 04:00 PM
I was looking at kevins button that he attached and thought I would post one with the border on it for those that wanted it.

Nupraptor
02-05-2002, 02:10 AM
http://www.movieforums.net/glossary.php?ltr=D

LOL!

Looks interesting. I might install it. I know it's hard enough trying to keep up with the slang of Star Wars geeks - much less SW geeks who roleplay. ;)

Lucky
02-05-2002, 02:52 AM
Got vbp3.0pr7 and vb2.2.2 and all is working great!

Thanks. :p

xug
02-05-2002, 03:10 AM
Cool Hack!

I would love to have a 'list all' option, any suggestions how to do this, or 'TWTCommish' could you add that to the script?

Many thanks in advance.

Lucky
02-05-2002, 10:08 PM
good idea.

TWTCommish
02-06-2002, 12:09 AM
Ok, I added the functionality for this. I've attached the new glossary.php file to this post...just upload it over the old one...but make the template changes first, naturally. :)

Find this in your glossary template:

<td width="100%"><normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &nbsp;> &nbsp;Glossary</b></normalfont></td>
Right after it, add this:

<td width="50%" align="right">$view_all</td>

Next, create a template called glossary_viewall. Enter this into it:

<normalfont><a href="$bburl/glossary.php?s=$session[sessionhash]&view=all">View All</a></normalfont>
Next, create a template called glossary_viewall_selected. Enter this into it:

<normalfont color="white"><b>View All</b></normalfont>
Okay! I think that's it. Here it is in action:
http://www.movieforums.net/glossary.php

Let me know if I've missed anything (more than likely!). :)

Snake~eyes
02-06-2002, 12:22 AM
Great! I am going to install this next when I have time.

Great job!

nextup user submission :D

TWTCommish
02-06-2002, 12:24 AM
I've already started thinking about that. It'll be pretty easy. :) Just a matter of getting around to it.

Snake~eyes
02-06-2002, 12:50 AM
Very cool!
I wish there was some way to repay you! :)

TWTCommish
02-06-2002, 12:52 AM
Hey, if you say you like it, use it, and click on the "Install" button, you've done more than I could possibly ask. People liking it and using it is PLENTY of reward, I assure you. :)

haas
02-06-2002, 06:14 AM
Great!! The last modification is just what i was looking for!

Thanks TWTCommish

LuBi
02-07-2002, 11:22 AM
Would it be possible for you to design something or another template so when users first go to the glossary it doesn't display "Sorry, there are no matching glossary terms available." Maybe we could like have the template so we can enter our own first message. Or like when they haven't or don;t click a letter..

TWTCommish
02-07-2002, 12:39 PM
Yeah, I could modify it to do that. Any one else second that emotion? :)

KevinG
02-07-2002, 12:42 PM
Originally posted by TWTCommish
Yeah, I could modify it to do that. Any one else second that emotion? :)

I second that emotion :stupid:

SaintDog
02-07-2002, 05:57 PM
Go for it, it would be cool

Lucky
02-07-2002, 07:47 PM
Would be great.

LuBi
02-08-2002, 05:38 AM
First off this seems to be slowing down nethread.php quite a bit. I have an error which maybe be the reason for the slow down:

Line: 316
Char: 75
Error: Undetermind string constant
Code: 0

Now besides that error When you click the term it like refreshes the page, takesm e to the top of it or something but nothing happens.

My line 316 looks like:

</table><br><center><font face="verdana,arial,helvetica" size="1" ><b>Random Term: <a href="#" onclick="alert('Basic Performance Upgrades (with or without multiple + indicators)

When I look at it in my view source it seems to be splitting after the word Upgrades. I guess there is a space somewhere in the code I put in a template or *.php file?

Thanks!

TWTCommish
02-08-2002, 11:53 AM
Yeah, I think you'd have to show me what specific code you're using and such. I was pretty sure I'd taken all parsing problems like that out of the equation. You're getting a JS error. As for newthread.php -- it's only adding one query, so it shouldn't be slowing it down much.

SaintDog
02-08-2002, 03:06 PM
Seems to be working fine for me, I just installed 2.2.2 last night and installed this hack right after and it is working perfectly, I did not get any of the above errors. Maybe you accidentaly added some extra coding without noticing it and that is the cause for this problem.

Though, it is working great on my vB 2.2.2.

Thanks for a great hack TWT!

LuBi
02-08-2002, 07:35 PM
I probably have to go over the code again, It's just after I installed it my friend looked at it and he's a really good coder and he couldn't figure it out.. so I figured lemme throw it up on here.. I'll try it again..

TWTCommish
02-08-2002, 07:56 PM
Well, a coder, even a good one, may not understand vBulletin code (and while my code is not vBulletin code, it uses the same customs and functions for the most part)...to really understand what's going on they'd probably have to look at some of the inner-workings of it first. I assure you it works fine and makes sense, though. :)

LuBi
02-08-2002, 08:08 PM
Code he knows, he wrote one of the biggest & best scripts one here.. it's the java he doesn't really do.. :D

TWTCommish
02-08-2002, 08:12 PM
I'm confused...I'm not saying he doesn't "know code," but knowing code doesn't mean you know someone else's functions very well. Also, there's no Java in vBulletin, or in my hack. Theres a tiny bit of JavaScript, though (it's actually very, very different from Java, despite the name)...but there's hardly any of it at all. Are you saying that he doesn't know anything about JavaScript?

BTW: which script did he write? I'm sort of curious. :)

SaintDog
02-09-2002, 08:56 PM
I will take a guess.....TubeDogg?

I am just judging from your avatar, I have seen it somewhere other than here I believe, it may have been at PixelJuction. :)

fsfl2k
02-10-2002, 04:16 AM
It's working on my site fine.
I had it installed before upgrading to 2.2.2 and it was working just fine.
Upgraded to 2.2.2 and still no problems. :D

You can see it working here (http://dentonmenus.com)

And for the "sorry no matches" message ... I just added ?&ltr=A after the php and it loads at the letter "A" so something shows when first going to the glossary.

Anthony

X-Fan
02-10-2002, 01:40 PM
What a fantastic hack, TWT! I run a site dedicated to Marvel Comics' X-Men, and with 30 years of history to them there's a lot of terms and acronyms that often need explaining. Now, with this glossary hack, that'll be a breeze! Thanks!

One thing, though, and that is I get an SQL error whenever I try and edit a glossary entry.

Database error in vBulletin Control Panel 2.2.2:

Invalid SQL: UPDATE glossary SET text = 'Adamantium', description = 'An artificially created alloy of iron that is the most impervious substance known on Earth, with the exception of the unknown Adamantium-Vibranium alloy of which Captain America's shield is composed.' WHERE glossaryid = '1'
mysql error: You have an error in your SQL syntax near 's shield is composed.' WHERE glossaryid = '1'' at line 1

mysql error number: 1064


Add and delete work fine, so I've just been deleting an entry I need to edit and re-adding it.

TWTCommish
02-10-2002, 03:37 PM
Sorry about that, I forgot to use addslashes() there, I think. I've attached an updated admin_glossary.php file. :)

nafae
02-10-2002, 08:23 PM
this hack is amazing and I love you.

TWTCommish
02-10-2002, 08:49 PM
I love you too, man.

X-Fan
02-11-2002, 01:25 AM
Originally posted by TWTCommish
Sorry about that, I forgot to use addslashes() there, I think. I've attached an updated admin_glossary.php file. :)

Beautiful! Thanks for the excellent support, TWT!

I'm curious, though, if you can use HTML code/vB Code in the descriptions? I'm asking because I'd like to know if this system could be adapted to post the X-Men character biographics that myself and my site's staff compile.

And is there a way that you can link one glossary entry to another (or several others)?

TWTCommish
02-11-2002, 02:02 AM
I'm curious, though, if you can use HTML code/vB Code in the descriptions.
Yes, you can use HTML...all HTML will be stripped from the Random Term JavaScript display, though. No, right now it doesn't parse for vB Code, but if you want, I could upload a modified glossary.php file and have it do so. It's a VERY minor change, really.

And is there a way that you can link one glossary entry to another (or several others)?
Well, sort of. You can display only a specific term. Like this (I forgot to add error-checking for it, though, I think):
http://www.movieforums.net/glossary.php?glossaryid=48

So, in that sense, you can link to a term directly. I dunno what you mean about several, though. You mean have "related terms" or something?

X-Fan
02-11-2002, 02:07 AM
Originally posted by TWTCommish
Yes, you can use HTML...all HTML will be stripped from the Random Term JavaScript display, though. No, right now it doesn't parse for vB Code, but if you want, I could upload a modified glossary.php file and have it do so. It's a VERY minor change, really.

Well that's cool, because I don't use random terms on my board.

Originally posted by TWTCommish
So, in that sense, you can link to a term directly. I dunno what you mean about several, though. You mean have "related terms" or something?

Yep, like a "See also..." function that you could edit through the admin where you could add x number of related terms to an existing glossary entry by entering the name and having the system automatically generate a link when viewing the entry to the related terms.

That would be sweet! :)

xug
02-12-2002, 01:58 AM
Dear TWTCommish,

When I have a text with line breaks and enter it as a new record the line breaks are gone and everything is placed line after line without breaks.

Could you make something in your hack that line breaks will be accepted.

Its a hugh job to put by hand the <br> codes in.

TWTCommish
02-12-2002, 02:01 AM
There must be something else going on, because line breaks DO work for me. Are you referring to the random term JS alert, though? If that's the case, then yes, line breaks are removed. But not on the actual glossary listings.

xug
02-12-2002, 02:06 AM
Sorry I'm a little duno ;)

When I have a text and add that to the list it will not project the text as I had copied, all lines are after each other without the <br> codes.

When I go into that data to edit it and put myself the <br> codes in everything looks fine, but to do that is a hugh job.

TWTCommish
02-12-2002, 02:17 AM
I understand what you mean -- but I don't know what to say. It spaces my lines out flawlessly. Anyone else having this problem?

TWTCommish
02-12-2002, 02:26 AM
Ok, nevermind, I got it fixed. Attached is an updated glossary.php file -- if anyone reading this wants vB Code support, use this one.

xug
02-12-2002, 02:26 AM
And as for your hack I haven't changed anything else than the file name and the filename in the templates.

xug
02-12-2002, 02:29 AM
Cool ! This update works for me.

Thank you so much for the very fast responces and action.

It's not only a great hack, but your a great guy too !

xug
02-12-2002, 02:34 AM
What do I need to do to change the background color ?

so that entry 1 is the same background as entry 3 and
that entry 2 is the same background as entry 4 etc. etc.

Mabye this is already mentioned in this thread but I can't find it.

TWTCommish
02-12-2002, 02:37 AM
To do that open the glossarybit template and change this:

$color
to either this:

{firstaltcolor}
Or this:

{secondaltcolor}

xug
02-12-2002, 02:57 AM
If I change that code to a color code the entire page background color on my list all page will be the same for each and every entry

TWTCommish
02-12-2002, 02:58 AM
Yes, isn't that what you wanted? The same color for entry 2, 3, 4, etc.

xug
02-12-2002, 03:02 AM
just as on your list, that you see a darker gray background for entry 1 and a lighter gray for entry 2 and than the darker gray background for 3 and the lighter gray for entry 4 etc etc.

TWTCommish
02-12-2002, 03:04 AM
It already does that without any changes. :) It uses your firstaltcolor and secondaltcolor variables (the ones you use for the background of your posts) to alternate colors.

xug
02-12-2002, 03:08 AM
Not on my board, maybe I installed something wrong or forgot a template!

Which template does this?

My glossarybit looks like this : (is this one ok?)

<tr bgcolor="$color">
<td width="20%" valign="top"><b><normalfont>$text</normalfont></b></td>
<td width="80%" valign="top"><normalfont>$description</normalfont></td>
</tr>

TWTCommish
02-12-2002, 03:11 AM
Yes, that looks right. Did you give your first/second alt colors the SAME value, though?

xug
02-12-2002, 03:18 AM
Haha, yep they are they same and I do not what to change any about that, so what can I do to solve this in your code or do you know a trick that I can put a line between each and every entry.

TWTCommish
02-12-2002, 03:23 AM
Well, I'd recommend changing one of your post alt colors -- it's better that way anyway. If you really don't want to do that, then you'll want to open glossary.php and replace {firstaltcolor} and {secondaltcolor} with the RGB values of the colors you want...like #FFFFFF for white and #E9E9E9 for light gray.

xug
02-12-2002, 03:42 AM
Cool, I got it !

Again many thanks.

Lucky
02-12-2002, 04:21 AM
That is what your glossarybit should look like.

Have you altered anything in the original file?

TWTCommish
02-12-2002, 04:25 AM
Don't worry, Lucky: he says he's got it now. :) Thanks anyway, though.

squawell
02-13-2002, 02:39 PM
i got this error

Warning: extract() expects first argument to be an array in squawell/forums/vbb220/newthread.php on line 441

what's wrong??

TWTCommish
02-13-2002, 02:43 PM
I think that means you don't have any glossary terms entered. It expects at least one. If anyone's interested, I can make a small modification to error-check the sucka'. :)

squawell
02-13-2002, 02:56 PM
Originally posted by TWTCommish
I think that means you don't have any glossary terms entered. It expects at least one. If anyone's interested, I can make a small modification to error-check the sucka'. :)
ok~~now it just like u say!!

i don't add any item so i got that error!!

now it works:D:D:D

if u did a error-check template that will be great!!

TWTCommish
02-13-2002, 03:07 PM
Ok, simple:

in newthread.php AND newreply.php. replace 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)));
...with this...
$rand_term = $DB_site->query("SELECT text AS term_text, description AS term_description FROM glossary ORDER BY RAND() LIMIT 1");
if ($DB_site->num_rows($rand_term)) {
extract($DB_site->fetch_array($rand_term));
$term_description = str_replace("'", "\\'", htmlspecialchars(strip_tags($term_description)));
}

squawell
02-13-2002, 03:55 PM
thankz~~:D:D

but i have another problem~

i can't delete and edit the item ~ ~

what's wrong??

TWTCommish
02-13-2002, 04:01 PM
Uh, I have no idea. It ought to work :) What happens when you try?

squawell
02-13-2002, 06:18 PM
when i create one item and i want to edit or delete

and nothing happen and can't work

i think maybe this is file's problem~~

can u give me the last admin_glossary.php file!!

TWTCommish
02-13-2002, 06:31 PM
Here's the one I've got.

squawell
02-13-2002, 06:46 PM
i try that file and still can't work

see the attach pic i add a item call "karma"and when i edit it

and it always show that and nothing happen??

any idea??

TWTCommish
02-13-2002, 06:58 PM
Did you use HTML and all kinds of funky characters inside the term field?

squawell
02-13-2002, 07:08 PM
no~i didn't use html ect.

i think it should can add chinese word isn't it?

because i see it action in a chinese forum!!

so i think that not the problem!!

TWTCommish
02-13-2002, 07:10 PM
Can you send me the HTML of that page via email or PM? I can take a look at it for you.

squawell
02-13-2002, 07:23 PM
i already pm to u and thankz for ur help again!! :up:

LuBi
02-15-2002, 03:33 AM
Well what is supposed to happen when you click the term in newreply or newthread ?

TWTCommish
02-15-2002, 05:09 AM
As I mentioned earlier (:)), it brings up a JavaScript alert box containing the term's description/definition.

Tim Wheatley
02-15-2002, 06:03 AM
There is a bug when the description is over a certain length - I haven't read this whole thread, but you know about that?

Great hack otherwise! Thanks :D

TWTCommish
02-15-2002, 03:43 PM
What length? The length would have to be completely MASSIVE...because the TEXT field can hold pages and pages of data.

Tim Wheatley
02-15-2002, 04:28 PM
Nope - the popup alert script can't handle large amounts of text :)

A few of my users complained that IE kept kicking in a debug script, so I decided to keep my word explanations short and sweet.

The glossary itself can :)

TWTCommish
02-15-2002, 04:40 PM
That's odd. I don't see why the JS alert would have any problems. How long until it kicks out?

Tim Wheatley
02-15-2002, 09:59 PM
No idea :)
.
.
.
.
.
.


.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
About that many lines of full text screwed it :)

SaintDog
02-16-2002, 12:01 AM
I don't know of anything that takes that much space to describe ;)

Tim Wheatley
02-16-2002, 01:26 AM
I just hope he gets what I mean ;)

SaintDog
02-16-2002, 01:31 AM
I am not sure but I think there is a limit to the amout of text that can be added, although I am not sure exactly. Just curious Tim, what word do you have that has that large of a definition (or remotley that size)?

nafae
02-20-2002, 11:34 PM
I just had a question, is there any way to make this location show up in the "who's online" area as "Viewing Glossary"

That would be fantastic if someone could find a way!

Lucky
02-20-2002, 11:36 PM
Sounds like a plan

TWTCommish
02-20-2002, 11:39 PM
Yep. You can use FireFly's hack (which is in beta, mind you): Add Who's Online locations from Admin CP (https://vborg.vbsupport.ru/showthread.php?threadid=32849). Once that's installed, just enter "/glossary.php" in the one field, and something like this in the other:

Viewing <a href="glossary.php">The Glossary</a>

nafae
02-21-2002, 12:00 AM
thanks!

David Bott
03-11-2002, 09:16 PM
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.)

TWTCommish
03-11-2002, 10:08 PM
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. :)

David Bott
03-11-2002, 10:23 PM
>>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.

TWTCommish
03-11-2002, 10:29 PM
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?

David Bott
03-11-2002, 10:48 PM
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

Radon3k
03-11-2002, 10:55 PM
Where is the text file for this?

Radon3k
03-11-2002, 11:16 PM
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 :)

Radon3k
03-11-2002, 11:30 PM
Ok well I've got it running on vBulletin v2.2.4 and it works great! Just one little minor thing, when I go to "glossary.php" it shows nothing. I do have terms added, just nothing appears, why is this? Thanks and great hack! :)

David Bott
03-11-2002, 11:52 PM
The attached was made by TWTCommish himself to get us stated (you needed to read the entire thread to find it.)

Put in admin directory and run. It will add about 20 items to the database.

Radon3k
03-12-2002, 12:12 AM
Ok thanks, however, that doesn't help the fact that it still doesn't show on "glossary.php". All it shows is this:

The Software Specialists Place > Glossary

#

There are no letters, nothing...What should I do?

TWTCommish
03-12-2002, 12:12 AM
What's the direct link?

Radon3k
03-12-2002, 12:24 AM
http://www.thessp.net/forum/glossary.php :)

TWTCommish
03-12-2002, 12:42 AM
Something's wrong with your glossary.php file. Can you post it here via attachment? I'll take a look at it.

Radon3k
03-12-2002, 12:43 AM
Sure, here you go

Radon3k
03-12-2002, 12:44 AM
Oops, here's the file, sorry! :)

TWTCommish
03-12-2002, 12:46 AM
I think I know what's wrong. It's not your glossary.php file: it's your templates. Did you add the glossary_letter and glossarybit templates? The problem you've having indicates that you didn't...I think that would explain it.

Radon3k
03-12-2002, 12:47 AM
I did add them though...

Radon3k
03-12-2002, 12:48 AM
Lemme double check to make sure it has the right info in it...

Radon3k
03-12-2002, 12:50 AM
Well I just double checked everything and it's all there and it all works....So what else should I do?

TWTCommish
03-12-2002, 12:53 AM
Can you email me (chris@movieforums.com) the contents of each of your glossary templates? I should probably look at those, too. Hmmm, strange stuff. What version of vB are you running? Are you sure you have a fairly recent installation of PHP?

Radon3k
03-12-2002, 12:57 AM
Well what's in the templates are exactly what the text file has

I'm running 2.2.4, and it was installed the same day that 2.2.4 came out ;)

TWTCommish
03-12-2002, 01:00 AM
Hmmm. Gimme some time, I'll see if I can figure out what the hizzell is going on. :D

Radon3k
03-12-2002, 01:01 AM
Okies, well in the mean time I think I'll delete the templates and re-create them. Also, I know I edited the index.php and stuff right, what else could be at fault? Thanks for your support, it's greatly appreciated! :)

Radon3k
03-12-2002, 01:05 AM
Well damn....I re-did the templates and it worked. I don't know what wasn't working the first time, but it works great now! Thanks so much for this hack! And btw, you have a successful test on 2.2.4 now ;) Thanks again sir!! :)

TWTCommish
03-12-2002, 01:05 AM
LOL. Good, I'm glad! Enjoy the hack...thanks so much for installing it.

diettalk
03-23-2002, 02:07 AM
Is there an install.php for the sql query? I do not have access to shell.. Thanks.

TWTCommish
03-23-2002, 02:13 AM
Ok, try this. I haven't tested it, but I think it'll work.

SaintDog
03-23-2002, 02:14 AM
You don't need shell, just phpMyAdmin to run queries. Most hosts have it already installed on user accounts, if it is not you may wish to ask your host to install it for you as you will probably need it sometime down the line....

SaintDog

diettalk
03-23-2002, 02:27 AM
It worked... thank you. I'll have to keep it for any other "hacks" I install. I just hope I don't blow up my database.. :)

Kaelon
03-23-2002, 10:18 PM
This is a great hack! I am curious, though, is there a way to do expand the functionality of this hack in the following way:

Instead of listing the definitions, the terms could be hyper-linked and open up a new page displaying an article; sort of like an Encyclopedic reference?

Thanks so much for your help!

Regards,
Kaelon

TWTCommish
03-23-2002, 10:34 PM
Kaelon: yes, it could be modified. Though not HIGHLY easily. I'm not sure how it'd look, formatting-wise. Could you elaborate? :)

Kaelon
03-23-2002, 11:13 PM
Sure!

Basically, like an Encyclopedia. The terms would be listed in the glossary.php page, without their definitions (so, basically, in a single column, like a list). Here are a few examples:


Ants (http://ants/)
Apples (http://apples/)
... etc.


Then, when you click on a term, a new page opens basically outputting the definition in the same template setting.

Ants:
such and such...

article information, etc.

<< Back to Index (http://index/)

Would that make sense/work?

Kaelon

TWTCommish
03-23-2002, 11:18 PM
Oh, yeah. Sorry, I misunderstood you. Lemme take a look-see. :)

Kaelon
03-24-2002, 12:06 AM
Thanks a bunch! What I'd really like to do with it is host an extensive library of fiction. =)

Gutspiller
03-29-2002, 04:49 PM
I am very interested in installing this hack on my board, but I was hoping somebody could let me know if it will work on a 2.0.3 board?

Thanks for any info you can provide.

TWTCommish
03-29-2002, 05:14 PM
Yes, I'm 99% sure it should work just fine with 2.0.3. Only one way to find out, though. :D It's mostly stand-alone anyway, so I think it's worth trying.

Gutspiller
03-29-2002, 08:01 PM
Thanks TWTCommish, This will make a great addition to may 50+ hacks I have installed on my forum.

Anybody know if there is a record for how many hacks you can install in a certain version of VB? :D

I have some pretty cool ideas for this hack too. I love tinkering with hacks and using them in ways nobody even thought of. :)

Gutspiller
03-29-2002, 10:25 PM
TWTCommish

I was wondering if it would be possible to make the gloassary searchable with the VB search? I was also looking Kaelon's request and I would like something like that too. Not exactly for the same thing, but it would work.

If you could let me know if it would be possible to make it searchable, along with adding that feature Kaelon as talking about I would really appreciate it. I have a really cool idea for this, but I kinda need these two features in order for it to work properly.

Thanks TWTCommish!

boatdesign
03-30-2002, 04:11 AM
It would definitely be very cool if you could both:
1.) Include searching of the glossary in every Search
2.) Choose to seach the glossary from a drop down

Maybe with #1 it would also be nice to put glossary results at the end of the results section.

Gutspiller
04-05-2002, 08:54 PM
Bump.

TWTCommish are you still working on this hack or should I be looking for an alternative hack for my databasing idea?

TWTCommish
04-05-2002, 08:55 PM
I'll need some more time, I'm working on a few other things. Don't give up on me just yet. :D

Gutspiller
04-05-2002, 09:34 PM
OK sounds good. Thanks. When you do update it please post in this thread so I get an email. I'm not as actively searching for hacks as I used to, just because I am starting to run into more problems when I install hacks of today on a 2.0.3 forum. :D

Radon3k
04-06-2002, 11:08 PM
Works great on 2.2.5 TWT, again, great hack! :)

Just one question...When viewing the "Who's Online", it just says "unknown source" then gives the link to the glossary...is there someway that I can make it say "Glossary"?

FWC
04-06-2002, 11:23 PM
Originally posted by Radon3k
Works great on 2.2.5 TWT, again, great hack! :)

Just one question...When viewing the "Who's Online", it just says "unknown source" then gives the link to the glossary...is there someway that I can make it say "Glossary"? You can always hard code it, but I highly recommend this hack:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=32849

TWTCommish
04-06-2002, 11:25 PM
What FWC said. :)

thehobbyforum
04-18-2002, 09:15 AM
I'm sure you have been told this a thousand times but great hack!

midad
05-18-2002, 10:24 AM
This is a fantastic Hack TWTCommish, it's just what I was looking for and I have installed it of course :D
Would it possible to add the following to the hack:
1. The search engine as you mentioned earlier and I DO think it's useful.
2. Can we add a new option so that the users themselves can add terms to the glossary itselfe?????
Thanx in advance :)

ladyfyre
06-10-2002, 01:33 AM
is there any way to set this up so that you can add glossary editors who are not Admins? Our Admins are already under a TREMENDOUS work load, and i seriously doubt they will contribute time to this...but we have many senior members who i believe would happily submit terms on a regular basis.

Would it work to move the admin_glossary.php file to another directory and use .htaccess to control access? (assuming of course that the script will work with the require for global.php taken out)

TWTCommish
06-10-2002, 01:53 AM
It won't work without the global.php file, I don't think. You might be able to move it to the /mod directory so that Mods can manage the Glossary, though.

bpuetz
07-06-2002, 03:33 AM
Great hacks -- thanks!

A question that I didn't see an answer to in the thread -- is it somehow possible to add images and other links into the definitions? I have a real need for that.

Also, a feature request. I would like to see an additional Category added to the terms. Then I could display the forum related terms when called from the forums, or the classified realted terms when called from the classifieds, etc. There would also be an option to display all terms. Because of the nature of my site, I'm going to eventually have a huge number of terms in the glossary, and this feature would make it less overwhelming and easier to navigate.

Thanks again!

FWC
07-06-2002, 05:10 AM
Originally posted by bpuetz
Great hacks -- thanks!

A question that I didn't see an answer to in the thread -- is it somehow possible to add images and other links into the definitions? I have a real need for that.Sure, just use HTML in the definition. I do it all the time.

bpuetz
07-06-2002, 06:29 AM
Originally posted by FWC
Sure, just use HTML in the definition. I do it all the time. I'll say you do! I just had a look at your glossary. Thanks!

FWC
07-06-2002, 08:14 AM
Originally posted by bpuetz
I'll say you do! I just had a look at your glossary. Thanks! Glad to help. :)

firewars
07-06-2002, 08:38 AM
This isn't working for me :(

The glossary itself works fine.
However, the admin_glossary-file is just blank.
I can't find an error, though.
I did the sql query and uploaded both files as well as added both templates and modified my /admin/index.php-file.

Any ideas? :(

firewars
07-06-2002, 08:39 AM
My fault, I tried accessing the file itself without the addings (?action=add..) :)
Thanks for such a great hack!

firewars
07-06-2002, 08:53 AM
Umm ok now this is not really working, as I just noticed:

When editing, I get a SQL error :(

Martin64
07-06-2002, 12:44 PM
excellent one, TWTCommish :)

I just installed this one and I'm now ready to add some glossary. This should be fun :D

This is my third TWT hack I have installed on my boards, I guess I like your hacks. :P

hypedave
08-05-2002, 08:41 PM
when I click on more glossary terms I get a blank page :alien:

Dockaych
08-28-2002, 12:03 PM
Would it be possible to have the Glossary.php file show 'all' words in the glossary, and then allow users to filter if necessary (much like the members list page)??

Right now it looks as though the glossary is empty because I don't have any items in the '#' numerical category.

Dockaych
08-28-2002, 12:29 PM
Another idea...

Would it be possible to make a custom tag such as Avatar which makes the word a hyperlink to an information box (just like on the New Thread page)? This would be really useful.

Dockaych
08-28-2002, 01:33 PM
Strange...

When I try to edit an entry, it gives me an SQL error.
However, I can add and delete entries with no problem.
What is the problem?

drownedspirit
01-13-2003, 01:56 AM
I get the "Sorry, there are no matching glossary terms available." on the glossary page. I already inputted some terms, why won't they display?


HELP!!! :ogre:

drownedspirit
01-13-2003, 02:43 AM
i get this error too..

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: INSERT INTO glossary (text, description) VALUES ('Who's Online', 'A page displaying the list of users currently on the forums, as well as their current action/location.')
mysql error: You have an error in your SQL syntax near 's Online', 'A page displaying the list of users currently on the forums, as well' at line 1

mysql error number: 1064

what do i do? please please HELP

Geographic
01-17-2003, 03:41 AM
It appears as though if the definition of the Glossary term is too long, the alert box will not pop when clicking the random term.

Any fix for dat?

Nice Hack BTW! Good Work.

~Geo~

Geographic
01-17-2003, 03:42 AM
The third planet from the sun, having a sidereal period of revolution about the sun of 365.26 days at a mean distance of approximately 149 million kilometers (92.96 million miles), an axial rotation period of 23 hours 56.07 minutes, an average radius of 6,378 kilometers (3,963 miles), and a mass of approximately 5.974 ? 1024 kilograms (1.317 ? 1025 pounds).

Oh yeah, with this definition. ;)

drownedspirit
01-20-2003, 11:16 AM
Originally posted by drownedspirit
i get this error too..

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: INSERT INTO glossary (text, description) VALUES ('Who's Online', 'A page displaying the list of users currently on the forums, as well as their current action/location.')
mysql error: You have an error in your SQL syntax near 's Online', 'A page displaying the list of users currently on the forums, as well' at line 1

mysql error number: 1064

what do i do? please please HELP

I found out why it gives me error.. I tried Who Is Online and it added. The table doesn't accept ' in Who's.

Btw, I still get the "Sorry, there are no matching glossary terms available." HELP!

.:.NetStartz.:.
02-08-2003, 06:52 PM
Could you upload a new .zip to the first page with all the changes and corrections. I love this idea and would love to install it, but going through all the post to see the fixes/updates is time consuming.

Ice Effect69
02-18-2003, 09:13 PM
i just installed it, and it works perfectly with no problems

Gutspiller
02-27-2003, 01:43 PM
Originally posted by TWTCommish
I'll need some more time, I'm working on a few other things. Don't give up on me just yet. :D

Are you still working on those 2 modifications for this hack TWTCommish? I know a lot of us want them, and I was hoping they may be coming shortly? How goes the progress? I was also wondering how hard it would be to implement a search for the glossary? I wouldn't mind something inside the search dropdown box on the actual search page, but I would be more interested in a search field at the top of all the glossary pages that allows you to search while in the glossary. Sound possible?

I also had a question, how hard would it be to modify the hack so that you use the glossary for something else? Like say I want a glossary, but I also want to use the same type of formating for another idea? How hard would it be tweak the current code so that there are like 2 glossaries (sp?) and 1 works as a glossary and the other works for another purpose?

Please let us/me know how the hacking is going. :)

Thanks.

Gutspiller
03-01-2003, 12:37 AM
How do I get the glossary word to link to itself on an individual page? That way people can click the word and have that word and it' description the only thing on the page. Can anybody help me with this? I think it would be simple, but I can't seem to figure it out.

Gutspiller
03-08-2003, 04:10 PM
bump

FleaBag
03-31-2003, 11:45 PM
Very nice hack - working fine with 2.3.0. Not sure how I managed to miss this one for so long. Got a few ideas for modifying this, I'll let you know how it goes. :)

jacobi
05-15-2003, 05:06 PM
At the risk of echoing what others have already said, this is an awesome hack, TWTCommish! :D

I'm also thoroughly impressly by the level of creativity of my fellow vBulletin hackers on this thread. It seems there are some great ideas out there for "interpreting" this script for various uses.

Like others have stated, I'd be quite interested in:[list=1] The ability for user-submitted (yet moderated) entries
A "quick search" box.[/list=1]
The vB Links Directory (https://vborg.vbsupport.ru/showthread.php?s=&threadid=44551) (now under version 3.0 development at this thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=49998) may offer a good model for incorporating these features. I'd love to take a try at it, but I'm still within my first six months as a vBer, and don't feel quite ready to forray into scripting my own hacks yet.

So, in the spirit of our hacker's site - is anyone seeing The Matrix: Reloaded today?

Cloudrunner
05-24-2003, 03:48 AM
Thank you TWTCommish, yet again!

I've taken this little gem and converted it into an online herbal. I'll be redoing some code within the structure of the mod and admin CPs to allow for formatting buttons when placing new listings. All in all my herbalist Mods and my users thank you as well for allowing us to have the herbal up and running with minimal time for coding the backend!

Thank you!

)O( Cloudrunner )O(

P.S. Was curious as to your thoughts on recycling the code for the vb buttons within newthread / newreply. Will this break the glossary code with the admin CP at all do you think?

gmarik
05-24-2003, 07:55 AM
The Matrix: Reloaded - no, I have not.
Has somebody tried to make an e-library of it?

Falkware
06-28-2003, 07:00 PM
I was wondering if anybody's modified the code so that when you first enter the glossary it will list total terms/definitions in the database?

If you have a big glossary it's nice to be able to show just how many terms you have in there.

Also, has anybody worked on the user-submission for the glossary? Would be nice to have registered members be able to suggest glossary they feel belong and have moderators/admin approve these much like moderated posts.

Other than that I have to say this is a killer hack, and we're loving it already! You can see ours in action here (http://www.eqcleric.com/forums/glossary.php).

Thanks again for a great hack, and I really hope you keep working on this gem!

Cloudrunner
06-28-2003, 10:56 PM
yes, I have actually....contact me for how to do it.

drumsy
10-23-2003, 02:59 AM
Installed, works great! :)

disquiet
11-15-2003, 09:40 PM
Just another user saying thank you for a great hack, but also requesting the user submission with moderation function...

Just had to post my two cents...:D

cinq
11-24-2003, 03:07 AM
I was wondering if anybody's modified the code so that when you first enter the glossary it will list total terms/definitions in the database?

If you have a big glossary it's nice to be able to show just how many terms you have in there.


I think you can try the following additions :

In glossary.php
Find

eval("dooutput(\"".gettemplate("glossary")."\");");


Before that, ADD

$query1 = $DB_site->query("SELECT * FROM glossary");
$total = $DB_site->num_rows($query1);


Save and reupload glossary.php

In your glossary template
Find :

<br>

$footer


Before that, ADD

<table cellpadding="6" cellspacing="0" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{tableheadbgcolor}" width="100%"><smallfont color="{tableheadtextcolor}">There are a total of <b>$total</b> terms in the glossary.</smallfont></td>
</tr>
</table>



Lemme know if it works :)

JamesFrost
01-06-2004, 07:12 PM
How about a vb3 version of the glossary? I'd certainly be keen to use it. :D

TWTCommish
01-07-2004, 03:20 AM
How about a vb3 version of the glossary? I'd certainly be keen to use it. :DI've already re-written it. :) I'll need a bit more time to modify it for public release, though.

JamesFrost
01-07-2004, 07:13 AM
Happy to be a test subject if you like.

Geographic2
01-12-2004, 07:57 PM
Hey TWT... I really liked this hack. And I've been converting it over to VB3 myself...

I have the whole admin functionality worked out perfect..

But I'm having trouble getting the display for users to work right at all.

Basically things that are repeated such as Glossary entries and the letters to select from
do not display properly, only the last one shows up.

Can you help me figure this out? Or sneak me a peak at the new glossary.php?

TWTCommish
01-12-2004, 08:04 PM
Hey TWT... I really liked this hack. And I've been converting it over to VB3 myself...

I have the whole admin functionality worked out perfect..

But I'm having trouble getting the display for users to work right at all.

Basically things that are repeated such as Glossary entries and the letters to select from
do not display properly, only the last one shows up.

Can you help me figure this out? Or sneak me a peak at the new glossary.php?PM in transit. :)

RobAC
01-30-2004, 04:06 PM
Looking forward to a vB3 version as well. :)

vdich
02-07-2004, 07:11 AM
The glossary works with vBulletin Version 2.3.0 ?
Do u have me actually files of glossary ?

vdich
02-07-2004, 09:13 AM
Hi

I have install the script on my vB 2.3.0, and it works perfect. thank u.

But i have any idea for updates, maybe some are possible:

- i want use the same glossary-code from "newreplay.php" and "newthread.php" on the forum/index.php site, ist that possible ?

- i want, that all registed users can add some Terms, with or without controll from Admin

thanks a lot and thanks for the gret hack

U can see a demo on http://www.informatikboard.ch/glossary.php?s=&view=all

pixelpunk
02-25-2004, 07:27 PM
Happy to be a test subject if you like.


likewise!

RobAC
03-31-2004, 11:38 AM
Anybody know if this will work with the new 3.0??

TWTCommish
03-31-2004, 01:11 PM
Anybody know if this will work with the new 3.0??
No vB 2.x hack with any significant amount of code modification will work with 3.0. All but the simplest hacks will need to be re-written.

dethfire
04-06-2004, 04:05 PM
any chance on getting this to 3.0?

kafi
06-16-2004, 07:35 PM
any chance on getting this to 3.0?

I am also interested in Vb3.0.1

Andreas
07-06-2004, 01:40 PM
*bump*

Any news about a vB3 port?
I am really dying for that ^.^

Maybe some $$$ could speed this up?

TWTCommish
07-06-2004, 01:53 PM
Well, I've got a working vB 3 port already, but someone else wrote the admin script. I suppose I'd be willing to sell my end of it. I had no idea the Glossary hack was popular enough to merit that sort of thing. :) PM me if you'd lke to discuss.