News:

Wondering if this will always be free?  See why free is better.

Main Menu

Glossary

Started by slinouille, December 24, 2008, 10:33:47 AM

Previous topic - Next topic

SDMiller


loplo

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.

spiros

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.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

spiros

Right, that sounds dead easy. It is worth being documented by the mod author.

Kindred

the mod author has not been active here in 3 years....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SDMiller

#466
[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

Kindred

??? 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)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SDMiller

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?

Kindred

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)?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SDMiller

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.

Kindred

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. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

loplo

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?

SDMiller

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]

loplo

Anyone having the compatibility issue with google analytics?

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dimspace

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

Hristo

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!

GlitchPC

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

Asusrev

Can not you ask someone to an existing package?

Advertisement: