Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: hadesflames on September 17, 2007, 08:36:21 PM

Title: html bbc
Post by: hadesflames on September 17, 2007, 08:36:21 PM
when i use the html bbc
[html][/html]
i get this when i click on the paypal button:

Session verification failed. Please try logging out and back in again, and then try again.
Title: Re: html bbc
Post by: codenaught on September 17, 2007, 08:40:00 PM
What paypal button? Is it from code used inside of [html[/html]? If you give us the code for it, that may help.
Title: Re: html bbc
Post by: hadesflames on September 17, 2007, 08:49:03 PM
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Sticky Ad">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="1.50">
<input type="hidden" name="buyer_credit_promo_code" value="">
<input type="hidden" name="buyer_credit_product_category" value="">
<input type="hidden" name="buyer_credit_shipping_method" value="">
<input type="hidden" name="buyer_credit_user_address_change" value="">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Title: Re: html bbc
Post by: Kirby on September 17, 2007, 09:03:47 PM
This is because a form already exists in the Display template for quick editing/moderation. You'd have to put it somewhere else in the template.
Title: Re: html bbc
Post by: hadesflames on September 17, 2007, 09:19:18 PM
and exactly how would i do that?
Title: Re: html bbc
Post by: Kirby on September 17, 2007, 09:22:02 PM
You can create a clone of the default theme (recommended unless if you really want to edit the default theme) and then edit it's files via the Themes directory.

Themes (http://docs.simplemachines.org/index.php?board=34.0;sort=subject)
I highly recommend reading that.
Title: Re: html bbc
Post by: hadesflames on September 17, 2007, 09:31:36 PM
ok i created a clone of the default theme...still doesn't work..
Title: Re: html bbc
Post by: karlbenson on September 17, 2007, 09:34:45 PM
where about and in which template did you try to put the code?

You won't be able to use that code you posted in any posts because it interferes with the other forms.


You could alternatively try using the link version provided by paypal. Its what I had to use for my "buy me a beer" mod
Title: Re: html bbc
Post by: Kirby on September 17, 2007, 09:34:54 PM
You have to edit the theme's files to include your HTML somewhere in the theme so it can be displayed.
Title: Re: html bbc
Post by: hadesflames on September 17, 2007, 09:49:25 PM
can u give me an example?
Title: Re: html bbc
Post by: codenaught on September 18, 2007, 07:07:26 PM
An example could be, adding this code:

echo '

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Sticky Ad">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="1.50">
<input type="hidden" name="buyer_credit_promo_code" value="">
<input type="hidden" name="buyer_credit_product_category" value="">
<input type="hidden" name="buyer_credit_shipping_method" value="">
<input type="hidden" name="buyer_credit_user_address_change" value="">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>';


After:

<div>', theme_linktree(), '</div>';

In Themes/<theme_name>/Display.template.php. And if you want to only show it in one or a few topics, right before the echo ' in that code, you could add:

if (in_array($context['current_topic'], array(1, 2, 3)))

Where 1, 2, 3 is a comma separated list of the IDs of the topics you want to show the button in.

Title: Re: html bbc
Post by: hadesflames on September 18, 2007, 08:41:55 PM
still getting session verification =/

EDIT: o wait i get it now. it will appear ontop of the post, yea i got it...but theres no way to put it inside the actual post?
Title: Re: html bbc
Post by: codenaught on September 18, 2007, 09:10:33 PM
As karlbenson suggested, maybe you can do this?

QuoteYou could alternatively try using the link version provided by paypal. Its what I had to use for my "buy me a beer" mod
Then use a linked image so it looks like whatever you want.