1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PayPal Donate button in header area.

Discussion in 'XenForo Questions and Support' started by masterchief, Feb 24, 2011.

  1. masterchief

    masterchief Well-Known Member

    What is best way to place paypal donate button in the header area?
     
  2. masterchief

    masterchief Well-Known Member

    I have the code, I just need to know where to place it so that it appears in the header area... peace
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Edit this template:

    Admin CP -> Appearance -> Templates -> logo_block

    Add this code:

    Code:
    			<div style="float: right;">
    				YOUR CODE HERE
    			</div>
    
    like so:

    Code:
    <div id="logoBlock">
    	<div class="pageWidth">
    		<div class="pageContent">
    			<div id="logo"><a href="{$logoLink}">
    				<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
    				<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
    			</a></div>
    
    			<div style="float: right;">
    				YOUR CODE HERE
    			</div>
    
    			<span class="helper"></span>
    		</div>
    	</div>
    </div>
    
    This is the result:

    Screen shot 2011-02-24 at 11.32.23 AM.png
     
    The8thLegion and Trombones13 like this.
  4. masterchief

    masterchief Well-Known Member

    THANK YOU!

    works great...
     
  5. DRE

    DRE Well-Known Member

    I used this button last night but took it down because it showed underneath the login button.

    I only had it up for a couple of hours and some member randomly donated. I'm shocked.

    I need to figure out a better place to put this button.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    I had one in the sidebar for a short while.

    Create a template called e.g. paypal_sidebar and add this code, inserting your own PayPal code where appropriate:

    Code:
    <div class="section">
        <div class="secondaryContent">
            <h3>Donate To Us</h3>
                <div style="text-align: center">
                    Your PayPal code here
                </div>
        </div>
    </div>
    Then just include the template in the sidebar or forum_list template.

    I also had a progress bar, but removed it from the above code because it was manual.

    paypal.PNG
     
    The8thLegion likes this.
  7. DRE

    DRE Well-Known Member

    Wow thanks Brogan! Random but you were in my dreams last night. Nothing gay now, just a random appearance. See that's what happens when you become so helpful people start dreaming about you lol.

    I'll put it in after my host unblocks my ip. If I enter the wrong password 3 times in cpanel it kicks me out. smh
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    I believe you ;)
     
    Darkimmortal likes this.
  9. DRE

    DRE Well-Known Member

    lmao
     
  10. masterchief

    masterchief Well-Known Member

    I took it a step further and placed my paypal code in a new phrase and placed it within the div style tags like so:

    Code:
    <div style="text-align: center">
        {xen:phrase paypal_code}
    </div>
    
     
  11. DRE

    DRE Well-Known Member

    What's your site link? Can I see what you did with the button?
     
  12. LuvMeSumZen

    LuvMeSumZen Active Member

    I'd like to add my button between the Forum Statistics and Share This Page link, but I'm not sure where to add the code. Can anyone offer the details on what template and where in the code, and what code I need to add to do this? Thanks!

    donate.png
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  14. LuvMeSumZen

    LuvMeSumZen Active Member

    I followed the directions in the link, and used the google code in the linked thread in that thread, but nothing appeared in my side bar. Here's what my code looked like after added the stuff in the green box:

    Added text.jpg
     
  15. Jeremy

    Jeremy XenForo Moderator Staff Member

    You may need to contact the style author to find out if there need to be something special.
     
  16. LuvMeSumZen

    LuvMeSumZen Active Member

    I don't think so. Every other template mod I've done has worked fine.
     
  17. Jeremy

    Jeremy XenForo Moderator Staff Member

    Do you have any widget frameworks installed?
     
    LuvMeSumZen likes this.
  18. masterchief

    masterchief Well-Known Member

    regards ~peace
     
    LuvMeSumZen likes this.
  19. LuvMeSumZen

    LuvMeSumZen Active Member

    Yes I do have the widget framework installed. But I don't know how to use it yet so I disabled it and viola - the code took effect and works as I wanted. Thanks Jeremy.
     
  20. LuvMeSumZen

    LuvMeSumZen Active Member

    Edit: never mind that question didn't make sense. I was working on something entirely differnt please ignore.
     

Share This Page