Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: slinouille on December 24, 2008, 10:33:47 AM

Title: Glossary
Post by: slinouille on December 24, 2008, 10:33:47 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1525)


GLOSSARY v0.3.1
By Slinouille (http://custom.simplemachines.org/mods/index.php?action=search;author=68142)



Introduction
The mod adds a glossary to your forum. You can manage the words and associated definition and display a tooltip containing the definition in the messages.
Glossary mod uses:
- jQuery javascript library : http://jquery.com/
- jQuery Tooltip pluggin for tooltip activity from http://bassistance.de/jquery-plugins/jquery-plugin-tooltip.
- jQuery SimpleModal pluggin for modal forms from http://www.ericmmartin.com/projects/simplemodal/.
- famfam Silk icon set from http://www.famfamfam.com/

Features
o Display a full list with words in your glossary
o Classification and selection by alphabetic order
o Can define one level of groups for your words in Glossary
o Manage rights for seeing and administrating the glossary, and for authorizing suggestion by membergroup
o Display a bubble tooltip on all words in the forms messages
o Activation in Admin Panel
o Enable or not the member keywords suggestion functionnality
o Keywords administration possibility for adding, updating and deleting
o Keywords detection can be optionaly case insensitive in messages
o Display title and body in tooltips
o Can activate or not bbccode in tooltips
o Define for each word if shown or not in messages
o bbc code for glossary word (in order to force tooltip for "not shown" words)
o If wanted, only display each word once per message
o Specific glossary administrators menu
o Enable a "right-click" administration menu (usefull for big glossaries)
o Languages : French, English, German

Installation
Simply install the package to install this modification on the SMF Default Core theme.
Manual edits will be required for other themes.

Glossary mod is totaly compliant with any other javascript library.

If you have a previous install, after update don't forget to save the glossary settings in admin panel so that all variables are reinitialised

Customize the Tooltips
Please customize the file "jquery.tooltip.css" to fit Tootip Effect with your Forum template.

This mod is compatible with SMF 2.0 Beta 4 Public and above only.

Support
Please use the modification thread for support with this modification.

Changelog
0.3.1 - 25th April 2009
- bug correction: some .JS files and images were not associated to default theme directory (thanks to Kindred)
- bug correction: when keyword was ending a line, the tooltip description was badly interpreted (thanks to dekay)
- bug correction: url tag was visible in links when bbc was enabled in tooltips
- bug correction: in german language, a quote was missing (thanks to dekay)

0.3.0 - 04th April 2009
o New specific Glossary page in admin panel
o New drop menu for Glossary administrators
o Enable a "right-click" administration menu (usefull for big glossaries)
o Add words selection for specific activity
o New option "By default, show definition in post"
o Installation and upgrading database has been entierely recoded
o Nicer dialog boxes
o Correcting errors in log
o Correcting bug "if a glossary word is also in the definition of another one"

0.2.0 - 03th February 2009
o New admin actions directly in main page
o Categories management in one unique form

0.1.9 - 03th February 2009
o Added option "Show glossary words only once per message"
o Added value "Show in message" for each glossary word. This permits to authorize or not a word to be shown in messages
o Added BBC code glossary in order to force a glossary word to be shown in message
o Added one level of category
o Correction of bug in tooltip for special caracters

0.1.8 - 29th January 2009
o Correction of a (stupid) bug

0.1.7 - 26th January 2009
o Correction of a bug if database in UTF-8 (reported by PerryM)

0.1.6 - 24th January 2009
o Code rewritting for better management of non conflict mode.
  jQuery library is now loaded independently of other libraries.

0.1.5 - 17th January 2009
o Solved conflict mode with other than jQuery javascript librairies
o Added GERMAN translation (by CvH)

0.1.4 - 2d January 2009
o Add possibility to have title and body in keywords definition. Administrator can choose a special character to delimit title and body.
o Administrator can activate bbccode in tooltip.

0.1.3 - 1st December 2008
o Add members keywords suggestion functionnality

0.1.2 - 1st December 2008
o Add Thickobx pluggin for better management keywords administration

0.1.1 - 30th November 2008
o Glossary analyzer improvment
o Corrections after code review

0.1.0 - 21th November 2008
o Initial release
Title: Re: Glossary
Post by: kizer on December 25, 2008, 02:55:57 AM
Man too bad. I've been looking for something like this forever in 1.1.17
Title: Re: Glossary
Post by: arba on December 25, 2008, 11:33:05 AM
Quote from: kizer on December 25, 2008, 02:55:57 AM
Man too bad. I've been looking for something like this forever in 1.1.17

Indeed to bad, I need this mod too for 1.17 version.
Can that be done?
Title: Re: Glossary
Post by: averyxie on December 25, 2008, 08:43:24 PM
Like the other two, If this can be done in 1.1.7 that be great!
Title: Re: Glossary
Post by: slinouille on December 26, 2008, 11:21:32 AM
Hello!

Sorry guys, it will not be possible for me to rewrite it for SMF1.x due to the fact that I've not done any code adaptation for that version and that I've not enough time to learn how SMF1.x works.
Neverthless if someone can take some time to adapt it, he/she will be welcome  ;)

Thanks for your comprehension

SliN
Title: Re: Glossary
Post by: Mick. on December 27, 2008, 11:56:30 PM
Ah,too bad.   It would be cool for 1.1.7
Title: Re: Glossary
Post by: SillyCone on December 28, 2008, 10:19:36 AM
Hello,

Great idea !

Only problem : I can't add any keywords  >:(

The link doesn't respond at all... : http://www.mywebsite.org/forum/index.php?action=glossary#TB_inline?height=200&width=400&inlineId=div_new_word&modal=false this url doesn't work... Help !

I'm running 2.0 Beta4 of course, and untill now have a glossary as an article thanks to the Articles Mod, but yours is much much better... Looking forward to make it work !
Title: Re: Glossary
Post by: slinouille on December 28, 2008, 10:24:32 AM
Hello SillyCone!
Strange behaviour  ::)
Can you give me the url of your website because http://www.mywebsite.org/forum/ (http://www.mywebsite.org/forum/index.php?action=glossary#TB_inline?height=200&width=400&inlineId=div_new_word&modal=false) doesn't seem to be a forum ?
Thanks
SliN
Title: Re: Glossary
Post by: SillyCone on December 28, 2008, 10:48:52 AM
My forum is quite underground... I can't publish the url in a public forum like this one...  O:)

PS: I sent you the link by MP. Thanks for the support !
Title: Re: Glossary
Post by: slinouille on December 28, 2008, 10:52:49 AM
Okay
Try to clear the cache of your browser then
I think that's all because this url is calling a javascript component.
Title: Re: Glossary
Post by: SillyCone on December 28, 2008, 11:40:59 AM
Hmm, that's not the problem, I cleared my cache and tried it with a new browser (Safari) to no avail, sorry  :(
Title: Re: Glossary
Post by: Sentinel [AF] on December 31, 2008, 08:14:28 AM
I've got the same problem.

It worked fine when I installed it bar the fact that when I activated the mod for the forum itself it makes all my post data invisible but they come back when I turn the mod off.

After I clicked the activate button and it made the post data (text whatever) invisible it's not allowed us to post any new words at all into the glossary.

I was wondering if it's something against the WYSIWYG get mod as I'm also running smf 2.04beta and would quite like to use your glossary to define music production terms, techniques and genres etc.

My site is www.alternatingfrequencies.com
although saying that you won't be able to see much as a guest.

eZ.
Title: Re: Glossary
Post by: Ken. on December 31, 2008, 11:07:41 AM
Nice Mod.  :)

Is there a way to add formating to the text of a tip? (like a line break)
I've tried using html and bbc but only get the code for the command displayed and not the desired formated result.

Thanks
Title: Re: Glossary
Post by: slinouille on January 02, 2009, 05:37:25 AM
@TheSentinel : I'll do some checks on your forum this weekend ;-)

@Ken : Thank you  :) Yes I can do a little update to add this functionnality.
Title: Re: Glossary
Post by: Ken. on January 02, 2009, 05:42:12 AM
Quote from: slinouille on January 02, 2009, 05:37:25 AM
@TheSentinel : I'll do some checks on your forum this weekend ;-)

@Ken : Thank you  :) Yes I can do a little update to add this functionnality.

Thanks.  ;D
Title: Re: Glossary
Post by: Sentinel [AF] on January 02, 2009, 09:48:19 PM
Ummm  I've had to remove your mod for now.

But I think it probably has something to do with the WYSIWYG mod that prevents it from working correctly.

Maybe !? - that is ...
Title: Re: Glossary
Post by: Garry1953 on January 02, 2009, 11:32:04 PM
Works Fine for me.
Thanks.
Title: Re: Glossary
Post by: [unplugged] on January 03, 2009, 12:06:39 AM
Quote from: SillyCone on December 28, 2008, 10:19:36 AM
Hello,

Great idea !

Only problem : I can't add any keywords  >:(

The link doesn't respond at all... : http://www.mywebsite.org/forum/index.php?action=glossary#TB_inline?height=200&width=400&inlineId=div_new_word&modal=false this url doesn't work... Help !

I'm running 2.0 Beta4 of course, and untill now have a glossary as an article thanks to the Articles Mod, but yours is much much better... Looking forward to make it work !

I am having the same issue. See here: http://www.empireofthesun.net

It works fine on my "clean install" test site, so it is more than likely conflicting with another mod (and I have plenty of those installed.  :P)
Title: Re: Glossary
Post by: Sentinel [AF] on January 03, 2009, 12:58:43 PM
Uh huh me too.

I think it's the WYSIWYG mod.
Title: Re: Glossary
Post by: [unplugged] on January 03, 2009, 01:04:36 PM
Out of the 3 and a half billion mods I have installed, WYSIWYG is not one of them. ;)
Title: Re: Glossary
Post by: grumblemarc on January 03, 2009, 07:30:37 PM
I have a problem. SMF 2.0.4b. The database seems not to have been modified. I get this error when trying to access the mod on my testbed Table 'smf2.smf_glossary' doesn't exist
File: W:\www\smf2\Sources\Glossary.php
Line: 168
. Sure enough I cannot see this table in the DB. All the files were deposited correctly however.

I don't know how to run the queries in installDatabase.php manually in that form. Can anyone help with a query that I can just drop into phpmyadmin and go? Thanks.
Title: Re: Glossary
Post by: Sentinel [AF] on January 03, 2009, 07:38:57 PM
Well then I have no clue what causes it to just one day decide to stop working ad if it has a mind of it's bloody own.

I tried uninstalling and doing a fresh install of latest version and still not working ...

I've just had to disable WYSIWYG as it was playing up with bloody bbcode this time for some reason - strange.
Title: Re: Glossary
Post by: [unplugged] on January 03, 2009, 07:44:18 PM
If I had to guess I would say a simple javascript conflict somewhere, especially on my heavily modded sight.
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 04:05:03 AM
Hello

It must be conflicting with some other mod using javascript. Im' looking with SillyCone that have this problem also. A question to those with problems, do you have file "reflection.js" loaded ?

Also do you have a mod using scriptaculous or mootools scripts ? Indeed in that case, my mod will not work because I'm using jQuery ... and I've got in mind that scriptaculous (or mootools) and jquery can't be loaded together without any problems  :-[

@TheSentinel® : it seems to be the problem on your forum because scriptaculous.js is loaded  :(

@Ken : I've uploaded version 0.1.4 that permits to use bbccode in the the word definition. I also added the possiblibility to use a character (such as -) to delimit the title and the body of the definition displayed in the tooltip.
I hope it's like you expected ;-)

SliN
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 04:11:53 AM
Quote from: grumblemarc on January 03, 2009, 07:30:37 PM
I have a problem. SMF 2.0.4b. The database seems not to have been modified. I get this error when trying to access the mod on my testbed Table 'smf2.smf_glossary' doesn't exist
File: W:\www\smf2\Sources\Glossary.php
Line: 168
. Sure enough I cannot see this table in the DB. All the files were deposited correctly however.

I don't know how to run the queries in installDatabase.php manually in that form. Can anyone help with a query that I can just drop into phpmyadmin and go? Thanks.
Hello Grumblemarc,
Don't you have any warning during installation ?
You can through (phpmyadmin) use the next sql query to create the table:
CREATE TABLE IF NOT EXISTS `smf_glossary` (
  `id` int(11) NOT NULL auto_increment,
  `word` varchar(30) collate latin1_german1_ci NOT NULL default '0',
  `definition` text collate latin1_german1_ci NOT NULL,
  `member_id` int(11) NOT NULL default '0',
  `date` int(11) NOT NULL default '0',
  `valid` int(1) NOT NULL default '0',
  `identical_to` text collate latin1_german1_ci NOT NULL,
  PRIMARY KEY  (`id`)
)


Perhaps you have to change the "latin1_german1_ci" ;)

SliN
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 07:23:59 AM
Same issue here:

Table 'test.smf_glossary' doesn't exist
File:*****\Sources\Glossary.php
Line: 171


mods installed:

Quotehttp://127.0.0.1/pixel/index.php?action=admin;area=packages;sa=list;package=BBC_you_final.zip

none of the following is installed:

"reflection.js" or scriptaculous or mootools script

unless you count the smf media gallery.. so.. will add the table in the database..  :)

thanks!!  :P

that did work.. im wondering why it didnt do it to begin with.. hope you figure it out..  8)
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 10:13:24 AM
Quote from: slinouille on January 04, 2009, 04:05:03 AM
...do you have file "reflection.js" loaded ?

Also do you have a mod using scriptaculous or mootools scripts ?...

I do not use any of these scripts on my site. I can post my installed packages list if you need, but be forewarned, it's a long list.  :P
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 10:19:39 AM
if you go into the cpanel and add the missing table, it will work Sunking..  ;)

CREATE TABLE IF NOT EXISTS `smf_glossary` (
  `id` int(11) NOT NULL auto_increment,
  `word` varchar(30) collate latin1_german1_ci NOT NULL default '0',
  `definition` text collate latin1_german1_ci NOT NULL,
  `member_id` int(11) NOT NULL default '0',
  `date` int(11) NOT NULL default '0',
  `valid` int(1) NOT NULL default '0',
  `identical_to` text collate latin1_german1_ci NOT NULL,
  PRIMARY KEY  (`id`)
)
Title: Re: Glossary
Post by: Ken. on January 04, 2009, 10:27:55 AM
Quote from: slinouille on January 04, 2009, 04:05:03 AM

@Ken : I've uploaded version 0.1.4 that permits to use bbccode in the the word definition. I also added the possiblibility to use a character (such as -) to delimit the title and the body of the definition displayed in the tooltip.
I hope it's like you expected ;-)

SliN

That works very well indeed... Thanks!  ;D

Test Word Here. (http://www.ourfamilyforum.org/SMF2.0/index.php?topic=3.0)
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 10:30:59 AM
Quote from: SmokyBlue on January 04, 2009, 10:19:39 AM
if you go into the cpanel and add the missing table, it will work Sunking..  ;)

Thank you for your reply. I just looked at my database and the table is already in place.
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 10:32:05 AM
hmm Ken, yours looks different than mine:

Click here to see mine (http://houseofsmoky.com/forum/index.php?action=glossary)   :P
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 10:57:45 AM
@smokyBlue: I've check your link ... what's the problem exactly ?

Strange that the php script for table installation is not always run during installation  ::) It's my 1st mod with table creation ... perhaps have I done something bad  :-[

THks
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 11:15:17 AM
The table installed fine on my test site and the mod works perfectly. Also, the table installed fine on my main site, but the mod doesn't work. In my case, I don't believe it's an issue with the database. I think the same can be said for TheSentinel®. The mod is installed as it should be, database and all, but something else existing on the site is conflicting with it.

The only part I actually have a problem with (as far as I can tell) is the link to add a new keyword (?action=glossary#TB_inline?height=200&width=400&inlineId=div_new_word&modal=false). The link simply does nothing.

EDIT: I have also noticed that when viewing the glossary, the spacing between shouts in my shoutbox (http://custom.simplemachines.org/mods/index.php?mod=585) seems to get messed up. It only happens when on the Glossary page (?action=glossary). As soon as I navigate to another page, the spacing returns to normal. This also seems to me to be a simple javascript conflict. ;)
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 11:24:54 AM
Quote from: slinouille on January 04, 2009, 10:57:45 AM
@smokyBlue: I've check your link ... what's the problem exactly ?

Strange that the php script for table installation is not always run during installation  ::) It's my 1st mod with table creation ... perhaps have I done something bad  :-[

THks

lol nothing is wrong slinoulle.. chin up! you did good, just to tighten the db settings perhaps.. if i knew, i could tell you.. but i do think its odd, im using your latest, think Ken is too, right Ken?? but mine looks different than his lol.. i dont know.. maybe he did something different..

but im working a theme now, if i see anything, will let you know.. ;)

mmm Smoky still cant spell so!! :p
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 12:03:04 PM
@SunKing:
Perhaps there is a conflict with the shoutbox because SillyCone experiments the same troubles with his forum where shoutbox is installed.

@SmokyBlue:
Quoteim using your latest, think Ken is too, right Ken?? but mine looks different than his lol.. i dont know.. maybe he did something different..
In the link given by Ken, glossary is exactly what it should be. It's as I've designed it for my website.
Question : have you entered a specific character for title and body separation? and also, have you activated the bbccode in the cpanel ?
When I've visited your link, Ive noticed another css stle for glossary, have you changer glossary.css file?
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 12:10:03 PM
Okay, I have another update. I installed the shoutbox on my test site (where the glossary mod was working) and it no longer works. I then uninstalled the shoutbox from my main site and th glossary started working. So the conflict (in my case) is specifically between Shoutbox and Glossary.

Going through the javascripts that the shoutbox uses, I systematically removed each one and tested the glossary again. The specific file causing the conflict is called yshout.js which is the main script for nneonneo's shoutbox (I use version AdvSB1.22). Hopefully, the conflict can be worked out. ;) I really want to implement the Glossary, but cannot live without the shoutbox....lol

EDIT: You posted before I was finished posting.....hehehe
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 12:16:05 PM
QuoteIn the link given by Ken, glossary is exactly what it should be. It's as I've designed it for my website.
Question : have you entered a specific character for title and body separation? and also, have you activated the bbccode in the cpanel ?
When I've visited your link, Ive noticed another css stle for glossary, have you changer glossary.css file?

havent changed the glossary.css as far as i know.

ok i might need to go into the settings eh?? lol.. havent had time to set things up, it was an unexpected site move.. will let you know if i dont get things right.. will be making my way to the site soon.. ;)

thanks slinouille, and pretty kool mod you have made.. congrats!! :)
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 12:20:34 PM
@SmokyBlue: thanks you  :D

@SunKing:
I was on your forum. I think too that's the shoutbox mod that is conflicting due to the fact it's based on Prototype, and mine on jQuery.
I've found on the jQuery site, that some conflict can be solved adding a specific code.
Can you please try this:

Find:
<script anguage="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/mod/js/jquery.js"></script>

Add after:

    ';
   
    echo '<script>
     var $j = jQuery.noConflict();
     
     // Use jQuery via $j(...)
     $j(document).ready(function(){
       $j("div").hide();
     });
     
     // Use Prototype with $(...), etc.
     $("someid").hide();
   </script>';
   
   echo '


This should load jQuery in noflict mode.
Title: Re: Glossary
Post by: Ken. on January 04, 2009, 12:32:33 PM
Quote from: SmokyBlue on January 04, 2009, 11:24:54 AM
Quote from: slinouille on January 04, 2009, 10:57:45 AM
@smokyBlue: I've check your link ... what's the problem exactly ?

Strange that the php script for table installation is not always run during installation  ::) It's my 1st mod with table creation ... perhaps have I done something bad  :-[

THks

lol nothing is wrong slinoulle.. chin up! you did good, just to tighten the db settings perhaps.. if i knew, i could tell you.. but i do think its odd, im using your latest, think Ken is too, right Ken?? but mine looks different than his lol.. i dont know.. maybe he did something different..

but im working a theme now, if i see anything, will let you know.. ;)

mmm Smoky still cant spell so!! :p

We are the same Smokey.  :)
My test word link was to the actual use of the word in a forum post, whereas your link was to your Glossary.

Heres My Glossary. (http://www.ourfamilyforum.org/SMF2.0/index.php?action=glossary)
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 12:35:01 PM
I added the noConflict code as requested, but the entire site then disappears, showing only the background.
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 12:41:56 PM
Quote from: Ken. on January 04, 2009, 12:32:33 PM
Quote from: SmokyBlue on January 04, 2009, 11:24:54 AM
Quote from: slinouille on January 04, 2009, 10:57:45 AM
@smokyBlue: I've check your link ... what's the problem exactly ?

Strange that the php script for table installation is not always run during installation  ::) It's my 1st mod with table creation ... perhaps have I done something bad  :-[

THks



lol nothing is wrong slinoulle.. chin up! you did good, just to tighten the db settings perhaps.. if i knew, i could tell you.. but i do think its odd, im using your latest, think Ken is too, right Ken?? but mine looks different than his lol.. i dont know.. maybe he did something different..

but im working a theme now, if i see anything, will let you know.. ;)

mmm Smoky still cant spell so!! :p

We are the same Smokey.  :)
My test word link was to the actual use of the word in a forum post, whereas your link was to your Glossary.

Heres My Glossary. (http://www.ourfamilyforum.org/SMF2.0/index.php?action=glossary)

lmao!! may i see it as a guest, Ken?? :P  (and that is a good thing to know, think im going to love this mod..

now if only i had tp.. hmm..  ;)

hmm least you can spell, and place sentences where they belong, the first time rofl!!
Title: Re: Glossary
Post by: Ken. on January 04, 2009, 12:45:45 PM
Sorry Smokey... did not realize that guest permissions were off!

Give it a try now.
Title: Re: Glossary
Post by: Smoky "Rider" Blue on January 04, 2009, 01:03:08 PM
yeps Kens its the same as mine.. ;)
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 01:06:17 PM
Quote from: SunKing on January 04, 2009, 12:35:01 PM
I added the noConflict code as requested, but the entire site then disappears, showing only the background.
Arrggg!

Looking foward to find a solution
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 01:11:41 PM
I think it may have to do with $("someid").hide();. Shoutbox (as far as I know) no longer relies on the Prototype library, but incorporates it into yshout.js. I tried to substitute "someid" with "yshout" as I thought that was what the shoutbox used, but to no avail. I am even less familiar with javascript than I am with PHP, so please don't expect much from my end.  :P
Title: Re: Glossary
Post by: slinouille on January 04, 2009, 01:19:29 PM
I'll install shoutbox on a test forum ... and do some tests  ;)
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 01:27:25 PM
Thank you for your time.

[slightly offtopic] If you have any questions about the shoutbox, I'll be more than happy to help you with it. ;)
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 01:47:12 PM
Another thing I have just noticed about v1.4. While the BBC works great when viewing the Glossary itself, the tooltips (when hovering) do not seem to be parsing the BBC.
Title: Re: Glossary
Post by: Mick. on January 04, 2009, 02:28:38 PM
Can anyone convert this mod to 1.1.7   pretty please?
Title: Re: Glossary
Post by: [unplugged] on January 04, 2009, 05:15:03 PM
I got the Glossary working with the Shoutbox. I opened yshout.js and replaced every instance of $( with $yS( to differentiate it from jQuery's default shortcut. It seems to have done the trick.
Title: Re: Glossary
Post by: Sentinel [AF] on January 05, 2009, 07:40:24 AM
Ahhh I downloaded a Yshout script a wee while back.

It just stopped working the other day and disappeared I'll try removing it from my server and install the glossary again.
I do not have any of those other scripts you refer to as far as I know.

I have a new shoutbox now even though I preferred the yshout one.

Hmmm. - I'll check the rest of the comments on here when I've done helping tidy the house.

Taaa and eZ.

Title: Re: Glossary
Post by: Sentinel [AF] on January 05, 2009, 08:14:28 AM
Quote from: SunKing on January 04, 2009, 05:15:03 PM
I got the Glossary working with the Shoutbox. I opened yshout.js and replaced every instance of $( with $yS( to differentiate it from jQuery's default shortcut. It seems to have done the trick.

Actually scrap my previous reply ...

I'll have a go at this one as the Yshout box is much nicer than the one I'm currently using.

:)
Title: Re: Glossary
Post by: grumblemarc on January 05, 2009, 09:36:05 AM
Quote from: slinouille on January 04, 2009, 04:11:53 AM
Quote from: grumblemarc on January 03, 2009, 07:30:37 PM
I have a problem. SMF 2.0.4b. The database seems not to have been modified. I get this error when trying to access the mod on my testbed Table 'smf2.smf_glossary' doesn't exist
File: W:\www\smf2\Sources\Glossary.php
Line: 168
. Sure enough I cannot see this table in the DB. All the files were deposited correctly however.

I don't know how to run the queries in installDatabase.php manually in that form. Can anyone help with a query that I can just drop into phpmyadmin and go? Thanks.
Hello Grumblemarc,
Don't you have any warning during installation ?
You can through (phpmyadmin) use the next sql query to create the table:
CREATE TABLE IF NOT EXISTS `smf_glossary` (
  `id` int(11) NOT NULL auto_increment,
  `word` varchar(30) collate latin1_german1_ci NOT NULL default '0',
  `definition` text collate latin1_german1_ci NOT NULL,
  `member_id` int(11) NOT NULL default '0',
  `date` int(11) NOT NULL default '0',
  `valid` int(1) NOT NULL default '0',
  `identical_to` text collate latin1_german1_ci NOT NULL,
  PRIMARY KEY  (`id`)
)


Perhaps you have to change the "latin1_german1_ci" ;)

SliN

Thanks for the reply. No. No warning. It said the mod was installed sucessfully. I didn't change anything. All files were deposited where they should be and all other files were modified correctly. Just the database stayed unchanged.

Thank you for the query. It worked fine.
Title: Re: Glossary
Post by: Nibogo on January 05, 2009, 01:06:24 PM
Good Mod
Maybe you can add categories , like the tp glossary module
Title: Re: Glossary
Post by: SillyCone on January 05, 2009, 06:58:52 PM
Quote from: slinouille on January 04, 2009, 01:06:17 PM
Quote from: SunKing on January 04, 2009, 12:35:01 PM
I added the noConflict code as requested, but the entire site then disappears, showing only the background.
Arrggg!

Looking foward to find a solution
Hello Slinouille,

My site is down for DNS reasons for the moment, that's why I haven't been back at you, sorry for that.

I do believe it is possible to use jQuery with other libs, I think jQuery is very "namespaceable" (I have never used it though, always kept up to date with the first luuuv, Prototype ;))
Title: Re: Glossary
Post by: [unplugged] on January 05, 2009, 07:06:18 PM
Quote from: SillyCone on January 05, 2009, 06:58:52 PM
I do believe it is possible to use jQuery with other libs, I think jQuery is very "namespaceable" (I have never used it though, always kept up to date with the first luuuv, Prototype ;))


Quote from: SunKing on January 04, 2009, 05:15:03 PM
I got the Glossary working with the Shoutbox. I opened yshout.js and replaced every instance of $( with $yS( to differentiate it from jQuery's default shortcut. It seems to have done the trick.

Works good enough for me.  ;D
Title: Re: Glossary
Post by: Sentinel [AF] on January 06, 2009, 12:01:33 PM
Still not working for me.

I did what you said SunKing.

But to no avail - Still can't add words and the text disappears from posts when I activate it within the forum.

I'm sorry Slin but I'll have to scrap the idea of using this for now.

Maybe one of the future releases will work fine without any conflicts - who knows.

Taaa anyways :)
Title: Re: Glossary
Post by: CvH on January 06, 2009, 07:06:32 PM
I´ve made an German-utf8 language file

could be useful for some :)
Title: Re: Glossary
Post by: slinouille on January 13, 2009, 12:56:59 PM
Quote from: CvH on January 06, 2009, 07:06:32 PM
I´ve made an German-utf8 language file

could be useful for some :)
Thank you CvH, I'll integrate it in the install package at next update ;-)

@other: I'll have soon some available time for working on gettind rid of this conflict ... I hope so.

Title: Re: Glossary
Post by: Sentinel [AF] on January 14, 2009, 12:57:48 PM
Nice :D
Title: Re: Glossary
Post by: slinouille on January 17, 2009, 03:03:16 AM
Hello,

I've upload version 0.1.5 that should solved the conflict of jQuery (used javascript librairy) with other javascript librairies that other mods may use (such as shoutbox)
I hope it will solve the problem that some of you may have  ;)

Thank you CvH for the German translation, it's now in the installation package  :)

SliN
Title: [Solved] Version 1.6 not working
Post by: PerryM on January 24, 2009, 01:40:37 PM
Hi,

Just downloaded V 1.6 into a brand new 2.0 Beta 4 and I still can't see any post that has the word which is in the glossary - same problem as I've had for a while now.

I just upload the module, activated it, add a word and the posts disappear if they contain that word.

Am I supposed to do something else too?

Thanks, I really need this module.

[Solved]
When I installed smf I selected UTF 8 option which causes Glossary to act nuts.  If it's not selected the module works just fine.  So there is still a bug but I really don't need UTF 8 now.
Title: Re: Glossary
Post by: [unplugged] on January 24, 2009, 09:08:54 PM
Quote from: slinouille on January 17, 2009, 03:03:16 AM
Hello,

I've upload version 0.1.5 that should solved the conflict of jQuery (used javascript librairy) with other javascript librairies that other mods may use (such as shoutbox)
I hope it will solve the problem that some of you may have  ;)

Thank you CvH for the German translation, it's now in the installation package  :)

SliN

So far, it seems to be working great. No problems with the shoutbox. Thanks for the mod.  ;D
Title: Re: Glossary
Post by: slinouille on January 25, 2009, 02:16:20 AM
@PerryM : very very strange behaviour ::)
Can you please give me the url so that I can check?
I've also tested this version on a fresh new 2b4 without any mods (no error in firebug) and with many mods (no error in firebug)

@SunKing : Thanks  :)
Title: Re: Glossary
Post by: PerryM on January 25, 2009, 12:55:02 PM
Quote from: slinouille on January 25, 2009, 02:16:20 AM
@PerryM : very very strange behaviour ::)
Can you please give me the url so that I can check?
I've also tested this version on a fresh new 2b4 without any mods (no error in firebug) and with many mods (no error in firebug)

@SunKing : Thanks  :)

When I installed smf I selected UTF 8 option which causes Glossary to act nuts.  If it's not selected the module works just fine.  So there is still a bug but I really don't need UTF 8 now.
Title: Re: Glossary
Post by: slinouille on January 26, 2009, 08:57:41 AM
Correction has been done, see version 0.1.7

Bug was due to UTF-8 mode.

Thank you PerryM  ;)

SliN
Title: Re: Glossary
Post by: Kraken on January 27, 2009, 12:42:27 PM
I installed this mod manually and work great.
However, in Greek language (i am using UTF-8) the tooltip shows  "??>?????" etc.
At the glossary's page the Greek are shown correctly.
Any ideas?
Title: Bug with Nneonneo's Shoutbox
Post by: PerryM on January 29, 2009, 01:04:37 AM
If I have nneonneo's Ajax ShoutBox and install Glossary 1.7 I get the following errors in shoutbox:

Notice: Undefined variable: jQueryLoaded in /home/fourm4he/public_html/perrym/dc/Sources/Load.php on line 1470

Notice: Undefined variable: jQueryLoaded in /home/fourm4he/public_html/perrym/dc/Sources/Load.php on line 1471


As soon as I remove Glossary the two lines go away.
Title: Re: Glossary
Post by: chillin on January 30, 2009, 03:58:42 AM
Nice mod slinouille! ! very useful indeed! if only I can get it to work as it should

I am also getting jQueryLoaded errors and I don't have nneonneo's Ajax ShoutBox .

Undefined variable: jQueryLoaded

File : /httpdocs/Sources/Load.php
Line: 1603
Title: Re: Glossary
Post by: slinouille on January 30, 2009, 05:07:57 AM
Sorry guys for this bug, it was a very stupid one  O:)

I've uploaded version 0.1.8 (perhaps the last one in 0.1 if it's okay ... I hope so)  :P

@Kraken: can you post a screen capture?

@PerryM: you are also in utf-8 mod, do you experience the same behavior than Kraken with tooltips ?

Thanks and really sorry for my stupid bug  :-[

SliN
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 07:40:38 AM
Quote from: slinouille on January 30, 2009, 05:07:57 AM
Sorry guys for this bug, it was a very stupid one  O:)

I've uploaded version 0.1.8 (perhaps the last one in 0.1 if it's okay ... I hope so)  :P

@Kraken: can you post a screen capture?

@PerryM: you are also in utf-8 mod, do you experience the same behavior than Kraken with tooltips ?

Thanks and really sorry for my stupid bug  :-[

SliN

I'm not in stf-8 mode but I've had crazy things happen with pretty urls - had to just get rid of it.  I'll check if Glossary has this problem anymore today.

Nope, Glossary still causes those undefined variable errors even with pretty urls left out.  Sorry
Title: Re: Glossary
Post by: slinouille on January 30, 2009, 08:20:23 AM
Strange I just can't reproduce that notice on my forum and on a fresh one ... can you please testwith this new package ?
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 08:37:59 AM
This is what I just got:
Notice: Undefined variable: jQueryLoaded in /home/m4inform/public_html/smf/Sources/Load.php on line 1480

Notice: Undefined variable: jQueryTooltip in /home/m4inform/public_html/smf/Sources/Load.php on line 1494

Notice: Constant already defined in /home/m4inform/public_html/smf/Sources/Load.php on line 1494
[History] [Commands] [ExtendedHistory] [HideAdminLinks] [ReturnToShoutbox]

Notice: Undefined variable: jQueryLoaded in /home/m4inform/public_html/smf/Sources/Load.php on line 1480

Notice: Undefined variable: jQueryTooltip in /home/m4inform/public_html/smf/Sources/Load.php on line 1494

Notice: Constant already defined in /home/m4inform/public_html/smf/Sources/Load.php on line 1494

I will try a virgin smf install just to make sure but I suspect the results will be the same.

P.S.
Yep, same errors with fresh install of smf 2.0 Beta 4 and nneonneo's AJAX ShoutBox.
Title: Re: Glossary
Post by: slinouille on January 30, 2009, 09:23:45 AM
Okay it only appears with this shoutbox installed!

I've done a modification ... see attached file and tell me  ;)
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 09:30:20 AM
Quote from: slinouille on January 30, 2009, 09:23:45 AM
Okay it only appears with this shoutbox installed!

I've done a modification ... see attached file and tell me  ;)

That's the one I installed  Glossary 1.8
Title: Re: Glossary
Post by: slinouille on January 30, 2009, 09:34:10 AM
Quote from: PerryM on January 30, 2009, 09:30:20 AM
Quote from: slinouille on January 30, 2009, 09:23:45 AM
Okay it only appears with this shoutbox installed!

I've done a modification ... see attached file and tell me  ;)

That's the one I installed  Glossary 1.8

It's a 0.1.8b in fact ;)
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 10:02:58 AM
Quote from: slinouille on January 30, 2009, 09:34:10 AM
Quote from: PerryM on January 30, 2009, 09:30:20 AM
Quote from: slinouille on January 30, 2009, 09:23:45 AM
Okay it only appears with this shoutbox installed!

I've done a modification ... see attached file and tell me  ;)

That's the one I installed  Glossary 1.8

It's a 0.1.8b in fact ;)


That did it!!!!  Whoo-hooo!

Thanks much.
Title: Re: Glossary
Post by: slinouille on January 30, 2009, 10:07:57 AM
Great !

:D
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 10:29:08 AM
When I was playing around with a number of the portal modules I noticed that the pencil which you have way over on the right side of the line next to "Add a new key word" was cut off.  You could not add a new word to the glossary.

Simple Portal, which I use, is ok.
Title: Re: Glossary
Post by: PerryM on January 30, 2009, 10:57:28 AM
One more thing - the glossary does change the word to blue but it does NOT replace the word with the correct size of the font.  They all seem to be 12 pt.

Well another thing - the Glossary does not work on the front page of SimplePortal - the articles on the front page of the portal are simply reprints of a post somewhere.  The Glossary does not find them on that front page.

And a suggestion - have an option to show the Glossary word just once in a post.  There is little reason to show the blue glossary word over and over again - my opinion.

Thanks for a great module - I sure appreciate your hard work.
Title: Re: Glossary
Post by: Özgür on January 30, 2009, 02:23:07 PM
@slinouille,

My problem is language. If i add a turkish description in keyword... etc = "Albüm" Message line to be appear "Albüm" But in glossary tooltip "Albüm".

Any idea for this ?
Title: Re: Glossary
Post by: slinouille on January 31, 2009, 01:40:07 AM
@Özgür´: please send me a capture screen

@PerryM:
- concerning the pencil, can you screen capture it and post it ?
- concerning the font size, please edit glossary.jquery.tooltip.css file
- concerning SImplePortal, it's normal because it's not integrated to ... I'll do an update to integrate it  ;)
- concerning suggestion, I can add an option to that
=> thank you for ideas  :)

SliN
Title: Re: Glossary
Post by: Özgür on January 31, 2009, 10:43:53 AM
Screen ;
Title: Re: Glossary
Post by: ianus on February 01, 2009, 06:16:18 AM
Greetings!

First thing I have to mention is, that your mod works great. I like the idea and the way this mod is working seems to offer a easy to handle usability.
I appreciate your work and so, please understand all following as a polite question.


Two things.
a.)It would be nice if we could have more than one Glossary.
b.)It would be nice if we could have an option to show the "Glossary-word" information inside a post or not.

This could be helpful for a wide mod-audience, but I like to give a very egocentric example.

I run a board which offers some basic information about games. I'm dealing with several singleplayer games which comes with a small amount of items. For them I write down some lists of things a player can find and use, like armory, spells ore weapons.
(Example: http://www.firopolis.de/forum/index.php/topic,2394.0.html)

Now I am searching for an option which allows me to embed a single name of an item inside a post. Some thing like the WoW Itemstats (http://www.simplemachines.org/community/index.php?topic=62358.0)
(Demo of WoW mod: http://www.darkcloud14.de/forum/first_test-t3.0.html)
(My testboard with your Glossary:
http://resmedia.info/smf2/index.php?action=glossary
http://resmedia.info/smf2/index.php?topic=10.0)

Your mod seems to have the potential to make something like this possible for my own item lists.
a.)For that I would need a Glossary for each game, because the word "sword" (for example) is used in nearly every game.
b.)For that I need an option to disable the "sword" information, for the case that somebody want to talk about a sword in general without referring to "the sword" mentioned in the Glossary.
Both can be done with a bb-code tag maybe. Something like [glossary1]Word[/glossary].

Maybe you want to grab the idea, but as mentioned, only a polite question and an offensive request.


Btw.
bb-code is working well in the Glossary, but not in threads.

Title: Re: Glossary
Post by: PfalzNacht on February 02, 2009, 06:45:01 AM
Hi!

I installed this very good mod, and it works just fine.

But i have one problem:

in the glossary.template everything is ok, but in the tooltip all german vowels are broken, there are some things like in the Screen from Özgür. All vowels like ä, ü, ö aren't show right.

Is this e html_encoding problem? My Forum is utf-8, and all other things works right.

What can i do to repair this in the tooltip?

EDIT:

oh, and i forgot to say, that the "Z" is missing!  ;)
Title: Re: Glossary
Post by: slinouille on February 02, 2009, 07:46:08 AM
Hello,
Thank you for your comments and suggestions.

Concerning the encoding problems, I'm doing some tests but I've not found any solution yet even if I'm quite sure it's due to the utf-8 encoding of the database. Must exist a solution ... I'll found it  ;)

@ianus : I'm working on some improvments of the glossary, and will include some of your suggestions. NEvertheless concerning "several" glossaries, I've already starting working on adding "categories" to the words. So I think that using categories combined to new option "show_in_message" and bbc_glossary code (in progress also), you'll be able to do what you want.
Title: Re: Glossary
Post by: slinouille on February 02, 2009, 07:54:23 AM
@Özgür´ and The Crusader:
I've found perhaps a solution. I thaught it was an encoding problem but it seems to bug a code problem (my fault in other terms)
in file Subs.php, found :
title=\"".htmlentities(addslashes($definition),ENT_QUOTES)."\">$1</a>'", $message);

replace by
title=\"".addslashes($definition)."\">$1</a>'", $message);

Tell me if it's okay after modification ::)
Title: Re: Glossary
Post by: PfalzNacht on February 02, 2009, 07:57:32 AM
My Database runs with utf8_general_ci, and the table smf_glossary is utf8_general_ci, too.

I think this is only a javascript problem with the tooltip, but i'm still haven't found the problem.

I converted the whole .js files into utf-8 without BOM, but it's still the same.

I hope you will find the answer.  ;)

EDIT:

you are my man!! It works like a charm!!  ;)
Title: Re: Glossary
Post by: Özgür on February 02, 2009, 08:23:32 AM
@slinouille
Problem fixed. But now smileys not showing.
   
All smiley in this way seems

rockayseri.net/rk/Smileys/default/coffee.gif" alt=":coffee:" title="" border="0" class="smiley" />
Title: Re: Glossary
Post by: slinouille on February 02, 2009, 10:15:24 AM
Quote from: Özgür´ on February 02, 2009, 08:23:32 AM
@slinouille
Problem fixed. But now smileys not showing.
   
All smiley in this way seems

rockayseri.net/rk/Smileys/default/coffee.gif" alt=":coffee:" title="" border="0" class="smiley" />
Don't you have a word in glossary that can be found in the url of your forum?
Example : you have defined word "test" in glossary and your forum has url : http://localhost/test/smf/...
Title: Re: Glossary
Post by: Özgür on February 02, 2009, 10:48:20 AM
I don't understand :S


Edit : I Understand this now.
I make a word "rockayseri" and enter desc. but my site rockayseri.net.
Now i delete this word and problem fixed. =)
Title: Re: Glossary
Post by: slinouille on February 02, 2009, 11:34:42 AM
That's it !

So we've found the cause of this problem ... but really don't understand why  :'(

Something with the regexp but as I'm not a regexp expert, I don't found ... this will be put as a 'limitation' in my readme file until I found a solution.
Title: Re: Glossary
Post by: Bancherd on February 03, 2009, 03:47:15 AM
Quote from: slinouille on February 02, 2009, 07:54:23 AM
@Özgür´ and The Crusader:
I've found perhaps a solution. I thaught it was an encoding problem but it seems to bug a code problem (my fault in other terms)
in file Subs.php, found :
title="".htmlentities(addslashes($definition),ENT_QUOTES)."">$1</a>'", $message);


replace by
title="".addslashes($definition)."">$1</a>'", $message);

Tell me if it's okay after modification ::)

I installed this mod along with the above fix on a fresh smf2 RC1 using UTF8-general-ci and Thai characters....it worked beautifully for English words with Thai-language description! :)

Now, I wish it could have glossary of Thai-words instead of just English words.  :)
Title: Re: Glossary
Post by: PfalzNacht on February 03, 2009, 08:02:52 PM
Quote from: The Crusader on February 02, 2009, 06:45:01 AM
oh, and i forgot to say, that the "Z" is missing!  ;)

There's always just this littile Bug. ;-)

Open the Glossary.php and search:
for ($i=ord("A");$i<ord("Z");$i++)

and replace it with
for ($i=ord("A");$i<=ord("Z");$i++)

That's all! :-)
Title: Re: Glossary
Post by: Kindred on February 04, 2009, 12:39:58 AM
Alright, I am really confused now....

I installaed the glossary, (which successfully installed on 2.0RC1) but I was getting a javascript error when attempting to do anything with it, which prevented me from added any terms.
Based on the conversations, I removed the gallery, downloaded the new one and attempted to re-install.

now I am getting the "table not found" error, even though the table *IS* present in my database, so I can not seem to re-install at all.

Based on my experience, it looks like this may be incompatible with EZPortal or SMF Media Gallery
Title: Re: Glossary
Post by: [unplugged] on February 04, 2009, 12:44:32 AM
I have both the Glossary mod and SMF Media Gallery mod installed and working together nicely in SMF2b4, and I would imagine they should coexist in SMF2RC1.
Title: Re: Glossary
Post by: Kindred on February 04, 2009, 12:52:01 AM
yup... it appears to be EZPortal. Looking through EZPortal, I notice that it also uses the jquery scripts

Of course, none of this helps if the darned thing won't re-install because of that screwy database error

edit - I went in and removed the install call for the database edits (since they were already done)
So, I am now back with the gallery installed and not working due to a javascript error
Title: Re: Glossary
Post by: slinouille on February 04, 2009, 05:02:21 AM
@The Crusader : thank you for the bug correction  O:)

@ Kindred : I'm also using the SMF Media Gallery and no problem. I'll do an installation of EZPortal and try to reproduce the javascript error you have

Edit : I've install EZPortal ... no error. i've added some 'by default' blocks and no error  :-\
Can you send me the error you have? Do you use specific EZportal blocks or modules?
Normally, even if this mod uses jQUery, Glossary should not interfere ... normaly
Title: Re: Glossary
Post by: Kindred on February 04, 2009, 08:10:49 AM
interesting...

using firefox, webdeveloper, I get a series of CSS errors and one JS error

Error: JQ is not defined
Source File: http://SITE/Themes/default/scripts/glossary.jquery.thickbox.modified.js
Line: 20


(CSS problems seem related to the use of this sort of these three lines in two different places within the css each.

margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');

height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
as well as

filter:alpha(opacity=0);


I suspect it's all related.....
Title: Re: Glossary
Post by: slinouille on February 04, 2009, 10:51:37 AM
Very strange ... I can't reproduce this js error with webdevelopper for FF
JQ can't be "not defined" because JQ is defined in Load.php file when page is loaded before that glossary.jquery.thickbox.modified.js (http://site/Themes/default/scripts/glossary.jquery.thickbox.modified.js) is loaded  ::)

On which page do you have this error? on "action=glossary" or on all pages of your forum ?
Do you use any specific Modules for EZPortal ?

Does this error block the usage of Glossary?

Nevertheless concerning the css errors, I confirm .. I'll try correcting them for next release.

EDIT : those CSS errors are due to some IE6 hacks ... try to suppress them perhaps
Title: Re: Glossary
Post by: Bancherd on February 04, 2009, 08:36:15 PM
I took a peek at the code, it'd be very difficult to convert it to work with Thai-alphabet words, even it if is using UTF8.  ::)   For the words to be defined by the glossary, can we set it up similar to the way SMF handles foreign languages using UTF8. ??? Regardless, it's still a very good mod!

I'll difnitely use this mod on my upcoming live site, along with PortaMx.  Is it possible to make this mod work with PortaMx?  Thanks.  :D
Title: Re: Glossary
Post by: slinouille on February 05, 2009, 03:58:30 AM
@Kindred : Okay I've found why ... it happens if you don't activate the Glossary.
Indeed if enable_glossary option is not found, then jquery library is not loaded. Then if you open glossary page, some part of the code needes some jquery elements (that are not loaded and an error is raised).
So Kinred, please activate glossary in the admin panel  ;) and you will be able to use it.

I'll do an improvment of that in the next release.

@Bancherd : I'm not a specialist of encoding things ... really sorry I'm afraid to not be very usefull for this problem. Concerning PortaMx ... perhaps  ;) I'll check if it's complicated (I don't know this PortaMx)

SliN
Title: Re: Glossary
Post by: Kindred on February 05, 2009, 08:10:53 AM
AH!   Wait...    you mean "[Glossary] Enable glossary tooltip in the messages" needs to be enabled?


That is somewhat confusing then...  I didn't realze that actually means "[Glossary] Enable glossary" :)         

What happens if I don't actually want the tooltip, but I do want the glossary LIST available at ?action=glossary?


hmmmmmmm.
I know what it needs too...    permissions.
I want STAFF to be able to add new glossary items, but not the regular users.
(maybe an approval option?)
Title: Re: Glossary
Post by: slinouille on February 05, 2009, 08:58:31 AM
Yes I've done a mistake in my translation.  O:)

I've added 2 specific options in next release  ;)

For information, you can parameter 3 options by membergroups :
option 1 - membergroup can administrate Glossary
option 2 - membergroup can view Glossary
option 3 - membergroup can suggest new word in Glossary

And for each word suggested, an admin must approve before being visible by all members
...
everything you want is already in the mod :D

SliN
Title: Re: Glossary
Post by: Kindred on February 05, 2009, 09:03:52 AM
You are good!

And yup... after all my whining about people not reading closely, I looked at the permissions list again and realized that they were indeed there. :)
Title: Re: Glossary
Post by: darkelhaym on February 05, 2009, 01:21:04 PM
I'm having a problem with the mod. I'm pretty sure I've installed everything correctly (though I had to make a manual edit to index.template of my custom theme) and I have activated the mod in the admin panel but the tooltip in the forum is shown like this.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg17.imageshack.us%2Fimg17%2F2323%2Ferrorua8.jpg&hash=fff71c7bcad45c568d93a1cabc58fac1f95f0034) (http://imageshack.us)


The theme I'm using is Blackrain V2 and running SMF 2.0 beta 4. Mods installed:
1.    PortaMx v0.95.2      0.952      
2.    AJAX Recent Topics    1.0.1    
3.    Spoiler Tag    0.6    
4.    SMF Trader System    1.2    
5.    Advanced Reputation System    1.5.2
6.    Downloads System    1.1.5
7.    Glossary    0.1.8
8.    PortaMx v0.95.1 Italian    0.951    
9.    cbi, 1.0    1.5    
10.    Reflection Avatar    1.1    

I already tried to uninstall Reflection Avatar but it didn't work.
Thanks for any help.
Title: Re: Glossary
Post by: slinouille on February 05, 2009, 04:17:15 PM
@darkelhaym: 2 possibilities :
1- you haven't activated the 1st option of the mod
2- you're custom theme didn't use the same classes on which the tooltip is activated.
In Load.php, I put "tooltip" on links in a div which has for classname "forumposts" (with next line):
JQ(function() { JQ("#forumposts a").tooltip(....
So check that it's always the case in your theme. If not try to adapt

SliN
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 05:06:06 AM
Please found attached version 0.2beta1.

New functions/options :Corrections of bugs listed until this post (hopefully)

Some screens  ;)
Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 06:00:53 AM
Oh, now with categories!  ;)  That's it. *thumbs up*
Later i will install the Glossary, and translate it completely into german utf-8. 
I attach the Modifications.german-utf8.php and the Help.german-utf8.php then.

But one question: is there a new install required, or can i only modify the files? Has something changed in the database?
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 06:56:23 AM
QuoteBut one question: is there a new install required, or can i only modify the files? Has something changed in the database?
Yes you should desinstall the previous one and reinstall the new package (test in local before of course). There are some DB changes, some new mod settings also ... but you can follow install manually of course.
Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 08:02:01 AM
Can you please give me the sql code to manually install the glossary groups table?
I have deinstall the old glossary and install the new mod, but the sql table with the groups is not there.
I uploaded the installDatabase.php, but this didn't work in my case.
Title: Re: Glossary
Post by: Kindred on February 06, 2009, 08:20:14 AM
odd...   I still get the error with the database table creation.

running the installDatabase.php separately has it respond
Fatal error: Call to undefined function db_extend() in /SITE/installDatabase.php on line 4
Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 08:29:28 AM
Sorry for the Doublepost, but here is the complete translation for german utf8.  ;)
Modifications.german-utf8.php
//Begin mod Glossary
$txt['enable_numeric_glossary']='[Glossar] Zahlen im Glossar bearbeiten';
$txt['glossary_none_sensitive']='[Glossar] Schlagwort Erkennung ohne Beachtung der Groß- und Kleinschreibung';
$txt['glossary_separator']='[Glossar] Zeichen das als Zeilenumbruch im Tooltip benutzt wird';
$txt['enable_bbc_tooltip_glossary']='[Glossar] Aktiviere BBCcode im Tooltip';
$txt['glossary'] = 'Glossar';
$txt['glossary_list_title'] = 'Begriff Liste';
$txt['glossary_all'] = 'alle';
$txt['glossary_new_word_button'] = 'Speichern';
$txt['glossary_new_word_title'] = 'Gib ein neues Schlagwort ein';
$txt['glossary_new_word'] = 'Schlagwort:';
$txt['glossary_new_definition'] = 'Definition';
$txt['glossary_bbccode_activated'] = ' (bbccode zulassen)';
$txt['glossary_edit_word_title'] = 'Bearbeite das Schlagwort';
$txt['glossary_submission_error_1'] = 'Fehler: Beide Felder m&uuml;ssen ausgef&uuml;llt sein!';
$txt['glossary_submission_error_2'] = 'Fehler: Das Schlagwort existiert bereits! <input type="submit" name="submit_update_word" value="Update">';
$txt['glossary_action_add'] = 'Schlagwort hinzuf&uuml;gen';
$txt['glossary_new_word_close'] = 'abbrechen';
$txt['glossary_menu'] = 'Glossar';
$txt['glossary_admin'] = 'Glossar';
$txt['permissiongroup_glossary'] = 'Glossar';
$txt['permissionname_view_glossary'] = 'Glossar ansehen';
$txt['permissionhelp_view_glossary'] = 'Entscheide ob Mitglieder das Glossar sehen k&ouml;nnen';
$txt['permissionname_admin_glossary'] = 'Administriere das Glossar';
$txt['permissionhelp_admin_glossary'] = 'Entscheide ob Mitglieder das Glossar Administrieren d&uuml;rfen';
$txt['permissionname_suggest_glossary'] = 'Erlaube Schlagwort Vorschlag';
$txt['permissionhelp_suggest_glossary'] = 'Entscheide ob Mitglieder neue Schlagw&ouml;rter vorschlagen d&uuml;rfen';
$txt['glossary_delete_word'] = 'Eintrag wirklich L&ouml;schen?';
$txt['glossary_edit_word_button'] = 'Update';
$txt['glossary_publish_word_button'] = 'Ver&ouml;ffentlichen';
$txt['glossary_confirm_publishing'] = 'Bitte Best&auml;tige die Ver&ouml;ffentlichung des Schlagworts!';
$txt['glossary_publish_word_tip'] = 'Ver&ouml;ffentlichen';
$txt['glossary_sugestion_you_made'] = 'Den Vorschlag muss best&auml;tigt werden!';
$txt['glossary_confirm_deleting'] = 'Bitte Best&auml;tige das L&ouml;schen dieses Schlagwortes!';
$txt['glossary_delete_word_button'] = 'l&ouml;schen';
//--- NOT TRANSLATED ---
$txt['enable_glossary_mod']='[Glossary] Erlaube die Glossar Mod';
$txt['enable_tooltips']='[Glossary] Erlaube den Glossar Tooltip in den Beitr&auml;gen';
$txt['glossary_unique_word']='[Glossary] Zeige ein Wort welches im Glossar steht nur einmal im Beitrag';
$txt['bbc_glossary'] = 'Ein Wort ins Glossar einf&uuml;gen';
$txt['glossary_by_alphabetic'] = 'Alphabetisch ordnen';
$txt['glossary_by_groups'] = 'Kategorien';
$txt['glossary_action_add_category'] = 'Kategorien verwalten';
$txt['glossary_not_enabled'] = 'Das Glossar ist zur Zeit nicht erlaubt!';
$txt['glossary_group'] = 'Kategorie';
$txt['glossary_add_new_group'] = 'Neue Kategorie erstellen';
$txt['enable_glossary_mod']='[Glossary] Erlaube die Glossar Mod';
$txt['glossary_new_group_name'] = 'Kategorietitel';
$txt['glossary_modify_group'] = 'Kategorie &auml;ndern';
$txt['glossary_delete_group_button'] = 'L&ouml;sche ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_button'] = 'Update ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_title'] = 'Neuer Name f&uuml;r die ausgew&auml;hlte Gruppe';
$txt['glossary_alert_new_group'] = 'Du musst der Gruppe einen neuen Namen geben!';
$txt['glossary_submission_error_3'] = 'FEHLR: Die Kategorie existiert bereits!';
$txt['glossary_alert_group_delete'] = 'Du musst die Gruppe zum l&ouml;schen ausw&auml;hlen!';
$txt['glossary_alert_group_update'] = 'Du musst einen neuen Titel f&uuml;r die ausgew&auml;hlte Gruppe ausw&auml;hlen';
$txt['glossary_publish_status'] = 'Wort ist freigegeben?';
$txt['glossary_tip_delete'] = 'Wort l&ouml;schen';
$txt['glossary_tip_approve'] = 'Dieses Wort freigeben';
$txt['glossary_tip_unapprove'] = 'Dieses Wort verbieten';
$txt['glossary_tip_edit'] = 'Wort ver&auml;ndern';
$txt['glossary_tip_visible'] = 'Tooltip verbieten';
$txt['glossary_tip_unvisible'] = 'Tooltip aktivieren';
$txt['glossary_confirm_disable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen erlauben!';
$txt['glossary_confirm_enable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen verbieten!';
$txt['glossary_confirm_approve'] = 'Du erlaubst dieses Wort';
$txt['glossary_confirm_unapprove'] = 'Du verbietest dieses Wort!';
$txt['glossary_approve_word_button'] = 'Erlaube es';
$txt['glossary_unapprove_word_button'] = 'Verbiete es';
$txt['glossary_enable_tooltip_button'] = 'Mach ein Tooltip daraus';
$txt['glossary_disable_tooltip_button'] = 'Verbiete den Tooltip';
$txt['glossary_alert_submit_new_word'] = 'Du musst alle Felder ausf&uuml;llen!';
$txt['glossary_tooltip_in_simpleportal'] = '[Glossary] Erlaube Tooltips in einem Block von SimplePortal';
$txt['glossary_definition_width']='[Glossary] "Definiere" Spaltenbreite (in Pixeln)';
$txt['glossary_group_none'] = '---ausw&auml;hlen---';
//End mod Glossary


Help.german-utf8.php
// The start of the language strings
$helptxt['enable_glossary_mod'] = 'Hier kannst du die Glossar Modifikation ein und ausschalten.';
$helptxt['enable_numeric_glossary'] = 'Entscheide ob Zahlen im Glossar bearbeitet werden k&ouml;nnen.';
$helptxt['glossary_none_sensitive']='Wenn aktiviert, wird der Tooltip &uuml;ber allen W&ouml;rtern gezeigt ohne Beachtung der Groß- und Kleinschreibung';
$helptxt['enable_groups_in_glossary']='Hier kannst du dich entscheiden f&uuml;r die Verwaltung von Kategorien im Glossar. Diese erlaubt die Einteilung der W&ouml;rter f&uuml;r ein besseres Verst&auml;ndnis.';
$helptxt['glossary_separator'] = 'Der Tooltip kann einen Titel und Abs&auml;tze darstellen. Setze nur das Zeichen, welches du verwenden willst um die Pause zwischen Titel und Absatz zu setzen.';
$helptxt['glossary_unique_word'] = 'Wenn du willst, kannst du hier entscheiden das der Tooltip nur einmal pro Beitrag gezeigt wird. Dies verhindert das mehrere Tooltips vom gleichen Wort in einem Beitrag gezeigt werden.';
$helptxt['glossary_definition_width']='Hier musst du nur die Absatzbreite ausw&auml;hlen.';
$helptxt['enable_tooltips'] = 'Wenn du Tooltips anzeigen lassen willst mit der Beschreibung des Wortes in einem Beitrag.';
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 08:29:54 AM
I'll check that

here is for creating new table :
CREATE TABLE `smf_glossary_groups` (
  `id` int( NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


For existing smf_glossary table, add 2 new fields:
  `show_in_message` int(1) NOT NULL,
  `group_id` int( NOT NULL,

Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 08:35:58 AM
There is something wrong in the sql code.
This is the Error Mesage when i try the code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL auto_increment, `title` varchar(50) NOT NULL, PRIMARY KEY (`id`)' at line 2
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 08:52:12 AM
Try this :

CREATE TABLE `smf_glossary_groups` (
  `id` int( NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);
Title: Re: Glossary
Post by: Kindred on February 06, 2009, 08:58:39 AM
hmmm....    this is really great.

My **ONLY** complaint is that it asks for confirmation on everything.

If I click approve, unapprove, tooptip, untooltip...  I shouldn't have to confirm via pop-up.

I'm OK with confirmation on delete...
Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 09:01:07 AM
This is the right sql code:  ;)
CREATE TABLE `smf_glossary_groups` (
  `id` int auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);



EDIT:
where can i edit the categories?
Title: Re: Glossary
Post by: Kindred on February 06, 2009, 09:02:29 AM
almost...

CREATE TABLE `smf_glossary_groups` (
  `id` int(1) auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);
Title: Re: Glossary
Post by: PfalzNacht on February 06, 2009, 09:13:31 AM
Sorry, my Package Manager is broken, and the files aren't rewritten.
I manually edit the files.

Thanks Kindred, i forgot in the sql code at int the number.  ;)

UPDATE:
just one question:
i edited the width from 800px into 100%, but this only works in the overview. When i select any category, the width is still for example 500px.
Where can i edit this? I searched in the Glossary.php and in the Glossary.template.php, but i didn't find it.
Title: Re: Glossary
Post by: darkelhaym on February 06, 2009, 10:39:31 AM
Quote from: slinouille on February 05, 2009, 04:17:15 PM
@darkelhaym: 2 possibilities :
1- you haven't activated the 1st option of the mod
2- you're custom theme didn't use the same classes on which the tooltip is activated.
In Load.php, I put "tooltip" on links in a div which has for classname "forumposts" (with next line):
JQ(function() { JQ("#forumposts a").tooltip(....
So check that it's always the case in your theme. If not try to adapt

SliN

Fixed this, thanks! But now I'm having problems with the BBC tags in tooltips. It appears ok while in the glossary but the forum tooltip is like this:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg23.imageshack.us%2Fimg23%2F9337%2Fforumou4.jpg&hash=e16aa8f039b32c9d4f91d96e90b3efe937668a55)

This is how I write it in the glossary:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg24.imageshack.us%2Fimg24%2F4679%2Ftextfieldpd5.jpg&hash=64d15d83667f3759d1ff88ada75c46acfa400e5c)

And how it appears:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg19.imageshack.us%2Fimg19%2F8590%2Fglossaryhn2.jpg&hash=03252427ae3ed2476de15bdb7f53c7464a4d8586)

The result is the same for the [img] tag. Other tags have weird problems, for example the b tag bolds the entire paragraph no matter where I close it. The only one that seems to work properly is italics.
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 12:17:15 PM
I'll check the "bugs" you both encountred as fast as possible !
Title: Re: Glossary
Post by: Kindred on February 06, 2009, 12:18:34 PM
hmmm...   question:   Permissions to EDIT entries?

I.e. I have a group
Project Editors who have the rights to add entries.
I want the editor who added the entry to also have the right to edit his own entries, but not to edit anyone else's and not to admin the whole glossary (i.e. no access to delete)

Especially now that I added categories, since *I* don't want to be responsible for going back through and categorizing all of the previous entries. :)
(Yes, I am an admin who delegates all REAL work!)
Title: Re: Glossary
Post by: slinouille on February 06, 2009, 03:04:09 PM
Normaly each author of a "word" has some rights on their own words ... if not I've forgotten to implement it because everything in the DB is ready for that  ... I'll check that tomorrow (totaly forgot to test that point ... I should have written down all my ideas in a specification :-D )

SliN
Title: Re: Glossary
Post by: Kindred on February 07, 2009, 12:05:38 AM
minor point:

You should use $settings['theme_url'] for the CSS instead of $settings['default_theme_url']

I have a dark background forum and I am working on a light-backed version of the same...   I'll need two completely different CSS for the two versions. Like anything custom, it's up to me to make those updates... but unless the CSS file called in index.template.php is actually IN the theme that I am working on, there will be only one version in the default theme (the standard, light colored version that you distribute)

BTW: The new beta version is working nicely on my 2.0RC1 forum...

-edit-

Ok, a few bugs:

8: Undefined index: sa
File: /.../Sources/Glossary.php
Line: 319

if ( ($_GET['sa'] == 'alphabetic' || empty($_GET['sa'])) || $modSettings['enable_groups_in_glossary'] == 0 ) {

8: Undefined index: 0
File: /.../Sources/Glossary.php
Line: 422 

<u>'.$context['glossary_groups'][$res['group_id']].'</u>



it's also missing a few new text strings which return undefined index..


$txt['glossary_group_error_submit']
$txt['glossary_error_submit']
$txt['glossary_action_status']
$txt['glossary_publish_word_button']
Title: Re: Glossary
Post by: slinouille on February 07, 2009, 01:08:47 PM
@Kindred: thank you for all comments ... I'm working on next beta2 ...coming soon hopefully  :P

@darkelhaym: sorry but bbcode with [.url] will not work due to the fact that this bbcode is transformet into a <a ... and the tooltips are also seeking for <a> tags ... so there is a double <a> tags which give the result you have seen!
For the moment I don't see any way to manage that point ... perhaps one day  ;D
Title: Re: Glossary
Post by: slinouille on February 08, 2009, 12:58:23 PM
Now Glossary 0.2b2

Some corrections done and improvments suggested.
Title: Re: Glossary
Post by: jak6868 on February 08, 2009, 07:14:51 PM
hi - does this work for unicode fonts? Could I put in a french glossary in an english language forum? Could I put in a hindi (unicode devanagari script) glossary (and would the tool tips work?).
thanks...
Title: Re: Glossary
Post by: Özgür on February 08, 2009, 07:38:48 PM
Quote from: slinouille on February 08, 2009, 12:58:23 PM
Now Glossary 0.2b2

Some corrections done and improvments suggested.

I install this but if i go to action=glossary

Unknown column 'title' in 'order clause'
... rk/Sources/Glossary.php
Line:334
Title: Re: Glossary
Post by: slinouille on February 09, 2009, 02:35:09 AM
Quote from: Özgür´ on February 08, 2009, 07:38:48 PM
I install this but if i go to action=glossary

Unknown column 'title' in 'order clause'
... rk/Sources/Glossary.php
Line:334
This seems to be a problem of database. So I think that during installation, installdatabaase.php has not been runned.
Add this sql query :
CREATE TABLE `smf_glossary_groups` (
  `id` int auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);


And add those 2 fields to smf_glossary table
`show_in_message` int(1) NOT NULL,
  `group_id` int(8) NOT NULL,


This is really strange that this installdatabase.php file is not executed. Can someone check is my file is well written? ::)

Quote from: jak6868 on February 08, 2009, 07:14:51 PM
hi - does this work for unicode fonts? Could I put in a french glossary in an english language forum? Could I put in a hindi (unicode devanagari script) glossary (and would the tool tips work?).
thanks...
The best is to test it on a local server. Nevertheless I'm developping and testing it, on an english version of SMF using french messages (as I'm french).
Title: Re: Glossary
Post by: Özgür on February 09, 2009, 04:40:53 AM
@slinouille i suppose this is smf rc1 bug. i see bugtracker.
Error is installDatabase.php;

No database selected
File: /home/rockayse/public_html/rk/installDatabase.php
Line: 81

Quote
Add this sql query :

your code work fine me. This error fixed.
Title: Re: Glossary
Post by: PfalzNacht on February 10, 2009, 10:30:15 AM
Quote from: slinouille on February 08, 2009, 12:58:23 PM
Now Glossary 0.2b2

Some corrections done and improvments suggested.

Are there many differents between beta 0.2.b1 and 0.2.b2?
Title: Re: Glossary
Post by: ianus on February 10, 2009, 03:36:10 PM
Greetings!

I like to drop a note about some strange behavior of your mod. Maybe this will help you a little bit.
I'm running a SMFb4 (clean install) and the latest version of your mod (0.2b2)
If you like, I can install the RC1.

Inside the Glossary:
I have set up two Categories.
If I enter a new Glossary-Word, I can't choose a category for it.
(cat01)
If I view the Glossary in alphabetical order, the have not category. Obvious.
(cat02)
I choose "Categroy" and "All" this "blank words" aren't shown
(cat02b)
If I want to edit a "blank word", I have to choose a category for them.
(cat03)

So, I have to put all words in a Category. Proposed I think.
In this case it would be nice, if I can choose the category while creating a new Glossary-word.


Inside a Post: (minor)
If I use only Glossary-words, each inside the tag, only the last word is active.
If I use some Glossary-words inside a single tag, all of them are active, but only if they are in the same row.
Well, the usual case will be, that some text is used before and after the Glossary-word. This is working well.

Anyway, you are doing great work. I really appreciate it.
Title: Re: Glossary
Post by: PfalzNacht on February 11, 2009, 06:41:33 AM
After i installed the SMF Media Gallery and the Aeva Mod, the Glossary (and jQLightbox) didn't work at all.

Are there Problems with JavaScript or something else?

I uninstall the Glossary and reinstalled it, but it doesn't work. I can't add a word or a category.

Maybe it's my failure, because in my testboard it works fine, but there i use glossary 0.1.8.  ;)

Title: Re: Glossary
Post by: slinouille on February 11, 2009, 08:16:58 AM
First of all, thank you for our comments that really help me to improve that mod  ;)

QuoteAre there many differents between beta 0.2.b1 and 0.2.b2?
Yes please use this new version ... some corrections have been done

QuoteAfter i installed the SMF Media Gallery and the Aeva Mod, the Glossary (and jQLightbox) didn't work at all. ...
It should not because, I have them using too without problems ... try the last version of glossary and jQLightbox. Please send me warning you have.

@ianus : Thanks for taking time ... much appreciated.
The fact is that you choose to manage "categories", the template for adding and modifying a word should propose you to select a category.
1=>This was a bug (corrected).
Indeed as written, I've decided to not shown "blank words" in "category" view.
2=> I will improve that by adding a category called "not categorized words".
Concerning the tags behavior, I'll check that carrefully

Points 1 & 2 will be implemented in version 0.2b3
SliN
Title: Re: Glossary
Post by: PfalzNacht on February 11, 2009, 08:23:38 AM
I installed the latest Vesion, and there were no warnings.  ;)

The only thing is that the buttons for "add word" and "add category" don't work.
Title: Re: Glossary
Post by: slinouille on February 11, 2009, 08:49:28 AM
Quote from: The Crusader on February 11, 2009, 08:23:38 AM
The only thing is that the buttons for "add word" and "add category" don't work.
if they don't work ... there is a problem with jquery library ... something is not loaded ... can you give me an url please ?
Title: Re: Glossary
Post by: Garry1953 on February 11, 2009, 02:17:39 PM
Hi
I'm unable to install Glossary for SMF 2.0RC1

I get this error.

Table 'xxxxxxxxx_smf.glossary' doesn't exist
File: /home/xxxxxxxxx/public_html/art-forum/Packages/temp/installDatabase.php
Line: 80


P.S. I've been using this mod on SMF Beta 4 without any problems so the database already exists,  and after updating to RC1 and trying to add Glossary_0.2b3.zip, I'm having the above error.

Title: Re: Glossary
Post by: Kindred on February 11, 2009, 07:49:43 PM
yeah.... I have never been able to get it to work on RC1.   I added the tables and fields manually through myphpadmin and removed the call to the SQL statements in the install file.
Title: Re: Glossary
Post by: timned88 on February 11, 2009, 09:37:43 PM
error when trying to run this in 2.0RC1...

Database Error
Unknown column 'title' in 'order clause'
File: /home/themagi2/public_html/forum/Sources/Glossary.php
Line: 334



//Build list of groups
$context['glossary_groups'] = array();
$data_groups = $smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}glossary_groups
               ORDER BY title ASC',        (LINE 334)
array()
);
Title: Re: Glossary
Post by: Kindred on February 11, 2009, 10:33:46 PM
did you do all of the database edits?
Title: Re: Glossary
Post by: Bancherd on February 11, 2009, 10:45:12 PM
I finally got 2b3 to work with a fresh install of RC1+PortaMx on my local box(xampp+xp).

It appears that the program generated "word" in the database table _glossary_groups instead of "title".

I deleted the table and regenerated it using
CREATE TABLE `smf_glossary_groups` (
  `id` int auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);

per above instructions....

It worked!  :D

A little problem though, it does NOT work if I used "Post new Poll"; however, it will work with my subsequent post/answer in the poll.

I also got undefined index errors while working with defining categories, etc.  Some of the errors are:  glossary_group_error_submit, glossary_error_submit, glossary_action_status, glossary_update_group_error_submit, etc. 

Looked like I am missing some files?
Title: Re: Glossary
Post by: slinouille on February 12, 2009, 02:29:17 AM
Hi!
You are right, my installdatabse.php file is bad ... I'm confused  O:)
I've mixed up "word" and "title"!
I'll correct that in 0.2b4

QuoteI also got undefined index errors while working with defining categories, etc.  Some of the errors are:  glossary_group_error_submit, glossary_error_submit, glossary_action_status, glossary_update_group_error_submit, etc. 

Looked like I am missing some files?
No no files are missing ... it's "old" definition I was using in temporary releases !
I'll do a chech of that and will clean them

QuoteA little problem though, it does NOT work if I used "Post new Poll"; however, it will work with my subsequent post/answer in the poll.
Do you mean that glossary tooltips are not available in a Poll ?
Title: Re: Glossary
Post by: Bancherd on February 12, 2009, 03:26:06 AM
QuoteDo you mean that glossary tooltips are not available in a Poll ?                      

I take it back....it works perfectly in poll.  :D   I must have done something wrong.  :-\
Title: Re: Glossary
Post by: slinouille on February 12, 2009, 05:37:24 AM
beta4 is uploaded ... I really hope this one is the good one ... I've taken time to check some differents aspects that where curious when managing groups.

Just uninstall previous beta and isntall this new one  ;)
Title: Re: Glossary
Post by: PfalzNacht on February 12, 2009, 05:52:58 AM
Thanks!

Have you make changes in the database tables?
Title: Re: Glossary
Post by: slinouille on February 12, 2009, 06:34:29 AM
Quote from: The Crusader on February 12, 2009, 05:52:58 AM
Thanks!

Have you make changes in the database tables?
Just use your phpmyadmin to access "smf_glossary_groups" and change name of field "word" to "title"
Title: Re: Glossary
Post by: PfalzNacht on February 12, 2009, 06:44:08 AM
The field was already "title", and it works since 0.2b2.  ;)
Title: Re: Glossary
Post by: slinouille on February 12, 2009, 07:42:03 AM
So it's ok ... use new 0.2b4 ... I think it's the good one ;)
Title: Re: Glossary
Post by: ianus on February 12, 2009, 08:58:29 AM
Greetings!

Thanks for the update.

Testboard: Fresh install of SMF2rc1 (+new database)
Glossary installs without problems.

Add words:
1.) Now I can chose a category while creating a new Glossary word. (nice!).
1.2.) But I'm not forced to set a category (while creating)
2.) I'm forced to set a category when I want to edit a word.

In my opinion, this could lead to confusions.
I think the user should be forced to set a category while creating a word (1) or the edit shouldn't require a category (2).
Maybe a "not categorized words" category is a good idea. This way a word is always categorized.

Add Glossary word to a thread:
While bold, italic and strikethrough are shown correct, others are breaking the function.

The first word inside bb-code that isn't working become the new G-word, the one that is in the Glossary becomes part of the post: ">codetest2
(Temporary example link: http://resmedia.info/smf21/index.php?topic=2.0)
bb-code inside the Glossary is working very well.

Mmh, I hope you understand what I am talking about.
Title: Re: Glossary
Post by: Garry1953 on February 12, 2009, 05:23:18 PM
Unfortunatley I'm still getting the same error using Glossary_0.2b4.zip when upgrading from previous Glossary v1.8.

However, when doing a clean instal on RC1, 0.2b4 works perfect.

Table 'xxxxxx_smf.glossary' doesn't exist
File: /home/xxxxxx/public_html/art-forum/Packages/temp/installDatabase.php
Line: 80
.
Title: Re: Glossary
Post by: Kindred on February 12, 2009, 05:51:03 PM
yup...   still remove the call for installDatabase.php from the packageinfo.xml file and do the database edits manually...


The method used to create the tables in this mod is not supported on RC1

slinouille,

Odd behavior
http://www.40konline.com/community/index.php?action=glossary

some of the columns are correctly spaced, others seem to collapse
Look at I, J, K, N, O and W as compared tothe other letters.

I also notice that b4 is still not using theme specific CSS... so those of use with 1 dark and one light theme are in a bind. :P
(note: fixed on my installation by editing default_theme_url to be theme_url in glossary.template.php and load.php)


edit: Installed the new version.
The following errors:

http://SITE/index.php?action=glossary 
8: Undefined index: edit_group
File: /SITE/Themes/default/Glossary.template.php
Line: 112 

http://SITE/index.php?action=glossary 
8: Undefined index: enable_groups_in_glossary
File: /SITE/Themes/default/Glossary.template.php
Line: 86 

http://SITE/index.php?action=glossary 
8: Undefined index: 0
File: /SITE/Sources/Glossary.php
Line: 442 

http://SITE/index.php?action=glossary 
8: Undefined index: sa
File: /SITE/Sources/Glossary.php
Line: 335 

http://SITE/index.php?action=glossary 
8: Undefined index: action_on_word
File: /SITE/Sources/Glossary.php
Line: 218 

Also lines 202, 186, and 170



-edit further-

I recommend making a setting in the admin tool that allows you to define the default state of "show in message instead of forcing it to 1 (on)
I modified mine directly in the database to default it to 0 (off)

Also... the glossary options are getting enough that I would suggest creating a new glossary section under modifications rather than having them in the modifications toplevel.

hmmm.... looking in the database, how is the field "identical to" used?   It looks to be helpful for multiple entries referencing the same thing (i.e. "TWSS" is identical to "That's What She Said" but would get two separate entries)  but I don't see any way to USE that field.
Title: Re: Glossary
Post by: Bancherd on February 12, 2009, 09:38:21 PM
QuoteI also notice that b4 is still not using theme specific CSS... so those of use with 1 dark and one light theme are in a bind. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsmileys%2Fsimple%2Ftongue.gif&hash=9053b56ffc94fa8bf1e2da12ddf332ae921c80ec)
(note: fixed on my installation by editing default_theme_url to be theme_url in glossary.template.php and load.php)

Thanks...I was trying to figure out how.  :D
Title: Re: Glossary
Post by: Kindred on February 12, 2009, 09:53:48 PM
you will also have to make copies of the 3 css files in your alternate themes CSS directories.
Title: Re: Glossary
Post by: Rockas on February 16, 2009, 01:25:20 PM
I'm having a problem with this fabulous mod.
if you have a word inserted which description contains another word inserted, the display in a topic gets screwed up.
ex.
Words inserted:

BUP: A bup file is a Back UP file of an IFO file. These files are commonly found on DVDs.

IFO: InFOrmation file commonly found on DVDs. Such files contain navigational information for your DVD player.

with those two inserted when you type BUP in a topic you get as result...

QuoteIFO file. These files are commonly found on DVDs.">BUP

Any clues to solve this?

thank you for the fantastic Mod.

edit: Typos
Title: Re: Glossary
Post by: slinouille on February 17, 2009, 03:03:02 AM
@Kindred: many thanks for your ideas and recommandations, I'll take them into consideration for next release (I've got much work those days, so that I didn't take time for the Glossary).
Concerning field "identical to", your right it's exactely for what it should be used ... but I decided to put that on side for the moment (perhaps in a future version when the actually functions will be okay ;) )

@Rockas: rhhaa ... I thaught I corrected that!!! I'll do some over tests ... in order to correct that in a next release.

Title: Re: Glossary
Post by: Rockas on February 17, 2009, 10:08:27 AM
@slinouille
Any estimated time to have that glitch solved? :-)
It would be a bit frustrating adding BBC tags to all the key words inside the definitions (as my under construction forum deals with lots of connected terms) if only for a couple or days or so :-)
Title: Re: Glossary
Post by: slinouille on February 17, 2009, 10:55:10 AM
Quote from: Rockas on February 17, 2009, 10:08:27 AM
@slinouille
Any estimated time to have that glitch solved? :-)
It would be a bit frustrating adding BBC tags to all the key words inside the definitions (as my under construction forum deals with lots of connected terms) if only for a couple or days or so :-)
I'll upload next release this evening or tomorrow.
Nevertheless if you can't wait  ;D , you can do next modification manually
In Sources/Subs.php, find and replace
// Do the Highlight in the message
            $message = preg_replace(
                '/((<a.+/a>)|(('. preg_quote(strtr($word, array(''' => ''')), '/'). '(?=[^A-Za-z0-9&agrave;-ÖØ-öø-ÿ_-s])))|('.preg_quote(strtr($word, array(''' => ''')), '/').'$))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
                "'$2' == '$1' ? stripslashes('$1') : '<span class="glossary" title="".addslashes($definition)."">$1</span>'",
                $message,
                (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1)? 1 : -1
            );

by
// Do the Highlight in the message
            $message = preg_replace(
                '/((<span.+/span>)|(('. preg_quote(strtr($word, array(''' => ''')), '/'). '(?=[^A-Za-z0-9&agrave;-ÖØ-öø-ÿ_-s])))|('.preg_quote(strtr($word, array(''' => ''')), '/').'$))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
                "'$2' == '$1' ? stripslashes('$1') : '<span class="glossary" title="".addslashes($definition)."">$1</span>'",
                $message,
                (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1)? 1 : -1
            );



QuoteI also notice that b4 is still not using theme specific CSS... so those of use with 1 dark and one light theme are in a bind. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsmileys%2Fsimple%2Ftongue.gif&hash=9053b56ffc94fa8bf1e2da12ddf332ae921c80ec)
I don't see what you mean exactly? ... I'm not an expert in SMF  ;)
Title: Re: Glossary
Post by: Rockas on February 17, 2009, 12:05:20 PM
hummm... i get an error
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/d/a/u/daudiok/html/forum/Sources/Subs.php on line 4142

I don't have a PHP editor here in the office, tried to visually find the missing ')' but couldn't find it... a lot easier when text gets different colors lol
Title: Re: Glossary
Post by: Kindred on February 17, 2009, 07:26:10 PM
slinouille,

What I mean is that the mod, as installed ALWAYS uses the default_theme_url/css/CSSFILES

What it SHOULD use is theme_url/css/CSSFILES

it is then up to each admin to make updates for any theme specific changes to colors, etc.

i.e. I have one light theme and one dark theme.
Your default CSS works perfectly well on the dfeault/light theme
it looks horrible on the dark background theme...   

I need two different CSS versions, so I had to go in and change the default_theme_url to be theme_url and add the glossary CSS files into my CUSTOMTHEME/css folder in order to correctly support the two different CSS versions.
Title: Re: Glossary
Post by: Rockas on February 19, 2009, 10:32:30 AM
:-( to install beta 5 the tables must be dropped first and i still have the same issue as described above :-(
Title: Re: Glossary
Post by: slinouille on February 19, 2009, 10:53:34 AM
There must be something wrong with my installDatabase.php file, it's not normal that you have to drop the tables before installing ... I'll check that and try to get some information about that point.
Concerning the second one, I've reinstall the package on a fresh smfrc1 with no such error ... can you write the source code that corresponds to those lines?
Title: Re: Glossary
Post by: Rockas on February 19, 2009, 11:05:15 AM
well... after restoring the tables I came across even more serious issues... I can't edit the words inserted not even create new ones as they icon doesn't appear
i will try to restore a back up and try a clean install, but i did it already when i first installed Beta 5 on a test folder.
Title: Re: Glossary
Post by: Rockas on February 19, 2009, 11:08:51 AM
new update... can't add new words, can't edit, can't erase... strangely, enebling and approving work fine.

edit: Beta 4 works fine with the exception for the first problem i described.
Title: Re: Glossary
Post by: Özgür on February 19, 2009, 11:17:22 AM
Quote from: Rockas on February 19, 2009, 11:08:51 AM
new update... can't add new words, can't edit, can't erase... strangely, enebling and approving work fine.

Me too..
Title: Re: Glossary
Post by: Rockas on February 19, 2009, 01:15:12 PM
oh well... having another issue... now the bb code isnot applied at the tooltip even if it appears on the glossary.
(went back to Beta 4)
Title: Re: Glossary
Post by: slinouille on February 20, 2009, 02:57:57 AM
oh !
I've been able to reproduce those problems when not using the by default SMF2 theme, is that your case?
Indeed in glossary.template.php, I'm using $settings['theme_url'] and not $settings['default_theme_url'], so that if you're not using default theme, the loaded files and icones don't correspond to where the files are ... hum do you see what I mean ?

I think I have to work hard on the installation aspect of my mod (my 1st really complexe mod  ;) )

Quote from: Rockas on February 19, 2009, 01:15:12 PM
oh well... having another issue... now the bb code isnot applied at the tooltip even if it appears on the glossary.
(went back to Beta 4)
Have you activated the option in the admin panel?

Title: Re: Glossary
Post by: Bancherd on February 20, 2009, 03:22:01 AM
QuoteI've been able to reproduce those problems when not using the by default SMF2 theme, is that your case?                      

yes...but that could be easily fixed.....however, I kept on getting some undefined errors whenever I entered into the glossary's control panel.  ::)
Title: Re: Glossary
Post by: Rockas on February 20, 2009, 04:31:38 AM
Yes, I am using a custom theme and yes I have bb code activated on the admin dialog and I am using a UTF-8 database if this helps.

Some posts before you posted a code to fix the problem of getting the keywords inside the description but it gives me the error i posted after. Can you help me fix that error so I check if it really fixes the problem?

Thank you.
Title: Re: Glossary
Post by: Rockas on February 20, 2009, 04:36:19 AM
In the mean time I am starting a server clean up so I can make a complete clean install. Lets see if I can fix the BB code issue like that. (uffff! thank god this is a site not opened to public yet lol :-))
Keep up the good work... this mod is really very fabulous for a support forum.
Title: Re: Glossary
Post by: Rockas on February 20, 2009, 09:09:44 AM
@slinouille
Ok... done... and still have the problem wth the bb code on posts... it works fine in glossary page but on the messages the code appears not the format.
Ofc... as i'm still using the beta 4 the mess with the descriptions and key words still exists.
I could try to install Beta 5 again, but from your explanation, i don't understand if it's enough to copy the icon files to my theme to make it work.

The database problem persists. When you try to install with the tables already created, it gives as error. The funny thing is that the error says the the table "don't exist" :-)
Anyway... this is just an installer problem.

Looking forward to hear from you.
Title: Re: Glossary
Post by: slinouille on February 22, 2009, 01:54:56 AM
@Bancherd: okay I'll check that

@Rockas: thank you for taking time for explaining your problems with the mod. In next days, I'll recheck every thing concerning the install (actually trying to see how other mods are building their "installdatabase" file in order to reproduce one good ;) )
Concerning the tooltip with utf-8, I know there is a probleme (see previous post), I thought it was corrected ... can you send me an example of word and text that create a problem?
Finaly concerning the theme, can you tell me if you have isntalled the mod with a theme and after that if you have switch to another theme?
Title: Re: Glossary
Post by: Bancherd on February 22, 2009, 09:59:29 PM
Quote@Bancherd: okay I'll check that

My apologies, the errors were with Beta4........no problems with Beta5.  :D
Title: Re: Glossary
Post by: Rockas on February 25, 2009, 06:40:01 AM
ok... here is one example:
definitions:

QuoteAVI = Audio Video Interleave. The video format most commonly used on Windows PC's. It defines how video and audio are attached to each other, without specifying a codec.

Codec = COder/DECoder. A codec is a piece of software that allows you to encode something - usually audio or video - to a specific format and can decode media encoded in this specific format again. Popular Codecs: MPEG1, MPEG2, MPEG-4, Indeo, etc. AVI, ASF, etc is not a codec but a format - that can be encoded using different codecs.

Result when I post "AVI"

Quotecodec.">AVI

Again... this happens with Beta 4... i can't install Beta 5 it simply doesn't work.
And please check your database when updating or installing... your installation Beta 4 amd Beta 5 doesn't support the previous existence of the tables.
Thank you.

Title: Re: Glossary
Post by: Rockas on February 25, 2009, 06:44:43 AM
Ah sorry... i forgot!
I have "Use keywords detection with case insensitivity" on in admin area but it still messes the displayed definitions on the topics as the key word is "Codec" and it gets screwed with "codec" in the AVI definition.
Th only workarround possible is if i type codec between commas.
Title: Re: Glossary
Post by: Antes on February 25, 2009, 09:50:39 AM
Works very good with RC1 ... This is so nice :) For Gamer Forums...

i Fixed my Problem Works now Awsome !
Title: Re: Glossary
Post by: ianus on February 25, 2009, 10:45:48 AM
Quote from: Gnoll on February 25, 2009, 09:50:39 AM
Works very good with RC1 ...

I can see at least two (already reported) errors when I look at your example thread.
yourdomain //index.php?&topic=8.0

Title: Re: Glossary
Post by: Antes on February 25, 2009, 12:02:18 PM
Quote from: ianus on February 25, 2009, 10:45:48 AM
Quote from: Gnoll on February 25, 2009, 09:50:39 AM
Works very good with RC1 ...

I can see at least two (already reported) errors when I look at your example thread.
yourdomain //index.php?&topic=8.0

i think it cause of installed mods ...

its working normal for me but !

* When edited my Post ... Glossary Converting last Word which i added ,
* i added Sherion ( +1 ) & Sherion ( +1 ) Rb ...
>> When i write Sherion ( +1 ) Sherion ( +1 ) Rb only Converting Sherion ( +1 ) Rb

Thx :) too much
Title: Re: Glossary
Post by: Rockas on February 26, 2009, 06:21:24 AM
Hummm... just made a few tests with some more key words and definitions and it looks like if I use the English language (ISO... not UTF) it goes ok but still doesn't accept the BBCode in the tooltip on posts.
Title: Re: Glossary
Post by: CvH on March 05, 2009, 08:09:51 PM
Known problems : - missing some translations in German -  just PM me if u need some phrases in german :)


Quote$txt['glossary_word_width'] = 'Wort Spaltenbreite (in Pixel)';
$txt['glossary_not_categorized'] = 'Nicht Kategorisiert';
$txt['glossary_show_in_message_default'] = 'Zeige standardm&auml;&szlig;ig Definitionen im Post';
Title: Re: Glossary
Post by: Bancherd on March 07, 2009, 10:08:43 PM
Not sure if this was caused by my setup.  ???   If I installed the mod without enabling the tooltips in posts, THEN went into the forum to read posts; I kept on getting undefined index error for the index- "enable_tooltips".

However, after I chose to  "enable_tooltips" for posts, the error no longer occurred.
Title: Re: Glossary
Post by: Bancherd on March 13, 2009, 06:45:25 PM
Quote from: Bancherd on February 04, 2009, 08:36:15 PM
I took a peek at the code, it'd be very difficult to convert it to work with Thai-alphabet words, even it if is using UTF8.  ::)   For the words to be defined by the glossary, can we set it up similar to the way SMF handles foreign languages using UTF8. ??? Regardless, it's still a very good mod!

I'll difnitely use this mod on my upcoming live site, along with PortaMx.  Is it possible to make this mod work with PortaMx?  Thanks.  :D

I got it to work with Thai-alphabets on my local test box(xampp/php5)  :D .....but it will take much more work for my real live site with php4.4.8 without mbstring-support. :(
Title: Re: Glossary
Post by: perro88 on March 28, 2009, 05:39:43 PM
Any chance of being coverted to 1.1.8 one day? regards
Title: Re: Glossary
Post by: jgarzaro on March 29, 2009, 06:29:05 PM
Quote from: perro88 on March 28, 2009, 05:39:43 PM
Any chance of being coverted to 1.1.8 one day? regards

Ditto!
Title: Re: Glossary
Post by: Bancherd on March 31, 2009, 11:59:49 PM
Looks like there is a problem with parsing bbc-codes, if bbc-codes are used in the tooltips.  For example, I had:

Keyword: beni
tooltips:  Red coloration [xrl=hxxp://xxx.........]link1[/xrl] ...(I substituted "x" for "u").

will cause 'link1">' to show up infront of 'beni',...( keyword 'beni' becomes 'link1">beni') and 'link1">'has the same tooltip as the keyword 'beni'.

same thing for (http:///%3E%3Cbr%20/%3EThere%20is%20no%20problem%20with%20the%20definition-page,%20everything%20parsed%20and%20displayed%20properly.%3Cbr%20/%3E%3Cbr%20/%3EHope%20this%20help.%3Cbr%20/%3E%3Cbr%20/%3EBancherd%3Cbr%20/%3E%3Cbr%20/%3EPS. %20I%20am%20using%20php%204.x.x..if%20it%20makes%20any%20difference.)
Title: Re: Glossary
Post by: slinouille on April 02, 2009, 04:48:37 PM
Quote from: Bancherd on March 31, 2009, 11:59:49 PM
Looks like there is a problem with parsing bbc-codes, if bbc-codes are used in the tooltips.  For example, I had:

Keyword: beni
tooltips:  Red coloration [xrl=hxxp://xxx.........]link1[/xrl] ...(I substituted "x" for "u").

will cause 'link1">' to show up infront of 'beni',...( keyword 'beni' becomes 'link1">beni') and 'link1">'has the same tooltip as the keyword 'beni'.

same thing for (http:///%3E%3Cbr%20/%3EThere%20is%20no%20problem%20with%20the%20definition-page,%20everything%20parsed%20and%20displayed%20properly.%3Cbr%20/%3E%3Cbr%20/%3EHope%20this%20help.%3Cbr%20/%3E%3Cbr%20/%3EBancherd%3Cbr%20/%3E%3Cbr%20/%3EPS. %20I%20am%20using%20php%204.x.x..if%20it%20makes%20any%20difference.)
Hi!

I thaught I've corrected that ... are you using a utf-8 database ?

Nevertheless ... I'll check that point very soon, because I've decided to recode this mod taking in account all the ideas and comments you give me on that mod ;)
If I'll found a quick way to solve your problem, I'll upload a new release.

SliN
Title: Re: Glossary
Post by: Bancherd on April 02, 2009, 06:41:48 PM
Quoteare you using a utf-8 database

Yes...I am using a utf-8 database.

Thanks for checking into this.  :D
Title: Re: Glossary
Post by: Rockas on April 02, 2009, 08:41:30 PM
Quote from: slinouille on April 02, 2009, 04:48:37 PM
Quote from: Bancherd on March 31, 2009, 11:59:49 PM
Looks like there is a problem with parsing bbc-codes, if bbc-codes are used in the tooltips.  For example, I had:

Keyword: beni
tooltips:  Red coloration [xrl=hxxp://xxx.........]link1[/xrl] ...(I substituted "x" for "u").

will cause 'link1">' to show up infront of 'beni',...( keyword 'beni' becomes 'link1">beni') and 'link1">'has the same tooltip as the keyword 'beni'.

same thing for (http:///%3E%3Cbr%20/%3EThere%20is%20no%20problem%20with%20the%20definition-page,%20everything%20parsed%20and%20displayed%20properly.%3Cbr%20/%3E%3Cbr%20/%3EHope%20this%20help.%3Cbr%20/%3E%3Cbr%20/%3EBancherd%3Cbr%20/%3E%3Cbr%20/%3EPS. %20I%20am%20using%20php%204.x.x..if%20it%20makes%20any%20difference.)
Hi!

I thaught I've corrected that ... are you using a utf-8 database ?

Nevertheless ... I'll check that point very soon, because I've decided to recode this mod taking in account all the ideas and comments you give me on that mod ;)
If I'll found a quick way to solve your problem, I'll upload a new release.

SliN

Great NEWS! :-)
Title: Re: Glossary
Post by: slinouille on April 04, 2009, 09:55:30 AM
Hello,

New release 0.3.0 is available ...

Some changes have been made such as new dialog boxes, administration contextual menu, words selection for massive actions, synonyms are also "tooltiped" in messages, ...

Some new functionnalities : synonyms management, massive administration actions, ...

Some improvments have been done for tooltip display in messages.

I really hope you like this version :)

SliN
Title: Re: Glossary
Post by: Özgür on April 04, 2009, 01:44:44 PM
If pretty url installed and enabled, glossary function (add keyword, administration etc) not work.
Title: Re: Glossary
Post by: Groundhog on April 04, 2009, 03:30:33 PM
slinouille

I had several other mods installing to the same area as yours since I had installed the last version so it took a bit of time to edit for uninstalling the old and edit for adding the new but it was worth it.

You have added so many options and the layout is so good. Thanks a lot for this mod and the new features.

Regards.  8)
Title: Re: Glossary
Post by: slinouille on April 04, 2009, 03:55:56 PM
@Groundhog: Many many thanks for your message ... I must say that this kind of message is really what makes me share my mods ... thank you for wrtting those lines  ;)

@Özgür´: I've tried installing "pretty url" but my server doesn't support "url rewritting" so that I just can't make any test  ::) ... my knowledge on url rewritting is too limites to understand why this mod is not working as it should when prettyurl is enabled. Do you have any error message, or something else in a console?

SliN
Title: Re: Glossary
Post by: Özgür on April 04, 2009, 04:21:25 PM
Hmm. Want to test this?? If you care, I can send you for my test site ftp&other account details by pm.
Links not work. Any errorlog.
Please look attachment.
Title: Re: Glossary
Post by: slinouille on April 05, 2009, 06:09:55 AM
Quote from: Özgür´ on April 04, 2009, 04:21:25 PM
Hmm. Want to test this?? If you care, I can send you for my test site ftp&other account details by pm.
Links not work. Any errorlog.
Please look attachment.
Yes please :)
Title: Re: Glossary
Post by: fotografo74 on April 06, 2009, 03:35:42 AM
Hi,
thanks for this Mod :-) ( sorry for my english)
I have problem, i'm unable insert new keyword, it's not clickable, and all links in quick admin panel ( manage categories,enable/disable tooltips,approve/unapprove selection,associate to a category,select/unselect all ) are http://www.macroforum.org/index.php?action=glossary#
Why?
How can i resolve this?
Thans!
Antonio
Title: Re: Glossary
Post by: slinouille on April 07, 2009, 12:47:06 PM
@fotografo74: by clicking on this link, I can't access to the glossary ...
Your forum seems to use many js files loaded ... I think there is js incompatibility between glossary and those. Indeed the problems you are describing are coded in javascript and relies on a js library.
Please give me an access so that I can check

@Özgür´: I've connected to your forum ... for the moment I've not been able to understand why the url rewriting is corrupting the glossary links ... I'll found it  ;)
Title: Re: Glossary
Post by: Özgür on April 07, 2009, 01:18:54 PM
I think prettyurls remove "#" character for url. But i don't know how fix.. :(
Title: Re: Glossary
Post by: fotografo74 on April 08, 2009, 02:49:12 PM
Quote from: slinouille on April 07, 2009, 12:47:06 PM
@fotografo74: by clicking on this link, I can't access to the glossary ...
Your forum seems to use many js files loaded ... I think there is js incompatibility between glossary and those. Indeed the problems you are describing are coded in javascript and relies on a js library.
Please give me an access so that I can check


Thanks for helps :-)
Now you can access :-)
You nedd other info ?
ANtonio
Title: Re: Glossary
Post by: slinouille on April 08, 2009, 04:05:01 PM
@fotografo74: it seems that the file glossary.jquery.js has been badly uploaded on your server because when trying to open it with firebug it's empty.
So please try to reupload this file by FTP ... I'm sure this will work after (but don't forget to clean your web browser cache)  ;)

SliN
Title: Re: Glossary
Post by: fotografo74 on April 08, 2009, 04:29:47 PM
Quote from: slinouille on April 08, 2009, 04:05:01 PM
@fotografo74: it seems that the file glossary.jquery.js has been badly uploaded on your server because when trying to open it with firebug it's empty.
So please try to reupload this file by FTP ... I'm sure this will work after (but don't forget to clean your web browser cache)  ;)

SliN
Now it's perfect!!!!
All .js files in scripts folder are 0 bytes!
Thanks thanks :-)
ANtonio
Title: Re: Glossary
Post by: dekay on April 15, 2009, 01:54:55 PM
It's a nice MOD, but I experienced some problems while installing/using it (SMF 2RC1, german utf8 database):

1. I was not able to install it at first because of AVEA (which was already installed). I discribed the issue at the AVEA-Thread (http://www.simplemachines.org/community/index.php?topic=200401.msg2017193#msg2017193) because I'm not sure who's to blame  ;D Perhaps Glossary...

2. When I managed to install Glossary it blanked out my entire Forum. I found out why: the language file is corrupt (german-utf-section of languages.xml):

$txt['glossary_untooltip_all'] = "Disable tooltips on selection?";
$txt['glossary_action_admin'] = "Administration";
$txt['glossary_action_select_all'] = "Select all";
$txt['glossary_action_unselect_all'] = "Unselect all
$txt['glossary_admin_context_menu'] = "Enable administrator right-click context menu";
//End mod Glossary


should be ...
$txt['glossary_action_unselect_all'] = "Unselect all";
... I assume

3. Glossary-words can't be in URLs to images, smilies, etc.. Thats quite bad when you have a domain name that's an acronym which is worthy to be explained via Glossary. This is worse if you think of users embedding images that can have almost every word that's allready in the glossary.
Any workaround for that? Or an option that can be used to stop that parsing of URLs?
Title: Re: Glossary
Post by: Running With Scissors on April 17, 2009, 10:59:47 AM
It installed without a problem but I can't any words or anything. http://www.traxck.com/index.php?action=glossary#
Title: Re: Glossary
Post by: webline on April 17, 2009, 11:35:09 AM
thanks @dekay, i just update the file, attached my version
Title: Re: Glossary
Post by: iain sherriff on April 18, 2009, 06:27:04 AM
Nice. Works a treat  :)

I had AEVA installed and had to uninstall this to allow Glosary to install but reinstalling AEVA doesnt affect Glossary.
I do have an issue with the Theme I'm using, the css for Glossary needs changing as the text links dont show up and I'm missing some images yet, but I hven't edited my Theme yet.

www.uklows.com
Title: Re: Glossary
Post by: slinouille on April 18, 2009, 03:59:05 PM
@dekay: thanks for correction. Concerning point 3, I thaught it was working ... can you give me a concret example ... I've perhaps not think to all existing cases ;)

@Running With Scissors: I think you didn't give the right to the membergroups to add words or manage tjhe glossary.

@iain sherriff: thank you for process to follow ... I'll check that behaviour with AEVA

Thanks guys for your comments :)

SliN

Title: Re: Glossary
Post by: dekay on April 18, 2009, 05:58:58 PM
Quote from: slinouille on April 18, 2009, 03:59:05 PM
@dekay: thanks for correction. Concerning point 3, I thaught it was working ... can you give me a concret example ... I've perhaps not think to all existing cases ;)

sure.

a) activate Glossary.
b) add the expression "lol" to the glossary
c) prepare a posting like this:
lol

:lol:

[url]/forum/Smileys/default/lol.gif[/url]

[img]/forum/Smileys/default/lol.gif[/img]

(assuming /forum/ is the path to your SMF)

d) Preview the post: everything looks alrigh
e) make the post and get something like you can see in the attached picture.
f) wonder why the first "lol" has no tooltip, but the one in the url

another interesting test: attach some top level domains to your glossary. like de, fr, com, info, net.
Title: Re: Glossary
Post by: Running With Scissors on April 19, 2009, 07:48:02 PM
Quote from: slinouille on April 18, 2009, 03:59:05 PM
@Running With Scissors: I think you didn't give the right to the membergroups to add words or manage tjhe glossary.

I'm a admin so I already have all the permissions but it still won't let me click add a new key word.
Title: Re: Glossary
Post by: Kindred on April 22, 2009, 04:03:10 PM
Actually,   Installing on 2.0RC1, I get the same error as running with scissors...   All of my previous entries work and are editable, but I can not enter ANY new ones.

I can send you a test admin account to demonstrate.
Title: Re: Glossary
Post by: slinouille on April 23, 2009, 03:48:25 AM
Arrggg what did I do :(

I've changed some settings variables in previous version, perhaps are they badly initialized when it's an upgrade?
Can you tell me if you have clicked on "save button" in the admin glossary panel ? perhaps that by clicking it will reload all variables.

Nevertheless I'll check on my side.

@Kindred: yes please ;)

SliN
Title: Re: Glossary
Post by: Kindred on April 23, 2009, 07:05:04 AM
hmmm....


I just noticed that ALL links in the upper right corner go to
http://SITE/index.php?action=glossary#

none of the admin links work either.

account info sent in PM
Title: Re: Glossary
Post by: marcozambi on April 24, 2009, 03:33:02 AM
Hi slinouille!
First thank you for this impressive piece of software. You made my day on forumastronautico.it.

I have just an odd behaviour, that it seems to me it's been signaled before: pattern recognition of keywords is working even inside the definition boxes of the Glossary, with the result that the text cotained in the popup balloons is corrupted.

Example:
1) I add a keyword like "EST" and his description is (in italian) "Eastern Standard Time - Ora solare della costa est degli USA, pari a UTC-5"
2) When i surf in my posts, the word "est" that is the italian for "east" is recursively "resolved", with the result you can see in the attached image files.

Is it possible to add an option to permanently avoid to apply glossary to the description of the glossary words itself?

I hope I've managed to explain myself, sorry for my bad english.
Title: Re: Glossary
Post by: marcozambi on April 24, 2009, 10:18:01 AM
To be more precise, the strange behavior disappears if i turn on the "Enable BBCcode in tooltip" option, but the keywords present in other keyword's descriptions appear in capital letters.
Title: Re: Glossary
Post by: slinouille on April 24, 2009, 12:33:31 PM
@Kindred: it seems that some js files are not loaded on your page. Please check that files glossary.jquery.contextMenu.js and glossary.simplemodal.js are in your "default-dark/scripts/" directory
After that clear cache and reload page, and I think everything will working ;)

@marcozambi: Perhaps this case is not taken into account in my regexp definition. I'll check that for you ;) ... and thank you for your "thanks" :)

SliN
Title: Re: Glossary
Post by: Kindred on April 24, 2009, 07:41:03 PM
hmmm.... shouldn't the scripts default to the versions sitting in the default/scripts directory, like the rest of SMF's scripts do?


I don't even HAVE a scripts sub-directory in ANY of my alternate themes' directories.
Title: Re: Glossary
Post by: slinouille on April 25, 2009, 01:44:44 AM
@Kindred: of course it should, but actually it doesn't ... I was just indicating you how to correct temporary ...
I'll do an update for correcting this bug.

By the way, some messages above you were writting that "Administration" menu in glossary was not visible (same problem as running with scissors). When connected to your forum, I've seen it ... did the solution I suggest you okay ???

SliN
Title: Re: Glossary
Post by: slinouille on April 25, 2009, 02:08:05 AM
@marcozambi: concerning the "bug" you've seen ... I've done some investigations.
On my forum I've add your keyword and description, and everything is okay. I've updated the database in utf-8, and it still okay.
In fact the strange code I see on the screen capture, is a specific tag I add to all keywords that are in description. Just in order to not show the description in a description (if you see what I mean) ...

The thing is that this code should be removed before the text being shown  :-\
As I'm not abble to reproduce it, I've done some minor changes in the code that could (perhaps) correct that.

I'll upload version 0.4 this morning  ;)

SliN
Title: Re: Glossary
Post by: marcozambi on April 25, 2009, 04:19:15 AM
Just a thing: it seems to me that this mod does not use any customized css created to adapt the tooltip's colors to themes... Am I wrong?
Title: Re: Glossary
Post by: webline on April 25, 2009, 04:40:10 AM
i have the same error like "marcozambi"
Title: Re: Glossary
Post by: slinouille on April 25, 2009, 05:18:49 AM
@webline: using new release ?

@marcozambi: modify file glossary.jquery.tooltip.css, but don't forget to clear cache after modification ;)
Title: Re: Glossary
Post by: Arveles on April 25, 2009, 09:46:30 AM
Please pretty urls support this mod. If use pretty urls js menu error. Thanks for your mod.
Title: Re: Glossary
Post by: Arveles on April 25, 2009, 09:49:31 AM
Turkish translate:

Modifications.turkish.php
$txt['enable_glossary_mod']='Sözlük Modunu Aç';
$txt['enable_tooltips']='Mesajlardaki sözlük aracını etkinleştir';
$txt['enable_numeric_glossary']='Sayısal sözlük aktif.';
$txt['enable_groups_in_glossary']='Sözlük içinde kategori yönetimi aktif.';
$txt['glossary_none_sensitive']='Use keywords detection with case insensitivity';
$txt['glossary_separator']='Satır sonu eklenmesi için gerekli karakter sayısı.';
$txt['enable_bbc_tooltip_glossary']='Araç içinde BBC kodlarını etkinleştir.';
$txt['glossary_unique_word']='Her sözcüğü mesajda bir kez görüntüle.';
$txt['glossary_tooltip_in_simpleportal'] = 'SimplePortal bloklarında aracı göster.';
$txt['glossary_definition_width']='"Tanım" Sütun genişliği (piksel olarak)';
$txt['glossary'] = 'Sözlük';
$txt['glossary_list_title'] = 'Tanımlar listesi';
$txt['glossary_all'] = 'Hepsi';
$txt['glossary_new_word_button'] = 'Kaydet';
$txt['glossary_new_word_title'] = 'Yeni bir anahtar kelime girin';
$txt['glossary_new_word'] = 'Anahtar Kelime:';
$txt['glossary_new_definition'] = 'Tanım';
$txt['glossary_show_in_message'] = 'Tanımı mesajların içinde göster.';
$txt['glossary_bbccode_activated'] = ' (bbc kodları kullanılabilir)';
$txt['glossary_edit_word_title'] = 'Anahtar kelimeyi düzenle';
$txt['glossary_submission_error_1'] = 'Hata: İşaretli alanlar doldurulmalıdır!';
$txt['glossary_submission_error_2'] = 'Hata: Bu anahtar kelime zaten var!';
$txt['glossary_action_add'] = 'Yeni anahtar kelime ekle';
$txt['glossary_new_word_close'] = 'İptal';
$txt['glossary_menu'] = 'Sözlük';
$txt['glossary_admin'] = 'Sözlük';
$txt['permissiongroup_glossary'] = 'Sözlük';
$txt['permissionname_view_glossary'] = 'sözlüğe bak';
$txt['permissionhelp_view_glossary'] = 'Üye olursanız sözlüğü görebilirsiniz.';
$txt['permissionname_admin_glossary'] = 'Sözlük Yönetimi';
$txt['permissionhelp_admin_glossary'] = 'Eğer üye olursanız sözlüğü yönetebilirsiniz.';
$txt['permissionname_suggest_glossary'] = 'Anahtar kelime önerilerine izin ver.';
$txt['permissionhelp_suggest_glossary'] = 'Eğer üye olursanız anahtar kelimeler önerebilirsiiz.';
$txt['glossary_delete_word'] = 'Silme işlemini onayla?';
$txt['glossary_edit_word_button'] = 'Güncelle';
$txt['glossary_publish_word_tip'] = 'Bu sözcüğü yayınla';
$txt['glossary_sugestion_you_made'] = 'Öneri yapmış ... onayla!';
$txt['glossary_confirm_deleting'] = 'Bu sözcüğün silinmesini onayla!';
$txt['glossary_delete_word_button'] = 'Sil';
$txt['bbc_glossary'] = 'Sözlüğe kelime ekle';
$txt['glossary_by_alphabetic'] = 'Alfabetik';
$txt['glossary_by_groups'] = 'Kategoriler';
$txt['glossary_action_add_category'] = 'Kategorileri Düzenle';
$txt['glossary_not_enabled'] = 'Sözlük etkin değil!';
$txt['glossary_group'] = 'Kategori';
$txt['glossary_add_new_group'] = 'Yeni Kategori Ekle';
$txt['enable_glossary_mod']='Sözlük Modu Açık';
$txt['glossary_new_group_name'] = 'Kategori Adı';
$txt['glossary_modify_group'] = 'Kategorileri değiştir';
$txt['glossary_delete_group_button'] = 'Seçilen kategoriyi sil';
$txt['glossary_update_group_button'] = 'Seçilen kategoriyi güncelle';
$txt['glossary_update_group_title'] = 'Seçilen kategoriye yeni isim ver';
$txt['glossary_alert_new_group'] = 'Bu kategoriye yeni bir isim vermek gerekir!!';
$txt['glossary_submission_error_3'] = 'Hata: Bu kategori zaten var!';
$txt['glossary_alert_group_delete'] = 'Silmek için bir kategori seçmelisiniz!';
$txt['glossary_alert_group_update'] = 'Seçilen kategori için yeni bir isim yazmalısın';
$txt['glossary_publish_status'] = 'Kelime onaylansın mı?';
$txt['glossary_tip_delete'] = 'kelimeyi sil';
$txt['glossary_tip_approve'] = 'Bu kelimeyi onayla';
$txt['glossary_tip_unapprove'] = 'Bu kelimeyi onaylama';
$txt['glossary_tip_edit'] = 'Bu kelimeyi düzenle';
$txt['glossary_tip_visible'] = 'Araç kapalı';
$txt['glossary_tip_unvisible'] = 'Aracı etkinleştir';
$txt['glossary_confirm_disable_tooltip'] = 'Bu kelime için aracın mesajlarda görünümünü kapat!';
$txt['glossary_confirm_enable_tooltip'] = 'Bu kelime için aracın mesajlarda görünümünü aç!';
$txt['glossary_confirm_approve'] = 'Bu kelimeyi onayladınız!';
$txt['glossary_confirm_unapprove'] = 'Bu kelimeyi onaylamadınız!';
$txt['glossary_approve_word_button'] = 'Onayla';
$txt['glossary_unapprove_word_button'] = 'Onaylama';
$txt['glossary_enable_tooltip_button'] = 'Araçları aç';
$txt['glossary_disable_tooltip_button'] = 'Araçları kapat';
$txt['glossary_alert_submit_new_word'] = 'Tüm alanları doldurmalısınız!';
$txt['glossary_group_none'] = '---seç---';
$txt['glossary_word_width'] = '"Kelime" sütun genişliği (piksel olarak)';
$txt['glossary_not_categorized'] = 'Kategorilendirilmemiş';
$txt['glossary_show_in_message_default'] = 'Varsayılan olarak, mesajın içinde tanımı göster';
$txt['glossary_synonyms'] = "Eş Anlamlıları";
$txt['glossary_synonyms_tip'] = "Eş anlamlı kelimelerin virgülle ayrılmış gösterimi.";
$txt['glossary_action_approve_all'] = "Seçimi onayla";
$txt['glossary_action_unapprove_all'] = "Seçimi onaylama";
$txt['glossary_action_tooltip_all'] = "Araçlar etkin";
$txt['glossary_action_untooltip_all'] = "Araçlar etkin değil";
$txt['glossary_tip_select'] = "Seç";
$txt['glossary_action'] = "Eylem";
$txt['glossary_go_on'] = "Git";
$txt['glossary_approve_all'] = "Seçilen onaylansın mı?";
$txt['glossary_unapprove_all'] = "Seçilenler onaylanmasın mı?";
$txt['glossary_tooltip_all'] = "Seçilenler için araç etkinleştirilsin mi?";
$txt['glossary_untooltip_all'] = "Seçilenler için araç etkinleştirilmesin mi?";
$txt['glossary_action_admin'] = "Yönetim";
$txt['glossary_action_select_all'] = "Hepsini Seç";
$txt['glossary_action_unselect_all'] = "Seçimi Geri Al";
$txt['glossary_admin_context_menu'] = "Admin için sağ tık yönetim menüsü etkin";
$txt['glossary_action_change_group_all'] = "Kategori için ilişkilendirme";
$txt['glossary_change_group_all'] = "Seçilenleri şu kategoriye aktar";


Help.turkish.php
$helptxt['enable_glossary_mod'] = 'Burada sözlük modunu etkinleştirebilir ya da devre dışı bırakabilirsiniz...';
$helptxt['enable_numeric_glossary'] = 'Burada Sözlüğü sayısal olarak belirleyebilirsiniz..';
$helptxt['glossary_none_sensitive']='Eğer etkinse, araç ipucu tüm anahtar kelimeler üzerinden karakterleri durumda bakılmadan görüntülenir.';
$helptxt['enable_groups_in_glossary']='Bu Terimler Sözlüğü kategorilerden bir seviye yönetmek için karar verebilir. Bu izinler için kelimeleri kategorize etmek için kullanılır.';
$helptxt['glossary_separator'] = 'Bu araç bir başlık ve bir paragraf görüntüleyebilir. Sadece bir başlık ve paragraf arasındaki ara belirlemek için kullanmak istediğiniz karakter gösteriyor.';
$helptxt['glossary_unique_word'] = 'Eğer isterseniz, sadece bir kez başına göstermek için bir kelimenin araç ipucu sonrası karar. Bu bir kelime bir yazı birkaç kez yazılı için birden fazla araç önlemek için.';
$helptxt['glossary_definition_width']='Sadece ana sütun genişlik için tanımlayın';
$helptxt['enable_tooltips'] = 'Forumda ve mesajlarda aracı göstermek istiyorsanız kullanabilirsiniz.';

Title: Re: Glossary
Post by: marcozambi on April 26, 2009, 04:32:55 AM
Ok, after complaining it's time to contribute a little.
In order to allow this mod to read customized css from css folder of each theme you have in your forum, I've changed those lines in Load.php (and could be corrected in next release of this wonderful piece of sw)

$context['html_headers'] .= '
<link rel="stylesheet" href="'. $settings['theme_url'] . '/css/glossary.jquery.tooltip.css" type="text/css" />
            <script language="JavaScript" type="text/javascript" src="'. $settings['default_theme_url']. '/scripts/glossary.jquery.dimensions.js"></script>
            <script language="JavaScript" type="text/javascript" src="'. $settings['default_theme_url']. '/scripts/glossary.jquery.tooltip.pack.js"></script>


And

$context['html_headers'] .= '
            <link rel="stylesheet" type="text/css" href="'.$settings['theme_url']. '/css/glossary.css" />';


I hope this could be useful.
Now I'll try to work on how avoid pattern recognition inside bbcodes like url, img, color etc, but this is quite hard.... :(
Title: Re: Glossary
Post by: Rockas on April 27, 2009, 11:18:40 AM
I finally managed to make 0.3.1 work on my site but now something weird is happening... when i try to insert a new word... the page refreshes... same happens when clicking on the admin menu so i can't add any definitions.
Edit words works, though.

thank you for the great work.
Title: Re: Glossary
Post by: slinouille on April 27, 2009, 01:15:38 PM
@Rockas: do you have Pretty URLs mod installed?
Title: Re: Glossary
Post by: Rockas on April 27, 2009, 01:18:55 PM
yes i have... is there an incompatibility?
Title: Re: Glossary
Post by: Rockas on April 27, 2009, 01:25:21 PM
ah yes! uninstalled pretty urls and it seems to work fine... any chance to make it compatible?
Title: Re: Glossary
Post by: SteveW on April 27, 2009, 02:43:15 PM
Hi - is there a way of adding more than one word ie "Steve Watkins" which will highlight in the post?
Thanks
Title: Re: Glossary
Post by: slinouille on April 27, 2009, 03:59:36 PM
@Rockas: yes I've notice that ... but still I don't understand why but I don't either understand how url rewritting works :(
Perhaps is there just to add an exception in .htaccess file, but I don't see what ?!?

@SteveW: yes you can ... I'm using on my forum glossary for "expression with 3 words" ... try it ;)
Title: Re: Glossary
Post by: Eclipse16V on April 28, 2009, 09:54:49 AM
Quote from: marcozambi on April 24, 2009, 03:33:02 AM
Hi slinouille!
First thank you for this impressive piece of software. You made my day on forumastronautico.it.

I have just an odd behaviour, that it seems to me it's been signaled before: pattern recognition of keywords is working even inside the definition boxes of the Glossary, with the result that the text cotained in the popup balloons is corrupted.

Example:
1) I add a keyword like "EST" and his description is (in italian) "Eastern Standard Time - Ora solare della costa est degli USA, pari a UTC-5"
2) When i surf in my posts, the word "est" that is the italian for "east" is recursively "resolved", with the result you can see in the attached image files.

Is it possible to add an option to permanently avoid to apply glossary to the description of the glossary words itself?

I hope I've managed to explain myself, sorry for my bad english.

I have the same problem.
I have this words:
"1G" = "1. Generation"
"AT" = "Aussentemperaturanzeige"

In the Tooltip of "1G" i become this error.
How can I make it so that this Mod work with the post but not with text in the Tooltip.

Sorry for my bad English

Here is it in complete German:
$txt['enable_numeric_glossary']='[Glossar] Zahlen im Glossar bearbeiten';
$txt['glossary_none_sensitive']='[Glossar] Schlagwort Erkennung ohne Beachtung der Gro&szlig;- und Kleinschreibung';
$txt['glossary_separator']='[Glossar] Zeichen das als Zeilenumbruch im Tooltip benutzt wird';
$txt['enable_bbc_tooltip_glossary']='[Glossar] Aktiviere BBCcode im Tooltip';
$txt['glossary'] = 'Glossar';
$txt['glossary_list_title'] = 'Begriff Liste';
$txt['glossary_all'] = 'alle';
$txt['glossary_new_word_button'] = 'Speichern';
$txt['glossary_new_word_title'] = 'Gib ein neues Schlagwort ein';
$txt['glossary_new_word'] = 'Schlagwort:';
$txt['glossary_new_definition'] = 'Definition';
$txt['glossary_bbccode_activated'] = ' (BBCcode zugelassen)';
$txt['glossary_edit_word_title'] = 'Bearbeite das Schlagwort';
$txt['glossary_submission_error_1'] = 'Fehler: Beide Felder m&uuml;ssen ausgef&uuml;llt sein!';
$txt['glossary_submission_error_2'] = 'Fehler: Das Schlagwort existiert bereits!';
$txt['glossary_action_add'] = 'Schlagwort hinzuf&uuml;gen';
$txt['glossary_new_word_close'] = 'abbrechen';
$txt['glossary_menu'] = 'Glossar';
$txt['glossary_admin'] = 'Glossar';
$txt['permissiongroup_glossary'] = 'Glossar';
$txt['permissionname_view_glossary'] = 'Glossar ansehen';
$txt['permissionhelp_view_glossary'] = 'Entscheide ob Mitglieder das Glossar sehen k&ouml;nnen';
$txt['permissionname_admin_glossary'] = 'Administriere das Glossar';
$txt['permissionhelp_admin_glossary'] = 'Entscheide ob Mitglieder das Glossar Administrieren d&uuml;rfen';
$txt['permissionname_suggest_glossary'] = 'Erlaube Schlagwort Vorschlag';
$txt['permissionhelp_suggest_glossary'] = 'Entscheide ob Mitglieder neue Schlagw&ouml;rter vorschlagen d&uuml;rfen';
$txt['glossary_delete_word'] = 'Eintrag wirklich L&ouml;schen?';
$txt['glossary_edit_word_button'] = 'Update';
$txt['glossary_publish_word_button'] = 'Ver&ouml;ffentlichen';
$txt['glossary_confirm_publishing'] = 'Bitte Best&auml;tige die Ver&ouml;ffentlichung des Schlagworts!';
$txt['glossary_publish_word_tip'] = 'Ver&ouml;ffentlichen';
$txt['glossary_sugestion_you_made'] = 'Den Vorschlag muss best&auml;tigt werden!';
$txt['glossary_confirm_deleting'] = 'Bitte Best&auml;tige das L&ouml;schen dieses Schlagwortes!';
$txt['glossary_delete_word_button'] = 'l&ouml;schen';
$txt['enable_glossary_mod']='Erlaube die Glossar Mod';
$txt['enable_tooltips']='Erlaube den Glossar Tooltip in den Beitr&auml;gen';
$txt['glossary_unique_word']='Zeige ein Wort welches im Glossar steht nur einmal im Beitrag';
$txt['bbc_glossary'] = 'Ein Wort ins Glossar einf&uuml;gen';
$txt['glossary_by_alphabetic'] = 'Alphabetisch ordnen';
$txt['glossary_by_groups'] = 'Kategorien';
$txt['glossary_action_add_category'] = 'Kategorien verwalten';
$txt['glossary_not_enabled'] = 'Das Glossar ist zur Zeit nicht erlaubt!';
$txt['glossary_group'] = 'Kategorie';
$txt['glossary_add_new_group'] = 'Neue Kategorie erstellen';
$txt['enable_glossary_mod']='Erlaube die Glossar Mod';
$txt['glossary_new_group_name'] = 'Kategorietitel';
$txt['glossary_modify_group'] = 'Kategorie &auml;ndern';
$txt['glossary_delete_group_button'] = 'L&ouml;sche ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_button'] = 'Update ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_title'] = 'Neuer Name f&uuml;r die ausgew&auml;hlte Gruppe';
$txt['glossary_alert_new_group'] = 'Du musst der Gruppe einen neuen Namen geben!';
$txt['glossary_submission_error_3'] = 'FEHLR: Die Kategorie existiert bereits!';
$txt['glossary_alert_group_delete'] = 'Du musst die Gruppe zum l&ouml;schen ausw&auml;hlen!';
$txt['glossary_alert_group_update'] = 'Du musst einen neuen Titel f&uuml;r die ausgew&auml;hlte Gruppe ausw&auml;hlen';
$txt['glossary_publish_status'] = 'Wort ist freigegeben?';
$txt['glossary_tip_delete'] = 'Wort l&ouml;schen';
$txt['glossary_tip_approve'] = 'Dieses Wort freigeben';
$txt['glossary_tip_unapprove'] = 'Dieses Wort verbieten';
$txt['glossary_tip_edit'] = 'Wort ver&auml;ndern';
$txt['glossary_tip_visible'] = 'Tooltip verbieten';
$txt['glossary_tip_unvisible'] = 'Tooltip aktivieren';
$txt['glossary_confirm_disable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen erlauben!';
$txt['glossary_confirm_enable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen verbieten!';
$txt['glossary_confirm_approve'] = 'Du erlaubst dieses Wort';
$txt['glossary_confirm_unapprove'] = 'Du verbietest dieses Wort!';
$txt['glossary_approve_word_button'] = 'Erlaube es';
$txt['glossary_unapprove_word_button'] = 'Verbiete es';
$txt['glossary_enable_tooltip_button'] = 'Mach ein Tooltip daraus';
$txt['glossary_disable_tooltip_button'] = 'Verbiete den Tooltip';
$txt['glossary_alert_submit_new_word'] = 'Du musst alle Felder ausf&uuml;llen!';
$txt['glossary_tooltip_in_simpleportal'] = 'Erlaube Tooltips in einem Block von SimplePortal';
$txt['glossary_definition_width']='"Definiere" Spaltenbreite (in Pixeln)';
$txt['glossary_group_none'] = '---ausw&auml;hlen---';
$txt['glossary_word_width'] = 'Wort Spaltenbreite (in Pixel)';
$txt['glossary_not_categorized'] = 'Nicht Kategorisiert';
$txt['glossary_show_in_message_default'] = 'Zeige standardm&auml;&szlig;ig Definitionen im Post';
//--- NOT TRANSLATED ---
$txt['glossary_synonyms'] = "Synonyme";
$txt['glossary_synonyms_tip'] = "Synonyme mit Komma zu diesem Wort trennen";
$txt['glossary_action_approve_all'] = "W&ouml;rter freigeben";
$txt['glossary_action_unapprove_all'] = "W&ouml;rter verbieten";
$txt['glossary_action_tooltip_all'] = "Tooltip aktivieren";
$txt['glossary_action_untooltip_all'] = "Tooltip verbieten";
$txt['glossary_tip_select'] = "Ausw&auml;hlen";
$txt['glossary_action'] = "Aktion";
$txt['glossary_go_on'] = "Go on";
$txt['glossary_approve_all'] = "Ausgew&auml;hlte freigeben?";
$txt['glossary_unapprove_all'] = "Ausgew&auml;hlte verbieten?";
$txt['glossary_tooltip_all'] = "Ausgew&auml;hlte Tooltips freigeben?";
$txt['glossary_untooltip_all'] = "Ausgew&auml;hlte Tooltips verbieten?";
$txt['glossary_action_admin'] = "Administration";
$txt['glossary_action_select_all'] = "Alle ausw&auml;hlen";
$txt['glossary_action_unselect_all'] = "Makierungen entfernen";
$txt['glossary_admin_context_menu'] = "Administrator Rechtsklick Men&uuml; aktivieren";
Title: Re: Glossary
Post by: webline on April 29, 2009, 09:44:33 AM
@Eclipse16V

i have corrected a few error with spaces in your German translation!

example:
Quote$txt['enable_glossary_mod']='Erlaube die Glossar Mod';


//Begin mod Glossary
$txt['enable_numeric_glossary'] = '[Glossar] Zahlen im Glossar bearbeiten';
$txt['glossary_none_sensitive'] = '[Glossar] Schlagwort Erkennung ohne Beachtung der Groözlig;- und Kleinschreibung';
$txt['glossary_separator'] = '[Glossar] Zeichen das als Zeilenumbruch im Tooltip benutzt wird';
$txt['enable_bbc_tooltip_glossary'] = '[Glossar] Aktiviere BBCcode im Tooltip';
$txt['glossary'] = 'Glossar';
$txt['glossary_list_title'] = 'Begriff Liste';
$txt['glossary_all'] = 'alle';
$txt['glossary_new_word_button'] = 'Speichern';
$txt['glossary_new_word_title'] = 'Gib ein neues Schlagwort ein';
$txt['glossary_new_word'] = 'Schlagwort:';
$txt['glossary_new_definition'] = 'Definition';
$txt['glossary_bbccode_activated'] = ' (BBCcode zugelassen)';
$txt['glossary_edit_word_title'] = 'Bearbeite das Schlagwort';
$txt['glossary_submission_error_1'] = 'Fehler: Beide Felder m&uuml;ssen ausgef&uuml;llt sein!';
$txt['glossary_submission_error_2'] = 'Fehler: Das Schlagwort existiert bereits!';
$txt['glossary_action_add'] = 'Schlagwort hinzuf&uuml;gen';
$txt['glossary_new_word_close'] = 'abbrechen';
$txt['glossary_menu'] = 'Glossar';
$txt['glossary_admin'] = 'Glossar';
$txt['permissiongroup_glossary'] = 'Glossar';
$txt['permissionname_view_glossary'] = 'Glossar ansehen';
$txt['permissionhelp_view_glossary'] = 'Entscheide ob Mitglieder das Glossar sehen k&ouml;nnen';
$txt['permissionname_admin_glossary'] = 'Administriere das Glossar';
$txt['permissionhelp_admin_glossary'] = 'Entscheide ob Mitglieder das Glossar Administrieren d&uuml;rfen';
$txt['permissionname_suggest_glossary'] = 'Erlaube Schlagwort Vorschlag';
$txt['permissionhelp_suggest_glossary'] = 'Entscheide ob Mitglieder neue Schlagw&ouml;rter vorschlagen d&uuml;rfen';
$txt['glossary_delete_word'] = 'Eintrag wirklich L&ouml;schen?';
$txt['glossary_edit_word_button'] = 'Update';
$txt['glossary_publish_word_button'] = 'Ver&ouml;ffentlichen';
$txt['glossary_confirm_publishing'] = 'Bitte Best&auml;tige die Ver&ouml;ffentlichung des Schlagworts!';
$txt['glossary_publish_word_tip'] = 'Ver&ouml;ffentlichen';
$txt['glossary_sugestion_you_made'] = 'Den Vorschlag muss best&auml;tigt werden!';
$txt['glossary_confirm_deleting'] = 'Bitte Best&auml;tige das L&ouml;schen dieses Schlagwortes!';
$txt['glossary_delete_word_button'] = 'l&ouml;schen';
$txt['enable_glossary_mod'] = 'Erlaube die Glossar Mod';
$txt['enable_tooltips'] = 'Erlaube den Glossar Tooltip in den Beitr&auml;gen';
$txt['glossary_unique_word'] = 'Zeige ein Wort welches im Glossar steht nur einmal im Beitrag';
$txt['bbc_glossary'] = 'Ein Wort ins Glossar einf&uuml;gen';
$txt['glossary_by_alphabetic'] = 'Alphabetisch ordnen';
$txt['glossary_by_groups'] = 'Kategorien';
$txt['glossary_action_add_category'] = 'Kategorien verwalten';
$txt['glossary_not_enabled'] = 'Das Glossar ist zur Zeit nicht erlaubt!';
$txt['glossary_group'] = 'Kategorie';
$txt['glossary_add_new_group'] = 'Neue Kategorie erstellen';
$txt['enable_glossary_mod'] = 'Erlaube die Glossar Mod';
$txt['glossary_new_group_name'] = 'Kategorietitel';
$txt['glossary_modify_group'] = 'Kategorie &auml;ndern';
$txt['glossary_delete_group_button'] = 'L&ouml;sche ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_button'] = 'Update ausgew&auml;hlte Gruppe';
$txt['glossary_update_group_title'] = 'Neuer Name f&uuml;r die ausgew&auml;hlte Gruppe';
$txt['glossary_alert_new_group'] = 'Du musst der Gruppe einen neuen Namen geben!';
$txt['glossary_submission_error_3'] = 'FEHLR: Die Kategorie existiert bereits!';
$txt['glossary_alert_group_delete'] = 'Du musst die Gruppe zum l&ouml;schen ausw&auml;hlen!';
$txt['glossary_alert_group_update'] = 'Du musst einen neuen Titel f&uuml;r die ausgew&auml;hlte Gruppe ausw&auml;hlen';
$txt['glossary_publish_status'] = 'Wort ist freigegeben?';
$txt['glossary_tip_delete'] = 'Wort l&ouml;schen';
$txt['glossary_tip_approve'] = 'Dieses Wort freigeben';
$txt['glossary_tip_unapprove'] = 'Dieses Wort verbieten';
$txt['glossary_tip_edit'] = 'Wort ver&auml;ndern';
$txt['glossary_tip_visible'] = 'Tooltip verbieten';
$txt['glossary_tip_unvisible'] = 'Tooltip aktivieren';
$txt['glossary_confirm_disable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen erlauben!';
$txt['glossary_confirm_enable_tooltip'] = 'F&uuml;r dieses Wort den Tooltip in den Beitr&auml;gen verbieten!';
$txt['glossary_confirm_approve'] = 'Du erlaubst dieses Wort';
$txt['glossary_confirm_unapprove'] = 'Du verbietest dieses Wort!';
$txt['glossary_approve_word_button'] = 'Erlaube es';
$txt['glossary_unapprove_word_button'] = 'Verbiete es';
$txt['glossary_enable_tooltip_button'] = 'Mach ein Tooltip daraus';
$txt['glossary_disable_tooltip_button'] = 'Verbiete den Tooltip';
$txt['glossary_alert_submit_new_word'] = 'Du musst alle Felder ausf&uuml;llen!';
$txt['glossary_tooltip_in_simpleportal'] = 'Erlaube Tooltips in einem Block von SimplePortal';
$txt['glossary_definition_width'] = '"Definiere" Spaltenbreite (in Pixeln)';
$txt['glossary_group_none'] = '---ausw&auml;hlen---';
$txt['glossary_word_width'] = 'Wort Spaltenbreite (in Pixel)';
$txt['glossary_not_categorized'] = 'Nicht Kategorisiert';
$txt['glossary_show_in_message_default'] = 'Zeige standardm&auml;&szlig;ig Definitionen im Post';
$txt['glossary_synonyms'] = "Synonyme";
$txt['glossary_synonyms_tip'] = "Synonyme mit Komma zu diesem Wort trennen";
$txt['glossary_action_approve_all'] = "W&ouml;rter freigeben";
$txt['glossary_action_unapprove_all'] = "W&ouml;rter verbieten";
$txt['glossary_action_tooltip_all'] = "Tooltip aktivieren";
$txt['glossary_action_untooltip_all'] = "Tooltip verbieten";
$txt['glossary_tip_select'] = "Ausw&auml;hlen";
$txt['glossary_action'] = "Aktion";
$txt['glossary_go_on'] = "Go on";
$txt['glossary_approve_all'] = "Ausgew&auml;hlte freigeben?";
$txt['glossary_unapprove_all'] = "Ausgew&auml;hlte verbieten?";
$txt['glossary_tooltip_all'] = "Ausgew&auml;hlte Tooltips freigeben?";
$txt['glossary_untooltip_all'] = "Ausgew&auml;hlte Tooltips verbieten?";
$txt['glossary_action_admin'] = "Administration";
$txt['glossary_action_select_all'] = "Alle ausw&auml;hlen";
$txt['glossary_action_unselect_all'] = "Makierungen entfernen";
$txt['glossary_admin_context_menu'] = "Administrator Rechtsklick Men&uuml; aktivieren";
//End mod Glossary
Title: Re: Glossary
Post by: Bancherd on April 29, 2009, 10:50:39 PM
Using 0.3.1, I got this error, when trying to read a post.
QuoteFatal error:  Call to undefined function:  str_ireplace() in /home/....../Sources/Subs.php on line 4074

Does this mod require php5.x  ???   I am using php4.x

??? ???
Title: Re: Glossary
Post by: PrizeLive.com on April 30, 2009, 03:24:53 PM
Does this work with 1.8 at all?
Title: Re: Glossary
Post by: Running With Scissors on May 03, 2009, 11:29:10 PM
I have smf 2.0 rc1 and I had 3.0 and then I just uploaded 3.1 and forgot to save a backup first and now the whole site has this error:

Fatal error: Cannot redeclare parse_glossary() (previously declared in /home/traxck/public_html/Sources/Subs.php:4079) in /home/traxck/public_html/Sources/Subs.php on line 4267

Title: Re: Glossary
Post by: slinouille on May 04, 2009, 05:49:05 AM
@Eclipse16V: are you in utf-8 mod ? I think so ... I still have some troubles with the parse engine in this database mod ... I'm working on it.

@Eclipse16V & webline: thanks for translations ;)

@Bancherd: yes it's a php5 function ... I didn't think about php4 server when using it ... really sorry!

@MoneyTalkPro.com: I don't know, but I think that it should not be very difficult to adapt it ... do it manually following install.xml file

@Running With Scissors: When uninstalling a previous version, function parse_glossary in subs.php has not be deleted. So it is declared twice which generates this error.
You should delete the first one (the one that was added with the old version of glossary mod).


Title: Re: Glossary
Post by: Running With Scissors on May 04, 2009, 09:44:38 AM
Quote from: slinouille on May 04, 2009, 05:49:05 AM

@Running With Scissors: When uninstalling a previous version, function parse_glossary in subs.php has not be deleted. So it is declared twice which generates this error.
You should delete the first one (the one that was added with the old version of glossary mod).

What exactly am I deleting? I deleted something and it didn't do anything so I put it back.
Title: Re: Glossary
Post by: Kindred on May 04, 2009, 06:16:20 PM
you have duplicate code from installing the mod twice...    so you need to delete the entire section of duplicate code.
Title: Re: Glossary
Post by: Running With Scissors on May 04, 2009, 09:42:12 PM
I did and I still get the error.

http://www.traxck.com and the subs file is attached. I deleted the parts that were doubled and its still like this.
Title: Re: Glossary
Post by: Kindred on May 04, 2009, 09:56:02 PM
I don't have my code editor handy... but the error suggests that you either deleted an additional close } or left an excess one...
Title: Re: Glossary
Post by: Running With Scissors on May 05, 2009, 10:51:09 AM
I don't know were to add o delete it. Would it be a bad idea to just reupload a fresh subs.php file?
Title: Re: Glossary
Post by: Kindred on May 05, 2009, 12:49:24 PM
that will likely mess up all mods that you may have installed... in which case you should probably upload a clean ste of forum files (with the exception of settings.php
Title: Re: Glossary
Post by: Running With Scissors on May 05, 2009, 06:53:19 PM
Then I guess I won't do that because I have about 10 mods already installed.
Title: Re: Glossary
Post by: Running With Scissors on May 07, 2009, 07:34:26 PM
Quote from: Kindred on May 05, 2009, 12:49:24 PM
that will likely mess up all mods that you may have installed... in which case you should probably upload a clean ste of forum files (with the exception of settings.php

Ok. If I overwrite every file but settings.php it won't delete all the members and posts will it? That stuff is all in the datebase right?
Title: Re: Glossary
Post by: Kindred on May 07, 2009, 08:45:31 PM
right....   all the board's DATA is kept in the database.  Cleaning the files will just remove the mods (installation)... but all mod data will still be in the database waiting for the mod code to be re-installed.
Title: Re: Glossary
Post by: PrizeLive.com on May 08, 2009, 02:39:03 PM
Quote from: slinouille on May 04, 2009, 05:49:05 AM
@MoneyTalkPro.com: I don't know, but I think that it should not be very difficult to adapt it ... do it manually following install.xml file

Thanks, will give it a shot shortly.
Title: Re: Glossary
Post by: casp3r on May 14, 2009, 07:26:43 AM
Quotehttp://www.dalesplanes.co.uk/index.php?topic=2.0;prev_next=next
8: Undefined index: enable_tooltips
File: /dalesplanes.co.uk/public_html/Sources/Display.php
Line: 1165
This particular message is appearing an awful lot in the error logs. I can only assume it has to do with the Glossary (if not I apologise). Anyone any ideas what could be causing it? Many thanks in advance.
Title: Re: Glossary
Post by: slinouille on May 14, 2009, 07:40:08 AM
@casp3r: yes it is a mod setting I'm using. Can you confirm that you have at least one time click on the save parameters button in the admin panel of glossary? Nevertheless I'll do a correction in order to avoid this warning ;)

@Running With Scissors: have you been able to manage your problem ?
Title: Re: Glossary
Post by: casp3r on May 15, 2009, 09:14:40 AM
Quote@casp3r: yes it is a mod setting I'm using. Can you confirm that you have at least one time click on the save parameters button in the admin panel of glossary? Nevertheless I'll do a correction in order to avoid this warning ;)

Now this is where I make a fool of myself :) I can't seem to see a save parameters button in the admin panel.
Title: Re: Glossary
Post by: Antes on June 17, 2009, 10:19:28 AM
Succsessfully installed RC1-1 but , When i click "Add a new Key word" Refreshing the page ( then ) closing the Pop-up page  , cant add Category - Key Word ...
Title: Re: Glossary
Post by: Özgür on June 17, 2009, 02:01:47 PM
Quote from: Antes on June 17, 2009, 10:19:28 AM
Succsessfully installed RC1-1 but , When i click "Add a new Key word" Refreshing the page ( then ) closing the Pop-up page  , cant add Category - Key Word ...

I think you're using prettyurls. This mod not compatible yet with prettyurls.
Title: Re: Glossary
Post by: Bruno36 on June 23, 2009, 07:17:54 AM
Hello!

the bbcode is not working

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg3.imageshack.us%2Fimg3%2F3885%2F28212010.th.jpg&hash=fae09814892411eb0e2f64c6d386ac273132b1df) (http://www.postimage.org/image.php?v=Pq1uhnAS)
Title: Re: Glossary
Post by: Bruno36 on June 24, 2009, 09:45:43 AM
Quote from: slinouille on April 27, 2009, 03:59:36 PM
@Rockas: yes I've notice that ... but still I don't understand why but I don't either understand how url rewritting works :(
Perhaps is there just to add an exception in .htaccess file, but I don't see what ?!?

@SteveW: yes you can ... I'm using on my forum glossary for "expression with 3 words" ... try it ;)

http://www.simplemachines.org/community/index.php?topic=146969.msg2126323#msg2126323
Title: Re: Glossary
Post by: Özgür on June 24, 2009, 11:20:38 AM
Quote from: Bruno36 on June 24, 2009, 09:45:43 AM
Quote from: slinouille on April 27, 2009, 03:59:36 PM
@Rockas: yes I've notice that ... but still I don't understand why but I don't either understand how url rewritting works :(
Perhaps is there just to add an exception in .htaccess file, but I don't see what ?!?

@SteveW: yes you can ... I'm using on my forum glossary for "expression with 3 words" ... try it ;)

http://www.simplemachines.org/community/index.php?topic=146969.msg2126323#msg2126323

Read the http://www.simplemachines.org/community/index.php?topic=282158.msg2003504#msg2003504 below..
Title: Re: Glossary
Post by: LaZKoPaT on June 25, 2009, 06:52:58 PM
For Older Versions 1.1.8 & 1.1.9 Users have a work can not use this mode for a solution Please Find Old Versions should
Title: Re: Glossary
Post by: Kindred on July 11, 2009, 11:22:32 AM
side note on the Glossary:  I finally ran the glossary page through the HTML Validator

Links in the glossary which use ...action=glossary&sa= should be changed to action=glossary&amp;sa=

<tr id="letter_+" style=""><td>
character "+" is not allowed in the value of attribute "id"

<img src="http://www.40konline.com/community/Themes/default/images/glossary_blue.png">
img tags should be self terminating and must include an alt value
i.e.
<img src="http://www.40konline.com/community/Themes/default/images/glossary_blue.png" alt="" />
This occurs over and over...   and is causing a huge number of errors further down in the code
so this same fix should be applied to ALL img tags.


You are not allowed to include DIVs within TDs
i.e.
<td style="padding:3px; width:100px;" valign="top"><b><div style="float:left;" id="word_76">++</div></b></td>

<td width="10%" text-align="right">
text-align is part of a style="text-align... " definition. text-align is not a valid attribute by itself. either use align to parse it... or use text-align within a style attribute.
I would recommend replacing both stand-alone tags with style... <style="width:10%;text-align:right;">

<input type="hidden"... should have a self-closing action i.e.   ... />

<script>
function Display_glossary_for_letter(letter){
Wow, everything after this is really rather confused....    this is an opening script tag, but it's not identified as javascript, which means that the parser gets confused after this.

should be

<script type="text/javascript">
Title: Re: Glossary
Post by: zorro18 on July 26, 2009, 03:09:17 AM
Hello,

I have installed glossary on SMF 2.0 RC-1.2 and I cant add any word or do any admin function for glossary as the page refreshes itself and redirects to the home page when i try to add a word or click on administration :(

I have pretty urls installed. Is that the conflict? Help is appreciated. Thanks,
Title: Re: Glossary
Post by: Kindred on July 26, 2009, 07:37:34 AM
are you running the default theme or a custom theme?
Title: Re: Glossary
Post by: zorro18 on July 26, 2009, 01:40:40 PM
Quote from: Kindred on July 26, 2009, 07:37:34 AM
are you running the default theme or a custom theme?

Its on a custom theme
Title: Re: Glossary
Post by: Kindred on July 26, 2009, 03:14:22 PM
try reading the thread or using search?

This was answered....    you have to opy the javascript files into your custom theme as well
Title: Re: Glossary
Post by: zorro18 on July 26, 2009, 04:18:02 PM
Quote from: Kindred on July 26, 2009, 03:14:22 PM
try reading the thread or using search?

This was answered....    you have to opy the javascript files into your custom theme as well

Hi kindred,

i ve  done this but didnt help.. any alternative please?
Title: Re: Glossary
Post by: Kindred on July 26, 2009, 06:22:21 PM
there is no alternative.   copy the javascript files and it works.
Title: Re: Glossary
Post by: Bruno36 on September 15, 2009, 04:47:48 AM
Hello!

The bbcode is not working
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi29.tinypic.com%2F1176wqr.jpg&hash=ac3dacce0102dd56cbb896f1a77779169097a2e1)
Title: Re: Glossary
Post by: Antes on November 17, 2009, 08:16:38 AM
HTML codes working awsome :)

<span style="color: red;">Piston</span>
Title: Re: Glossary
Post by: Eclipse16V on November 24, 2009, 07:22:48 AM
Is there a Update to 2.0 RC2 ?
Title: Re: Glossary
Post by: Bigguy on December 01, 2009, 04:03:25 PM
Haas anyone installed this on RC2 to see if it works. ???
Title: Re: Glossary
Post by: Kindred on December 01, 2009, 04:16:26 PM
I have it working on RC 1.2 (Dev edition, between 1.2 and 2.0)

I will be updating the site to 2.0 next weekend...   so I'll let you know then. :)
Title: Re: Glossary
Post by: Costa on December 01, 2009, 04:18:01 PM
Thank's Kindred :)
Title: Re: Glossary
Post by: Bigguy on December 01, 2009, 04:19:00 PM
Sounds good Kindred. I was just about to install it but was wondering if the database had changed much between RC 1.2 and RC 2.0
Title: Re: Glossary
Post by: Bruno36 on December 02, 2009, 03:48:01 AM
Hello!

I have an error message

QuoteErreur de base de données
Table 'smf.smf_glossary_groups' doesn't exist
Fichier: C:\wamp\www\Sources\Glossary.php
Ligne: 422

//Build list of groups
$context['glossary_groups'] = array();
$data_groups = $smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}glossary_groups
ORDER BY title ASC',
array()
);
Title: Re: Glossary
Post by: Kindred on December 02, 2009, 08:37:50 AM
that means that the database tables were not created when you installed the mod.  find the database file, put it in your forum root and run it... or manually create the tables...
Title: Re: Glossary
Post by: Bruno36 on December 02, 2009, 09:28:51 AM
Notice: Undefined index: fm_adminbutton in C:\wamp\www\Sources\Subs.php on line 3950


Erreur de base de données
No database selected
Fichier: C:\wamp\www\installDatabase.php
Ligne: 99
Retour
Title: Re: Glossary
Post by: Antes on December 02, 2009, 12:21:23 PM
Quote from: Bruno36 on December 02, 2009, 09:28:51 AM
Notice: Undefined index: fm_adminbutton in C:\wamp\www\Sources\Subs.php on line 3950


Erreur de base de données
No database selected
Fichier: C:\wamp\www\installDatabase.php
Ligne: 99
Retour

simply open phpmyadmin you 'll see db tables about Glosarry add smf_ as prefix it solves :)
Title: Re: Glossary
Post by: CvH on December 03, 2009, 05:14:17 PM
im trying to install it on RC2 (updatet install routine) get this error , if i try to add an word in glossary O_o

Unknown column 'synonyms' in 'field list'
Datei: /htdocs/Sources/Glossary.php
Zeile: 80
Title: Re: Glossary
Post by: Kindred on December 03, 2009, 08:08:19 PM
it looks like the database install did not complete.
Title: Re: Glossary
Post by: Nibogo on December 03, 2009, 08:53:18 PM
I´m having some serious issues with this mod, I don't know if anyone else has this problem but if I try to add a new term the form to create it just appear a few seconds and them it close, I have the same with the administrator dropdown menu. Anyone else have this??

Browser: Firefox, SMF 2.0 RC2 (I made the convertion and it works in one forum but in the other one I have this issue)
Title: Re: Glossary
Post by: Kindred on December 03, 2009, 10:38:10 PM
I had that problem before...   copy all of the glossary files into your custom theme directory/
Title: Re: Glossary
Post by: Nibogo on December 03, 2009, 10:49:22 PM
Quote from: Kindred on December 03, 2009, 10:38:10 PM
I had that problem before...   copy all of the glossary files into your custom theme directory/

I´m using curve but I did it and didn't work

Btw I´m using the latest version
Title: Re: Glossary
Post by: t3ngu on December 16, 2009, 07:04:23 PM
Any chance we'll be getting this on RC2.0? I'd really love to have this mod.
Title: Re: Glossary
Post by: Kindred on December 16, 2009, 07:35:16 PM
hmmm....   it seems to work just fine for me with 2.0RC2.  I had to tell the system to install with a lesser version, but it installed fine.
Title: Re: Glossary
Post by: marcozambi on January 05, 2010, 08:31:27 AM
Today I have installed it on a clean, vanilla RC2.0. RC2
The installer warns you that is not possible to modify correctly Subs.php and Subs-Editor.php, so it is necessary to modify the installer in a couple of points to make it work.

Original install.xml, starting line 89

<file name="$sourcedir/Subs.php">
<operation>
<search position="after"><![CDATA[
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),]]></search>


Changed in this way

<file name="$sourcedir/Subs.php">
<operation>
<search position="after"><![CDATA[
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),]]></search>


Then going on with original Subs-Editor.php, starting from line 255

<operation>
<search position="before"><![CDATA['quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt['bbc_quote']),]]></search>
<add><![CDATA[
'glossary' => array('code' => 'glossary', 'before' => '[glossary]', 'after' => '[/glossary]', 'description' => $txt['bbc_glossary']),]]></add>
</operation>


Change in this way

<operation>
<search position="before">
<![CDATA[
array(
'image' => 'quote',
'code' => 'quote',
'before' => '[quote]',
'after' => '[/quote]',
'description' => $txt['bbc_quote']
),
]]>
</search>
<add>
<![CDATA[
//Glossary Mod
array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),
]]>
</add>
</operation>


After that I had no probs installing it.
Now I am working to trick some problem in regular expression recognition and on keywords that are appearing in capitol letters... I'll update soon.

I hope this could be useful for the developer to release a RC2.0 compatible version of Glossary Mod.
Title: Re: Glossary
Post by: nexxuscorp on January 10, 2010, 03:11:05 PM
Hi everybody !!!

I use this wonderful mod, even if it has problems with rc2, but i've noticed a bug ( i don't know if it existed before).
Glossary doesn't work with AEVA .
When i use the glossary to works on my forum, My videos are not embed, but if i disable it, AEVA works.

Anyone has this problems?

Sorry for my english, i'm french :p
Title: Re: Glossary
Post by: Kindred on January 10, 2010, 04:44:59 PM
hmmm. I am using both, but I do not have the glossary embed turned on...   I suspect that both use a javascript include to trigger the "link text" and that the two mods overlap/conflict.
Title: Re: Glossary
Post by: nexxuscorp on January 11, 2010, 02:09:56 AM
Any Idea to fix it?
Title: Re: Glossary
Post by: nexxuscorp on January 12, 2010, 03:26:20 AM
Hello everybody !!
Bug fixe, to correct this, i choose an option in the new AEVA media.
Title: Re: Glossary
Post by: memet on January 19, 2010, 10:33:52 PM
I've changed the database to utf-8 after installation and it worked like a charm; it's a very fine work, thanks.

Still, I have a problem. I can see the characters in words as they are (like "çeşme") but I can not see "ç" or "ş" in alphabetical order; they look like this: � (see pscreen.jpg in the attachment).  I tried to place the whole alphabet into categories and the appearance has become normal. However, this time, the glossary accepts only one of "c" and "ç", or "g" and "ğ", etc (see category.jpg in the attachment). Is there any way to customize the alphabet in a way that it will include non-standard-latin characters as separate letters? (æ, ğ, ü, etc., alongside a, g, u)
Title: Re: Glossary
Post by: Eclipse16V on March 15, 2010, 02:24:22 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Glossary
Post by: Arantor on March 15, 2010, 07:58:48 AM
Did you bother to read this thread either? You already bumped it for RC2 which doesn't appear to have happened.
Title: Re: Glossary
Post by: [unplugged] on March 15, 2010, 08:42:10 AM
lol....74 times.....for 74 different mods.... :o
Title: Re: Glossary
Post by: kizer on March 15, 2010, 02:46:24 PM
Quote from: nexxuscorp on January 12, 2010, 03:26:20 AM
Hello everybody !!
Bug fixe, to correct this, i choose an option in the new AEVA media.

What exactly do you mean? What option. I'm rather interested in running this as well as Aeva, which I currently run.
Title: Re: Glossary
Post by: Kindred on March 15, 2010, 03:35:03 PM
BTW: This mod installed just fine on RC2 and I suspect will also install on RC3...  you just have to use the "install as version" option
Title: Re: Glossary
Post by: Bigguy on March 16, 2010, 12:11:56 PM
The edit for Subs-Editor.php is different in RC2 and 3. It tries to find:

'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt['bbc_quote']), 

And put this in:

  'glossary' => array('code' => 'glossary', 'before' => '[glossary]', 'after' => '[/glossary]', 'description' => $txt['bbc_glossary']), 

In Subs-Editor.php The code looks like this:

         array(
            'image' => 'quote',
            'code' => 'quote',
            'before' => '[quote]',
            'after' => '[/quote]',
            'description' => $txt['bbc_quote']
         ),


My install fails anyway. Just thought I would post this.
Title: Re: Glossary
Post by: Bigguy on March 16, 2010, 12:20:09 PM
I changed it around a bit so this SHOULD work for people that this fails for:

            array(
                'image' => 'glossary',
                'code' => 'glossary',
                'before' => '[glossary]',
                'after' => '[/glossary]',
                'description' => $txt['bbc_glossary']
            ),
Title: Re: Glossary
Post by: Kindred on March 16, 2010, 12:28:38 PM
thanks Bigguy...    I might have done the manual edit myself when I installed it without remembering.
Title: Re: Glossary
Post by: Bigguy on March 16, 2010, 12:34:16 PM
Not a problem. :)
Title: Re: Glossary
Post by: Bigguy on March 16, 2010, 05:18:42 PM
What would give me this error when trying to post:

Call to undefined function parse_glossary() in /home/*****/public_html/forum/Sources/Display.php  on line 1173
Title: Re: Glossary
Post by: Bigguy on March 16, 2010, 05:37:07 PM
Figured it out. Some edits were not done.
Title: Re: Glossary
Post by: kizer on March 16, 2010, 06:02:00 PM
I got the glossary to install, but when I try to insert a word the popup box comes up then it drops super fast. I have to literally install words via PhpAdmin

I'm running 2.0 RC2

Here are my mods

1.  Redirect_Moved_Topics  1.0    [ Uninstall ]  [ List Files ]  [ Delete ]
2. Stop Spammer 2.3.7 [ Uninstall ] [ List Files ] [ Delete ]
3. Advanced Reputation System 1.8.1 [ Uninstall ] [ List Files ] [ Delete ]
4. Sitemap 2.1.0 [ Uninstall ] [ List Files ] [ Delete ]
5. Auto Purge Old Topics 1.2 [ Uninstall ] [ List Files ] [ Delete ]
6. Location on memberlist SMF2 1.2 [ Uninstall ] [ List Files ] [ Delete ]
7. Images on Print Page 1.0 [ Uninstall ] [ List Files ] [ Delete ]
8. Pretty URLs 1.0RC [ Uninstall ] [ List Files ] [ Delete ]
9. Aeva ~ Auto-Embed Video & Audio 7.0 [ Uninstall ] [ List Files ] [ Delete ]
10. Add Domaintools to TrackIP 1.1 [ Uninstall ] [ List Files ] [ Delete ]
11. Tapatalk SMF Plugin 0.9.2 [ Uninstall ] [ List Files ] [ Delete ]
12. Moderator and Administrator Comment Tags 1.8 [ Uninstall ] [ List Files ] [ Delete ]
13. Related Topics 1.4 Beta 3 [ Uninstall ] [ List Files ] [ Delete ]
14. Glossary 0.3.1 [ Uninstall ] [ List Files ] [ Delete ]
15. nCode Image Resizer 1.3 [ Uninstall ] [ List Files ] [ Delete ]
16. Annoy User 1.2 [ Install Mod ] [ List Files ] [ Delete ]


I unstalled nCode and it didn't solve Issue, but I haven't been very successful in uninstalled Aeva to easily and I wonder if it could be the issue. Unless I'm the only one with the popup issue.
Title: Re: Glossary
Post by: Nibogo on March 16, 2010, 06:40:51 PM
kizer try uninstalling the Pretty Urls Mod
Title: Re: Glossary
Post by: kizer on March 16, 2010, 06:51:20 PM
Quote from: NIBOGO on March 16, 2010, 06:40:51 PM
kizer try uninstalling the Pretty Urls Mod

Good Call. I just disabled it and it works. Looks like I can disable, edit the glossary then re-enable.
Title: Re: Glossary
Post by: Nibogo on March 16, 2010, 06:54:55 PM
Quote from: kizer on March 16, 2010, 06:51:20 PM
Quote from: NIBOGO on March 16, 2010, 06:40:51 PM
kizer try uninstalling the Pretty Urls Mod

Good Call. I just disabled it and it works. Looks like I can disable, edit the glossary then re-enable.

It shouldn't happend, I mean it's a serious error with this mod and I'm not sure if you are going to be able to use like you should the Glossary when you enable the Pretty Urls
Title: Re: Glossary
Post by: kizer on March 16, 2010, 07:30:55 PM
Pretty URL's still works and Glossary still allows Tool tips and the viewing of the glossary, but you can not edit the glossary as long as Pretty URL is turned on.

I think its kinda bizarre too. I'm just worried that I've been spidered so much that if I delete Pretty URLs I'm going to have issues. With it turned off I can still use the Pretty URL and it does forward to each topic just fine. I haven't tried deleting it as of yet. Im sure I would save Database space.
Title: Re: Glossary
Post by: kizer on March 17, 2010, 01:58:15 PM
I'm also running Aeva which as we all know embeds videos into posts.
If I have tool tips on it does not embed the videos. I tried to ask a question over in the Aeva area if I installed a newer version would it make a difference, but as of yet I'm not able to get an answer.

I'm guessing its a conflict with the javascripting, but I can't seem to find it.
Title: Re: Glossary
Post by: Bugo on April 10, 2010, 11:06:32 AM
This mod works perfectly on SMF 2.0 RC2- RC3 (manually changed by me), but what about cyrillic symbols?
Title: Re: Glossary
Post by: Bruno36 on May 17, 2010, 03:54:03 AM
Hello!

When I activate the option Enable glossary in the tooltip messages there is a conflict with the mode Aeva Media (Gallery & Auto-embedder)
The videos are invisible in the subject
Title: Re: Glossary
Post by: Kindred on May 17, 2010, 08:12:31 AM
yup...   conflict in javascripts...
Title: Re: Glossary
Post by: Sakae on May 18, 2010, 09:43:04 AM
Too bad there's a conflict with AEVA Mod... I was looking forward to install this MOD :(
Title: Re: Glossary
Post by: Kindred on May 18, 2010, 01:29:27 PM
I have them both working together...   I just turned off the "autoemebed for the glossary" lol...
Title: Re: Glossary
Post by: Sakae on May 18, 2010, 01:42:02 PM
Does your tooltip works, Kindrey?
Title: Re: Glossary
Post by: Sakae on May 18, 2010, 02:05:55 PM
Quote from: Antes on December 02, 2009, 12:21:23 PM
Quote from: Bruno36 on December 02, 2009, 09:28:51 AM
Notice: Undefined index: fm_adminbutton in C:\wamp\www\Sources\Subs.php on line 3950


Erreur de base de données
No database selected
Fichier: C:\wamp\www\installDatabase.php
Ligne: 99
Retour

simply open phpmyadmin you 'll see db tables about Glosarry add smf_ as prefix it solves :)

That's a BIG problem. I'm having the same issue, but I have no permissions to rename my db tables using PhpMyAdmin.

I even tried to tweak the installDatabase.php file putting smf_ in front of the tables names, but still doesn't works.

Any idea?
Title: Re: Glossary
Post by: r2d2-trader on June 23, 2010, 03:53:40 AM
i would like to enable Tooltip within PotaMx - this feature seems to be available only for Simple Portal. Can you give a hint how i can enable this for PortaMx instead?

and

BBC-Code in Tooltips don't work. Do i have to use HTML-Tags instead?


thanks in advance

Rob
Title: Re: Glossary
Post by: Kindred on June 23, 2010, 06:57:16 AM
the tooltip works with any system... so long as the system does not have a conflicting function (which portaMX may)
Title: Re: Glossary
Post by: timmytimmy on August 14, 2010, 03:04:31 PM
Quote from: Kindred on December 02, 2009, 08:37:50 AM
that means that the database tables were not created when you installed the mod.  find the database file, put it in your forum root and run it... or manually create the tables...

hi.

i get the same error message.  when i placed the database file in the root and navigated to it in my browser, i get the following error:


QuoteDatabase Error
No database selected
File: .../html/bboard/installDatabase.php
Line: 99

could you explain a workaround or better explain how to manually create the tables? 

thank you!
Title: Re: Glossary
Post by: Kindred on August 14, 2010, 04:02:44 PM
is SMF installed in the bboard directory and are you logged into your forum?
Title: Re: Glossary
Post by: timmytimmy on August 14, 2010, 10:13:40 PM
Quote from: Kindred on August 14, 2010, 04:02:44 PM
is SMF installed in the bboard directory and are you logged into your forum?

yes, of course.  the installation appears as if it's successful, but i get that error message.  would uploading/sharing any of my files help?

EDIT:

i get this error message when i navigate to .../bboard/index.php?action=glossary

QuoteTable 'atwsmf20rc3.smf_glossary_groups' doesn't exist
File: /home/content/52/5084952/html/bboard/Sources/Glossary.php
Line: 422
Title: Re: Glossary
Post by: Kindred on August 14, 2010, 10:17:17 PM
well, that error suggests that the install file can not find the SSI.php or the settings.php file in order to determine the database connection info.
Title: Re: Glossary
Post by: timmytimmy on August 15, 2010, 10:39:15 AM
Quote from: Kindred on August 14, 2010, 10:17:17 PM
well, that error suggests that the install file can not find the SSI.php or the settings.php file in order to determine the database connection info.

i did some digging around and it turns out that when the glossary mod created the tables in the database, there was no "smf_" prefix in the table names.  i had to manually go in and add the prefix in myself, but i think it's okay now.
Title: Re: Glossary
Post by: timmytimmy on August 17, 2010, 01:05:22 AM
Quote from: Kindred on May 18, 2010, 01:29:27 PM
I have them both working together...   I just turned off the "autoemebed for the glossary" lol...

could you explain how to do that?
Title: Re: Glossary
Post by: Kindred on August 17, 2010, 06:52:13 AM
it's a checkbox in the glossary admin
Title: Re: Glossary
Post by: timmytimmy on August 17, 2010, 09:44:21 AM
Quote from: Kindred on August 17, 2010, 06:52:13 AM
it's a checkbox in the glossary admin

i think i may have misunderstood what you originally said.  are you just saying you turned off the tooltips, which enabled both Aeva and Glossary to be able to function together?

i only see the options that are available in these screenshots (http://custom.simplemachines.org/mods/index.php?mod=1525), so that is why i am confused as to what you mean.

just be clear, i want glossary tooltips and aeva auto embed to both work.  is this possible?
Title: Re: Glossary
Post by: Kindred on August 17, 2010, 10:50:32 AM
getting both to work would require one side or the other to modify the javascript quick creates the tooltips...
Title: Re: Glossary
Post by: Sapinho® on October 07, 2010, 01:38:21 PM
Hi, my english is very bad but, i try post some tips that i do for this mod funcionaty for me. i have use avea gallery and glosary working good with all funtion of glosary

1. pretty url is not compatible, u have disable this. (or maybe go to options for prety url and add ?action=glosary like exception but i canot try this)
2. when u install mod glosary, this create bad name into db, is created 2 fields without the prefix "smf_" u have modify this manually in the start of db table, find glosary and glosary_group, or something like u fix to  example "smf_glosary and smf_glosary_group".
3. i have avea gallery 1.4 (not sure if this tips work with other funtions but i think that not problem.)
4. use u file manager of site... and go to "/Sources" find file that name subs.php and dowload for modify this. and go to last line of code... or find the sentence "?>" u can see that after this line, are some line of code that mod glosary install but instead of install before of "?>" install after of "?>" this make error when u active tool tips in function glosary, the only that u have is selec code cut and paste before "?>" and mod glosary work good, (good work for me)
5. U have very very precautions when edit sub.php u dont have any lines incluide blank lines after "?>" incluide spaces, if u have this some funtions of ssi maybe generate errors.

is all modifications that i make...

I hope that works for them
Title: Re: Glossary
Post by: et10yl on October 07, 2010, 10:45:39 PM
Has someone already made the modifications to update this for RC 3 and willing to share? Thanks!
Title: Re: Glossary
Post by: Kindred on October 07, 2010, 10:53:46 PM
it works fine on RC3....  no problems installing... just tell it to emulate a lesser version beta 4 or RC1 or something (I don't reclal which one I specifically used)
Title: Re: Glossary
Post by: divecall on October 13, 2010, 06:36:57 PM
I have installed this mod in my forum SMF2 RC2, only my members can´t offer "words" for the glossary, so i deleted this code for the "subs-editor.php".

And i need to edit manually the subs.php (the first part, what this nice Mod want to change).

Actually, there is a bug with PrettyURL´s. It works not together. You need to disable PrettyURL´s when you want to use this MOD. Maybe an .htassess-issue, i dont know.

Title: Re: Glossary
Post by: divecall on October 15, 2010, 03:35:44 PM
I have another bug:

When i declare for example the word "Break even" and i put in Synonyms the shortform "BE", in ALL OTHER Glossary-Tooltips the combination of the letters "BE" is writing in big letters, e.g. BEing or AsBEst.

Can somebody help ?
Title: Re: Glossary
Post by: Kindred on October 15, 2010, 03:37:22 PM
unfortunately, I am not sure there is anything you can do about it.   It's one of the problems with using such a common set of letters.

(for example, BE could mean "Barium Enema")
Title: Re: Glossary
Post by: divecall on October 15, 2010, 03:45:30 PM
sure, the meaning can be different. But why it is writing in capital letters in the other tooltips ?

when i put in synonyms the letters "AR" for example, in ALL OTHER glossary tooltips i can read "glossARy" or "ARgentinia" in the text from this mod.
When i put "TEST" in one synonym and i write a silly word in another tooltip like "sillytesthere", the output on mouseover in the forum is "sillyTESThere"
Title: Re: Glossary
Post by: Sapinho® on October 16, 2010, 12:19:22 AM
i think this can use not sure in the panel admin, of setting glosary u can try enable o disable "use detec of word keys in case of insesitibilyti" gl
Title: Re: Glossary
Post by: divecall on October 19, 2010, 04:03:47 PM
Thank you, i will try...
Title: Re: Glossary
Post by: divecall on October 22, 2010, 09:53:16 AM
I have another issue here, when i have for example the word "BE" in tooltip (glossary), an i write in a message from the board "gebe" there is no problem. But when i write "gäbe" for example this mod show "gäbe" - with the tooltip.

Looks like this mod cut off the words after "ä,ü,ö"

Another example for this: i declare a word in the glossary mod with "sl" and somebody write the finnish word "üslö" you see in the text "üslö", but when you write "uslo" nothing happend, no tooltip.

Has somebody a solution for this ?
Title: Re: Glossary
Post by: divecall on October 22, 2010, 05:41:22 PM
and yes...there are troubles with the AVEA-Mod !

If you have other languages installed or Mods like "prettyURL" or "Avea"

DONT INSTALL THIS !
Title: Re: Glossary
Post by: PLAYBOY on December 03, 2010, 11:53:41 PM
Is there an up-to-date example link for this mod we can take a look at?
Is it ever gonna be available for 1.1.12 ?
Title: Re: Glossary
Post by: Bigguy on December 04, 2010, 02:40:18 PM
Quote from: divecall on October 22, 2010, 05:41:22 PM
and yes...there are troubles with the AVEA-Mod !

If you have other languages installed or Mods like "prettyURL" or "Avea"

DONT INSTALL THIS !

I have them installed and it works fine for me.
Title: Re: Glossary
Post by: Kindred on December 04, 2010, 04:53:53 PM
the javascript pop-up function conflicts with aeva's embed function... yes.
Pretty-urls, besides being useless (IMO) doesn't work with 20+ mods what add extra sections.

additional languages...   well, most mods only install in English and you have to make your own translations.

lastly... I am using this mod on RC4 with Aeva Media (although I do have the glossary tooltips turned off) and I have no problems.
Title: Re: Glossary
Post by: Sakae on December 05, 2010, 06:18:33 PM
Installed fine on SMF 2.0 RC4.

But I can't add new words...

http://www.tigrelog.com.br/index.php?action=glossary
Title: Re: Glossary
Post by: Bigguy on December 07, 2010, 12:31:55 AM
Quote from: Kindred on December 04, 2010, 04:53:53 PM
the javascript pop-up function conflicts with aeva's embed function... yes.

I have not noticed any.
Title: Re: Glossary
Post by: PLAYBOY on December 09, 2010, 12:26:09 AM
Is there an up-to-date demo for this mod we can take a look at?
Title: Re: Glossary
Post by: Kindred on December 09, 2010, 01:03:45 AM
I have it working on 40konline.com
Title: Re: Glossary
Post by: Baloch on December 10, 2010, 07:52:51 AM
is it compatible for SMF 2.0 RC4?
Title: Re: Glossary
Post by: Kindred on December 10, 2010, 09:55:21 AM
you have to tell the forum to emulate a previous version... but yes, it works
Title: Re: Glossary
Post by: Baloch on December 11, 2010, 11:06:04 PM
Quote from: Kindred on December 09, 2010, 01:03:45 AM
I have it working on 40konline.com

Can u plz provide direct url of glossary at your site?
Title: Re: Glossary
Post by: Bigguy on December 12, 2010, 12:02:44 AM
Here try this:

P.C. Tweakr glossary (http://forum.pctweakr.com/index.php?action=glossary)
Title: Re: Glossary
Post by: Kindred on December 12, 2010, 01:30:32 AM
http://www.40konline.com/community/index.php?action=glossary

BTW: Can you please not use chatspeak.
Title: Re: Glossary
Post by: Masterd on December 12, 2010, 07:09:20 AM
When you will update this mod for SMF 2.0 RC4?
Title: Re: Glossary
Post by: Kindred on December 12, 2010, 09:21:39 AM
Quote from: Kindred on December 09, 2010, 01:03:45 AM
I have it working on 40konline.com

Although that SAYS RC3, it is actually running RC4
Title: Re: Glossary
Post by: Bigguy on December 12, 2010, 11:52:02 AM
Quote from: Masterd on December 12, 2010, 07:09:20 AM
When you will update this mod for SMF 2.0 RC4?

It works on RC4.
Title: Re: Glossary
Post by: Baloch on December 16, 2010, 04:32:08 AM
I am getting error  in Package Installation.
Screen shout is attached herewith

Title: Re: Glossary
Post by: blue_shadow on December 17, 2010, 01:23:06 PM
Glossary installer doesn't use table prefix in RC4, otherwise the install is easy. My friend found the install bug, here's the install fixes for RC4.

Find:
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),


Add this before it:
'glossary' => array( 'title' => $txt['glossary'], 'href' => $scripturl . '?action=glossary', 'show' => $context['allow_view_glossary'], 'sub_buttons' => array( ), ),


Find:
array(),
array(
'image' => 'list',
'code' => 'list',
'before' => '[list]\n[li]',
'after' => '[/li]\n[li][/li]\n[/list]',
'description' => $txt['list_unordered']


Add this before it:
array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),


Good luck guys.
Title: Re: Glossary
Post by: Baloch on December 18, 2010, 10:26:55 PM
Quote from: blue_shadow on December 17, 2010, 01:23:06 PM
Glossary installer doesn't use table prefix in RC4, otherwise the install is easy. My friend found the install bug, here's the install fixes for RC4.

Find:
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),


Add this before it:
'glossary' => array( 'title' => $txt['glossary'], 'href' => $scripturl . '?action=glossary', 'show' => $context['allow_view_glossary'], 'sub_buttons' => array( ), ),


Find:
array(),
array(
'image' => 'list',
'code' => 'list',
'before' => '[list]\n[li]',
'after' => '[/li]\n[li][/li]\n[/list]',
'description' => $txt['list_unordered']


Add this before it:
array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),


Good luck guys.

Kindly mention the file name in which we have to edit for RC4.

Title: Re: Glossary
Post by: Baloch on December 18, 2010, 10:30:08 PM
on test forum I have installed it with error and now getting following error:

Table 'baaskcom_smf3.smf_glossary_groups' doesn't exist
File: /home/baaskcom/public_html/forum/Sources/Glossary.php
Line: 422
Title: Re: Glossary
Post by: Kindred on December 19, 2010, 07:50:13 AM
did you run the db script to add the tables& columns?
Title: Re: Glossary
Post by: Baloch on December 19, 2010, 10:21:12 AM
Quote from: Kindred on December 19, 2010, 07:50:13 AM
did you run the db script to add the tables& columns?
no

from where I can get the DB SCRIPT and from which point should I run that script?
Title: Re: Glossary
Post by: Kindred on December 19, 2010, 02:38:27 PM
it is in the mod package. You can extract and run it from your forum root
Title: Re: Glossary
Post by: Baloch on December 19, 2010, 10:49:18 PM
Quote from: Kindred on December 19, 2010, 02:38:27 PM
it is in the mod package. You can extract and run it from your forum root

got this error
Notice: Undefined index: glossary in /home/baaskcom/public_html/forum/Sources/Subs.php on line 4249
Title: Re: Glossary
Post by: Kindred on December 19, 2010, 11:35:24 PM
looks like the text strings did not get installed....   seriously... did you actually successfully install this mod?
Title: Re: Glossary
Post by: blue_shadow on December 21, 2010, 03:43:35 PM
Opps, I did forget to mention the filenames, didn't I? Sorry, here we go:

Find in $sourcedir/Subs.php:
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),


Add this before it:
'glossary' => array( 'title' => $txt['glossary'], 'href' => $scripturl . '?action=glossary', 'show' => $context['allow_view_glossary'], 'sub_buttons' => array( ), ),


Find in $sourcedir/Subs-Editor.php:
array(),
array(
'image' => 'list',
'code' => 'list',
'before' => '[list]\n[li]',
'after' => '[/li]\n[li][/li]\n[/list]',
'description' => $txt['list_unordered']


Add this before it:
array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),


REMEMBER: this is the fix for RC4, not sure how it is in RC3 or before, but if the code seems similar, try it.
Title: Re: Glossary
Post by: wiwaedu on March 02, 2011, 03:50:23 PM
Hello, exists this MOD for 1.1.13 ??
Title: Re: Glossary
Post by: Bigguy on March 02, 2011, 04:11:56 PM
From what the mod site says unfortunately no it does not.
Title: Re: Glossary
Post by: Baloch on March 05, 2011, 10:50:34 PM
I dont want to take any risk to install this mode with errors.
Why you guys don't update SMF MOD page so that anyone could get benefit from your Mod?
Title: Re: Glossary
Post by: Bigguy on March 06, 2011, 12:26:50 AM
It's up to the mod author to update.
Title: Re: Glossary
Post by: saks on March 11, 2011, 07:20:15 PM
how can I add string with Russian letters ?
Title: Re: Glossary
Post by: Kindred on March 11, 2011, 07:25:09 PM
I don't know if the mod supports utf-8
Title: Re: Glossary
Post by: blue_shadow on March 12, 2011, 01:39:44 AM
Inside the embedded posts, character entities such as foreign characters, are displayed just fine, but inside the glossary list, they display as their character entity code (such as &nbsp; for space). How can we make the entity appear in the glossary like it does in the tooltips in the posts?
Title: Re: Glossary
Post by: WasdMan on March 19, 2011, 10:30:45 AM
2.0RC5 version will be?
Title: Re: Glossary
Post by: blue_shadow on March 19, 2011, 04:38:08 PM
WasdMan, forget it. It wasn't even updated for RC4, but I posted how to make it work with RC4, so maybe someone running RC5 will post as well. I haven't updated to RC5, so I'm not sure if the structure has changed. Check the previous page and see if my tips will help it install on RC5.
Title: Re: Glossary
Post by: WasdMan on March 21, 2011, 06:54:28 AM
I have this error:(attachment)

I tried so well:
Quote// Run BBC interpreter on the message.
   $message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);
   
   //Run Glossary analyzer on the message
   if ( $modSettings['enable_tooltips'] )
   $message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);

or:

   $message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);

   //Run Glossary analyzer on the message
   if ( $modSettings['enable_tooltips'] )
      $message['body'] = parse_glossary($message['body']);


or:

   // Run BBC interpreter on the message.
   $message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);
   
   //Run Glossary analyzer on the message
   if ( $modSettings['enable_tooltips'] )
   $message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);


One with smiley here, but there is no image BBC.
Image and another one is smiley, but no sign Glossary.

What's the solution?

mywebsite.com/Download/Topicfaq/szojegyzek.png" alt="" width="600" height="275" class="bbc_img resized" />
Title: Re: Glossary
Post by: Biology Forums on April 25, 2011, 12:44:35 PM
Is this available for 1.x?
Title: Re: Glossary
Post by: Kindred on April 25, 2011, 12:50:45 PM
no.   and since the author has not been online in 5 months, I doubt that there will be any further updates.
Title: Re: Glossary
Post by: blue_shadow on June 16, 2011, 03:27:22 AM
Just a hopeful bump. Maybe the author will get a hint...anyone have success with RC5? Or for that matter, making it work with different character sets?
Title: Re: Glossary
Post by: Kindred on June 16, 2011, 07:37:26 AM
Actually, I have it running just fine on rc5....  Have not tried on final yet.
Title: Re: Glossary
Post by: blue_shadow on June 16, 2011, 09:19:00 PM
Final's out huh? I should really keep up with the news. I made it work on RC 4 no prob and posted the fix, but the author must not even check or it'd have been easy for them to update. I am still having that issue with the character displaying differently and aside from rewriting the whole thing, I don't know how to fix it. Don't suppose you could offer assistance, kindred?
Title: Re: Glossary
Post by: blue_shadow on June 21, 2011, 05:26:27 AM
I have confirmed that this will work in 2.0 Stable/gold. If you follow my steps in this post (http://www.simplemachines.org/community/index.php?topic=282158.msg2887955#msg2887955), you should have no problem installing it.

It also seems as if the error with the tables not being created is no longer a problem. At least, it wasn't for me.
Title: Re: Glossary
Post by: MrMorph on July 30, 2011, 12:58:47 PM
Thank you Blue Shadow :)

Has anyone noticed if this has much impact on the speed of the forum, page loads etc... ?
Title: Re: Glossary
Post by: WasdMan on August 16, 2011, 04:00:23 AM
Prepare to have someone on the 2.0-compatible version.
Because the current is wrong szerkesztgetés after operation.
For example, no editing category, one half of the database is not created.
Title: Re: Glossary
Post by: blue_shadow on August 16, 2011, 04:41:34 AM
With minimal editing, this worked fine with RC4. I'd upgraded to 2 stable and it still works fine.
Title: Re: Glossary
Post by: Eclipse16V on September 02, 2011, 06:50:17 AM
Works nice on 2.0 Gold
Title: Re: Glossary
Post by: Danni_X on September 26, 2011, 02:30:19 AM
not work with PrettyUrl  :( :( :(
Title: Re: Glossary
Post by: GlitchPC on October 10, 2011, 01:27:13 PM
Well...I installed on my SMF 2.0.1 forum...and did the manual edits for Subs.php and Subs-Editor.php.  Afterwards...got an error message that I needed to upgrade my database to 2.01..  Shouldn't have to since there is no major changes between 2.0 and 2.0.1.  Was really looking forward to using this mod...as it would be helpful on a site such as mine.

Oh well...

Guess I'll just have to wait until someone can port this to 2.0.1 with no issues.
Title: Re: Glossary
Post by: PLAYBOY on October 17, 2011, 03:21:22 AM
Is this gonna be updated for 2.0.1?
Does it support Turkish language/characters?
Title: Re: Glossary
Post by: GlitchPC on October 17, 2011, 01:26:41 PM
Quote from: WasdMan on August 16, 2011, 04:00:23 AM
Prepare to have someone on the 2.0-compatible version.
Because the current is wrong szerkesztgetés after operation.
For example, no editing category, one half of the database is not created.

Looking forward to someone taking this over...hopefully, soon...with a 2.01 compatible version.


Update...

I currently have this installed on SMF 2.0.1, using no emulation.  Had to change table names to add the "smf_" prefix.  Also had to manually edit the Subs.php and Subs-Editor.php files as described in an earlier post.  I'm currently testing it on a live board to see if there are any issues.  Unfortunately, I do not have a test board.  Will keep you posted...
Title: Re: Glossary
Post by: GlitchPC on November 01, 2011, 05:47:51 AM
Okay,  hopefully...someone can point me in the right direction with a couple of issues I'm currently facing.  (See attached image)


Update...

Don't worry about it guys...  I decided to uninstall this.  There just seems to be too many issues with it.  I know it wasn't coded for my version of SMF....I just wanted to give it a go.  It's just too buggy.  Anyhow...I hope it gets ported to 2.0.1.  In the meantime...I'll keep an eye on it.
Title: Re: Glossary
Post by: Bigguy on November 01, 2011, 11:34:54 PM
I have not solved the nav tree yet but the glossary mod works in SMF 2.0.1.
Title: Re: Glossary
Post by: Bigguy on November 02, 2011, 12:50:37 AM
At the top of the glossary.template.php take out the reference to the linktree, that's it.
Title: Re: Glossary
Post by: Kindred on November 02, 2011, 07:49:47 AM
Sorry for not responding sooner... Yes, bigguy has it.

In the change between rc3 and final, the link tree was moved so that it  displays for mods... Because this mod was designed previously, it had also included the call in the mod file itself.

Apart from that, this mod should work fine on 2.0.1
Title: Re: Glossary
Post by: GlitchPC on November 02, 2011, 03:10:42 PM
Thanks for the input...

Could you tell me, specifically, which line of code I should remove for that particular file, please?  Also...will the linktree work after that line of code is removed?  Will it show the "Glossary" in the linktree?

One last thing...

Did you see #2 of my previous post?

QuoteThe table headers don't appear that well...since the headers are a dark blue, it seems the colors for these need to be changed.  How do I accomplish this?

Now...I'm not talking about the background for the table headers...I just mean the color of the text.

Thanks, in advance...
Title: Re: Glossary
Post by: Kindred on November 02, 2011, 03:15:54 PM
firefox with firebug is your friend...   use it, find the appropriate CSS entries...

Title: Re: Glossary
Post by: GlitchPC on November 02, 2011, 03:18:30 PM
Kindred...

Great answer!  Love it!  Thanks, a treat...  ;)
Title: Re: Glossary
Post by: Bigguy on November 02, 2011, 05:01:45 PM
Right at the top of the glossary.template.php there is only one reference to the link tree. It is in a line that stands by itself so it is easy to spot. Remove that whole line. No it does not show glossary in the linktree but I'm not to sure why it has to in the first place.
Title: Re: Glossary
Post by: Kindred on November 02, 2011, 05:03:43 PM
ummm...   I can't get to my main site form the office... but there is a single line that can be added to the mod that will add your current location into the linktree.  Look in one of SA's mods - I know I went over it with him and we got it to work a few months ago.
Title: Re: Glossary
Post by: GlitchPC on November 03, 2011, 12:58:25 AM
Quote from: Kindred on November 02, 2011, 03:15:54 PM
firefox with firebug is your friend...   use it, find the appropriate CSS entries...

Unfortunately, the css entries are linked to the theme's index.css file.  If I change it there...it's changed throughout the board and that won't do.  I appreciate the help on that, though, Kindred.

I also found a couple of additional issues with this mod and am not sure if they've been covered before.  Here's what I've found:

1.  If you click the "Category" link in the table header, to sort by category...it results in an unidentified index error in the Admin error log.

2.  Enabling Administrative right-click makes the right-click function available to everyone on the board...even guests.  Not good...  Have checked permissions and those were good.

I really like this mod...and hate to see little things like this deter me from using it.  Security is a big issue with me...and the lack of updates for this mod make me a little hesitant to re-install it.

I'm really hoping someone can take over this mod and port it to SMF 2.0.1.  I know, I know...you guys have it working.  Well...I had it working, too.  It's just that the above issues...give me reason for concern.
Title: Re: Glossary
Post by: WasdMan on November 17, 2011, 06:38:54 AM
The package is nicely telpül 2.0.1 below.
But ...
You can not add to - not - category or keywords.
I do not get in the block which could be added.
Successfully go hand in 2.0.
Title: Re: Glossary
Post by: GlitchPC on November 28, 2011, 12:23:24 PM
Okay...have this thing working as it should, now.  Except for one thing.  When I open the Admin/Modification Settings ... Glossary menu link is already highlighted.  The settings associated with that mod are not listed underneath...unless I click the already highlighted "Glossary" navigation link.

Shouldn't the "Miscellaneous" link be the default highlighted link when opening Admin/Modification Settings?

Update...

Never mind.  It would seem the author placed the link on the Admin.php file in the wrong location.

I fixed it.
Title: Re: Glossary
Post by: GlitchPC on December 11, 2011, 09:34:56 AM
Okay, guys and gals...

Kindred referred me to Firebug before...and to be perfectly honest...I'm not much of a coder...so, I need all the "free" help I can get.  I'm not an idiot...it's just that coding is not one of my specialties.

Anyhow...please, take a look at the attached image....it's from a custom theme called "Anecdota" by Crip.  Note:  I have no issues, at all in SMF's Curve theme.  I just use those two themes...and that's it.

Herein lies the problems:

     1.  How would I go about changing the font color of the word "Glossary"?  It's black and doesn't appear that well on the table header.

     2.  The link color (css) for this theme appears to be fine outside the table header, but is the wrong color for the table header.  How can I change the color without it affecting any other links for this theme?

     3.  Finally...a link is attached to the image, but not the text.  I know where to change it...I just don't know how...again...it's a coding issue...and I've tried everything I know to get it to work, but I get a template parse error, after I try.  Below is the current coding of the Glossary.template.php for that link:
<a href="#" title="'.$txt['glossary_new_word_title'].'" id="div_new_word-show"><img src="'. $settings['default_theme_url']. '/images/glossary_blue_add.png"></a> '. $txt['glossary_action_add'];

Thanks, in advance for any and all help...I really appreciate it.
Title: Re: Glossary
Post by: GlitchPC on December 13, 2011, 11:02:29 PM
Hello?  Anyone care to make any additional suggestions.  I know everybody is probably out shopping but, this is ridiculous... :laugh: ;)
Title: Re: Glossary
Post by: Bigguy on December 15, 2011, 06:49:05 PM
You may have to assign those words there own .css entries.
Title: Re: Glossary
Post by: GlitchPC on December 15, 2011, 08:34:20 PM
Bigguy,

Apparently you missed this comment...

Quote from: GlitchPC on December 11, 2011, 09:34:56 AM
I'm not an idiot...it's just that coding is not one of my specialties.
Title: Re: Glossary
Post by: GlitchPC on December 17, 2011, 02:19:10 PM
Okay...I found out how to fix the table header.  That part of it is done.  Did that on my own, but it took me some time to figure out.

There's two lines of code I need help with, please.  If anyone can help...I appreciate it.

I need to know how to code the following to make the text bold:

Current coding:
', $txt['glossary'], ' ',

The last thing I need to do is to fix the below coding to link the text and the image together.  not just the image.  Every way I've tried...I've failed.  Any help?

echo '
                    <a href="#" title="'.$txt['glossary_new_word_title'].'" id="div_new_word-show"><img src="'. $settings['default_theme_url']. '/images/glossary_blue_add.png"></a> '. $txt['glossary_action_add'];
                   
                   


Again...I appreciate any and all help.


Update...

Never mind...Miss All Sunday helped with the coding and the issue has been resolved.
Title: Re: Glossary
Post by: Bigguy on December 23, 2011, 05:35:47 PM
Glad to hear you got it....and no I didn't miss it...everyone has to start somewhere. ;)
Title: Re: Glossary
Post by: GlitchPC on December 23, 2011, 07:06:46 PM
LOL!  True...I'm at an age where it's hard to teach an old dog new tricks, though.
Title: Re: Glossary
Post by: Bigguy on December 23, 2011, 08:43:33 PM
I hear ya there. ;)
Title: Re: Glossary
Post by: Kindred on January 30, 2012, 10:53:18 PM
ok... FYI, here is the linktree code that I mentioned.

Code (find in file "Sources/Glossary.php") Select

    loadTemplate('Glossary');
    $context['page_title'] = $txt['glossary'];

Code (replace) Select

    loadTemplate('Glossary');

$context['linktree'][] = array(
    'url' => $scripturl . '?action=glossary',
    'name' => $txt['glossary']
);

    $context['page_title'] = $txt['glossary'];


I have also sent an email to the original author asking if he will open the source code/license to another author...
Title: Re: Glossary
Post by: GlitchPC on January 31, 2012, 07:50:56 AM
Thanks, Kindred, for that linktree code.
Title: Re: Glossary
Post by: Dave J on February 11, 2012, 08:59:59 AM
Firstly a big thanks to the original creator of this mod.

Secondly thanks to all you other guys who have helped to iron out the glitches.

I now have this working on SMF2.0.2 with all it's functions working correctly.

An edit I made of my own prior to reading this thread was in the 'installDatabase.php' when I installed it it said that the tables did not exist so I edited the file so that the tables have the prefix 'smf', once I did that and did another install it worked perfectly. Just in case anyone else has this same problem I have attached it here.

PS: I have diiferent themes on my site and it's working on all correctly once you transfer the 'Glossary CSS' files to the individual themes CSS folder. The link to 'my site' is below.



Title: Re: Glossary
Post by: Kindred on February 11, 2012, 09:11:22 AM
you should not need to use the css file in every theme. It should drop to the default version if the theme specific one does not exist.
Title: Re: Glossary
Post by: Dave J on February 13, 2012, 11:34:40 AM
Each theme has it's own css folder....and as the mod wasn't working correctly all I did was copy the 'default' css files into the css folder of each custom theme, when I did that the tools within the 'Administration' link on the right side then worked in the custom theme i.e 'Select All' which they didn't before.

I'm not a coder by any means but just testing things out on my test site it worked...my error log shows no errors at all when the glossary is used.

So I don't really know why it happened that way Kindred
Title: Re: Glossary
Post by: Kindred on February 13, 2012, 11:55:39 AM
oh... I understand what you did...  I am saying that it should not have been necessary.
Title: Re: Glossary
Post by: Drover on February 26, 2012, 08:14:08 PM
I'm using 2.0.2 with a curve variant called "Green Bean (http://custom.simplemachines.org/themes/index.php?lemma=2348)".  Can someone help me get this working? 

On install I get Test Failed on these sections:

Find:
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),


Add Before:
// Glossary Mod
'glossary' => array(
'title' => $txt['glossary'],
'href' => $scripturl . '?action=glossary',
'show' => $context['allow_view_glossary'],
'sub_buttons' => array(
),
),


and...

Find:
'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt['bbc_quote']),

Add After:
'glossary' => array('code' => 'glossary', 'before' => '[glossary]', 'after' => '[/glossary]', 'description' => $txt['bbc_glossary']),

Thanks in advance!
Title: Re: Glossary
Post by: Kindred on February 26, 2012, 08:22:09 PM
Did you try to use search? Because that has already been answered a few times.

Howevere... The subs.php can be manually edited exactly as it shows...
Te subs-editor.php file is different. Find the quote lines and the. Just duplicate them but re,ace quote with glossary
Title: Re: Glossary
Post by: Drover on February 26, 2012, 08:43:21 PM
Thanks, Kindred.  I did try that but must have done something wrong.  Do I install the mod first and then make the edits to those files?

Not sure what you mean by this:
QuoteFind the quote lines and the. Just duplicate them but re,ace quote with glossary
Title: Re: Glossary
Post by: Kindred on February 27, 2012, 10:02:27 AM
http://www.simplemachines.org/community/index.php?topic=282158.msg2542286;topicseen#msg2542286
Title: Re: Glossary
Post by: GlitchPC on February 27, 2012, 10:43:41 AM
Okay, guys...

Here's the deal.  Thanks to all who helped me get this mod installed and working with 2.0.2.  Especially all the little tweaks to get it to look right.

Anyhoo...the problem is lag.  I'm not sure if it's a javascript issue...mod conflict...or just the size of the glossary.  When I open the Glossary from the Help menu tab...it just takes forever on some browsers.  On the latest version of Chrome...it's not too bad.  However, on the other latest versions of major browsers...Firefox, Opera, Safari, and IE8...it just lags to high heaven.

Anyone care to take a gander to see if you're experiencing it too?  Link to site in sig.  Just ckick Help tab and select Glossary.


Thanks, in advance...
Title: Re: Glossary
Post by: Dave J on March 03, 2012, 10:31:50 AM
Quote from: GlitchPC on February 27, 2012, 10:43:41 AM
Okay, guys...

Here's the deal.  Thanks to all who helped me get this mod installed and working with 2.0.2.  Especially all the little tweaks to get it to look right.

Anyhoo...the problem is lag.  I'm not sure if it's a javascript issue...mod conflict...or just the size of the glossary.  When I open the Glossary from the Help menu tab...it just takes forever on some browsers.  On the latest version of Chrome...it's not too bad.  However, on the other latest versions of major browsers...Firefox, Opera, Safari, and IE8...it just lags to high heaven.

Anyone care to take a gander to see if you're experiencing it too?  Link to site in sig.  Just ckick Help tab and select Glossary.


Thanks, in advance...

Thats exactly the same as happened to me...and after long looking around and un-installing mods etc I found out that if I disabled
QuoteEnable glossary tooltip in the messages
in the settings it all worked a lot faster.

It is unfortunate that it slows it down like that but my main priority was having this great mod on the site and working ...so to me it was a small compromise.

Hope that helps
Title: Re: Glossary
Post by: Inti31 on March 03, 2012, 03:40:06 PM
hmmh...

I  corrected the database installer, the install.xml (because of Subs-Editor..php, PortalBlocks.php), removed the linktree line - and the installation was okay - no errors.
I can use the glossary tag in a new post, that's all.
I can't manage categories, add glosssary infos. I only see that - any ideas?

I use it with the standard theme , smf version 2.0.2...

Testforum: http://inti31.cwsurf.de/

cheers inti31
Title: Re: Glossary
Post by: Kindred on March 04, 2012, 04:53:44 PM
this mod conflicts with nearly ANY other mod or theme which uses javascript....  and the admin and add-term functions use javacript
Title: Re: Glossary
Post by: GlitchPC on March 04, 2012, 04:56:24 PM
Quote from: Kindred on March 04, 2012, 04:53:44 PM
this mod conflicts with nearly ANY other mod or theme which uses javascript....  and the admin and add-term functions use javacript

This is what I thought...  It would seem different browsers have an issue and take an extremely long time to load the page.  I have to wait almost forever if I wanted to add a term or use the Admin menu.  So far...the only browser that really holds its own...Chrome.
Title: Re: Glossary
Post by: Kindred on March 04, 2012, 05:08:10 PM
sorry....  I have well over 200 entries in the glossary and I have no problem on IE9 or FF10
Title: Re: Glossary
Post by: Inti31 on March 15, 2012, 03:27:16 AM
okay - i did a new install of my testforum (http://inti31.cwsurf.de/)- now everything is okay..

After I installed succesful "Statistics in jQuery", this mod doesn't work anymore... - thx for the hint about problems with other mod are using javascript...

cheers Inti31
Title: Re: Glossary
Post by: GlitchPC on March 26, 2012, 08:47:39 PM
Getting the following error using Categories:

xxxx://xxxxxxxx.xxx/index.php?action=glossary&amp;sa=categories
8: Undefined index: idFile: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/Glossary.php
Line: 776

Here's that line of code...

$ids_list .= ';'.$res['id'];

Can anyone shed some light on the subject, please?


Thanks, in advance...
Title: Re: Glossary
Post by: GlitchPC on April 08, 2012, 08:11:43 AM
Does anyone know if there is a way to control the duration of the tooltip?  I'd like to leave the tooltip displayed for as long as the mouse pointer is hovering over a glossary term.

Currently...it just displays for a certain amount of time and then disappears.

Any help is appreciated...

Update...

Never mind...must've been a glitch...pardon the pun ;)...or operator error.
Title: Re: Glossary
Post by: DaKrampus on May 01, 2012, 04:07:45 AM
works like a charm, after the fixes..
but it has a real annoying bug.
If you use the tooltips , it replaces the keywords in the definitions.
Example (from a medical site)
2 keywords
ED => Erectile Dysfunction, medical treatment etc...
SF => Serotonine function is used to do this and that.

In the tooltips, the definition is parsed (has to be) but with keyword.
so you get:
Tooltip:
ED => Erectile DySFunction, mEDical treatment etc...
SF => Serotonine function is usED to do this and that.

If you have Like 100 definitions with 2 letters it gets really annoying.

I wrote a short fix... that seems to work.

in the install.xml (or the subs.php - for testing)
find:
$prefix = 'wgYBA1Mq@Xn8y#zWL';
foreach($arr_unique_words as $elem)
array_push($arr_prefixed_words,$prefix.$elem);

$words = array();
foreach($arr_unique_defs as $def){
array_push($arr_treated_defs,str_ireplace($arr_unique_words, $arr_prefixed_words, $def));
}


replace with:

$prefix = 'wgYBA1Mq@Xn8y#zWL';
//foreach($arr_unique_words as $elem)
// array_push($arr_prefixed_words,$prefix.$elem);

$words = array();
foreach($arr_unique_defs as $def)
{
foreach($arr_unique_words as $elem)
{
$def = preg_replace("@(.*)(".$elem.")(.*)@i",'$1'. $prefix .'$2$3', $def);
}
array_push($arr_treated_defs,$def);
}


Now i dont like nested foreach...
i didnt find a better way to do it.

The thing is.. you have to prefix all the keywords in the definitions, so you dont get nested span tags that would break the layout.
If someone has a better way... please post.

I am not to good at regex, but the best would be to leave that part out completely, and just do it with the final parsing in the final preg_match.
Like :
Skip all replacement within a span tag -> then do the replacement.
I tried, but my low regex skills made me fail, so I came up with this one.

Luc

PS: BTW.. I found a stupid bug.. when a word is in "double quotes" like "this".. it somehow breaks the layout...
Title: Re: Glossary
Post by: nixlike on May 20, 2012, 02:53:56 PM
Is anyone able to fix this for current SMF 2.0.2? Installing it with some manual edits is not a problem, but the usage seems to be broken, especially here:

'<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",

It shows up with ">theglossarywordIputin which can also be fixed somehow by manual editing but then again it fails again when the definition is multilined (not just one single line) and shows up in the post with line2, line3">theglossarywordIputin in the post message and I don't seem to be able to fix this on my own :( I am so much looking forward to use this mod, but it needs some optimization.

Thanks to anyone (mod creator - are you still active?) who is able to fix this :)
Title: Re: Glossary
Post by: DaKrampus on June 05, 2012, 02:08:22 AM
Quote from: nixlike on May 20, 2012, 02:53:56 PM
Is anyone able to fix this for current SMF 2.0.2? Installing it with some manual edits is not a problem, but the usage seems to be broken, especially here:

'<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",

It shows up with ">theglossarywordIputin which can also be fixed somehow by manual editing but then again it fails again when the definition is multilined (not just one single line) and shows up in the post with line2, line3">theglossarywordIputin in the post message and I don't seem to be able to fix this on my own :( I am so much looking forward to use this mod, but it needs some optimization.

Thanks to anyone (mod creator - are you still active?) who is able to fix this :)

That one is only usefull if you want to add glossary bbcode.. when editing. I dont use that.

But I am rewriting the parsing part for a medical page, and got it working by changing big parts of  the parsing function.
As I am out of the country, I dont have my pc here, but I will be back in about 2 weeks time.
basically what i did is in subs.php
I replaced parse_glossary function with this one:
function parse_glossary($message)
{
global $context, $modSettings, $smcFunc, $db_prefix;
// Check if mod is enabled
if(empty($modSettings['enable_glossary_mod']) || $modSettings['enable_glossary_mod'] == false)
return $message;

//Build full glossary list
if ( empty($context['glossary_list']) ){
$context['glossary_list'] = array();
$data_glossary = $smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}glossary
WHERE valid = {int:valid} AND show_in_message = {int:show_in_message}
ORDER BY word ASC',
array(
'valid' => 1,
'show_in_message' => 1,
)
);   
while ($res = $smcFunc['db_fetch_assoc']($data_glossary) ){
$context['glossary_list'][trim($res['word'])] = trim($res['definition']);
//if synonyms exit then add them in the list
if ( !empty($res['synonyms']) ){
$synonyms = explode(',',$res['synonyms']);
foreach ( $synonyms as $synonym )
{
$context['glossary_list'][trim($synonym)] = trim($res['definition']);

}
}
}
$smcFunc['db_free_result']($data_glossary);
}
$words = $context['glossary_list'] ;
$restricted_symbols = array('{','}','?',',','+','*','|','/','\\','$','^','.','[',']');
foreach($words as $word => $definition)
{
/*if you are in UTF-8 Fix the international characters in the keyword. */

$word = (isset($context['utf8']) && !empty($context['utf8'])) ? un_htmlspecialchars($word) : $word;
// we strip out any regex breaking symbols
$word = str_replace($restricted_symbols, '', $word);


//This is the new regex
$regex = '/\b(?!<.*?)('.trim($word).')(?![^<>]*?>)\b/siU'; 
//does the def really need addslashes??? i dunno but i tried without using ' " and <> and it works without. so i dont use it
$newstring = '<span class="glossary" title="'.$definition.'">'."$1".'</span>';
// now we do the preg_replace
$message = preg_replace($regex, $newstring, $message,(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1); 
}
//followin has to disappear, because a) I dont want urls in tooltipps b) you cannot click them anyway.
// TODO: keep all bbcode as is, and parse with javascript.

if ( !empty($modSettings['enable_bbc_tooltip_glossary']) ) {
$message = preg_replace('#\[ url=([^\]]*) \] (.*?) \[ /url \]#smx','$2',$message); //Suppress URL bbcode from tooltip
return parse_bbc($message,true,'',array('b','i','u','url'));
}
else return $message;
}


it takes much less memory on very large glossaries, because the part where in the original you have to prefix all glossary words to avoid them parsing themselves is gone. So those huge array manipulations are also gone.
The original regex does not permit to parse in urls, but we are in a span tag, this regex does not permit to parse between any < > tags. so there is no self parsing any more. Advantage: you can parse a word that is <a>tags.. seems to work. reslut parsing test: <a href="#">testword</a> will give <a href="#"><span class=glossary>test</span>word</a>

And, you ran into major probs, if some of your keywords contained regular expression elements. like []*.? In that case it was broken.
here it would also be the case.
But they are stripped out now, so word wont match anyway. (it would not break, if you slashed the chars out in the word... but that would be too complex as usually you dont slash out a * or a dot .)

Just dont use those chars in your key words (in description it does not matter)

I hope it works for you, because I modified much more, as there were/are glitches in the javascript part. I wrote my own, that only makes tooltips and parses the bold, underline, italic and line breaks on the client side.
It will be finished next month when I am back. But i think I will not be able to post it here, as the dev is somehow gone and I heard you are not allowed to package and post modified mods of an existing mod.

Da.
Title: Re: Glossary
Post by: Kindred on June 05, 2012, 12:57:21 PM
the rule is:

you can not post modified mods unless a mod author has
a) released the mod with a specific, Open Source, distributable license.
b) given permission in email or in the thread for individuals (or anyone) to release modified copies

If you have sufficiently re-written the code so that it is no longer the same mod (I think the rule of thumb is less than 10% original code?) then you can submit it to the mod site as your own, new mod. :)
Title: Re: Glossary
Post by: DaKrampus on June 06, 2012, 04:59:05 PM
Yeah, well I think there is more than 10% left. Cause you have to count all the parts that you cant really change, like the arrays to integrate into the admin etc...
and the loops populating the template, i dont really see what you can do differently.
The changes are in the core part: db (3 extra fields), the parsing of the post. And rewritten a new javascript. for the mouseover tooltip. But still I kept the var names.

Anyway I wouldnt have the time to give support.
So i wont post it.

the function up there is the key part anyway. and it is much faster than the original (at least if you have ~ 500 keywords.
the javascript is only needed if you want to change functionality. like parsing the bbcode clientside with jquery instead of doing it in the function. uses less ressources, because as it is it parses every message twice...

but to make a long story short. I'll just keep posting little functions to change for speeding it up.

Da
Title: Re: Glossary
Post by: nixlike on October 30, 2012, 11:18:20 AM
Is there a working update for SMF 2.0.2 meanwhile or does anyone else have a solution to seriously come up with? If so - please do so!
Title: Re: Glossary
Post by: Kindred on October 30, 2012, 11:42:24 AM
hmmm?  This seems to work just fine on 2.0.2. I have it installed and working on two sites.

DaKrampus has a nice update to the mod listed just above...
Title: Re: Glossary
Post by: nixlike on October 30, 2012, 11:57:40 AM
See my quote from above, thats the issue I'm running in. and of course its most probably because of some other mod installed but instead of dealing with other installed mods to get past that issue I'd rather lay down that glossary mod for good. I'll give it another try with the update from Krampus above, thank you Kindred :)
Title: Re: Glossary
Post by: loplo on February 04, 2013, 05:45:25 PM
Hey guys, just installed the mod but the "Add a new key word" is disappearing after half of second.
Is there a workaround?

LE
I've found out that when I'm clicking on the "Add a new keyword" with the middle mouse button, a new tab is being opened (normal) BUT the popup window is not disappearing anymore. Temporary workaround.
Title: Re: Glossary
Post by: dimspace on February 04, 2013, 08:14:36 PM
Well installed, made a couple of corrections, changed the database table details manually, all working, well, not working.

darned jquery conflicts, add glossary item popup dissapears after about 2 seconds, and the admin popup menu appears or doesnt appear depending on which browser you are using.

And then, doh, reading back through the pages, found my problem. Pretty Urls! :S (works with simplesef)
Title: Re: Glossary
Post by: loplo on February 05, 2013, 07:12:22 AM
Good point, changed the SEF and now it works.
Now I have to check for any errors in case of incompatibility.
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 10:10:59 AM
sef works fine but needs all traces of pretty urls removed, which is proving a nightmare.
Title: Re: Glossary
Post by: Kindred on February 05, 2013, 10:24:10 AM
sef is silly anyway
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 11:44:55 AM
Agree to an extent, although it makes things a bit tidier when tweeting links etc. i had to get rid of pretty urls at some point anyway, its a monolithic mess and slowdown, the database tables for it end up being extreme. This was a good excuse.

Only problem im now getting is when trying to create new entries
Duplicate entry '0' for key 'PRIMARY'

thats an easy fix though. :D
Title: Re: Glossary
Post by: loplo on February 05, 2013, 11:57:57 AM
Is there a way to avoid the capitalization in the tooltip?
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 01:17:04 PM
Ok, working beautifully, but now i have a request that I need help with.

I run a cycling forum and as you can imagine we will be creating a huge glossary of terms, from race category descriptions, rider nicknames, cycling terms and a whole host of other things. For guests, and people new to cycling the tooltips will be a big feature, helping them understand the sport, however, for members who are experienced the tooltips could just be a pain and they would like the ability to turn them off.

Now in theory this is a simple process

1) add a column to the user database denoting tooltips on or off with a relevant settings entry to check a checkbox
2) tell the mod to look at the user reference for on/off rather than the global setting

Sounds simple, but although im learning php and my way around smf im not confident enough with it to approach such a task, but i imagine for someone with experience its a relatively easy coding change.

but that brings me onto the status of the mod,, and what is permissible as far as improvements or additions goes on existing mods. im not sure if we are allowed to add extra code to add extra functionality without the user permission, so I will ask for clarification on that before I go any further with that request. :D
Title: Re: Glossary
Post by: Kindred on February 05, 2013, 02:30:20 PM
you can do just about anything you want to the code on your own server.
You can even share what you did with other users - so long as it is provided as "modify the package this way" so long as you are not distributing a fully modified package on your own.
Title: Re: Glossary
Post by: loplo on February 05, 2013, 02:46:59 PM
I've managed to fix for the time the capitalization in the tooltip, using text-transform:uppercase. Now the whole text is shown with capitals.
But I'm still looking for the piece of code that changes parts of the text.
Anyone?!
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 02:51:01 PM
Quote from: Kindred on February 05, 2013, 02:30:20 PM
you can do just about anything you want to the code on your own server.
You can even share what you did with other users - so long as it is provided as "modify the package this way" so long as you are not distributing a fully modified package on your own.

cool, i wanted to check.

im going to try and work it out myself (this could be amusing). If I cant then i may wave some $ around
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 03:51:09 PM
Well that was easier than I though.

I tested this and it appeared to work, but i am by no stretch of the imagination a competent coder, so it may be badly done, not work, delete all information from your hard drive, or lead to the complete and utter destruction of the world as we know it,  so dont take my word for it. ta. disclaimer ends

Add additional radio button to profiles (I added it to look and layout)

with the following details:
name: Glossary Tooltips
description: Select if you want to see mouseover tooltips on glossary words.
checkbox
default state checked

and then made the following edits;

in load.php

find
if ( !empty($modSettings['enable_tooltips']) )

replace with
if ( !empty($options['cust_glossa']) )

in display.php

find
//Run Glossary analyzer on the message
if ( $modSettings['enable_tooltips'] )


replace with
//Run Glossary analyzer on the message
if ( $options['cust_glossa'] )




tested, and user selection of wether to display tooltips works.

Now i just need to sort out the fact that enabling glossary has stopped my lightbox working :D
Title: Re: Glossary
Post by: dimspace on February 05, 2013, 03:58:31 PM
Quote from: loplo on February 05, 2013, 02:46:59 PM
I've managed to fix for the time the capitalization in the tooltip, using text-transform:uppercase. Now the whole text is shown with capitals.
But I'm still looking for the piece of code that changes parts of the text.
Anyone?!

erm, text transform lowercase? maybe :S im not sure what you are trying to achieve
Title: Re: Glossary
Post by: loplo on February 06, 2013, 08:47:27 AM
Let-s say you have in the glossary ARM and somewhere a definition containing the word army.
In the tooltip, the word army will appear as ARMy.
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 09:00:39 AM
that's why you tick the box to only flag whole words.
Title: Re: Glossary
Post by: loplo on February 06, 2013, 09:17:01 AM
Sorry, I'm missing something. Where should I thick that?
Title: Re: Glossary
Post by: dimspace on February 06, 2013, 09:19:08 AM
Quote from: dimspace on February 05, 2013, 03:51:09 PM
Well that was easier than I though.

I tested this and it appeared to work, but i am by no stretch of the imagination a competent coder, so it may be badly done, not work, delete all information from your hard drive, or lead to the complete and utter destruction of the world as we know it,  so dont take my word for it. ta. disclaimer ends

Add additional radio button to profiles (I added it to look and layout)

with the following details:
name: Glossary Tooltips
description: Select if you want to see mouseover tooltips on glossary words.
checkbox
default state checked

and then made the following edits;

in load.php

find
if ( !empty($modSettings['enable_tooltips']) )

replace with
if ( !empty($options['cust_glossa']) )

in display.php

find
//Run Glossary analyzer on the message
if ( $modSettings['enable_tooltips'] )


replace with
//Run Glossary analyzer on the message
if ( $options['cust_glossa'] )




tested, and user selection of wether to display tooltips works.

Now i just need to sort out the fact that enabling glossary has stopped my lightbox working :D

ok, this half works, havnt worked out how to make it on for everyone by default :S they have to physically uncheck and check the box to add the database line otherwise in the abscence of a database line it just defaults as off.
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 09:50:22 AM
Quote from: loplo on February 06, 2013, 09:17:01 AM
Sorry, I'm missing something. Where should I thick that?

hmmm.... I thought the glossary had this....

However, what about "Use keywords detection with case insensitivity"  leave that UNCHECKED.
Title: Re: Glossary
Post by: loplo on February 06, 2013, 09:53:51 AM
In that case, if someone is writing about his arm (body part) and not about the ARM (the abbreviation), the word is being connected to ARM, which is in the glossary and the tooltip pops up.
The only thing I need to find is, where are those letters capitalized. And it's somewhere in the java files.
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 10:03:46 AM
One assumes that they are capitalized in the glossary itself.

for example:
In my glossary, we have
BBB (meaning "Big Black Book")
BRB (meaning "Big Red Book")

bbb and brb do not trigger the tool tip because they are not case-exact matches.
Title: Re: Glossary
Post by: loplo on February 06, 2013, 11:44:11 AM
Let me give you an example from the forum. It's an aviation forum, so the glossary is related to aviation.
In glossary I have:
CLJ = Aeroportul International Cluj Napoca
RO = TAROM
TU = Tunisair
NAP = Naples International Airport

Now, while hovering over CLJ the toolbox is showing this: AeROporTUl International Cluj NAPoca
The RO TU NAP are capitalized because of the glossary.
Title: Re: Glossary
Post by: spiros on February 06, 2013, 11:47:22 AM
Maybe it has been answered before, but is it possible to mass import terms to this module, i.e. from a csv file?

Also, does the index support non-Latin alphabets, i.e. Greek?
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 12:49:55 PM
Loplo,

Do you have the "Use keywords detection with case insensitivity" UNCHECKED?   make sure that is unchecked!


Seriously... I have never seen that before... and AFAIK, it should not be tooltipping contents of anothet tooltip.

Spiros... only if you know how to do it directly in SQL.
As for the non-latin...  no idea, I suggest that you try it out and let us know.
Title: Re: Glossary
Post by: spiros on February 06, 2013, 12:59:12 PM
Quote from: Kindred on February 06, 2013, 12:49:55 PM
Spiros... only if you know how to do it directly in SQL.

You mean something like using a database tool like navicat to map csv fields to MySQL tables and columns?
Title: Re: Glossary
Post by: dimspace on February 06, 2013, 01:14:27 PM
Quote from: spiros on February 06, 2013, 12:59:12 PM
Quote from: Kindred on February 06, 2013, 12:49:55 PM
Spiros... only if you know how to do it directly in SQL.

You mean something like using a database tool like navicat to map csv fields to MySQL tables and columns?

theoritcally, you can export the glossary table, edit with notepad++, import the relevant data in teh correct encoding and the re-import back through phpmyadmin, not sure i would recommend it though.

Title: Re: Glossary
Post by: Kindred on February 06, 2013, 01:19:53 PM
not sure. I have never used that tool.
Any time I have had to do something like this, I build an import SQL script with the content.

i.e.
create an excel spread sheet
have one column
INSERT INTO smf_glossary (column1, column2, column3) VALUES

then the next few columns, one each for the actual values that you want to insert

and a final column
);

save that as a export to a tab-separated TEXT file and use a text editor to strip out the tabs.

Title: Re: Glossary
Post by: loplo on February 06, 2013, 01:31:13 PM
Quote from: Kindred on February 06, 2013, 12:49:55 PM
Loplo,

Do you have the "Use keywords detection with case insensitivity" UNCHECKED?   make sure that is unchecked!


Seriously... I have never seen that before... and AFAIK, it should not be tooltipping contents of anothet tooltip.

Spiros... only if you know how to do it directly in SQL.
As for the non-latin...  no idea, I suggest that you try it out and let us know.

"Use keywords detection with case insensitivity" it is unchecked.
Here you have a link (http://forum.fly-ra.com/companii_aeriene_din_romania/tarom_rorot_45.msg6162.html#msg6162) to one of the messages from the forum. Just for reference.
I really don't know what and why is happening. I've seen someone mentioning the same issue some pages back.
Title: Re: Glossary
Post by: dimspace on February 06, 2013, 01:40:56 PM
Quote from: loplo on February 06, 2013, 01:31:13 PM
Quote from: Kindred on February 06, 2013, 12:49:55 PM
Loplo,

Do you have the "Use keywords detection with case insensitivity" UNCHECKED?   make sure that is unchecked!


Seriously... I have never seen that before... and AFAIK, it should not be tooltipping contents of anothet tooltip.

Spiros... only if you know how to do it directly in SQL.
As for the non-latin...  no idea, I suggest that you try it out and let us know.

"Use keywords detection with case insensitivity" it is unchecked.
Here you have a link (http://forum.fly-ra.com/companii_aeriene_din_romania/tarom_rorot_45.msg6162.html#msg6162) to one of the messages from the forum. Just for reference.
I really don't know what and why is happening. I've seen someone mentioning the same issue some pages back.

ive just done a test here creating a reference that repeated the reference in lower case in the description, and can confirm the same issue.

on a side note, in trying to sort out a conflict with our custom.js we use on the site, we have ripped out vast swathes of the js coding in load.php and glossary.template.php without it having any effect on the mod, seems to be an awful lot of redundant code in there. In fact, of the five js files, we are now only using one (and we still have a conflict but thats by the by)
Title: 2.0.4 compatibility coming soon?
Post by: SDMiller on February 06, 2013, 08:31:06 PM
Howdy all.

First post here.

I recently got my forum going, would LOVE to add a glossary to it (actually it's critical that I get it going), but it triggers a warning during install.

I run the following other mods...
Stop Spammer
httpBL
SimplePortal
Sneaky Editing
SMF 2.0.4 Update

I see the last update to the mod was 2009... ouch.  I see posts about fixes for older versions of SMF, but no comment (yet) on 2.0.4. Any hope of an update any time soon?

Thanks.

:D
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 08:39:05 PM
no... there will be no update.

However, warnings just basically mean that you have to do a bit of manual installation. I have it running on 2.0.4 with no issues
Title: Re: Glossary
Post by: SDMiller on February 06, 2013, 08:49:24 PM
Quote from: Kindred on February 06, 2013, 08:39:05 PM
warnings just basically mean that you have to do a bit of manual installation. I have it running on 2.0.4 with no issues

That's encouraging...

I'll just come right out and admit I'm a complete smf newbie.

If it's not a terrible imposition, would you mind sharing what things I may need to do to install it to get it working on my 2.0.4?

Thanks in advance for your kind and prompt reply.

;D
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 10:18:23 PM
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Don't have a "glossary" menu.
Post by: SDMiller on February 06, 2013, 11:43:00 PM
I did the following steps...

1. uploaded Glossary.0.3.1.zip to my forum using the forums package manager.
2. Told it to go ahead and install the mod with errors.
3. Used FTP to grab subs.php.
4. fixed function parse_glossary($message) with DaKrampus's code from June 05, 2012, 02:08:22 AM
5. uploaded new subs.php to forum.
6. went to configurations/modification settings/glossary and ticked "Enable Glossary mod"

erm...

Nothing seemed to happen differently... I don't see the expected "glossary" menu item in my forum main menu...

What did I miss?

Thanks.
Title: Re: Glossary
Post by: Kindred on February 06, 2013, 11:45:21 PM
what files generates can not install errors?
Title: Re: Glossary
Post by: SDMiller on February 07, 2013, 12:24:22 AM
See attached.
Title: Re: Glossary
Post by: loplo on February 07, 2013, 01:41:15 AM
As mentioned before. You have to edit both files manually.
At the beginning the glossary menu appears only for admins. You have to change member rights, if you want the members to see the glossary list.
Title: Re: Glossary
Post by: spiros on February 07, 2013, 10:12:15 AM
Quote from: dimspace on February 06, 2013, 01:14:27 PM
theoritcally, you can export the glossary table, edit with notepad++, import the relevant data in teh correct encoding and the re-import back through phpmyadmin, not sure i would recommend it though.

That sounds far too complex than using a database tool to do the import. These tools simply map say excel or csv file columns with columns in the import table.
Title: Re: Glossary
Post by: Kindred on February 07, 2013, 11:20:18 AM
I have done conversions from one site format to another and imported 50% of my glossary in the same way...   so it's not all that complex.

if you have a CSV, the writing an INSERT command at the start of each line and adding a closing semi colon to the end is simple.
Title: Re: Glossary
Post by: spiros on February 07, 2013, 12:27:35 PM
Right, that sounds dead easy. It is worth being documented by the mod author.
Title: Re: Glossary
Post by: Kindred on February 07, 2013, 12:28:42 PM
the mod author has not been active here in 3 years....
Title: Everything you need to get it working in 2.0.4
Post by: SDMiller on February 07, 2013, 02:27:11 PM
[EDIT] This is everything you need to do to get this working in SMF 2.0.4.[/EDIT]

Here's my install steps...

1. uploaded Glossary.0.3.1.zip to my forum using the forums package manager.
2. Told it to go ahead and install the mod with errors.
3. Used FTP to grab subs.php, subs-editor.php and glossary.template.php
4. made the following code fixes:

FIND in $sourcedir/Subs.php:
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),

Add this before it:

'glossary' => array( 'title' => $txt['glossary'], 'href' => $scripturl . '?action=glossary', 'show' => $context['allow_view_glossary'], 'sub_buttons' => array( ), ),


FIND in $sourcedir/Subs-Editor.php:

array(),
array(
'image' => 'list',
'code' => 'list',
'before' => '[list]\n[li]',
'after' => '[/li]\n[li][/li]\n[/list]',
'description' => $txt['list_unordered']

Add this before it:

array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),


FIND in $sourcedir/Glossary.php function Glossary, and just after the global definitions, add this:

$context['linktree'][] = array(
'url' => $scripturl . '?action=glossary',
'name' => $txt['glossary'],
);


5. In glossary.template.php deleted the line about link tree. Right at the top of the glossary.template.php there is only one reference to the link tree. It is in a line that stands by itself so it is easy to spot. Removed that whole line.

6. uploaded new subs.php, subs-editor.php and glossary.template.php to forum.
7. went to configurations/modification settings/glossary and ticked "Enable Glossary mod"


[EDIT]8. Enable glossary tooltip in the messages  in the glossary settings.

Finally, be sure you have "approved" and "enabled" the tooltips for each glossary item. In other words, is the lightbulb icon to the left of the term and definition in the glossary LIT (yellow)?[/EDIT]

All seems to work, I can see glossary menus and items... it just doesn't do the whole "define this word" thing when you hover the cursor over a glossary word in a post.

What am I missing... I'm THIS close ---><--- !


Thanks a bajillion!

:D
Title: Re: Glossary
Post by: Kindred on February 07, 2013, 02:35:15 PM
??? huh?

there is no hover effect in the glossary itself. The hoverbox is generated when a word is user IN POSTS.
see http://www.40konline.com/index.php?action=glossary
(although I currently have the tooltips turned off as they conflict with aeva)
Title: Re: Glossary
Post by: SDMiller on February 07, 2013, 03:32:32 PM
Quote from: Kindred on February 07, 2013, 02:35:15 PM
there is no hover effect in the glossary itself. The hoverbox is generated when a word is user IN POSTS.

Exactly!

But mine doesn't work....

Quote from: SDMiller on February 07, 2013, 02:27:11 PM
Ok, everything on the glossary mod for me seems to work... except that it doesn't bring up the definition when you hobver your cursor over a word which is in the glossary....


All seems to work, I can see glossary menus and items... it just doesn't do the whole "define this word" thing when you hover the cursor over a glossary word in a post.

IOW words in a post... that are in my glossary and therefore should provide a definition in the post when hovered over by the cursor... do nothing.

Sorry if that seemed ambiguous.

Any help?
Title: Re: Glossary
Post by: Kindred on February 07, 2013, 03:39:41 PM
and did you turn on
Enable glossary tooltip in the messages  in the glossary settings?

*AND* have you enabled the tooltips for each glossary item?   Remember, each glossary entry can either be enabled or disabled.
(in other words, is the lightbulb icon to the left of the term and definition LIT (yellow)?
Title: Re: Glossary
Post by: SDMiller on February 07, 2013, 03:51:44 PM
Quote from: Kindred on February 07, 2013, 03:39:41 PM
and did you turn on
Enable glossary tooltip in the messages  in the glossary settings?


Ahhh yeah. Ok.  See, there, I won't get too grumpy with the mod author because his mod rocks... and because he's gone from the scene... but "messages" to me would imply "messages" as in "between users  in a pm to each other"... and "posts" would imply a "post"! I would label that tick box "Enable glossary tooltip in posts."

Why would you enable the mod... and then not have it do anything anyway... kind of a redundant tick box if you ask me.

Meh, I'm just making excuses for not trying that :P

But it works great!!!

Thanks for all your help Kindred... you the man!

And in the future, you can direct people to my post which lists all the right steps in one post... that was the hard part, reading through all the threads consolidating and ferreting out what all needs doing.  Soooo many posts use superlative language like "that's all you need to do" when it's not. Gets very confusing trying to decide if people are all skinning the same cat different ways, or not.  :D

Thanks again.
Title: Re: Glossary
Post by: Kindred on February 07, 2013, 03:58:04 PM
you're welcome. :)

I will say this, in defense of the author - many of those who write mods do not use english as their primary language - so some of the gammar may be the result of an exact translation rather than a relative transtaltion


also, as to why that enable is there....   As I said, with my site, 40konline, the glossary conflicts with the aeva mod...   so I have tool tips turned OFF globally, even though I am using the glossary itself. So, that makes complete sense to me. :)
Title: Re: Glossary
Post by: loplo on February 08, 2013, 04:06:05 PM
Hey guys,
I'm still struggling with the capitalization, any ideas?
Also just checked my google analytics account and since I've installed this mod, the analytics is playing crazy and is not recording almost anything.
Any workaround?
Title: Tooltip forces "China" and "Chinese" to lowercase "china" and "chinese"?!?
Post by: SDMiller on February 11, 2013, 06:41:21 PM
Here's a strange anomaly... the glossary tooltip thingy (what pops up when you hover your cursor over a word in a post) shows the words "China" and "Chinese" as "china" and "chinese".

Doesn't do this with ANY other words that are capitalized in the glossary... just those two.

Those two words appear in 20 different glossary terms... and when they show up in the pop-up... they are lowercase every time without exception.

I even looked through glossary.php looking to see if it had some "thing" against China and was doing that on purpose, but I don't find any such code.

Any clues?

[edit: added screen shot illustration of it occurring]
Title: Re: Glossary
Post by: loplo on February 18, 2013, 04:20:15 PM
Anyone having the compatibility issue with google analytics?
Title: Re: Glossary
Post by: Kindred on February 20, 2013, 03:52:52 PM
note, to fix the link tree, after you delete the linkthree statement from the Glossary.template.php, add the following at the top of Sources/Glossary.php, in function Glossary just after the global definitions


$context['linktree'][] = array(
'url' => $scripturl . '?action=glossary',
'name' => $txt['glossary'],
);



dimspace,

I tried what you did - and it hosed my glossary. It would not allow me to add new items nor did it trigger tooltips.   So, you have some other combination of things going on and your instructions will not work with a clean install.
Title: Re: Glossary
Post by: dimspace on April 27, 2013, 01:22:07 PM
Quote from: Kindred on February 20, 2013, 03:52:52 PM
note, to fix the link tree, after you delete the linkthree statement from the Glossary.template.php, add the following at the top of Sources/Glossary.php, in function Glossary just after the global definitions


$context['linktree'][] = array(
'url' => $scripturl . '?action=glossary',
'name' => $txt['glossary'],
);



dimspace,

I tried what you did - and it hosed my glossary. It would not allow me to add new items nor did it trigger tooltips.   So, you have some other combination of things going on and your instructions will not work with a clean install.

hmmm.. weird..  theres some really weird jq going on with this whole thing.. will zap my post..
Title: Re: Glossary
Post by: Hristo on July 01, 2013, 09:56:51 AM
This is a long shot, but I'll ask anyway. Does anyone know how to add support for Cyrillic characters? After the fixes the mod works fine (on SMF 2.0.4) with Latin letter words, but not with Cyrillic. They are ok on the glossary (except the alphabetic order on utf-8 forums), but the main problem is that highlighting and tooltips do not work with Cyrillic letter words no matter of the forum encoding. I used this fix too http://www.simplemachines.org/community/index.php?topic=282158.msg3346885#msg3346885 but it does not fix the above problem.

Thanks for the attention!
Title: Re: Glossary
Post by: GlitchPC on September 13, 2013, 09:43:11 PM
Gonna try this again...not sure if anyone can help but will give it another shot.

Any time anyone clicks the "Categories" link it creates an entry in my Error Log.  (See below)

http://glitchpc.net/index.php?action=glossary&amp;sa=categories
8: Undefined index: id
File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/Glossary.php
Line: 776

Line 776 of the Glossary.php file reads like this:

//Get list of all ids
            $ids_list .= ';'.$res['id'];
      }

Anyone care to shine a little light on this matter for me?  Thanks, in advance...
Title: Re: Glossary
Post by: Asusrev on November 22, 2013, 05:25:23 AM
Can not you ask someone to an existing package?
Title: Re: Glossary
Post by: Augustine on November 22, 2013, 03:04:33 PM
Very good.  :)
Title: Re: Glossary
Post by: Draffi on December 13, 2013, 07:06:40 PM
Sorry...may i ask, for what is this

[glossary]WORD[/glossary]

BBC good for?

It seems, that it is not working in my board (SMF 2.0.6)....
Title: Re: Glossary
Post by: Hristo on December 13, 2013, 07:15:21 PM
It can work in 2.0.6, but you have to make some changes which are discussed in this topic. Here is a summary of them:
http://www.simplemachines.org/community/index.php?topic=282158.msg3485881#msg3485881
Title: Re: Glossary
Post by: Draffi on December 13, 2013, 07:47:15 PM
oohhh...

sorry, my mistake. IT IS WORKING IN SMF 2.0.6. (Following the instruction some posts before...)

What i mean is:

The BBC-Button have no effect in SMF 2.0.6



Title: Re: Glossary
Post by: Hristo on December 13, 2013, 08:12:06 PM
You have to enter the words in the glossary, then the bbc will work for these words. Go to glossary's menu and press "Add a new key word" add some word, lets say "glossary", then the it will work for that word. I may be wrong on some things though, because I do not use it now due to lack of support for Cyrillic. But I remember it worked fine with Latin letters.
Title: Re: Glossary
Post by: Draffi on December 14, 2013, 10:28:15 AM
???

Why i need to mark a word, when it is automatically marked by the glossary Mod ?
Title: Re: Glossary
Post by: Hristo on December 14, 2013, 11:09:39 AM
Now I see what you wonder. Yes, the mod works with and without the tag and frankly I do not know/remember why the tag is needed at all.
Title: Re: Glossary
Post by: Kindred on December 14, 2013, 05:35:26 PM
because
1- many people have the automatic link part turned OFF.
2- even with it turned on, it may only mark the first occurrence of the word - and you also want a later occurrence linked.
Title: Re: Glossary
Post by: Draffi on December 14, 2013, 08:54:26 PM
thank you @Kindred

Now i understand...

Title: Re: Glossary
Post by: petb on January 06, 2014, 04:13:11 PM
Quote from: GlitchPC on September 13, 2013, 09:43:11 PM
Gonna try this again...not sure if anyone can help but will give it another shot.

Any time anyone clicks the "Categories" link it creates an entry in my Error Log.  (See below)

http://glitchpc.net/index.php?action=glossary&amp;sa=categories
8: Undefined index: id
File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/Glossary.php
Line: 776

Line 776 of the Glossary.php file reads like this:

//Get list of all ids
            $ids_list .= ';'.$res['id'];
      }

Anyone care to shine a little light on this matter for me?  Thanks, in advance...

Is there really no one who can help us with the undefined Index: id ?

Please,.....

Maybe there is only a global "id" to set ? 
Or to make a change in the DB do declare the "ID" field as an key ore something else ?

Thank you for reading our Search for Help.



Oooohhhh, its sad.

If you have Links to somewhere, or Links to Images, even when they are between IMG Tags,
the Mod corrupts the Link so the Link wont work any more.

Unfortunately, this is disappointing, because otherwise it's a great mod.

Is there a similar Mod available ?
Title: Re: Glossary
Post by: Hristo on January 07, 2014, 02:46:56 AM
The closest to Glossary mod I know of is:
http://custom.simplemachines.org/mods/index.php?mod=1593
Not as powerful, but still something.
Title: Error: Undefined index: glossary_change_group_all
Post by: moal on May 06, 2014, 08:01:38 AM
Hi there,

in my error logs keep on getting the following error:

http://www.meine-domain.de/index.php?pretty;action=glossary
8: Undefined index: glossary_change_group_all
Datei: /mnt/web1/a0/01/51373001/htdocs/meine-domain/Themes/default/Glossary.template.php (main sub template - eval?)
Zeile: 321


I use SMF2.0.7 with a customized theme based on Elegant.

The following modifications are installed.
Activity in Profile 1.1    
Auto Refresh Who Index    1.1
Add Table, Td, Tr Button    1.0
cb|GeSHi-mod    1.2
Clone Topic 0.4
Custom Action Mod    3.2
Glossary    0.3.1
Google Translate for SMF 2.0    1.4
Track IP on ip-adress.com 1.0    
Member Color Link    3.1
MetaTags Modification 2.0.2
NoFollow BBCode 1.1
Pretty URLs Extras    1.0
Pretty URLs 1.1.1a
Show BBCode to guests    0.1.7
SimplePortal 2.3.5
SimplePortal - German 2.3.5
Tidy Child Boards 1.4.1
Topic Solved 1.1.1


Please help me, this error worry me.

best regards moal

Sorry for my English, I use the goggle translator.
Title: Re: Glossary
Post by: Kindred on May 06, 2014, 08:22:17 AM
well, don't worry....   that error just means that one of the variables is not defined.

You will need to turn off eval to get a better idea in which bit of code the error is actually happening.
Title: Re: Glossary
Post by: moal on May 06, 2014, 08:54:19 AM
Quote from: Kindred on May 06, 2014, 08:22:17 AM
You will need to turn off eval to get a better idea in which bit of code the error is actually happening.

And how do I do that?  :-[
Title: Re: Glossary
Post by: Kindred on May 06, 2014, 08:54:51 AM
See the other thread where you asked the same questions and I answered in more detail
Title: Re: Glossary
Post by: Sakae on June 08, 2015, 11:42:17 AM
Working great on my SMF 2.0.10 using instructions given here http://www.simplemachines.org/community/index.php?topic=282158.msg3485881#msg3485881

Just one though, is it possible to define a word using a picture? (you know, one picture equals a thousand words)
Title: Re: Glossary
Post by: Kindred on June 08, 2015, 11:52:06 AM
I do not believe so  -- not without some recoding (possibly major)
Title: Re: Glossary
Post by: Baloch on June 21, 2016, 07:51:49 PM
Is it still useful for the SMF 2.0.11?
Title: Re: Glossary
Post by: petb on June 22, 2016, 06:12:56 AM
Quote from: Baloch on June 21, 2016, 07:51:49 PM
Is it still useful for the SMF 2.0.11?
I think so!
It is much useful.
Title: Re: Glossary
Post by: Kindred on February 26, 2017, 02:23:36 PM
This line added in Subs.php generates a php deprecated error...
working on finding the correct replacement


      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );
Title: Re: Glossary
Post by: Harvester on March 04, 2017, 06:27:09 PM
Quote from: Kindred on February 26, 2017, 02:23:36 PM
This line added in Subs.php generates a php deprecated error...
working on finding the correct replacement


      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );


Any luck on finding a replacement?
Title: Re: Glossary
Post by: Harvester on March 04, 2017, 06:34:36 PM
I just installed this on 2.0.13 (had to use parser) and when I click on the Glossary link in the top menu I get this error:

Table 'jared867_smf2.smf_glossary_groups' doesn't exist
File: /home/jared867/public_html/Sources/Glossary.php
Line: 422

tried to install on a test site (i use for a sandbox) and i got same error...

I checked phpmyadmin and sure enough the smf_glossary__groups does not exist. Actually there is no smf_glossary_* databases at all.

can someone help  here? Id love to use this mod.
Title: Re: Glossary
Post by: Arantor on March 04, 2017, 06:47:16 PM
Try this replacement code. I have no idea if it will work, I haven't tested it, but this doesn't look like a complex change.


$message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => ''')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => ''')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
return $matches[2] == $matches[1] ? stripslashes($matches[1]) : '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);


As to the install issues, this is because the installer predates 2.0 RC2 or RC3 where the DB code changed. The tables will likely exist but not have the smf_ prefix in which case you just need to rename the tables.
Title: Re: Glossary
Post by: Harvester on March 04, 2017, 07:31:45 PM
Arantor, you were 100% correct about the database. I found the tables without the prefix.

How do I rename them now? I clicked on the table and then clicked Edit but what came up left me clueless lol


By the way, were does that edited code go? what file?

Title: Re: Glossary
Post by: Arantor on March 04, 2017, 07:32:18 PM
Go into the tables in phpMyAdmin and go to the Operations tab where you can rename them.
Title: Re: Glossary
Post by: Kindred on March 04, 2017, 07:37:44 PM
the edited code (still untested) would replace the line that I mention in Subs.php
Title: Re: Glossary
Post by: Harvester on March 06, 2017, 02:20:41 PM
Quote from: Arantor on March 04, 2017, 06:47:16 PM
Try this replacement code. I have no idea if it will work, I haven't tested it, but this doesn't look like a complex change.


$message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => ''')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => ''')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
return $matches[2] == $matches[1] ? stripslashes($matches[1]) : '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);


As to the install issues, this is because the installer predates 2.0 RC2 or RC3 where the DB code changed. The tables will likely exist but not have the smf_ prefix in which case you just need to rename the tables.

im viewing the subs in the parser and i cannot figure out what this new code replaces.   any help please?
Title: Re: Glossary
Post by: Kindred on March 06, 2017, 02:46:36 PM
Quote from: Kindred on March 04, 2017, 07:37:44 PM
the edited code (still untested) would replace the line that I mention in Subs.php
Quote from: Kindred on February 26, 2017, 02:23:36 PM
This line added in Subs.php generates a php deprecated error...
working on finding the correct replacement


      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );

Title: Re: Glossary
Post by: Kindred on March 06, 2017, 02:51:03 PM
except, having just tried it....  it generates a fatal php error

[06-Mar-2017 19:48:57 UTC] PHP Parse error:  syntax error, unexpected '')), '' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /....../Sources/Subs.php on line 5025
Title: Re: Glossary
Post by: Kindred on March 06, 2017, 02:56:30 PM
Looks like this might be better code.



      $message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '')), '/') . '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b' . preg_quote(strtr($word, array('\'' => '')), '/') . '\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
if ($matches[2] == $matches[1])
return stripslashes($matches[1]);
else
return '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);


no php errors with this..,.

Title: Re: Glossary
Post by: Arantor on March 06, 2017, 03:03:46 PM
Something else must be wrong because I still see it using the 'e' operator which is the one in 5.5 that causes it to throw a wobbly in the first place.

If the code runs any PHP evaluation, it used to have to use the 'e' option, or use a callback with the preg_replace_callback function. Since this is doing neither, what you have isn't going to work correctly.

It's also not helped by the fact that SMF actually broke the code I posted since there's a section in the quote with three ' in a row, but that wasn't what I posted. What I posted was a & #039; (without the space) as the middle quote, which is necessary to deal with issues around XSS injection. It's the bit just before the )), that it complains about.
Title: Re: Glossary
Post by: Kindred on March 06, 2017, 03:16:39 PM
hmmm.... interesting.

I don't get the e operator with my code...


but your, corrected as you mention

$message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
return $matches[2] == $matches[1] ? stripslashes($matches[1]) : '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);

does seem to work now
Title: Re: Glossary
Post by: Harvester on March 06, 2017, 03:59:45 PM
Thank you guys! I really appreciate your hard work.. but please forgive my for being slow lol  I am looking at the parser and what changes the mod makes to Subs.php (which from what I gather, is here this edit goes) but of the 3 edits made in teh Subs.php, I do not know which this new code replaces. Im sorry. Im lost at the moment.
Title: Re: Glossary
Post by: Arantor on March 06, 2017, 04:19:16 PM
That's not the code you originally posted, which is what confused me. As to why your updated code snippet works, it works right up until there's an apostrophe in the dictionary term.
Title: Re: Glossary
Post by: Kindred on March 06, 2017, 06:29:24 PM
Code (find in Subs.php) Select

      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );



Code (replace with (Thanks to Arantor)) Select

$message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
return $matches[2] == $matches[1] ? stripslashes($matches[1]) : '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);

Title: Re: Glossary
Post by: Harvester on March 06, 2017, 07:04:22 PM
I can't (well Dreamweaver cant) find

      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );


I edited my original Subs.php with the edits tht the parser the mod links to and changed what it told me to change. This is the file i have searched for the above code.  For arguments sake I even searched the Subs.php before i made the glossary edits.

Im now a bit confused.

I desperately want this Mod. It is exactly what I was looking for. I was going to make a glossary using a board and topics (one for each term) but with that I'd have no way to really organize other than post date. This Mod would be fantastic if I can get it to work. When I upload all the edited files currently, entering a topic displays a blank white area where the post once was.
Title: Re: Glossary
Post by: Kindred on March 06, 2017, 08:26:55 PM
Well, the base automatic install works just fine, after you change the tables to use the correct prefix.

Then, after the install, you go to subs.php and search for a little bit of that code...like glossary_unique_word
Title: Re: Glossary
Post by: Harvester on March 06, 2017, 10:56:24 PM
Ok I finally got  the mod installed and Arantors edit in place. Oddly the mods install was not placing that code at the end of the file and that is why I had no clue what code to replace. I used a different parser and saw what should have been added at the end of the subs file and then I made arantors edit and pasted that at the end of the subs

Now my glossary is working but I made a test word in the glossary and when that word appears in a post nothing happens.. no tool tip no highlight.. no nothing... any ideas?
Title: Re: Glossary
Post by: Kindred on March 07, 2017, 07:35:59 AM
strangely enough...   I just checked one of my other sites that has the glossary installed and you're right....   that code doesn't exist in that installation... and the tooltips work just fine. Actually, the function parse_glossary($message) is VERY different in that installation for some reason.

So, in that case "putting it in" is incorrect...   and replacing it with Arantor's code won't do anything.



However, in a third installation, the code IS there... but putting the replacement code in breas things and gives Parse error: syntax error, unexpected T_FUNCTION...
I suspect that is an old php version issue...maybe.
all three indicate version 0.3.1 of the mod...
strange....
Title: Re: Glossary
Post by: Harvester on March 07, 2017, 06:06:25 PM
ok so I wasn't losing my mind. lol So what do I do now to make this work on my site?
Title: Re: Glossary
Post by: Kindred on March 07, 2017, 06:33:08 PM
It should work just fine ... even with the original code that I replaced, it still worked fine, it just generated an error in the logs
Title: Re: Glossary
Post by: Harvester on March 08, 2017, 07:27:11 AM
Quote from: Kindred on March 07, 2017, 06:33:08 PM
It should work just fine ... even with the original code that I replaced, it still worked fine, it just generated an error in the logs

Mine seems to work fine but the words I have entered in the glossary do not show tooltips when they are present in a post. I'd like that to work. Perhaps I will check the rest of the files with the other parser. Maybe I am missing more code.
Title: Re: Glossary
Post by: Kindred on March 08, 2017, 07:30:32 AM
or maybe another mod that you have conflicts with the javascript....   

When I used AEVA, I could not also use the embed glossary words/popup feature
Title: Re: Glossary
Post by: Harvester on March 08, 2017, 08:13:29 AM
Quote from: Kindred on March 08, 2017, 07:30:32 AM
or maybe another mod that you have conflicts with the javascript....   

When I used AEVA, I could not also use the embed glossary words/popup feature

I once had Aeva installed but I uninstalled that a week or so ago.

I checked all the code and im not missing anything in all the files.. Im gonna give it a shot on a clean install of SMF and see what happens.
Title: Re: Glossary
Post by: petb on May 21, 2018, 06:38:54 PM
Got the same problem with the depricated  'e' in that preg_replace usage.

But without that modifier the code produces confusing chars bevor the real word in the topic is shown.
Any other suggestions about that warning error which is produced on every topic view, when the mod is active?
Title: Re: Glossary
Post by: Kindred on May 21, 2018, 07:56:11 PM
Quote from: Kindred on March 06, 2017, 06:29:24 PM
Code (find in Subs.php) Select

      $message = preg_replace(
        '/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : '') .'e' ,
        "'\$2' == '\$1' ? stripslashes('\$1') : '<span class=\"glossary\" title=\"".addslashes($definition)."\">$1</span>'",
        $message,
        (isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
      );



Code (replace with (Thanks to Arantor)) Select

$message = preg_replace_callback(
'/((<a.+\/a>)|(\b'. preg_quote(strtr($word, array('\'' => '&#039;')), '/'). '(?=[^A-Za-z0-9&agrave;-??-??-?_\-s]))|(\b'.preg_quote(strtr($word, array('\'' => '&#039;')), '/').'\b))/'. (!empty($modSettings['glossary_none_sensitive']) ? 'i' : ''),
function ($matches) use ($definition) {
return $matches[2] == $matches[1] ? stripslashes($matches[1]) : '<span class="glossary" title="' . addslashes($definition) . '">' . $matches[1] . '</span>';
},
$message,
(isset($modSettings['glossary_unique_word']) && $modSettings['glossary_unique_word']==1) ? 1 : -1
);

Title: Re: Glossary
Post by: petb on May 22, 2018, 09:52:12 AM
I apologize, i am sorry.
I thought you only stripped the  e   but you changed the function   to the .._callback.

Thanks for the repeated reference.

It is working.
Title: Re: Glossary
Post by: shadav on August 26, 2019, 06:44:08 PM
Following this post
https://www.simplemachines.org/community/index.php?topic=282158.msg3485881#msg3485881
and this post
https://www.simplemachines.org/community/index.php?topic=282158.msg3917465#msg3917465
and the tips from Aranator about the database...
QuoteAs to the install issues, this is because the installer predates 2.0 RC2 or RC3 where the DB code changed. The tables will likely exist but not have the smf_ prefix in which case you just need to rename the tables.
====
Go into the tables in phpMyAdmin and go to the Operations tab where you can rename them.
I was able to get this seemingly to work on 2.0.15, we shall see :D
a few more alterations though....
before you install it (You can do all the edits that were mentioned above to the files and the install.xml but you will also need to fix in the install.xml
find
<search position="before"><![CDATA['quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt['bbc_quote']),]]></search>
<add><![CDATA[
'glossary' => array('code' => 'glossary', 'before' => '[glossary]', 'after' => '[/glossary]', 'description' => $txt['bbc_glossary']),]]></add>
</operation>

replace with
<operation>
<search position="before"><![CDATA[
array(
'image' => 'quote',
'code' => 'quote',
'before' => '[quote]',
'after' => '[/quote]',
'description' => $txt['bbc_quote']
),]]></search>
<add><![CDATA[
array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),]]></add>
</operation>

[edit again] Ignore all of that what is quoted, you do not need it, please skip that part of SDMiller's fix completely and ignore what I said to fix of their fix ;) the above mentioned fix takes care of that and is already in the install.xml (I think for SDMiller, it was just because they installed ignoring the warnings, please don't do that :D ) so just forget everything below :D and do the above except for that one part
and then you will need to fix one thing that SDMiller posted in their fix [edit]just skip it, don't even do it[/edit]
they had said
Quote from: SDMiller on February 07, 2013, 02:27:11 PM
FIND in $sourcedir/Subs-Editor.php:

array(),
array(
'image' => 'list',
'code' => 'list',
'before' => '[list]\n[li]',
'after' => '[/li]\n[li][/li]\n[/list]',
'description' => $txt['list_unordered']

Add this before it:

array(
'image' => 'glossary',
'code' => 'glossary',
'before' => '[glossary]',
'after' => '[/glossary]',
'description' => $txt['bbc_glossary']
),
[edit]removing my "fix" to the above fix, as it is not needed[/edit]
[edit] just skip the above part, don't do it ;) it's not needed[/edit]

hope it helps (hope it works, so far seems to be working after doing all the above, but haven't fully tested it)


[edit] just noticed, I don't need to add it both times do I? (after the quote and after the list....it only needs to be added once, correct....) [edit again]nope, it's not needed as it's in the install file already :) it just needed fixed[/edit] ok I think i'm done editing my edited edits now  :laugh:
Title: Re: Glossary
Post by: shadav on June 12, 2020, 12:28:52 AM
so i installed this onto a new project, 2.0.17, following my post above....
it installed fine, added the db prefixes....
the problem is, when I click on Add a new key word or Administration the page just reload, the box will pop up to add a word but then the page loads and it's gone...the administration's dropdown box will appear and the page reloads.....

any thoughts on how to fix this?
if i can't add or edit words, kind of makes the mod useless  :o


[edit]ok after reading through 16 pages, it's a conflict with pretty urls....anyone have a fix?
tested and it works if i disable pretty urls, so I mean meh ok, i'll just have to remember to turn it off, add/edit glossary and turn it back on. hehehehe
Title: Re: Glossary
Post by: Jotade29 on December 29, 2021, 09:14:12 PM
@Kindred

Followed the steps posted at: https://www.simplemachines.org/community/index.php?topic=282158.msg3485881#msg3485881
but the mod is still not working, and as far as I know, there are people who work for them in version 2.0.19. I have made the modifications indicated in the above message, and I have changed the name of the tables, but I get an error when I go to see a message ...

Call to undefined function parse_glossary ()
I have the mod activated, I have the words activated in the glossary, the tooltip activated ... I don't know what to do. Thanks.
Title: Re: Glossary
Post by: Kindred on December 29, 2021, 09:22:11 PM
I dunno...  it's working for me on 2.0.19

I was in the process of trying to convert to hooks and update for php 7.4/8 but real life took over and I haven't gotten around to finishing
Title: Re: Glossary
Post by: Jotade29 on December 29, 2021, 09:35:19 PM
@Kindred the glossary appears to me perfectly, but when I see any message, it does not allow me to enter the post. If I uncheck the box -> Enable tooltip glossary in the messages "It lets me enter the post, but if I use the BBC it also throws me an error that it cannot find a certain function. Clean installation, that is, I have version 2.0.19 and just the glossary mod installed following the above message.

Ohh, it would be great if you could adapt it, do you think it will be next year? :)
Title: Re: Glossary
Post by: Kindred on December 29, 2021, 09:45:55 PM
Ah, yeah...  I think I may have turned off the tooltip...

Not sure about the missing function, I don't recall if I've seen that.  Are you sure it all got installed?