Enhanced Paypal Codes Ver 0.2 Released
Since I released my plugin Enhanced Paypal Shortcodes the other day, I have been “enhancing” it. The one feature I did want to enable on Enhanced Paypal Shortcodes was the ability to use hosted buttons. Whilst my motivation for creating the plugin initially was to help my clients who used iDevAffiliate and JROX JAM (which don’t support hosted paypal buttons), I could also see the need for hosted buttons looming – and loom it did!
Of course, whilst using my own plugin, I found a few things that could have been done better so I took the opportunity to do so in this update.
So here is Version 0.2 of Enhanced Paypal Shortcodes…
Add Functionality
Support for Paypal Hosted Buttons
Sample usage:
[ paypal type="hosted" buttonid="1234456" imageurl="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" ] (remember to remove the spaces before and after the [ ]
Formatting Now Works Correctly
During my testing, I found that the automatic centering of the button didn’t work – this is now resolved.
The plugin will wrap the paypal button in a <div> tag. The formatting options available are:
divwidth = the width of the div. This should be at least the width of the image.
Default – 100%
text-align = the alignment of the image / text within the div
Allowable values:
left – text is left justified
right – text is right justified
center – text is centered
If left out, the format is taken from the page format
float = position of the div on the page
left – the div ‘floats’ on the left
right – the div ‘floats’ on the right
Default – if this value is missing, the div is centered on the page
margin-left = the amount of space between the div and the text to the left of the div (particularly good to use when using float=right)
Default – if this value is missing, the page format is used
margin-right = the amount of space between the div and the text to the right of the div
(particularly good to use when using float=left)
Default – if this value is missing, the page format is used
margin-top = the amount of space to the line above the div
Default = 10px;
margin-bottom = the amount of space to the line below the div
Default = 10px;
Sample Usage With Formatting:
This example shows the usage of the shortcode for a hosted button. This formatting will use your own custom image hosted on your site, that is 200px wide, center the button in the line and leave 20px space above and 10px space below:
[ paypal type="hosted" buttonid="1234456" imageurl="http://yourdomainname.com/images/buynow.jpg" imagewidth="200px" divwidth="200px" margintop="20px" marginbottom="10px" ]
Remember to remove the spaces before and after the [ ]
All formatting options work on three button types.
Download Enhanced Paypal Shortcodes Version 0.2 from the WordPress Repository
