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.

Logo Changer

View previous topic View next topic Go down

Solved Logo Changer

Post by Ghost Pirate on September 8th 2014, 4:51 pm

Hello FM Staff Hello
I like to make my logo change like this forum the logo changes every time you go to a different page and not the same logo on the same page it like randomly changing    
http://riftlakecichlids.forumotion.com/

Thanks for any help Wink
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 8th 2014, 11:05 pm

Hmm let me see bump like this (Help) must have been to early Razz
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by Ange Tuteur on September 8th 2014, 11:30 pm

Hello Fish Crazy,

You can bump your topics once every 24 hours. There are other members with questions as well. Wink

I was writing something up and testing it, here :
Modules > JavaScript codes management > Create a new script

Title : your choice
Placement : In all the pages
Code:
$(function() {
  var n=0,r,ready=false;
  
  addBanner('http://img837.imageshack.us/img837/7395/9p8p.png');
  
  function addBanner(image) {
    n+=1;
    var t=n,wait=window.setInterval(function() {
      if (ready==false) return;
      window.clearInterval(wait);
      if (r==t) document.getElementById('i_logo').src=image;
    },1);
  };
  r=Math.floor(Math.random()*n+1),ready=true;
});

To add a banner to the rotation, write addBanner('image'); with image being the URL of your image. I've already set an example in the script for you.
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 12:17 am

Did not know the bumping rule get it now 24Hour salut
Thanks for the code Ange Tuteur
oops just saw it, The rule #6 in the green it just to/so small for me to see wow may need to make it a little bigger for us older boys and girl to see.
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by SLGray on September 9th 2014, 1:08 am

Do you have JavaScript Management activated?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 1:08 am

Yes
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 1:11 am

Code:
$(function() {
  var n=0,r,ready=false;
 
  addBanner('http://img837.imageshack.us/img837/7395/9p8p.png');
 
  function addBanner(image) {
    n+=1;
    var t=n,wait=window.setInterval(function() {
      if (ready==false) return;
      window.clearInterval(wait);
      if (r==t) document.getElementById('i_logo').src=image;
    },1);
  };
  r=Math.floor(Math.random()*n+1),ready=true;

Have this to add is this the way to add the pics ?
addBanner('http://i39.servimg.com/u/f39/18/93/34/26/coolte19.png');
addBanner('http://i39.servimg.com/u/f39/18/93/34/26/coolte20.png');
addBanner('http://i39.servimg.com/u/f39/18/93/34/26/coolte22.png');
addBanner('http://i39.servimg.com/u/f39/18/93/34/26/coolte21.png');
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by SLGray on September 9th 2014, 1:19 am

I am seeing a different fish on the banner when I load a different page.  Clear your browser's cache.


Last edited by SLGray on September 9th 2014, 1:22 am; edited 1 time in total


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 1:21 am

avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by SLGray on September 9th 2014, 1:22 am

@SLGray wrote:I am seeing a different fish on the banner when I load a different page.  Clear your browser's cache.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Logo Changer

Post by Ange Tuteur on September 9th 2014, 2:17 am

FISH CRAZY wrote:it in my test forum http://aquariumphantasies.forumotion.com/ yes
Is that invision ? The script I wrote is for phpbb2, I went by the forum in your profil. Also I'm getting a syntax error from one of the scripts on the forum above. Not sure which one though, but it looks like one in all the pages.
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 2:36 am

The forum it is going on will be a phpbb2 will it also work on the phpbb3 I was just going to check it out in my test forum to see how it work and yes it a inv.
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by Ange Tuteur on September 9th 2014, 2:46 am

For phpbb3 use this :
Code:
$(function() {
  var n=0,r,ready=false;
 
  addBanner('http://img837.imageshack.us/img837/7395/9p8p.png');
 
  function addBanner(image) {
    n+=1;
    var t=n,wait=window.setInterval(function() {
      if (ready==false) return;
      window.clearInterval(wait);
      if (r==t) document.getElementById('logo').getElementsByTagName('IMG')[0].src=image;
    },1);
  };
  r=Math.floor(Math.random()*n+1),ready=true;
});

It might also work on invision too. From what I recall both bb3 and invision have similar structure.
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Logo Changer

Post by Ghost Pirate on September 9th 2014, 5:31 am

Thank You Ange Tuteur for making the codes :wouhou: works great héhé
Also thanks for helping to SLGray

byebye
avatar
Ghost Pirate
Forumember

Male Posts : 273
Reputation : 82
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Logo Changer

Post by Ange Tuteur on September 9th 2014, 8:15 am

You're welcome ^^

Topic archived
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
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