Joined: Mar 2009 Gender: Male Posts: 2,594 Location: MI, USA Karma: 102
Re: Add Menu Buttons « Reply #16 on Apr 6, 2012, 1:01am »
Nice idea for a code Pebble! I'd like to see you add a couple more options to this. 1) Option to add the link to ALL skins. Maybe "-1" for the skinid? 2) Expanding on #1, ability to use the same line for multiple skinids. 3) Option to use text links for forums that use text menus. We'll keep in touch bro!
Pebble Code Helper IOD Supporter member is offline
Joined: Mar 2011 Gender: Male Posts: 1,180 Location: Here & There Karma: 155
Re: Add Menu Buttons « Reply #20 on Apr 14, 2012, 5:32am »
Hi Speed, Is it one extra button you want to open in a new window ? Or all extra buttons ? I have another slight mod to do to the code so I could do this one at the same time.
EDIT: I'm going to put it in as a choice in the vars. Soon as I get some free time (super busy at the moment) I'll update this code with the added option.
Hi Speed, Is it one extra button you want to open in a new window ? Or all extra buttons ? I have another slight mod to do to the code so I could do this one at the same time.
EDIT: I'm going to put it in as a choice in the vars. Soon as I get some free time (super busy at the moment) I'll update this code with the added option.
Cheers Pebble All of them yes a choice for those that do not want to it would be great!!!
PS Check your skype requests it you already have'nt
Pebble Code Helper IOD Supporter member is offline
Joined: Mar 2011 Gender: Male Posts: 1,180 Location: Here & There Karma: 155
Re: Add Menu Buttons « Reply #22 on Apr 15, 2012, 4:30pm »
Give this a whirl Speed, You need to add one of these to the end of the var statements: (they are already in the vars in this code so just change them, or add , '_blank' to the end of each var you already have and replace the code section.
_blank : Opens in a new window or tab _self : Opens in the same window or tab as it was clicked _parent : Opens in the parent frame _top : Opens in the full body of the window
Code:
<script type="text/javascript"> /* Extra buttons If Guest And If Skin */ /* Written By Pebble - DO NOT REPOST */ /* [ skinid , guest viewable =1/not guest viewable = 0 , 'url to button destination' , 'url to image source' , 'hover text','window open'] , */ /* example: [1,1,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png','http://i1136.p hotobucket.com/albums/n494/pebbleleague/menubuttons2/5members_off.png','TESTEROOONY','_blank'] , */
var eb=[ ['0',1,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png','http://i1136 .photobucket.com/albums/n494/pebbleleague/headerGlobal.png','99er','_blank'] , ['1|3|4',1,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png', 'http://i1136.photobucket.com/albums/n494/pebbleleague/headerMain.png','TEST','_self'] , ['2',1,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png', 'http://i1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/5members_off.png','TESTEROOONY','_parent'] , ['2',1,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png', 'http://i1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/5members_off.png','TESTEROOONY','_top'] , ['1',0,'http://s1136.photobucket.com/albums/n494/pebbleleague/menubuttons2/?action=view¤t=5members_off.png', 'EXTRA TEXT BUTTON','TESTEROOONY','_blank'] ];
/* DON'T TOUCH BELOW HERE */ for (var i=0;i<eb.length;i++){ var sV = new RegExp("^"+eb[i][0]+"$","g"), lI='<a href="'+eb[i][2]+'target="'+eb[i][5]+'">'; if (sV.test(pb_skinid)||eb[i][0]==0){ if((pb_username!=="Guest")||((pb_username=="Guest")&&(eb[i][1]==1))){ var patt=/http/g; if (patt.test(eb[i][3])){lI+= '<img src="'+eb[i][3]+'" border="0" alt="'+eb[i][4]+'" /></a> '} else {lI+=eb[i][3]+'</a> '}; document.getElementsByTagName("font" )[3].innerHTML+=lI; }}} </script>
Speed Moderator v5 Theme Support member is offline
The Vortex
Joined: Apr 2011 Gender: Male Posts: 5,571 Location: In The Vortex Of IOD Karma: 215
Re: Add Menu Buttons « Reply #24 on Apr 17, 2012, 2:42pm »
Pebble the code doesnt seem to be working, it wont go to a new tab and also it wont go to the web site. You might want to check the links in the code as I did, something doesnt seem right. Speed when one clicks on the "extra text button"
this is what comes up:
The action that you were trying to perform has failed.
Speed Moderator v5 Theme Support member is offline
The Vortex
Joined: Apr 2011 Gender: Male Posts: 5,571 Location: In The Vortex Of IOD Karma: 215
Re: Add Menu Buttons « Reply #25 on Apr 17, 2012, 2:56pm »
Ok, just as a suggestion so I can put it through the loops how about adding a few common web sites such as google ect... to the list replacing a couple of the ones you have now and put them at 1,0 sound like a plan?