News:

Join the Facebook Fan Page.

Main Menu

Glossary

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

Previous topic - Next topic

GlitchPC

Thanks, Kindred, for that linktree code.

Dave J

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




Kindred

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

Dave J

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

Kindred

oh... I understand what you did...  I am saying that it should not have been necessary.
Сл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."

Drover

I'm using 2.0.2 with a curve variant called "Green Bean".  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!

Kindred

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

Drover

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

Kindred

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

GlitchPC

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

Dave J

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

Inti31

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
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Kindred

this mod conflicts with nearly ANY other mod or theme which uses javascript....  and the admin and add-term functions use javacript
Сл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."

GlitchPC

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.

Kindred

sorry....  I have well over 200 entries in the glossary and I have no problem on IE9 or FF10
Сл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."

Inti31

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
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

GlitchPC

Getting the following error using Categories:

xxxx://xxxxxxxx.xxx/index.php?action=glossary&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...

GlitchPC

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

DaKrampus

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

nixlike

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

Advertisement: