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
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[RELEASE] HabboExtreme REVCMS THEME
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="Pace" data-source="post: 289193" data-attributes="member: 47937"><p>I'm having a bit of trouble with the avatars . What do I need to do to get these working?</p><p></p><p>I know it says "This has its own imager so you need to add your db information into avatar.php in the root folder if you use all of my stuff *I SUGGEST YOU DO FOR NO ERRORS*"</p><p></p><p>But where is avatar.php, and where can I find my db info to insert it?</p><p></p><p>I made a folder called avatar.php in : /app/tpl/skins/HabboExtreme</p><p>In the folder I put:</p><p></p><p>[PHP]<?php</p><p>header('Content-Type: image/png');</p><p>define("host", "localhost");</p><p>define("username", "root");</p><p>define("password", "***");</p><p>define("database", "hotel");</p><p>$map = './avatars';</p><p>define("hotel", "habbo.nl");</p><p> mysql_connect(host, username, password) or die ('Wrong username or password, or simply host.');</p><p> mysql_select_db(database) or die ('Cannot connect to database.');</p><p>if (!is_dir($map))</p><p> {</p><p> if (!mkdir($map, 0, true))</p><p> {</p><p> die('Unable to create directory.');</p><p> }</p><p> }</p><p>$figure = $_GET['figure'];</p><p>if(isset($_GET['size'])){</p><p>$size = $_GET['size'];</p><p>} else {</p><p>$size= 'b';</p><p>}</p><p>if(isset($_GET['direction'])){</p><p>$direction = $_GET['direction'];</p><p>} else {</p><p>$direction = '2';</p><p>}</p><p>if(isset($_GET['head_direction'])){</p><p>$head = $_GET['head_direction'];</p><p>} else {</p><p>$head = '2';</p><p>}</p><p>if(isset($_GET['action'])){</p><p>$action = $_GET['actionn'];</p><p>} else {</p><p>$head = 'sit';</p><p>}</p><p>if(isset($_GET['gesture'])){</p><p>$gesture = $_GET['gesture'];</p><p>} else {</p><p>$gesture = '';</p><p>}</p><p>$lookhash = md5("$figure$size$action$direction$head$gesture");</p><p>if (file_exists("$map/$lookhash.png")) {</p><p> $finalavatar = require("$map/$lookhash.png");</p><p>} else {</p><p> $habbo = file_get_contents("http://".hotel."/habbo-imaging/avatarimage?figure=".$figure."&size=".$size."action".$action."&direction=".$direction."&head_direction=".$head."&gesture=".$gesture."");</p><p> $fp = fopen("$map/$lookhash.png", 'w');</p><p> fwrite($fp, $habbo);</p><p> fclose($fp);</p><p> $finalavatar = $habbo;</p><p>}</p><p>echo $finalavatar;</p><p>?>[/PHP]</p><p>With the shit at the top filled out. Still not showing avatars</p></blockquote><p></p>
[QUOTE="Pace, post: 289193, member: 47937"] I'm having a bit of trouble with the avatars . What do I need to do to get these working? I know it says "This has its own imager so you need to add your db information into avatar.php in the root folder if you use all of my stuff *I SUGGEST YOU DO FOR NO ERRORS*" But where is avatar.php, and where can I find my db info to insert it? I made a folder called avatar.php in : /app/tpl/skins/HabboExtreme In the folder I put: [PHP]<?php header('Content-Type: image/png'); define("host", "localhost"); define("username", "root"); define("password", "***"); define("database", "hotel"); $map = './avatars'; define("hotel", "habbo.nl"); mysql_connect(host, username, password) or die ('Wrong username or password, or simply host.'); mysql_select_db(database) or die ('Cannot connect to database.'); if (!is_dir($map)) { if (!mkdir($map, 0, true)) { die('Unable to create directory.'); } } $figure = $_GET['figure']; if(isset($_GET['size'])){ $size = $_GET['size']; } else { $size= 'b'; } if(isset($_GET['direction'])){ $direction = $_GET['direction']; } else { $direction = '2'; } if(isset($_GET['head_direction'])){ $head = $_GET['head_direction']; } else { $head = '2'; } if(isset($_GET['action'])){ $action = $_GET['actionn']; } else { $head = 'sit'; } if(isset($_GET['gesture'])){ $gesture = $_GET['gesture']; } else { $gesture = ''; } $lookhash = md5("$figure$size$action$direction$head$gesture"); if (file_exists("$map/$lookhash.png")) { $finalavatar = require("$map/$lookhash.png"); } else { $habbo = file_get_contents("http://".hotel."/habbo-imaging/avatarimage?figure=".$figure."&size=".$size."action".$action."&direction=".$direction."&head_direction=".$head."&gesture=".$gesture.""); $fp = fopen("$map/$lookhash.png", 'w'); fwrite($fp, $habbo); fclose($fp); $finalavatar = $habbo; } echo $finalavatar; ?>[/PHP] With the shit at the top filled out. Still not showing avatars [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[RELEASE] HabboExtreme REVCMS THEME
Top