Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Requests
I have a userbar generator but it does not
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Stormy" data-source="post: 226482" data-attributes="member: 30951"><p>This is my code:</p><p> </p><p>[PHP]<html></p><p><head></p><p><title>m0nsta.'s Userbar Generator</title></p><p><style type="text/css"></p><p>body, input, select, textarea {</p><p> font-family: Verdana;</p><p> font-size: 11px;</p><p> color: black;</p><p> background-color: #cee5f7;</p><p> padding: 0;</p><p> margin: 0;</p><p>}</p><p>input, select, textarea {</p><p> border: 1px solid black;</p><p>}</p><p>label {</p><p> cursor: pointer;</p><p>}</p><p>a {</p><p> color: black;</p><p> text-decoration: none;</p><p>}</p><p>a:hover {</p><p> text-decoration: underline;</p><p> font-weight: bold;</p><p> color: black;</p><p>}</p><p>a:visited {</p><p> color: black;</p><p>}</p><p>fieldset {</p><p> align: center;</p><p> margin-left: auto;</p><p> margin-right: auto;</p><p> background-color: #E3EEF7;</p><p>}</p><p></style></p><p><script type="text/javascript"></p><p>function select(what){</p><p> document.getElementById(what).select();</p><p>}</p><p>function changeBase(base){</p><p> document["baseclr"].src = 'imagescreator/bars/'+base+'.png';</p><p>}</p><p>function htmlspecialchars(str) {</p><p> str = str.replace(/&/g, "and_sign");</p><p> str = str.replace(/"/g, "&quot;");</p><p> str = str.replace(/'/g, "&#039;");</p><p> str = str.replace(/</g, "&lt;");</p><p> str = str.replace(/>/g, "&gt;");</p><p> return str;</p><p>}</p><p>function makeBar(){</p><p> var base = document.getElementById("baseclr").value;</p><p> var text = htmlspecialchars(document.getElementById("text").value);</p><p> var tc = document.getElementById("tc").value;</p><p> var oc = document.getElementById("oc").value;</p><p> var icon = document.getElementById("selected_icon").value;</p><p> var barstring = base+'/'+tc+'-'+oc+'/'+icon+'/'+text;</p><p> var root = '<?php echo $_SERVER['SERVER_NAME']; ?><?php echo $_SERVER['REQUEST_URI']; ?>';</p><p> document["m0nsta_bar"].src = barstring;</p><p> document["m0nsta_bar_example"].style.display = 'none';</p><p> document.getElementById("html").value = '<img src="'+ root + barstring + '">';</p><p> document.getElementById("bb").value = '[img]'+ root + barstring + '[/img]';</p><p> document.getElementById("direct").value = root + barstring;</p><p> document.getElementById("result").style.display = 'block';</p><p>}</p><p>function changeIcon(nicon){</p><p> document.getElementById("theicon").value = nicon;</p><p>}</p><p></script></p><p></head></p><p> </p><p><body></p><p><center><h1>m0nsta.'s Userbar Generator</h1></center></p><p><fieldset style="width: 475px;"></p><p> <legend><strong>m0nsta.'s Userbar Generator</strong></legend></p><p> <form method="" action=""></p><p> <input type="hidden" name="theicon" value="none"></p><p> <label for="baseclr">Base colour:</label><br></p><p> <select name="baseclr" id="baseclr" onchange="changeBase(this.value);"></p><p> <option value="red">Red</option></p><p> <option value="blue">Blue</option></p><p> <option value="green">Green</option></p><p> <option value="grey">Grey</option></p><p> <option value="maroon">Maroon/Brown</option></p><p> <option value="orange">Orange</option></p><p> <option value="pink">Pink</option></p><p> <option value="turquoise">Turquoise</option></p><p> <option value="yellow">Yellow</option></p><p> </select> &raquo; <img src="imagescreator/bars/red.png" name="baseclr" id="baseclr"><br><br></p><p> </p><p> <label for="text">Text:</label><br></p><p> <input type="text" name="text" id="text" value="" size="76" maxlength="59"><br><br></p><p> </p><p> <label for="tc">Text Colour:</label><br></p><p> <select name="tc" id="tc"></p><p> <option value="black">Black</option></p><p> <option value="white" selected="selected">White</option></p><p> <option value="red">Red</option></p><p> <option value="blue">Blue</option></p><p> <option value="green">Green</option></p><p> <option value="grey">Grey</option></p><p> <option value="maroon">Maroon/Brown</option></p><p> <option value="orange">Orange</option></p><p> <option value="pink">Pink</option></p><p> <option value="turquoise">Turquoise</option></p><p> <option value="yellow">Yellow</option></p><p> </select><br><br></p><p> </p><p> <label for="oc">Text Outline Colour:</label><br></p><p> <select name="oc" id="oc"></p><p> <option value="black" selected="selected">Black</option></p><p> <option value="white">White</option></p><p> <option value="red">Red</option></p><p> <option value="blue">Blue</option></p><p> <option value="green">Green</option></p><p> <option value="grey">Grey</option></p><p> <option value="maroon">Maroon/Brown</option></p><p> <option value="orange">Orange</option></p><p> <option value="pink">Pink</option></p><p> <option value="turquoise">Turquoise</option></p><p> <option value="yellow">Yellow</option></p><p> </select><br><br></p><p> </p><p> <label>Icon:</label><br></p><p> <input type="text" name="selected_icon" id="selected_icon" value="none" style="display: none;"></p><p> <table width="100%"></p><p> <tr></p><p> <td></p><p> <input type="radio" id="none" onclick="document.getElementById('selected_icon').value = 'none';" name="icon" value="icon" checked> <label for="none">None</label></p><p> </td></p><p> <?php</p><p> for($i=1;$i<=89;$i++){</p><p> echo '<td><input type="radio" id="icon_'.$i.'" onclick="document.getElementById(\'selected_icon\').value = \''.$i.'\';" name="icon" value="'.$i.'"> <label for="icon_'.$i.'"><img src="imagescreator/icons/icon_'.$i.'.png"></label></td>';</p><p> if($i % 5 == 0){</p><p> echo '</tr><tr>';</p><p> }</p><p> }</p><p> ?></p><p> </tr></p><p> </table></p><p> </p><p> </p><p> <input type="button" name="create" value="Create Bar &raquo;" onclick="makeBar(selected_icon);"><br><br></p><p> </p><p> <img src="bar.php?base=red&text=this%20is%20an%20example!&tc=white&oc=black" name="m0nsta_bar_example" id="m0nsta_bar_example"></p><p> <div id="result" style="display: none;"></p><p> <img src="" name="m0nsta_bar" id="m0nsta_bar"><br><br></p><p> </p><p> <label for="direct">Direct Link:</label><br></p><p> <input type="text" name="direct" id="direct" onfocus="select(this);" value="" size="76"><br><br></p><p> </p><p> <label for="html">HTML Code:</label><br></p><p> <input type="text" name="html" id="html" onfocus="select(this);" value="" size="76"><br><br></p><p> </p><p> <label for="bb">BBCode:</label><br></p><p> <input type="text" name="bb" id="bb" onfocus="select(this);" value="" size="76"></p><p> </div></p><p> </form></p><p></fieldset></p><p></body></p><p></html>[/PHP]</p></blockquote><p></p>
[QUOTE="Stormy, post: 226482, member: 30951"] This is my code: [PHP]<html> <head> <title>m0nsta.'s Userbar Generator</title> <style type="text/css"> body, input, select, textarea { font-family: Verdana; font-size: 11px; color: black; background-color: #cee5f7; padding: 0; margin: 0; } input, select, textarea { border: 1px solid black; } label { cursor: pointer; } a { color: black; text-decoration: none; } a:hover { text-decoration: underline; font-weight: bold; color: black; } a:visited { color: black; } fieldset { align: center; margin-left: auto; margin-right: auto; background-color: #E3EEF7; } </style> <script type="text/javascript"> function select(what){ document.getElementById(what).select(); } function changeBase(base){ document["baseclr"].src = 'imagescreator/bars/'+base+'.png'; } function htmlspecialchars(str) { str = str.replace(/&/g, "and_sign"); str = str.replace(/"/g, """); str = str.replace(/'/g, "'"); str = str.replace(/</g, "<"); str = str.replace(/>/g, ">"); return str; } function makeBar(){ var base = document.getElementById("baseclr").value; var text = htmlspecialchars(document.getElementById("text").value); var tc = document.getElementById("tc").value; var oc = document.getElementById("oc").value; var icon = document.getElementById("selected_icon").value; var barstring = base+'/'+tc+'-'+oc+'/'+icon+'/'+text; var root = '<?php echo $_SERVER['SERVER_NAME']; ?><?php echo $_SERVER['REQUEST_URI']; ?>'; document["m0nsta_bar"].src = barstring; document["m0nsta_bar_example"].style.display = 'none'; document.getElementById("html").value = '<img src="'+ root + barstring + '">'; document.getElementById("bb").value = '[img]'+ root + barstring + '[/img]'; document.getElementById("direct").value = root + barstring; document.getElementById("result").style.display = 'block'; } function changeIcon(nicon){ document.getElementById("theicon").value = nicon; } </script> </head> <body> <center><h1>m0nsta.'s Userbar Generator</h1></center> <fieldset style="width: 475px;"> <legend><strong>m0nsta.'s Userbar Generator</strong></legend> <form method="" action=""> <input type="hidden" name="theicon" value="none"> <label for="baseclr">Base colour:</label><br> <select name="baseclr" id="baseclr" onchange="changeBase(this.value);"> <option value="red">Red</option> <option value="blue">Blue</option> <option value="green">Green</option> <option value="grey">Grey</option> <option value="maroon">Maroon/Brown</option> <option value="orange">Orange</option> <option value="pink">Pink</option> <option value="turquoise">Turquoise</option> <option value="yellow">Yellow</option> </select> » <img src="imagescreator/bars/red.png" name="baseclr" id="baseclr"><br><br> <label for="text">Text:</label><br> <input type="text" name="text" id="text" value="" size="76" maxlength="59"><br><br> <label for="tc">Text Colour:</label><br> <select name="tc" id="tc"> <option value="black">Black</option> <option value="white" selected="selected">White</option> <option value="red">Red</option> <option value="blue">Blue</option> <option value="green">Green</option> <option value="grey">Grey</option> <option value="maroon">Maroon/Brown</option> <option value="orange">Orange</option> <option value="pink">Pink</option> <option value="turquoise">Turquoise</option> <option value="yellow">Yellow</option> </select><br><br> <label for="oc">Text Outline Colour:</label><br> <select name="oc" id="oc"> <option value="black" selected="selected">Black</option> <option value="white">White</option> <option value="red">Red</option> <option value="blue">Blue</option> <option value="green">Green</option> <option value="grey">Grey</option> <option value="maroon">Maroon/Brown</option> <option value="orange">Orange</option> <option value="pink">Pink</option> <option value="turquoise">Turquoise</option> <option value="yellow">Yellow</option> </select><br><br> <label>Icon:</label><br> <input type="text" name="selected_icon" id="selected_icon" value="none" style="display: none;"> <table width="100%"> <tr> <td> <input type="radio" id="none" onclick="document.getElementById('selected_icon').value = 'none';" name="icon" value="icon" checked> <label for="none">None</label> </td> <?php for($i=1;$i<=89;$i++){ echo '<td><input type="radio" id="icon_'.$i.'" onclick="document.getElementById(\'selected_icon\').value = \''.$i.'\';" name="icon" value="'.$i.'"> <label for="icon_'.$i.'"><img src="imagescreator/icons/icon_'.$i.'.png"></label></td>'; if($i % 5 == 0){ echo '</tr><tr>'; } } ?> </tr> </table> <input type="button" name="create" value="Create Bar »" onclick="makeBar(selected_icon);"><br><br> <img src="bar.php?base=red&text=this%20is%20an%20example!&tc=white&oc=black" name="m0nsta_bar_example" id="m0nsta_bar_example"> <div id="result" style="display: none;"> <img src="" name="m0nsta_bar" id="m0nsta_bar"><br><br> <label for="direct">Direct Link:</label><br> <input type="text" name="direct" id="direct" onfocus="select(this);" value="" size="76"><br><br> <label for="html">HTML Code:</label><br> <input type="text" name="html" id="html" onfocus="select(this);" value="" size="76"><br><br> <label for="bb">BBCode:</label><br> <input type="text" name="bb" id="bb" onfocus="select(this);" value="" size="76"> </div> </form> </fieldset> </body> </html>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Requests
I have a userbar generator but it does not
Top