The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Toolbar: new icon set?

View previous topic View next topic Go down

Solved Toolbar: new icon set?

Post by troyeccles on September 7th 2014, 12:58 am

Hi!

Just noticed Forumotions new set of social networking icons above and was wondering if it's possible to use those in the Toolbar instead of the standard set? I can't see anything in the ACP that allows me to change these images.

Troy

troyeccles
Forumember

Posts : 239
Reputation : 5
Language : English

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by Ange Tuteur on September 7th 2014, 3:20 am

Hello troyeccles,

Are you wanting to replace these image links by your own, or create a new section on the toolbar ?


Thanks Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by troyeccles on September 7th 2014, 3:44 am

Hi,

I'd just like to replace the current set that are in the Forumotion toolbar at the top of the page with the new, funky ones.

troyeccles
Forumember

Posts : 239
Reputation : 5
Language : English

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by Ange Tuteur on September 7th 2014, 4:18 am

Go to Administration Panel > Modules > JavaScript codes management and create a new script

Title : Your choice
Placement : In all the pages
Paste the code below and submit :
Code:
$(function(){$(function(){
 var shareText = 'Social : ';
 addNetwork('http://illiweb.com/fa/prosilver/icon_contact_twitter.gif','http://www.twitter.com/#!/Forumotion');
 

 function addNetwork(image, url) {
  var i = document.createElement('IMG'), a = document.createElement('A'), share = document.getElementById('fa_share');
  if (document.getElementById('fa_share_text').className != 'fa_modified') share.innerHTML = '<span id="fa_share_text" class="fa_modified">'+shareText+'</span>';
  i.src = image;
  a.href = url;
  a.target = '_blank';
  a.className = 'fa_network';
  a.appendChild(i);
  share.appendChild(a);
 }
})});

Some stuff to modify :
shareText : The text that displays next to the icons. You can change this to whatever you wish.

To add a new network simply write addNetwork('image','url');

image : the URL of the image you want to display
url : the URL of the social network

an example is already provided in the script :
Code:
addNetwork('http://illiweb.com/fa/prosilver/icon_contact_twitter.gif','http://www.twitter.com/#!/Forumotion');

Lastly you can adjust the images with some CSS :
Display > Colors > CSS stylesheet
Code:
.fa_network { margin:0 2px; }

This will add a space between the images, but other styles can be added to it if you desire.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by troyeccles on September 7th 2014, 4:46 am

Great but it seems to have covered the formation link and search bar and looks odd.

Screenshot:


troyeccles
Forumember

Posts : 239
Reputation : 5
Language : English

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by Ange Tuteur on September 7th 2014, 4:56 am

Replace your CSS by :
Code:
.fa_network {
  margin:0 2px;
  max-height:30px;
  max-width:30px;
}

If the images are too large they will move the content down with them.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by troyeccles on September 7th 2014, 5:05 am

Sorted! Lovely.

Thank you.

troyeccles
Forumember

Posts : 239
Reputation : 5
Language : English

Back to top Go down

Solved Re: Toolbar: new icon set?

Post by Ange Tuteur on September 7th 2014, 5:07 am

No problem Wink

Topic archived

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum