Johan Steen
Forum Replies Created
-
Thanks for the extra info.
I actually have an old laptop sitting around with Ubuntu 10.04 installed. ??
I’ll do some testing on that machine and see if I can replicate the problem. Much easier to start digging if I can see the error here as well.Cheers,
JohanThanks for the example code. I tested with it here and couldn’t get it to break the editor like it happens for you, but it worked fine.
The plugin encodes <> for snippets to be inserted directly in the editor until they are inserted to make sure that the browser isn’t tempted to execute them and cause any conflicts.
ie. <script> is transformed to \x3Cscript\x3E while waiting to be used, so javascript should be safe and work to use in snippets to be inserted directly in posts.So if it fails, I speculate that it could perhaps be a browser issue. What browser are you encountering this problem with?
Hi,
If you can provide me with the javascript snippet that breaks the plugin, I’d be happy to take a look at it and see what I can do about it.
Cheers,
JohanForum: Plugins
In reply to: [Post Snippets - Custom WordPress Code Snippets Customizer] Doesn't work…Thanks for the report.
Could you please supply the code you have entered in the snippet when this problem started? So I can replicate the issue here and see what the cause is.Cheers,
JohanHello again,
Sorry for the delay in my response, but now I’ve been trying to replicate your issue. I’ve been using ‘Vidéo réalisée par’ in a snippet here, but so far it seems to work as it should, both in visual and html mode.
Do you think you can supply some more details of how to replicate the problem?
Cheers,
JohanThanks for the report.
I have not been able to reproduce your problem. Reading your description of how the shortcodes duplicates themselves from the iPhone App as well, makes me suspect there is another plugin involved that might interfere with the shortcodes. Post Snippets itself doesn’t do any actions when a post is saved so the plugin cannot add or change anything when re-saving a post for instance.
If you have any further details to share to be able to reproduce the problem, feel free to do so.
I’d guess the button disappears because get_username() is a function that doesn’t exist, so it throws an error. I assumed that get_username() was some custom function you had.
Instead you can use WP’s own function to get the current username, get_currentuserinfo.
So then it would look like this:
global $current_user; get_currentuserinfo(); $reference = $current_user->user_login;
Cheers,
JohanIf you don’t mind making some modifications to the code, you can fix the new page pretty easy by adding a target=”_blank” to the form tag.
Locate the form tag in the code (around line 152 in v1.4.9.4):
$paypal_btn .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">';
and change it to:
$paypal_btn .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">';
You could also modify the $reference part in the same function (generate_html()) to use the get username function istead.
Change:
$reference = (!$reference) ? $pd_options['reference'] : $reference;
to:
$reference = get_username();
You could probably even though something like:
if(is_user_logged_in()) $reference = get_username();
Hope this helps some.
Cheers,
JohanI’ve just released v1.8, and have added support for nested shortcodes.
Forum: Plugins
In reply to: [Post Snippets - Custom WordPress Code Snippets Customizer] PHP in snippet?Bernhard,
Using PHP in snippets is currently not possible. It’s planned to be supported by the time the plugin hits v2 though.
Cheers,
JohanForum: Plugins
In reply to: [Donations via PayPal] [Plugin: PayPal Donations] center the buttonSorry for my late reply, Brian’s suggestion with the addition to the .css file should work, and if it doesn’t work it’s probably a conflict with some other CSS setting.
So feel free to post a link.Cheers,
JohanForum: Plugins
In reply to: [Donations via PayPal] [Plugin: PayPal Donations] other input fieldsI believe those fields are used when you create a button on PayPal’s site and then they are hosting it for you. At least the “hosted_button_id” is used for that and would provide no purpose for this plugin as it is not designed to use hosted buttons.
About the “cmd” field, it can be used to decide if the PayPal button is a donation button, buy button, subscribe button and so on. I guess you want to change that to use the plugin for something else than a donation button?
It would require to tweak the output code of the plugin. If you are comfortable with doing that you can locate the generate_html() function in the plugin and simply add an additional line within that function to set another value for the cmd.
Cheers,
JohanThanks for the report. I’ll take a look at this for the next update.
I don’t have a Multi-Site with the domain mapping setup at the moment to be able to test it myself.
If the HTML button works fine at the moment, this will resolve itself in the not too distant future, as I’ve planned to let the functionality of that button also be used in the Visual editor mode.
I haven’t used FCKEditor myself, but I’d guess as FCKEditor is a 3rd party editor that probably not checks for what extra buttons that are hooked into WP’s own editor, it would require to be supported specifically by a plugin for it to show up in that editor as well.