Log in to check your private messages 
Username: Password:   
  howtodoit.myfastforum.org
  Walkthough guides for myfreeforum phpbb 2 forums
Index  FAQ  Search  Memberlist  Usergroups  Profile

Text
Text
Friends
MYFF Support Forum
HOWTODOIT (PHPbb3)
portalogy
CGArts
ANNOUNCEMENTS
Complete List of templates Available
Please Read First Before Editing your template
Permissions
Admin Index
Sticky Articles
Latest Posts
Friends

Start | Stop
Color Bar Mod
Jump to:  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfastforum.org Forum Index » Add-on`s for your forum
Author Message
Symon
Guide Legend
Guide Legend



Joined: 11 Jun 2006
Posts: 911


Location: Berkshire,England
FLAGS
Add Comment
Show Comments
PostPosted: Mon Dec 25, 2006 11:40 pm  Reply with quote

###############################
#Javascript Color Bar Mod
#Information: Adds a color bar in the posting body, Adds in the apprioate HTML color code for that color
###############################
#Edited And Coded by- BlakeLives0312
#Guide- Codyt07
###############################
#Please remember to back up your template, and use "editor".
###############################
#Prevew image of final result

Click to see full size image
###############################
Step 1) Open posting_body.tpl

Step 2)Find near bottom of page
Code:
<td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
            </tr>
           </table>
         </td>
        </tr>


Step 3)After Add
Code:
 <SCRIPT language=JavaScript>
// Made by mat <mat100_at_ifrance.com> and updated by Ronak Bhatia <www.goons.tk> and <goonstk@yahoo.com>
var height1 = 10;//define the height of the color bar
var pas = 28;// define the number of color in the color bar
var width1=Math.floor(-2/15*pas+6);//define the width of the color bar here automatic ajust for subsilver template.
var text1=s_help.substring(0,search(s_help,"="));
var text2=s_help.substring(search(s_help,"]"),search(s_help,"/"));
var base_hexa = "0123456789ABCDEF";
function dec2Hexa(number) {
return base_hexa.charAt(Math.floor(number / 16)) + base_hexa.charAt(number % 16);
}

function RGB2Hexa(TR,TG,TB) {
return "#" + dec2Hexa(TR) + dec2Hexa(TG) + dec2Hexa(TB);
}

col = new Array;
col[0] = new Array(255,0,255,0,255,-1);
col[1] = new Array(255,-1,255,0,0,0);
col[2] = new Array(0,0,255,0,0,1);
col[3] = new Array(0,0,255,-1,255,0);
col[4] = new Array(0,1,0,0,255,0);
col[5] = new Array(255,0,0,0,255,-1);
col[6] = new Array(255,-1,0,0,0,0);

function rgb(pas,w,h,text1,text2) {
init();
for (j=0;j<6+1;j++) {
for (i=0;i<pas+1;i++) {
r = Math.floor(col[j][0]+col[j][1]*i*(255)/pas);
g = Math.floor(col[j][2]+col[j][3]*i*(255)/pas);
b = Math.floor(col[j][4]+col[j][5]*i*(255)/pas);
codehex = r + '' + g + '' + b;
document.write('<td bgColor=\"' + RGB2Hexa(r,g,b) + '\"'
+ 'onClick=\"bbfontstyle(\'[color=\' + this.bgColor + \']\',\'[/color]\');document.getElementById(\'colorused\').bgColor = this.bgColor;\" '
+ 'onmouseover=\"document.getElementById(\'colorused1\').bgColor = this.bgColor;this.style.cursor=\'pointer\'\" '
+ 'title=\"'+text1+ RGB2Hexa(r,g,b) + ']'+text2+'color]\" '
+ 'width=\"'+w+'\" height=\"'+h+'\">');
if (is_ie)
document.write('');
document.writeln('</td>');
}
}
}

function search(text,caract) {
for(i=0;i<text.length;i++) {
if (caract == text.substring(i,i+1))
return i+1;
}
}

function init() {
images = document.getElementsByName("color_bar");
for (var i = 0; i < images.length; i++)
images[i].height=height1;
}
</SCRIPT>
<SCRIPT language=JavaScript>
var height1 = 10;//define the height of the color bar
var pas = 60;// define the number of color in the color bar
var text1="Font color: Syntax : ";
var text2="text";
</SCRIPT>
<TR>
<TD colSpan=12>
<TABLE id=ColorPanel cellSpacing=0 cellPadding=0 align=left
border=0>
<TBODY>
<TR>
<TD id=ColorUsed onmouseover="helpline('s')"
onclick="if(this.bgColor.length > 0) bbfontstyle('[color=' + this.bgColor + ']', '[/color]')"
vAlign=center align=middle ridge? 2px BORDER-BOTTOM:
default; CURSOR: ridge; BORDER-LEFT: BORDER-TOP:
BORDER-RIGHT:>
<SCRIPT language=JavaScript>
<!--
rgb(pas,2,height1,text1,text2)
// -->
</SCRIPT>
</TR></TBODY></TABLE></TD></TR>


View user's profile Send private message Visit poster's website FACEBOOKSTEAM
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfastforum.org Forum Index » Add-on`s for your forum


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

HOWTODOIT was designed and built by Symon Field
Creator Of ☆ ☆ FunnyWorld
HOWTODOIT© Symon Field 2006,2007,2008

Powered by phpBB Group © 2001,2005.
 
Create your own free forum | Buy a domain to use with your forum