Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Facebook and Like Button in Heading

    Greetings;

    I am trying to add a button in my heading for Facebook so that it links to my facebook page. I have the button working but it isnt where i want it and dosnt matter what i do i cant seem to move it. I would like the button on the line above where the rest of the buttons are on the right hand side.

    Here is the coding;

    tpl_header.php

    Code:
    <div <?php echo ($current_page_base == FILENAME_FACEBOOK) ? ' class="current"' : ''; ?>><a href="http://www.facebook.com/pages/Delights-of-the-Flesh/147018598659118?sk=wall"><img src="includes/templates/bdsm/images/facebook.gif" height="50" alt="Facebook"></a></div>
    stylesheet.css

    Code:
    #facebook  {
    	background:url(../images/facebook.gif) no-repeat scroll left;
    }
    Anyone know what i have done wrong ?
    Last edited by Delights; 16 Apr 2011 at 05:12 AM.

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

  3. #3
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    Quote Originally Posted by haredo View Post
    this page will be helpful
    Thanks but it wasnt, i already had the button working, i just needed to change the location and alignment...

  4. #4
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    OKay, i did some searching on the internet and figured it out, i removed the CSS coding from the Stylesheet, and also changed the coding in TPL_Header.php

    What was added;

    Code:
    		<div id="Facebook">
    		<div style="float:right; margin-top: -50px;"><a href="http://www.facebook.com/pages/Delights-of-the-Flesh/147018598659118?sk=wall"><img src="includes/templates/bdsm/images/facebook.gif" height="50"></a></div>
    		</div>
    Added after;

    Code:
    		<div id="menu">
    		  <div <?php echo $this_is_home_page ? ' class="current"' : ''; ?>><a href="index.php"><?php echo HEADER_TITLE_CATALOG; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_PRODUCTS_NEW) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'); ?>"><?php echo PAGE_PRODUCTS_NEW; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_SPECIALS) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_SPECIALS, '', 'NONSSL'); ?>"><?php echo BOX_HEADING_SPECIALS; ?></a></div>
    		  <div <?php echo (($current_page_base == FILENAME_ACCOUNT) or ($current_page_base == FILENAME_LOGIN) or ($current_page_base == FILENAME_LOGOFF)) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_CONTACT_US) ? ' class="current"' : ''; ?> style="margin:0;"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></div>
    		</div>
    so now looks like this;

    Code:
    		<div id="menu">
    		  <div <?php echo $this_is_home_page ? ' class="current"' : ''; ?>><a href="index.php"><?php echo HEADER_TITLE_CATALOG; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_PRODUCTS_NEW) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'); ?>"><?php echo PAGE_PRODUCTS_NEW; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_SPECIALS) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_SPECIALS, '', 'NONSSL'); ?>"><?php echo BOX_HEADING_SPECIALS; ?></a></div>
    		  <div <?php echo (($current_page_base == FILENAME_ACCOUNT) or ($current_page_base == FILENAME_LOGIN) or ($current_page_base == FILENAME_LOGOFF)) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></div>
    		  <div <?php echo ($current_page_base == FILENAME_CONTACT_US) ? ' class="current"' : ''; ?> style="margin:0;"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></div>
    		</div>
    		<div id="Facebook">
    		<div style="float:right; margin-top: -50px;"><a href="http://www.facebook.com/pages/Delights-of-the-Flesh/147018598659118?sk=wall"><img src="includes/templates/bdsm/images/facebook.gif" height="50"></a></div>
    		</div>

  5. #5
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    Now, how do i make it so that it opens in a new window instead of the old window ?

  6. #6
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    Del,
    Please try this:
    <div id="Facebook"> <div style="float:right; margin-top: -50px;"><a href="http://www.facebook.com/pages/Delights-of-the-Flesh/147018598659118?sk=wall"><img src="includes/templates/bdsm/images/facebook.gif" height="50"></a></div> </div>
    Change to this:
    <div id="Facebook">
    <div style="float:right; margin-top: -50px;"><a href="http://www.facebook.com/pages/Delights-of-the-Flesh/147018598659118?sk=wall" target="_blank"><img src="includes/templates/bdsm/images/facebook.gif" height="50"></a></div>
    </div>
    Notice the only change is the red font above...

  7. #7
    Join Date
    Apr 2011
    Location
    uk
    Posts
    6
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    Cant get this to work either! Must be my VPS set-up or something

  8. #8
    Join Date
    Sep 2008
    Posts
    431
    Plugin Contributions
    0

    Default Need Help Addding Facebook Like Image to Header

    As per the post found here:

    http://www.zen-cart.com/forum/showth...light=facebook

    I've got the code shown below:

    <div id="menu">
    <div <?php echo $this_is_home_page ? ' class="current"' : ''; ?>><a href="index.php"><?php echo HEADER_TITLE_CATALOG; ?></a></div>
    <div <?php echo ($current_page_base == FILENAME_PRODUCTS_NEW) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'); ?>"><?php echo PAGE_PRODUCTS_NEW; ?></a></div>
    <div <?php echo ($current_page_base == FILENAME_SPECIALS) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_SPECIALS, '', 'NONSSL'); ?>"><?php echo BOX_HEADING_SPECIALS; ?></a></div>
    <div <?php echo (($current_page_base == FILENAME_ACCOUNT) or ($current_page_base == FILENAME_LOGIN) or ($current_page_base == FILENAME_LOGOFF)) ? ' class="current"' : ''; ?>><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></div>
    <div <?php echo ($current_page_base == FILENAME_CONTACT_US) ? ' class="current"' : ''; ?> style="margin:0;"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></div>
    <div id="Facebook">
    <div style="float:right; margin-top: -50px;"><a href="http://www.facebook.com/pages/Redline-Engineering/105948549455532" target="_blank"><img src="/catalog/images/facebook_logo.png" height="55"></a></div>
    </div>

    That I think needs to be added to my tpl_header.php file in order to put a Facebook like image into my header. However, I don't know where to find this tpl_header.php file in my folder structure and I'm also not sure if this bit of code will do what I need. Does anyone know? Thanks in advance.

    Ian

  9. #9
    Join Date
    Aug 2008
    Location
    Southern California
    Posts
    129
    Plugin Contributions
    0

    Default Re: Need Help Addding Facebook Like Image to Header

    The location depends whether you're using the stock or custom template, but you should be able to find it quickly in one of these locations. A simple search on your computer for the filename should have pointed you in the right location...

    includes>templates>YOUR CUSTOM TEMPLATE>common>tpl_header.php
    or
    includes>templates>template_default>common>tpl_header.php

  10. #10
    Join Date
    Sep 2008
    Posts
    431
    Plugin Contributions
    0

    Default Re: Facebook and Like Button in Heading

    Ok, so I've implemented this to my test site http://examplecart.com/catalog/ and though the button is there and it works the outcome wasn't pretty. It threw everything off on the page. Does anyone know why? I'm not much when it comes to layouts.

    Ian

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Facebook like addon weird appearance on facebook activity
    By navido in forum General Questions
    Replies: 0
    Last Post: 7 Sep 2014, 06:34 PM
  2. v150 Help facebook like button not working anymore
    By dsimon55 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Jul 2013, 01:41 AM
  3. v151 facebook scraper/google linter can't find my urls with Numinix Facebook Like
    By flernebunu in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Mar 2013, 11:25 AM
  4. v139h Facebook Like Button no product image
    By explorer1979 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 May 2012, 11:09 AM
  5. Need help with header image/header area-Apple Zen
    By Samuz in forum Addon Templates
    Replies: 2
    Last Post: 9 Jul 2010, 12:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg