
wrx
Members-
Posts
212 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by wrx
-
i agree it is clean and organized [mp]24[/mp]
-
i have been getting requests for these template files ... Download links are in the first post......... Also check out the marketplace World War theme design is located in the Marketplace>Freebies Section [mp]24[/mp]
-
keep all your css or links to css within your <head> </head> in your header.php <head> <link rel='stylesheet' href='css/screen.css' type='text/css' media='screen' /> <!--[if lt IE 7]> <link rel='stylesheet' href='css/screen_ie.css' type='text/css' media='screen' /> <![endif]--> <link type='text/css' href='../themes/vista/jx.stylesheet.css' rel='stylesheet' /> <script type='text/javascript' src='../jquery-1.3.2.min.js'></script> <script type='text/javascript' src='../src/jixedbar-0.0.2.js'></script> <script type='text/javascript'> $(document).ready(function() { $('#demo-bar').jixedbar({ hoverOpaque: true, roundedCorners: true }); }); </script> </head> using css to detect IE browsers will make this work in all browers. that site has what it takes to make this work. thats what i used and it works great its a nice static bar cool features
-
this works in IE
-
yea that's why i uploaded my source with the .jpegs the source image can be scaled skewed sized anyway he would like to make it fit if he wishes to use
-
Use the GD Library to build a dynamic chart graphic
wrx replied to wrx's topic in Free Modifications
tried to duplicate your error but was unable :( pointed it at my users money table here's my result and query info $is=mysql_query("SELECT * FROM users ORDER BY username ASC LIMIT 23",$c); // users $strData = '$data=array('; While ($r=mysql_fetch_array($is)) //users { $strData .= "\"" . $r['username'] . "\"" . ' => ' . $r['money'] . ','; } $strData .= ');'; eval($strData); sleep allways helps ;) -
Use the GD Library to build a dynamic chart graphic
wrx replied to wrx's topic in Free Modifications
your trying to pull x=username table and y=money table ? try username table and userID just to verify ... my guess would be that the money might be a large amount and is throwing this value off ... ill try this myself with the user money table shortly -
Use the GD Library to build a dynamic chart graphic
wrx replied to wrx's topic in Free Modifications
ty sir , just offering something hopefully usefull to the community 8) I agree that looks like the problem.... also if you are having problems creating images simply run it with the db connections commented out to make sure your install will support the code Most Do but still an easy way to troubleshoot the GD functions of the code ============================================================ ////Build Chart from Static data to test GD Library $data = array( "Stock1" => 44,"Stock2" => 54,"Stock3" => 34,"Stock4" => 24,"Stock5" => 64,); /// example static chart data reference top post for more detail on this.. hope this helps -
source arrows png source .png
-
this looks promising GJ getting a timezone error in header i cant figure out . ill look again
-
This is usefull :) bookmarked just poking around the forums you can find the darndest things here
-
Gang themed template complete with jpgs,png,and css. Login and registraion pages setup with default mccodes forms v1 ( not sure what you use but this would be easy to edit to your likings/game source) Gang template (login.php,register.php,contact.php,about.php,style.css)
-
Use the GD Library to build a dynamic chart graphic
wrx replied to wrx's topic in Free Modifications
your data connection is commented out. you should be able to chart your trend if your storing in in the databse x=tickTIME y= stockPRICE did you get any image generated at all ? -
Use the GD Library to build a dynamic chart graphic
wrx replied to wrx's topic in Free Modifications
heres an example of the above code pointing at the user table -
This could be used for any data you chose as (example chart users with most kills,rank,level,etc... have fun with it) the example below charts the stockmarket The following code will build a .gif or .png image of your stock market on the fly with the ability to call it when needed on any page. example image created from in game stockmarket to call the image in your page !! Yes your src image is "stockchart.php" echo"[img=stockchart.php]"; create file stockchart.php <?php /* -- stockchart.php */ ////Build Chart from Static data to test GD Library $data = array( "Stock1" => 44,"Stock2" => 54,"Stock3" => 34,"Stock4" => 24,"Stock5" => 64,); /// example data to build a static image /* ///////Build Chart from DB stocks !! if used comment above include "mysql.php"; $q=mysql_query("SELECT * FROM stock ORDER BY stNAME ASC LIMIT 6",$c); $strData = '$data=array('; While ($r=mysql_fetch_array($q)) { $strData .= "\"" . $r['stNAME'] . "\"" . ' => ' . $r['stCOST'] . ','; } $strData .= ');'; eval($strData); */ ////End Stock Data ////Build Chart from Static data to test GD Library //$data = array( "Stock1" => 44,"Stock2" => 54,"Stock3" => 34,"Stock4" => 24,"Stock5" => 64,); /// example data to build a static image // create image $width = 480; $height = 250; $image = imagecreate($width, $height); // colors $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); $navy = imagecolorallocate($image, 0x00, 0x00, 0x80); $black = imagecolorallocate($image, 0x00, 0x00, 0x00); $gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0); // layout $maxval = max($data); $nval = sizeof($data); $vmargin = 20; // top (bottom) vertical margin for title (x-labels) $hmargin = 38; // left horizontal margin for y-labels $base = floor(($width - $hmargin) / $nval); // distance between columns $ysize = $height - 2 * $vmargin; // y-size of plot $xsize = $nval * $base; // x-size of plot // title $titlefont = 3; $title = "Current Stock Price (in dollars)"; $txtsz = imagefontwidth($titlefont) * strlen($title); // pixel-width of title $xpos = (int)($hmargin + ($xsize - $txtsz)/2); // center the title $xpos = max(1, $xpos); // force positive coordinates $ypos = 3; // distance from top imagestring($image, $titlefont, $xpos, $ypos, $title , $black); // y labels and grid lines $labelfont = 2; $ngrid = 4; // number of grid lines $dydat = $maxval / $ngrid; // data units between grid lines $dypix = $ysize / ($ngrid + 1); // pixels between grid lines for ($i = 0; $i <= ($ngrid + 1); $i++) { // iterate over y ticks // height of grid line in units of data $ydat = (int)($i * $dydat); // height of grid line in pixels $ypos = $vmargin + $ysize - (int)($i*$dypix); $txtsz = imagefontwidth($labelfont) * strlen($ydat); // pixel-width of label $txtht = imagefontheight($labelfont); // pixel-height of label $xpos = (int)(($hmargin - $txtsz) / 2); $xpos = max(1, $xpos); imagestring($image, $labelfont, $xpos, $ypos - (int)($txtht/2), $ydat, $black); if (!($i == 0) && !($i > $ngrid)) { imageline($image, $hmargin - 3, $ypos, $hmargin + $xsize, $ypos, $gray); // don't draw at Y=0 and top } } // columns and x labels $padding = 3; // half of spacing between columns $yscale = $ysize / (($ngrid+1) * $dydat); // pixels per data unit for ($i = 0; list($xval, $yval) = each($data); $i++) { // vertical columns $ymax = $vmargin + $ysize; $ymin = $ymax - (int)($yval*$yscale); $xmax = $hmargin + ($i+1)*$base - $padding; $xmin = $hmargin + $i*$base + $padding; imagefilledrectangle($image, $xmin, $ymin, $xmax, $ymax, $navy); // x labels $txtsz = imagefontwidth($labelfont) * strlen($xval); $xpos = $xmin + (int)(($base - $txtsz) / 2); $xpos = max($xmin, $xpos); $ypos = $ymax + 3; // distance from x axis imagestring($image, $labelfont, $xpos, $ypos, $xval, $black); } // plot frame imagerectangle($image, $hmargin, $vmargin, $hmargin + $xsize, $vmargin + $ysize, $black); // flush image header("Content-type: image/gif"); // or "Content-type: image/png" imagegif($image); // or imagepng($image) imagedestroy($image); ?> i would reccomend using the first option to test for the GD library ////Build Chart from Static data to test GD Library $data = array( "Stock1" => 44,"Stock2" => 54,"Stock3" => 34,"Stock4" => 24,"Stock5" => 64,); /// example data to build a static image once that is verified comment the above and use (edit this of course to pull your stock tables) //////Build Chart from DB stocks include "mysql.php"; $q=mysql_query("SELECT * FROM stock ORDER BY stNAME ASC LIMIT 6",$c); $strData = '$data=array('; While ($r=mysql_fetch_array($q)) { $strData .= "\"" . $r['stNAME'] . "\"" . ' => ' . $r['stCOST'] . ','; } $strData .= ');'; eval($strData); ////End Stock Data Any questions just ask ;) wrx
-
I wanted this functionality for my newspaper and thought others might find it usefull What is it ? Function to display RSS feeds in your game newspaper / or any where on your site. Why ? Some games have a main site for news, game updates,etc... that users might not visit regularly since they most likely bookmark the game link and come directly to the login page missing any site news /content.Grabbiing this data and displaying it in your in game newspaper will increase the chance of getting game news and updates to your users attention. create file sitenews.php <?php function getFeed($feed_url, $posts_to_show) { try { $content = file_get_contents($feed_url); $x = new SimpleXmlElement($content); echo ""; $i = 0; while ($i < $posts_to_show){ echo "<font id='content'><a href=\"" . $x->channel->item[$i]->link . "\" title=\"" . $x->channel->item[$i]->title . "\" target=\"_blank\">" . $x->channel->item[$i]->title . "</a> ".$x->channel->item[$i]->pubDate ." ".$x->channel->item[$i]->category ." ".$x->channel->item[$i]->description ."</font> "; $i++; } echo " "; } catch (Exception $e) { echo " The blog feed doesn't seem to be available at the moment...</p>"; } } getFeed("http://www.yourdomain.com/?feed=rss2", 5); ?> add in any file you want to want to display your feed (newspaper.php,loggedin.php,etc....) include "sitenews.php"; =================================================================== note getFeed("http://www.yourdomain.com/?feed=rss2", 5); getFeed("http://www.yourdomain.com/?feed=rss2" - is your feed address your grabbing ( this can also be any valid feed address you might want to grab) , 5 - is the number of posts to pull
-
<center><body onload="getme();">[img=login-logo.png] for future reference keep your formatting tags within the body tag <body onload="getme();"><center>[img=login-logo.png] There is no need in the following to keep calling the print function it can be called once print "<h3>>Souless Warriors Log-In</h3> <table align='left'><td background='login-bk.png'><font size='13'>Login</font> "; print "<form action=authenticate.php method=post name=login onsubmit=\"return saveme();\"> Username: <input type=text name=username> Password: <input type=password name=password> Remember me? <input type=\"radio\" value=\"ON\" name=\"save\">Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked>No <input type=submit value=Submit></form></td></tr></table>"; print " <table><td background='Description-bk.png'><font size='13'>Description</font> "; print "Welcome to Souless Destroyers... Once you enter theres no backing out... you lose your soul but can you keep your mind... When the battle begins where is the end... <font size='4'> no-where...</font>no-where...</font><font size='1'>no-where...</font></td></table> "; print "<table><td background='login-copy.png'>[url='register.php']REGISTER NOW![/url] [i]Powered by codes made by Dabomstew. Copyright © 2010 Coly010[/i]</td></table>"; print " <table align='left'><td background='login-register-bk.png'> [url='register.php'] Register[/url] [url='grules.php'] Game Rules[/url] [url='story.php'] Story[/url] [url='s-shots.php'] Screenshots[/url] </td></table>"; print "</body></center></html>"; can be print "<h3>>Souless Warriors Log-In</h3> <table align='left'><td background='login-bk.png'><font size='13'>Login</font> <form action=authenticate.php method=post name=login onsubmit='return saveme();'> Username: <input type=text name=username> Password: <input type=password name=password> Remember me? <input type='radio' value='ON' name='save'>Yes <input type='radio' name='save' value='OFF' checked>No <input type=submit value=Submit></form></td></tr></table> <table><td background='Description-bk.png'><font size='13'>Description</font> Welcome to Souless Destroyers... Once you enter theres no backing out... you lose your soul but can you keep your mind... When the battle begins where is the end... <font size='4'> no-where...</font>no-where...</font><font size='1'>no-where...</font></td></table> <table><td background='login-copy.png'>[url='register.php']REGISTER NOW![/url] [i]Powered by codes made by Dabomstew. Copyright © 2010 Coly010[/i]</td></table> <table align='left'><td background='login-register-bk.png'> [url='register.php'] Register[/url] [url='grules.php'] Game Rules[/url] [url='story.php'] Story[/url] [url='s-shots.php'] Screenshots[/url] </td></table> </body></center></html>"; not nitpicking here just trying to help .. GJ keep at it 8) here is my quick attempt on your soulless warrior theme logo
-
thanks for the comments :) PM me ill help if i can
-
The following files will change the ingame style to match with the above template the image below displays the new ingame header. 1. Download the Header images package that matches the above template 2. Copy and replace header.php,mainmenu.php.default.css with existing game files ================================================================== War Header Download > Header Images =================================================================== Lycan Header Download > Header Images =================================================================== header.php <?php class headers { function startheaders() { global $ir; print "<html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <title></title> <meta name='keywords' content='' /> <meta name='description' content='' /> <link href='default.css' rel='stylesheet' type='text/css' /> </head>" ; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $c,$userid; $IP = $_SERVER['REMOTE_ADDR']; if((isset($_SESSION['userAgent'])) && sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION['userAgent']) { session_unset(); session_destroy(); header('Location: login.php'); } else { $_SESSION['userAgent'] = sha1($_SERVER['HTTP_USER_AGENT']); } mysql_query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid",$c); if(!$ir['email']) { die ("<body>Your account may be broken. Please mail [email][email protected][/email] stating your username and player ID."); } if($dosessh && $_SESSION['attacking']) { print "You lost all your EXP for running from the fight."; mysql_query("UPDATE users SET exp=0 WHERE userid=$userid",$c); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color='#CC0000'>{$ir['username']}</font>";$d="[img=donator.gif]"; } if($ir['gang']) { $qg=mysql_query("SELECT * FROM gangs WHERE gangID={$ir['gang']}",$c); $rr=mysql_fetch_array($qg); $gn=$rr['gangPREF'].""; } else { $gn=""; } print "<body> <div id='header'> <div id=menu> <table align=right bgcolor='#000000' border=0 width=100%><tr> <td align='right' valign='center'> <table border='0'> <tr><td>[url='#']My Profile[/url]</td></tr> <tr><td>[url='#']Donate[/url]</td></tr> <tr><td>[url='#']Vote For Us[/url]</td></tr> </table> </td> <td align='right' valign='center'> <table border='1'> <tr><td> Name: $gn{$u} [{$ir['userid']}] $d</td></tr> <tr><td> Money: {$fm}</td></tr> <tr><td> Crystals: {$ir['crystals']}</td></tr> </table> </td> <td align='right' valign='center'> <table border='1'> <tr><td colspan='2'> Level: {$ir['level']}</td></tr> <tr><td> EXP: {$experc}%</td> <td><img src=expbg.gif width=$experc height=7><img src=barred.gif width=$exopp height=7></td></tr> <tr><td> Health: {$hpperc}%</td> <td><img src=healthbg.gif width=$hpperc height=7><img src=barred.gif width=$hpopp height=7></td></tr> </table> </td> <td align='center' valign='center'> <table border='1' > <tr><td> Energy: {$enperc}%</td> <td><img src=energybg.gif width=$enperc height=7><img src=barred.gif width=$enopp height=7></td></tr> <tr><td> Will:{$wiperc}%</td> <td><img src=willbg.gif width=$wiperc height=7><img src=barred.gif width=$wiopp height=7></td></tr> <tr><td> Brave: {$ir['brave']}/{$ir['maxbrave']}</td> <td><img src=awakebg.gif width=$brperc height=7><img src=barred.gif width=$bropp height=7></td></tr> </table> </td> </tr> </table> <table bgcolor='#000000' border=0 width=100%><tr><td align='left'>[b]Current Time ::[/b]<font color='#CC0000'>";// Display Time Date Table echo date ('F j, Y').date('g:i:s a'); print "</font></td></tr></table></div> </div>";// End Time Date Table print "<table width=100% border=0><tr><td width=10% valign='top'> "; if($ir['fedjail']) { $q=mysql_query("SELECT * FROM fedjail WHERE fed_userid=$userid",$c); $r=mysql_fetch_array($q); die("[b]<font color='#CCOOOO' size='2'>You have been banned for {$r['fed_days']} day(s). Reason: {$r['fed_reason']} </font>[/b] </td></tr></table></body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</td></tr></table></body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; print "</td><td valign=top> "; } function endpage() { print "</td> <tr><td colspan='2'> <div id='footer'>[size="1"] ©2009 All Rights Reserved. | <img src=images/creative-commons.png> | Designed by [url='#']GenScript[/url]</p> [url='#']Legal[/url] | [url='http://jigsaw.w3.org/css-validator/check/referer']CSS[/url]</p> [/size] </div> </td></tr> </table></body> </html>"; } } ?> mainmenu.php <?php print " <div id='colOne'><div class=class='boxed'>";// /******************** Replace with mainmenu.php code here ********************/ print "</div></div>";// ?> default.css /* Released for free under a Creative Commons Attribution 2.5 License */ body { margin: 0; padding: 0; background: #252D37 url(images/hd1.jpg) repeat-x; font: normal 11px "Trebuchet MS", Arial, Helvetica, sans-serif; color: #A4AFBD; } form { margin: 0; padding: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; color: #000000; } h1 { font-size: 31px; } h2 { font-size: 26px; } h3 { font-size: 18px; } p, ul, ol, blockquote { margin-top: 0; padding-top: 0; text-align: justify; line-height: 18px; } a { color: #FFFFFF; } a:hover { text-decoration: none; } /* Boxed */ .boxed { margin: 0 0 20px 0; padding: 5px 20px 20px 20px; background: url(images/img4.gif) repeat-x left bottom; } /* Post */ .post { margin: 0 0 20px 0; padding: 10px 20px 30px 20px; background: url(images/img4.gif) repeat-x left bottom; } .post h4 { margin-bottom: 20px; font-size: 11px; font-weight: normal; } .post h4 strong { font-weight: bold; color: #5B6F88; } /* Header */ #header { /*width: 904px;*/ height: 140px; margin: 0 auto; } /* Menu */ #menu { float: right; padding: 10px 0 0 0; } #menu ul { margin: 0; padding: 15px 0 0 0; list-style: none; } #menu li { display: inline; } #menu a { text-decoration: none; color: #FFFFFF; } /* Content */ #content { width: 904px; margin: 0 auto; } #colOne { float: left; width: 238px; } #colTwo { float: right; width: 646px; } /* ColOne Content */ #colOne ul { margin-left: 5px; padding-left: 0; list-style: none; } #colOne li { padding: 2px 0 7px 0; } #colOne li.first { border: none; } #colOne h3 { font-size: 15px; } /* ColTwo Content */ /* Welcome */ #welcome { padding: 5px 20px 20px 20px; } #welcome h2 { margin-bottom: 25px; } #welcome .image { float: left; padding: 0 17px 0 0; } #welcome p { margin-left: 126px; } /* Footer */ #footer { clear: both; /*width: 904px;*/ margin: 0 auto; background: url(images/img6.gif) repeat-x left top; } #footer p { margin: 0; padding: 30px; text-align: center; }
-
tks all ... i built a lycan theme as well if anyone wants to see just ask ill post it up too