Post by cozzienz » Mon Mar 19, 2012 3:35 pm

Hi all,

I would like to add the following social networking buttons linked to my social networking URLS as the target in a new window when clicked.

Please see attached screen shot for example.
Index.jpg

Index.jpg (91.02 KiB) Viewed 1782 times

I have done the following but am unsure how to process from here as trying previously wipped my header completely. as you will see below i have not added code for RSS feed as this is yet to be set up with a module but would still like the button there with referrence how to link to later once RSS is setup.

All images have been added to file path as stated in Header.tpl
and thats where it all goes wrong. can someone tell me where i am going wrong

Added to botton of Stylesheet.css:

Code: Select all

/* Share Buttons */
#share {
	position: absolute;
	top: 88px;
	right: 328px;
	float: left;	
	width: 210px;
	height: 30px;
	text-align: center;
	z-index: 8;
}
#share .twitter{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/twitter.gif') ;
  float: left;
}
#share .facebook{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/facebook.gif') ;
  float: left;
}
#share .myspace{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/myspace.gif') ;
  float: left;
}
#share .linkedin{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/linkedin.gif') ;
  float: left;
}
#share .youtube{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/youtube.gif') ;
  float: left;
}
#share .blogger{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/blogger.gif') ;
  float: left;
}
#share .rss{
  display: block;
  width: 30px;
  height: 30px;
  margin-left:0px;
  background: url('../image/rss.gif') ;
  float: left;
}
#share .twitter:hover, 
#share .facebook:hover, 
#share .myspace:hover, 
#share .linkedin:hover, 
#share .youtube:hover, 
#share .blogger:hover, 
#share .rss:hover
{ 
  background-position: 0 -30px;
}
Added to template/common/header.tpl:
( Before)<div id="top_links">
<div id="welcome">

Code: Select all

<div id="share">
		<a class="twitter" title="twitter" href="https://twitter.com/#!/Cozziemo"></a>
		<a class="facebook" title="facebook" href="http://www.facebook.com/profile.php?id=119152818198860"></a>
		<a class="myspace" title="myspace" href="http://www.myspace.com/576330104"></a> 
		<a class="linkedin" title="linkedin" href="http://nz.linkedin.com/pub/cozziemo-motorsport/43/984/3a2"></a> 
		<a class="youtube" title="youtube" href="http://www.youtube.com/user/CozziemoMotorsport"></a>
		<a class="blogger" title="blogger" href="http://cozziemomotorsport.blogspot.com/"></a>
    </div>

User avatar
Active Member

Posts

Joined
Sun May 15, 2011 11:13 am

Post by qahar » Mon Mar 19, 2012 4:56 pm

It's much easier to help if you provide link to the site.

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by cozzienz » Tue Mar 20, 2012 3:46 am


User avatar
Active Member

Posts

Joined
Sun May 15, 2011 11:13 am

Post by qahar » Tue Mar 20, 2012 10:24 pm

I can't find <div id="share">...</div> on your site, are you sure you modificate the correct header.tpl ?

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by Maansy » Wed Mar 21, 2012 4:18 am

qahar wrote:I can't find <div id="share">...</div> on your site, are you sure you modificate the correct header.tpl ?
That's because he is reffering to The coding we use in our template design.
We use I'd=share to place social network buttons in.

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by cozzienz » Wed Mar 21, 2012 6:33 am

Icons has been successfully uploaded to site via header.tpl and stylesheet.css
dont know why it was going all wrong for me before, just all of a sudden worked ??? .

i still would like to know how to position them how i have shown in Screen Shot and the appropriate path to enter for rss

User avatar
Active Member

Posts

Joined
Sun May 15, 2011 11:13 am

Post by ocdictor » Wed Mar 21, 2012 6:04 pm

Here is an example.

header.tpl

Code: Select all

        <ul class="list-services">
            <li class="first"><a class="tooltips" title="twitter" href="twitter.com"></a></li>
            <li class="second"><a class="tooltips" title="facebook" href="facebook.com"></a></li>
            <li class="third"><a class="tooltips" title="google pluse" href="plus.google.com"></a></li>
            <li class="four"><a class="tooltips" title="yuotube" href="youtube.com"></a></li>
      </ul>
stylesheet.css

Code: Select all


.list-services {
    position: absolute;
    right: 249px;
    top: 76px;
}

.list-services li {
    float: left;
    padding-right: 5px;
}

.list-services li.first a {
    background: url("../image/twitter.png") no-repeat scroll 0 0 transparent;
}

What's the difference between the OpenCart Templates and Prestashop Themes?


Newbie

Posts

Joined
Tue Mar 13, 2012 4:01 pm

Post by brian1999 » Thu Mar 22, 2012 8:38 am

ImageHere is an example.

Newbie

Posts

Joined
Fri Mar 16, 2012 9:01 pm

Post by cozzienz » Thu Mar 22, 2012 9:50 am

Do not quite understand your example as you have used <li> in your code which is used in ordered and unordered lists.

Issue has been solved by altering position for each icon in stylesheet.css

User avatar
Active Member

Posts

Joined
Sun May 15, 2011 11:13 am
Who is online

Users browsing this forum: No registered users and 7 guests