Home > Forum

Support Forum

Change parameter symbol?

Change parameter symbol?

Postby Schokokaese » Wed Jul 18, 2012 8:43 pm

I miss the function to change the parameter symbol. Because I want to use Shortcoder to embed tracks from soundcloud.com, but there are some „%“ in the code from the html 5 player:

Code: Select all
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F52523083&amp;auto_play=false&amp;show_artwork=true&amp;color=f2e1c4"></iframe>

For now it would be enough to change it hardcoded, e.g. to „*“. Or perhaps another save symbol – or maybe more than one, for example „**“. Unfortunately, my PHP skills aren’t good enough to change it by myself.
Schokokaese
 
Posts: 3
Joined: Wed Jul 18, 2012 8:19 pm

Re: Change parameter symbol?

Postby vaakash » Thu Jul 19, 2012 4:17 pm

Hello,

I too heard that the "%" symbol is clashing with the content of the shortcode. Ill soon change it in the next version.
User avatar
vaakash
Site Admin
 
Posts: 704
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Change parameter symbol?

Postby Schokokaese » Thu Jul 19, 2012 8:30 pm

Can you say (circa), how long this could take?

Thank you :-)
Schokokaese
 
Posts: 3
Joined: Wed Jul 18, 2012 8:19 pm

Re: Change parameter symbol?

Postby raymond » Thu Jul 19, 2012 8:52 pm

Hi Schokokaese,

Good day!

Meanwhile, please see if doing an HTML entity works for you. "%" is "&#3;" and see if that works.


Thanks!
raymond
 
Posts: 12
Joined: Thu Jul 19, 2012 3:24 pm
Location: Philippines

Re: Change parameter symbol?

Postby Schokokaese » Fri Jul 20, 2012 6:54 pm

Hi raymond.

Thank you very much for your suggestion. It works! With the correct entity &#37; ;-)

Code: Select all
<iframe width="100&#37;" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http&#37;3A&#37;2F&#37;2Fapi.soundcloud.com&#37;2Ftracks&#37;2F%video%&amp;auto_play=false&amp;show_artwork=true&amp;color=f2e1c4">&nbsp;</iframe>



But by checking this I found a bug:

When you click on the button from an existing shortcode to edit it, the plugin does not only load the existing code. Even in html view it decodes entities! This is not only relevant for users like me, who want to „trick“ the plugin to work with „%“ in the shortcode.

No, as you can see above in the code (in my first posting you can see the original code), also the „&“ in the url are encoded („&amp;“), because the url is a parameter from „http://w.soundcloud.com/player/?“.

Therefore you cannot edit existing shortcodes easily. When you do not save the shortcode anywhere else, you have to search for it in the mysql database. Or even re-encode the shortcode.
Schokokaese
 
Posts: 3
Joined: Wed Jul 18, 2012 8:19 pm

Re: Change parameter symbol?

Postby raymond » Fri Jul 20, 2012 7:35 pm

I see. Makes sense. Maybe you can try to place the URL on http://bit.ly/ and source it from there instead.
raymond
 
Posts: 12
Joined: Thu Jul 19, 2012 3:24 pm
Location: Philippines

Re: Change parameter symbol?

Postby vaakash » Wed Aug 08, 2012 5:57 pm

This parameter symbol is now changed to %% instead of %.
I think this is the permanent solution for this problem. This will avoid clashes with the native HTML codes.

This is added in the Shortcoder v3.1 Just download/update to it.

Download: http://www.aakashweb.com/wordpress-plugins/shortcoder/
User avatar
vaakash
Site Admin
 
Posts: 704
Joined: Sun Jan 17, 2010 11:15 am
Location: India


Return to Shortcoder

cron


phpBB SEO