Advertisement:

Author Topic: Expanding & Collapsing Spoiler Tag  (Read 25167 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #60 on: January 15, 2016, 06:36:51 PM »
I would like to use an image (gif) instead of the word "spoiler". Presumably this is in the file index.english.php. Could you possibly let me know what I need to do?
Go into Themes/default/languages/index.english.php and replace this:
Code: [Select]
$txt['spoiler'] = "Spoiler";with something like this:
Code: [Select]
$txt['spoiler'] = "<img src="{URL}" width=x height=y></img>You can omit width and height if you desire, but you need to replace {URL} with the URL of the image you want to display in it's place.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline ?Almirena?

  • Semi-Newbie
  • *
  • Posts: 25
Re: Expanding & Collapsing Spoiler Tag
« Reply #61 on: January 16, 2016, 02:33:26 AM »
Hello - thank you, dougiefresh. It works beautifully.

Just for the information of others who may want to do something similar, don't forget the "; at the end...

Code: [Select]
$txt['spoiler'] = "<img src=http://www.yourdomain.com/images/spoiler.gif></img>";
or whatever URL is appropriate.

Offline gerno

  • Newbie
  • *
  • Posts: 2
Re: Expanding & Collapsing Spoiler Tag
« Reply #62 on: February 12, 2016, 01:05:42 PM »
Hi, you considered add the parameter {expand} to sho the spoiler expanded by default?

It can be very useful for indexes, titles and sections on a large post.

Thanks

PD: I'm learning english

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #63 on: February 12, 2016, 04:51:39 PM »
I'd have to rewrite the mod for that....  Let me see what I can do.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline gerno

  • Newbie
  • *
  • Posts: 2
Re: Expanding & Collapsing Spoiler Tag
« Reply #64 on: February 13, 2016, 04:38:46 AM »
I'd have to rewrite the mod for that....  Let me see what I can do.

Was just a suggestion, but I do not deserve that rewrites the mod just for my suggestion. Needs to be useful to other users and you have to consider your time and dedication.
I appreciate your work.

Thanks.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #65 on: February 13, 2016, 09:25:37 PM »
Uploaded v3.0 - Febrary 13th, 2016
o Added "expand" parameter to indicate whether or not the spoiler is expanded by default.
o Rewrote spoiler validation function to support new parameter.



@gerno: Your request has been implemented.  I don't know if other people might find it useful, but there's only one way to find out!!!!  :P  Thanks for the suggestion!

EDIT: I honestly thought modifying the mod to do this would be more... problematic, I guess you would say....  It turned out to be quite easy....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline spiritus_infernus

  • Newbie
  • *
  • Posts: 4
Re: Expanding & Collapsing Spoiler Tag
« Reply #66 on: February 14, 2016, 04:24:23 AM »
Hello there, found some strange thing using this spoiler: when placing something inside him instead of text, things making vanished. i.e. if place an image tag in spoiler- image hide. if placing somwthing within sploiler with text - only text shows all other - hides.
How possible solve it?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #67 on: February 14, 2016, 08:18:16 AM »
I tried this:
Code: [Select]
[spoiler]
Blah Blah Blah
[img width=800 height=600]http://www.hispanicallyspeakingnews.com/uploads/images/article-images/black_panther_spain.jpg[/img]
[/spoiler]
and couldn't duplicate what you are seeing.  Could you provide the actual post you are using, so that I can see what is happening?  Thanks![/code]
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline spiritus_infernus

  • Newbie
  • *
  • Posts: 4
Re: Expanding & Collapsing Spoiler Tag
« Reply #68 on: February 14, 2016, 08:43:44 AM »
Code: [Select]
on my forum if I trying to use [_spoiler=with something inside him more than plain text]
for example image code: [_img]http://i.imgur.com/NIFgNqi.jpg[/img]
i will have nothing inside spoiler, except text
[_/spoiler]
as you understand, without _ this symbol
giving such results:
for preview it will show image (at screenshot 1)
for post - will not (screenshot 2)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #69 on: February 14, 2016, 10:49:14 AM »
What version of this mod are you using?  Cause I've just tested with version 3.0 and it functions as expected for me....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline spiritus_infernus

  • Newbie
  • *
  • Posts: 4
Re: Expanding & Collapsing Spoiler Tag
« Reply #70 on: February 14, 2016, 01:37:20 PM »
version 2.4, but when I've wrote a certain dimesions for included image in spoiler it shown. But I think it is not so useful and not even user on forum will diving deep in correct writing image tag in spoiler. Possible edit this by myself? or I can just upgrade version?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #71 on: February 14, 2016, 04:24:57 PM »
I just tried the post contents you provided with mod version 2.4 and had the same results as version 3.0.  Please try upgrading to version 3.0 and tell me if the same thing happens.....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Darkness_Black

  • Sophist Member
  • *****
  • Posts: 1,139
  • Gender: Male
  • Translator SMF - BR
    • www.facebook.com/gilvanroberto on Facebook
    • @gilvanroberto on Twitter
    • Translator SMF - BR
Re: Expanding & Collapsing Spoiler Tag
« Reply #72 on: February 16, 2016, 03:17:42 PM »
Good afternoon, in index.english missing $txt["debug_show"] = "SHOW";
Mod working  ;)
How do I show in button?
Translator - Brazilian

Não respondo MP de ajuda, Poste sua duvida no forum!!! Se alguém te Ajudou Agradeça!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #73 on: February 16, 2016, 07:15:40 PM »
That's rather odd, cause the default install of SMF 2.x contains the string.  You can fix this particular bug report by adding the following line to the Themes/default/languages/index.english.php file:
Code: [Select]
$txt['debug_show'] = 'show';
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Darkness_Black

  • Sophist Member
  • *****
  • Posts: 1,139
  • Gender: Male
  • Translator SMF - BR
    • www.facebook.com/gilvanroberto on Facebook
    • @gilvanroberto on Twitter
    • Translator SMF - BR
Re: Expanding & Collapsing Spoiler Tag
« Reply #74 on: February 16, 2016, 07:48:18 PM »
That's rather odd, cause the default install of SMF 2.x contains the string.  You can fix this particular bug report by adding the following line to the Themes/default/languages/index.english.php file:
Code: [Select]
$txt['debug_show'] = 'show';

Already fix this, just sent you here to know they need to fix.

My question now is: How do I show in button?
Translator - Brazilian

Não respondo MP de ajuda, Poste sua duvida no forum!!! Se alguém te Ajudou Agradeça!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #75 on: February 17, 2016, 09:20:31 AM »
You should be able to click to the word "Show" in the spoiler header in order to get the contents of the spoiler to show....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,670
  • Mod King
    • XPtsp.com Community
Re: Expanding & Collapsing Spoiler Tag
« Reply #76 on: April 04, 2016, 04:08:25 PM »
Uploaded v3.1 - April 4th, 2016
o Added Spanish Latin translation by Rock Lee [BC].



@Rock Lee [BC]: Thank you for the translation.  It's been included in this version!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Kortal

  • Semi-Newbie
  • *
  • Posts: 11
Re: Expanding & Collapsing Spoiler Tag
« Reply #77 on: January 17, 2017, 05:10:30 PM »
Hey, thanks a lot dougiefresh for your hard work on mods.

Would it be possible to change a bit the spoiler design ? something more like quickspoiler or simplespoiler would be very nice.
(I just hate this straight line below the spoiler... lol)

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,213
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Expanding & Collapsing Spoiler Tag
« Reply #78 on: January 18, 2017, 06:38:02 AM »
I don't know Dougie's feelings on the subject but here's my unsolicited two cents worth:

Mod designers intentionally design their mods to look different and work different than other mods. Otherwise, what's the point of creating a mod that does the same basic thing as existing mods (in this case, hiding content)? My vote would be to leave it as is OR have an option to have the lines or not. :)
Online Manual

Please do not PM me for support.

Offline Kortal

  • Semi-Newbie
  • *
  • Posts: 11
Re: Expanding & Collapsing Spoiler Tag
« Reply #79 on: January 18, 2017, 01:12:59 PM »
Steve, I totally agree with you.

If i'm using this spoiler, it's because it has way more options than other mods. Most interesting is the option to hide or not to guests.
A good solution would be as you said, to be able to change a bit the layout, then it would be perfect (at least, for me)