Hello there! Welcome to Youjoomla Support Forums

We are Web Development Company specializing in Joomla Templates , Joomla Extensions and WordPress Themes development . You are not able to see some forum threads due to your memberhip level. To unlock all forums and special customer support please take few moments to signup . If you are just searching for free joomla templates , or free joomla extension support simply head to our Free Joomla Support forums and open a new thread. Our moderators will help you as soon as possible. To spead up the response time please take few seconds and go over forum rules

Have fun!

Custom shortcode

09-08-2014, 07:21 AM
# 1 (permalink)
openweb
Hi

We are making a custom shortcode that needs formated text and an image selector.

We already manage to build it with an simple input text and an image selector (we copied from your image.html/image.js shortcode).

The question is, we need to instead of simple text put formated text, in other words we need an editor (WYSIWYG) in the shortcode popup.

How can we do this?

Thanks in advance

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 3.x

MySQL Version: 5.x

PHP version: 5.x

Link to installation: private

Have you edited any files? If yes tell us which ones.: Yes

Is this personal or client website?: Personal
09-08-2014, 01:58 PM
# 3 (permalink)
openweb
We think you don't understand the issue.

But we made a workaround. So no problem.
09-08-2014, 05:42 PM
# 5 (permalink)
openweb
ok we will try to explain better.

We know we can create custom shortcodes. It's a very cool feature of your framework and we already made 3 custom shortcodes for our sites.

The problem is when you try to build more complex custom shortcodes.
We, for instance, needed a field inside the popup of the shortcode to be of the type "Editor", or in other words, a WYSIWYG field.

Since the custom shortcodes are simple html/js they cannot inteact with joomla framework to get for instance: the editor the user is using, the session, the language and translation, etc.

So, besides we have made a workaround for this particular issue, this is a suggestion we made: Make the custom shortcode inteact with joomla framework so you can get the languagues, and all the joomla framework. In other words dynamic php code in shortcodes. And with an example like you did for html/js.

Thanks
09-08-2014, 06:32 PM
# 6 (permalink)
neo
ok got it. I did that on purpose to protect people who are not as advanced and use only js and html,

but you can always convert the html file to php and get the params trough external joomla framework call. see an example of external call in
plugins/system/yjsg/elements/yjsgupdate.php

first few lines call the framework
Screenshot by Lightshot

and you can now see everything you need

please protect the external via user access check or form isset that can be sent only via admin interface
09-08-2014, 06:41 PM
# 7 (permalink)
openweb
of course. thanks neo

The only problem with static is the translations...
Thread Tools
Display Modes

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

Members Login

Username
Password