Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
change [spoiler] to [spoil]
Avatar
Golden Sharks
Member
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2015 - 10:26 am

 Hello!
I need help - I want to change original [spo.iler] function to work with [spoil] code too (because our external software that our users effects will post on forum are in [spoil] tags)

Yours,
Golden Sharks Team

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2015 - 12:58 pm

as long as you dont care about the button in tinymce, you can just add a new definition for the shortcode...  so in your spFunctions.php file of your sp theme, add

add_shortcode('spoil', 'sp_filter_display_spoiler');

as always, we strongly recommend you use a child theme or a custom theme before making the theme changes to keep from losing changes on updates...

Avatar
Golden Sharks
Member
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2015 - 2:30 pm

I added this line to spFunctions of sp theme I'm using but the content of [spoil] doesn't appear at all.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2015 - 3:12 pm

It does for me...  are you filtering shortcodes on forum - options - content settings?  if so,  you will need to add it to the allowed list...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17348
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10118
Posts: 79603