Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spoiler Plugin - Support
#26
More/Less doesn't show nor works in Firefox.

On my site http://www.ranthambhore.com, the home pages text has spoiler text for show more and less text. You can see all the text when the page is loading and then the spoiler hides the part within the spoiler tags.

IE9 doesn't show the spoiler tags at all and shows the complete text while in Chrome everything works fine.

Also when clicking on "More" the browser window takes you to the top of the page even when the hidden text is at the bottom.

Can these issues be sorted soon?
Reply
#27
andyash Wrote:Can these issues be sorted soon?
I had time to fix the mentioned issues now!
The Bugs you mentioned:
  • Internet Explorer doesn't show spoiler link at all in some cases it showed only the full spoiler and ignored the JavaScript completely
  • Firefox doesn't showed the link and on buttons the text was missing

The issues were cause because some horrible JavaScript compatibility issues:
Fixing the Firefox bug was easy, after a couple minutes I knew that innerText was the problem, which Firefox seems to handle in a strange way some times, I changed it to innerHTML and Firefox problems were fixed.
With Internet Explorer (version lower than 9) it was more complicated, it was a combination of two issues that Internet Explorer had before version 9. First problem was the way i searched for the spoiler's: I used document.getElementsByClassName which was a very easy and simple way which worked much better than the old loop search I used for it. But Internet Explorer doesn't supports it and throws an error when using it.
To circumvent this I used “The Ultimate GetElementsByClassName“ by Rober Nyman and this problem was fixed for god.
Now I ran into another issue: Internet Explorer doesn't support addEventListener but has attachEvent instead, so I added a simple try - catch, if addEventListener doesn't work it will use attachEvent instead. This isn't maybe a good solution and I know that this maybe causes some problems in more unknown Browsers like Opera but for now it is a acceptable and simple solution.
I will improve the JavaScript more when I have more time and can concentrate more on the topic. See 1.6 like a quick'n'dirty update, until I've time to think of a better solution for mentioned problems.

Thanks, ePirat
Reply
#28
It works in Firefox as well as IE9 now. Only thing is Firefox still shows "More..." and not "Less..." even when the text is expanded. But for now I'm happy. Thanks.
Reply
#29
Thanks, forgot to change every innerText to innerHTML, should be fixed in 1.7 now.
Sorry!
Reply
#30
is it possible to somehow set the class for link and button
Reply
#31
Sorry for the delay, had some issues which took me some time fix...
Finally 1.8 is finished:
Added support for custom classes for button and div, go to the settings page to set them.
Switched to domready to load faster.
Reply
#32
Thank you, all is now well
Reply
#33
Hi, it doesn't seem to work in combination with images or the l18N Gallery plugin. So it's not possible to hide and unhide images.
Reply
#34
datiswous Wrote:Hi, it doesn't seem to work in combination with images or the l18N Gallery plugin. So it's not possible to hide and unhide images.
Hello, this might be right. Image support is not really finished at the moment and I didn't thought anyone would need it… Can you tell me what you did or show me a demo site where you tried using it? I would love to make it compatible.
Reply
#35
How work options for Div and Button ePirat can you post here example
Reply
#36
(2013-02-19, 08:37:27)wampir Wrote: How work options for Div and Button ePirat can you post here example

Can you reformulate your question? I do not understand what do you mean…
If you mean how to set a custom class, just go to the plugin settings page and set it there.
Reply
#37
Yes but whate i can put in button to work in calsses or in Div can you post here examples for this classes Thx Big Grin are this for change colors or what
Reply
#38
(2013-02-20, 23:31:37)wampir Wrote: Yes but whate i can put in button to work in calsses or in Div can you post here examples for this classes Thx Big Grin are this for change colors or what

Sorry I don't get it. The only think you can do is to specify what classes the button and div should use, this is useful if you are writing Themes or custom CSS to style it in a special way, but that you have to do yourself or your theme has to support it.
Reply
#39
after enable the plugin
Code:
Strict Standards: Creating default object from empty value in /home/p30318/www/getsimplecms.ru/plugins/spoiler_button.php on line 119
in adminpanel
Code:
Strict Standards: Creating default object from empty value in /home/www/mydomen/plugins/spoiler_button.php on line 66
in input Button:
Code:
<b>Notice</b>:  Undefined property: stdClass::$clbtn in <b>/home/www/mydomen/plugins/spoiler_button.php</b> on line <b>100</b><br />
after changes in the input Button: everything disappears.
after installing the spoiler
Code:
Notice: Use of undefined constant replika - assumed 'replika' in /home/www/mydomen/plugins/spoiler_button.php on line 445
Reply
#40
Sorry for the late reply, I was a bit busy. I've fixed the errors and submitted the new version, you can download it here.
Reply
#41
Hello!

in IE 7 (maybe other IE versions as well) spoiler button centers the text and leaves margins to left and right proportionally depending on the text's length. (see screenshot attached)
Tried to fix it with CSS, but didn't work out.

Can this be fixed?

Thanks!


Attached Files Thumbnail(s)
   
Reply
#42
(2013-08-07, 14:25:48)0zz Wrote: in IE 7 (maybe other IE versions as well) spoiler button centers the text and leaves margins to left and right proportionally

This seems to be a CSS issue, I am currently trying to reproduce this, but without luck… Are you sure you don't have any special css rules that cause this? Since the spoiler plugin does not changes text alignment, this doesn't seem to be related to this plugin.
Reply
#43
Looks like plugin doesn't work with images. I tried to insert an image and it doesn't appear in the browser. Tried FF36 and Chrome.. Is this a bug?
Reply




Users browsing this thread: 1 Guest(s)