vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBGlossary (https://vborg.vbsupport.ru/showthread.php?t=34385)

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

Quote:

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

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

...with this...
PHP Code:

  $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. Once that's installed, just enter "/glossary.php" in the one field, and something like this in the other:

Code:

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

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


All times are GMT. The time now is 11:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02831 seconds
  • Memory Usage 1,813KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete