Support Forum
Here is the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="BQS7YMRYTEAJC"> <input type="image" src="http://www.ohhtee.com/wp-content/uploads/2015/08/b2.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
Nice and simple, all you need to do is add a closing PHP tag before, and an opening PHP tag after. This is because the code PayPal give you is HTML so you need to drop out of PHP (as the templates use) in order for it to work, and then open it up again after so the template can continue. I did this on line 159 of spForumViewDesktop.php to add the donate button in the header.
I.e just after 'sp_TopicNewButton' which I've left in for reference:
sp_TopicNewButton('tagClass=spButton spRight iconStatusClass=spLockPosition&iconLock=sp_ForumStatusLockWhite.png', __sp('Add Topic'), __sp('Start a new topic'), __sp('This forum is locked')); ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="BQS7YMRYTEAJC"> <input type="image" src="http://www.ohhtee.com/wp-content/uploads/2015/08/b2.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> <?php
You can just add an inline float rule to the first opening div:
?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="float: right;"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="BQS7YMRYTEAJC"> <input type="image" src="http://www.ohhtee.com/wp-content/uploads/2015/08/b2.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> <?php
Glad it works how you want it!..
Yes, you could add this in topic view, you could experiment putting it before or after certain functions, and changing the float: right to float: left to get it to look how you want.
As to mobile, sure - You can add it to any of the mobile templates just the same. Although it might be up to PayPal to give you something more suitable for mobile view. You would have to experiment..
1 Guest(s)