News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Glossary

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

Previous topic - Next topic

Bancherd

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

slinouille

@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
Visit VAG-Technique.fr
Take a look to my mods

Kindred

#102
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?)
Сл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."

slinouille

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
Visit VAG-Technique.fr
Take a look to my mods

Kindred

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. :)
Сл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."

darkelhaym

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

[nofollow]


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.

slinouille

@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
Visit VAG-Technique.fr
Take a look to my mods

slinouille

Please found attached version 0.2beta1.

New functions/options :

  • manage one level of category
  • optionnaly activate tooltips only once per posts
  • for each word, define if tooltips are displayed in posts
  • for each word, define if approved or not
  • bbccode [glossary] in order to force a word to be "tooltiped" in a post
Corrections of bugs listed until this post (hopefully)

Some screens  ;)
Visit VAG-Technique.fr
Take a look to my mods

PfalzNacht

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?

slinouille

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.
Visit VAG-Technique.fr
Take a look to my mods

PfalzNacht

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.

Kindred

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
Сл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."

PfalzNacht

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üssen ausgefü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.';

slinouille

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,

Visit VAG-Technique.fr
Take a look to my mods

PfalzNacht

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

slinouille

Try this :

CREATE TABLE `smf_glossary_groups` (
  `id` int( NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);
Visit VAG-Technique.fr
Take a look to my mods

Kindred

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...
Сл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."

PfalzNacht

#117
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?

Kindred

almost...

CREATE TABLE `smf_glossary_groups` (
  `id` int(1) auto_increment,
  `title` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
);
Сл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."

PfalzNacht

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

Advertisement: