I am running the SMF 1.0.2 with the Simplicity theme. My site is used as a Community Trading Post. I would like to add a PayPal button to the mainpage so users can make donations. If anyone knows how this is done using the Simplicity theme, i would sure appreciate the assistance.
Thanks
Joe
Use the html block in the tpadmin section. Insert the html code from your paypal account page.
I found in the admin screen under " Theme Settings - Simplicity" , Modify the index template. (the main template)
Is this the file that I am supposed to edit? If so, where exactly is the PayPal html code inserted?
Joe
You need to manually edit that file, yes. Currently the theme has no special box for inserting html code, like for instance Themis theme or Helios theme.
Even if the theme resembles TinyPortal its not the same - and currently no conversion to make simplicity work in TP has been made.
Do you know exactly where in that file the PayPal code goes?
Joe
It depends on where you want it? on top or at the bottom perhaps?
If you look on my site, www.joesdomain.ca/forums I would like it under User Tools. The button first then, Home,Help etc underneath the button
joe
Find this code in index.template.php:
template_menu();
echo '</span>';
And just add you html code right above that and enclosed like this:
echo 'yourhtmlcodehere';
echo '<br />';
I edited the file and inserted the code where you mentioned and I got the following error:
Template Parse Error!
There was a problem loading the /Themes/simplicity/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Joe
Could you post what you inserted? and 2-3 lines before and after it?
I know this is an old topic, but thought I'd post, since I just added a paypal button to my index template. I'm using the Neptune theme on 1.1 Beta 3.
In the // leftblocks
function leftbar() section, I added sidebartop('Donations');
Then this code:
?><script type="text/javascript">
function gopaypal() {
ÂÃ, Ã‚Ã, document.paypalinfo.submit();
}
</script>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="your paypal ID">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="margin: 2px 0;"ÂÃ, border="0" onclick="gopaypal();"/>
</form>ÂÃ, Ã‚Ã,Â
<?
Works perfectly :)