Add a paypal buy now button?

Started by JoeBrodsky, July 16, 2014, 01:55:16 PM

Previous topic - Next topic

JoeBrodsky

I've tried a few paypal mods and each one I have tried so far is not compatible with my current version of 2.0.8 SMF  Does anyone have a mod or know how to add the paypal button to the site?  I already have the html code for it.  I can't seem to find a working mod!

br360


JoeBrodsky

I input the HTML code and for some reason it does not show up on my website

Deaks

what theme are you using?  this mod looks for specific code that may not be in your theme.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

JoeBrodsky

Quote from: Μπράιαν on July 16, 2014, 02:33:00 PM
what theme are you using?  this mod looks for specific code that may not be in your theme.

I've been using the Carbon theme

http://www.awesomestyles.com/smf-themes/view/carbon

Deaks

thats why, that theme doesnt have the required code.

Where would you like paypal to display?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

JoeBrodsky

I would want my button to appear directly below the menu bar and in between the shoutbox.

I posted a picture to show what I am talking about.

Is there a way to get the paypal button setup without needing a mod?


Deaks

yes by directly adding the code to the index.template.php file.  If you can attach that file I will show you where it goes :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

JoeBrodsky

This is the index.template.php for the carbon theme


Deaks

ok you want to add your code between these 2 line

<div id="bodyarea">';
theme_linktree();


see the '; after the body area div move it to the end of your generated code so it looks like </form>'; and that div looks like <div id="bodyarea">
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Matthew K.

My PayPal modification should also be compatible with SMF 2.0.8. Just needs Version Emulate, iirc.

JoeBrodsky

Quote from: Μπράιαν on July 16, 2014, 03:00:30 PM
ok you want to add your code between these 2 line

<div id="bodyarea">';
theme_linktree();


see the '; after the body area div move it to the end of your generated code so it looks like </form>'; and that div looks like <div id="bodyarea">

Thanks that worked!  My friends want me to try placing it below the shoutbox, could you code that for me as well? Sorry for the inconvenience, I appreciate the help so much!

Deaks

ok add the '; back to the bodyarea div but keep it after the </form>  move everything below the line that says

// <-- SMFPacks Shoutbox


also replace that above line with:

// <-- SMFPacks Shoutbox
echo'
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

JoeBrodsky

Quote from: Μπράιαν on July 16, 2014, 03:13:42 PM
ok add the '; back to the bodyarea div but keep it after the </form>  move everything below the line that says

// <-- SMFPacks Shoutbox


also replace that above line with:

// <-- SMFPacks Shoutbox
echo'


Worked perfectly I appreciate it!  Much better than having an unnecessary mod on my site.  Thread marked answered.

JoeBrodsky

Is there a way I can get the paypal button to only show up on the home page under the shoutbox? It's currently on every page you go to

Kindred

If you use a portal mod, you can do it easily...,

Otherwise, you will have to code the conditional...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver



/// Show PayPal button on main index only.

if (($context['current_action'] == '') && ($context['current_board'] == ''))

echo '

<div class="paypal">

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd"  value="_s-xclick">

<input type="hidden" name="encrypted" value="-----BEGIN PKCS7---------END PKCS7-----
">

<input type="image" src="http://www.domain.com/forum/Themes/default/images/paypal.png" border="0" name="submit">
</form>

</div>';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JoeBrodsky

Quote from: Kindred on July 21, 2014, 07:27:02 PM
If you use a portal mod, you can do it easily...,

Otherwise, you will have to code the conditional...

How would I do that? I'm really new to this lol

Kindred

portal mods allow you to create blocks for display and to pick what screens those blocks display on....

Check into the support topics or sites and pick one of the several portal mods. :)  They'll explain all of the configuration options etc.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

JoeBrodsky

Quote from: Kindred on July 24, 2014, 07:25:02 AM
portal mods allow you to create blocks for display and to pick what screens those blocks display on....

Check into the support topics or sites and pick one of the several portal mods. :)  They'll explain all of the configuration options etc.

I've tried simple portal, but there are problems in the subs folder when i go to install it

kat

What are those problems, exactly?

Sorry about this being left for so long... :(

Advertisement: