Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
wp short-codes
Avatar
David H
Member
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2013 - 12:59 am

Hi

 

Is it possible to use short-codes that I wrote in the wp function.php - within the simple press forum?

What i wrote works well in the blog but it is ignored from the forum.

Is it important which editor I am using? 

 

Thanks

 

David

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2013 - 1:06 am

yes, you can use any wp shortcode in a forum post... check forum - options - content settings and make sure you are allowing the shortcode though...

Avatar
David H
Member
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2013 - 3:22 pm

Thank you for the quick answer.

It was really that.

OK,

Now I have short-codes that works in the forum and in the blog.

I made buttons for these two short codes and I can see the buttons in the blog but not in the forum. im using tinymce editor.

I try to put the JS button script as a plugin to the tinymce.

It didn't work.

 

What should I do?

 

Thanks

David

 

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2013 - 10:16 pm

buttons are just css.. they are not part of the shortcode...  or if you added them to wp editor in admin, you need to add them to the list in the forum use of the wp editor (you might have to hook them in too depending on how you did it)...  forum - components - tinymce...

Avatar
David H
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2013 - 12:34 am

Hi

What I did is that I create a button in the function.php of my theme. The js function of the button I wrote in another datei named editor_plugin.js.

That works fine for the blog, i can see the button and it works.

In the forum however I don't see the button.

I add the button name to the list in the forum plugin (forum – components – tinymce) but it didn't help.

I thought that maybe I have to use what I wrote as a plugin within the tinymce plugin, and iI uploaded it to the right tinymce plugins file.

it didnt work.

If I wrote the my plagin name in the plagins list of the tinymce (forum – components – tinymce), I lost the hole editor... :)

 

What can I do?

 

thanks 

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2013 - 1:05 am

well, thats what I mean by you will need to hook in...  how did you register it with the wp editor?  the admin_init hook?  wont work for front end usage...

sorry, about to head off to bed (have to work in AM)... but wanted to post quick note to maybe help you out quickly.... think you might be able to pick it up... otherwise Andy or I can provide more details tomorrow...

you can register your plugin with us too if registering for wp editor on front end doesnt work...

take a look in our tinymce plugin, the library/sp-tinymce-init.php file...  you will see some functions and hooks for your to register your plugin (ie tell us about the editor_plugin.js)...  use our sph_mce_external_plugins hook to register the plugin...  once registerd and we know about it, then you can add the button to the toolbar...

more tomorrow if needed...

Avatar
David H
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2013 - 9:30 am

Thank you for the answer

and thank you for answering quick.

 

I did what you suggested and everything work fine.

Thanks

 

David

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 19, 2013 - 3:16 pm

Great news. Thanks for the update.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
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