Uridium Posted October 7, 2008 Posted October 7, 2008 Add images to your index page and estate.php so people can view before they buy. Overwrite staff_houses.php with this one You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now call this one uploadhsepix.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open smenu.php Under the HOUSES catagory add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ow open index.php and add this line where you want your pic to be displayed.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now overwrite estate.php with this one which also allows you to sell your house You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now create a folder on your ftp called hsepics and add a new table to your database under houses.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And thats it Quote
Haunted Dawg Posted October 7, 2008 Posted October 7, 2008 Re: [MOD] House Images Your staff_houses.php will entere incorectly. Quote
Zero-Affect Posted October 7, 2008 Posted October 7, 2008 Re: [MOD] House Images staff_houses.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. estate.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I get bored easy so i thought i'd polish over your estate and staff houses coding hope you don't mind (i didn't test them so give 'em a go if ya like let me know if i forgot something) Quote
Uridium Posted October 7, 2008 Author Posted October 7, 2008 Re: [MOD] House Images Cheers ZERO worst thing about adding scripts on here is trying to remember what you did whilst making it work. I think im doing too many tasks at once lol I appreciate your help though Thank You :) Quote
Zero-Affect Posted October 7, 2008 Posted October 7, 2008 Re: [MOD] House Images Cheers ZERO worst thing about adding scripts on here is trying to remember what you did whilst making it work. I think im doing too many tasks at once lol I appreciate your help though Thank You :) Your welcome mate glad i could help Quote
Uridium Posted October 7, 2008 Author Posted October 7, 2008 Re: [MOD] House Images Just noticed that on the staff_houses ive called some routines {$ir['hsepic']} where as on the other scripts ive called it {$ir['hsepics']} for some silly reason, so if your using this make sure the rest of the script for that routine is the same either with the s or without it Bare in mind if you change it to not having the (s) at the end you will also need to alter the SQL ALTER TABLE houses ADD `hsepics` VARCHAR(255) NOT NULL or ALTER TABLE houses ADD `hsepic` VARCHAR(255) NOT NULL Quote
ColdK Posted October 8, 2008 Posted October 8, 2008 Re: [MOD] House Images t_string error on staff houses on line 127 lol Quote
HITMAN 17 Posted October 8, 2008 Posted October 8, 2008 Re: [MOD] House Images Parse error: syntax error, unexpected T_STRING in /home/chavster/public_html/staff_houses.php on line 127 thats your house pic zero affect Quote
Uridium Posted October 8, 2008 Author Posted October 8, 2008 Re: [MOD] House Images have you tried the staff_houses.php from my orig post ? on Zeros script overwrite with this one on line 127 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I cant even see the code to select so im going to have to quote it... $query = sprintf("UPDATE `users` SET money=money+'%.0f', maxwill = %u WHERE userid IN(".implode(', ', %u).")", $old['hPRICE'], 100, $ids); change line 127 for this one all ZEROS mistake was adding "%.0f" have changed it to '%.0f' Quote
HITMAN 17 Posted October 8, 2008 Posted October 8, 2008 Re: [MOD] House Images Parse error: syntax error, unexpected '%' in /home/chavster/public_html/staff_houses.php on line 127 another error mate +1 though Quote
hobbes Posted October 9, 2008 Posted October 9, 2008 Re: [mccode v2] House Images Parse error: syntax error, unexpected '%' in /staff_houses.php on line 127 Same error as above, but great addition! Quote
Uridium Posted October 9, 2008 Author Posted October 9, 2008 Re: [mccode v2] House Images Parse error: syntax error, unexpected '%' in /staff_houses.php on line 127 Same error as above, but great addition! Try installing it using my Original Post see if that helps Quote
hobbes Posted October 9, 2008 Posted October 9, 2008 Re: [mccode v2] House Images that would do it ill. Quote
Uridium Posted October 9, 2008 Author Posted October 9, 2008 Re: [mccode v2] House Images Just an update. You can basically add Items or house images to any part of the gamenand for those that are having problems heres a small Tutorial.. Each script on a page has a Different string so to speak so for example if you wanted images in the attack.php script you can still use the items or house pics code to do this.. All you have to remember is adding a new SQL to the dbase of your phpmyadmin so that pic shows up.. so we are going to use the attack script for this Demo.. create a new sql ALTER TABLE users ADD `attpics` VARCHAR(255) NOT NULL Now create a new folder on your FTP call it attpics call this file attackimageuploader.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open up your attack.php Right at the bottom of that script find this line You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Notice how it says $vars but yet on the items and the houses it was either $ir or $p So aslong as you stick with the $ on the line you want to add your pics to you should have viewable pictures all the time.. so the above would be You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. for your pic and You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. for your opponents image.. Keep the same basics through out the pages your adding pics to and you should be fine. Quote
p_T_s Posted October 21, 2008 Posted October 21, 2008 Re: [mccode v2] House Images I have it installed and looking good except for the image... I cant see the house images, i have uploaded the straight to the hsepics folder that i created because when i goto upload image in the staff admin i get this error - Error: This script requires an action. Any ideas? Thanks Quote
Uridium Posted October 21, 2008 Author Posted October 21, 2008 Re: [mccode v2] House Images I have it installed and looking good except for the image... I cant see the house images, i have uploaded the straight to the hsepics folder that i created because when i goto upload image in the staff admin i get this error - Error: This script requires an action. Any ideas? Thanks MARZY :) can you send me your game link via PM on here and i'll look at the page for you.. Or you could simply right click on the blank image and note the path if your path is as follows yourdomain.com/hsepics/hsepics/.house.jpg Then that would mean when your editing your house and inserting the image name just call the image house.jpg and not hsepics/house.jpg... However if your getting the url as yourdomain.com/ Again when editing your houses and adding the link for the image it would be hsepics/house.jpg Like i say send me your link and i'll have a look for you... Quote
winfidel Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images Parse error: syntax error, unexpected '<' in E:\xampp\htdocs\index.php on line 11 Where do I add: Property:</center> {$ir['hNAME']} <center></center>"; to <?php $housequery=1; include "globals.php"; print "<h3>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<table><tr><td>Name: {$ir['username']}</td><td>Crystals: {$cm}</td></tr><tr> <td>Level: {$ir['level']}</td> <td>Exp: {$exp}%</td></tr><tr> <td>Money: $fm</td> <td>HP: {$ir['hp']}/{$ir['maxhp']}</td></tr> <tr><td>Property: {$ir['hNAME']}</td></tr></table>"; print "<hr><h3>Stats Info:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); I tried to hook onto <tr><td>Property: {$ir['hNAME']}</td></tr></table>"; in different ways and I always get the Parse error: syntax error, unexpected '<' in E:\xampp\htdocs\index.php on line 11 Quote
Adrian Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images When a added it its good but i dont see the house pictures anyone know y please help thanks Quote
p_T_s Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images Since adding this mod i now get this error when i try add a new house..... QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO houses VALUES Any ideas? Quote
p_T_s Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images Never mind fix the last issue but still cant see images Quote
Uridium Posted October 22, 2008 Author Posted October 22, 2008 Re: [mccode v2] House Images Parse error: syntax error, unexpected '<' in E:\xampp\htdocs\index.php on line 11 Where do I add: Property:</center> {$ir['hNAME']} <center></center>"; to <?php $housequery=1; include "globals.php"; print "<h3>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<table><tr><td>Name: {$ir['username']}</td><td>Crystals: {$cm}</td></tr><tr> <td>Level: {$ir['level']}</td> <td>Exp: {$exp}%</td></tr><tr> <td>Money: $fm</td> <td>HP: {$ir['hp']}/{$ir['maxhp']}</td></tr> Property:</center> {$ir['hNAME']} <center></center>"; print "<hr><h3>Stats Info:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); I tried to hook onto <tr><td>Property: {$ir['hNAME']}</td></tr></table>"; in different ways and I always get the Parse error: syntax error, unexpected '<' in E:\xampp\htdocs\index.php on line 11 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
winfidel Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images Thank you <bowing while saying:"I'm not worthy!"> because now it works ... I'll slap some pictures in there and create a poor man's one man's fair and friendly Torn City... only I'll care more about my players than about donator packs... thats my goal to make something sort of like TC but more enjoyable... with friendly staff... making just enough bread to pay my hosting company so the game pays for itself... and I kid you not.. I will treat you and Floyd and the others like visiting dignitaries for helping me make this happen. Quote
Adrian Posted October 22, 2008 Posted October 22, 2008 Re: [mccode v2] House Images Very thanks to illusions he helped me fix my pics Quote
Uridium Posted October 24, 2008 Author Posted October 24, 2008 Re: [mccode v2] House Images Slight update it was mentioned that when you EDIT a pic or even added a new House the Image wasnt being sent to the databse so heres the fixed version. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
p_T_s Posted October 25, 2008 Posted October 25, 2008 Re: [mccode v2] House Images Thx illusions.... That has fixed it! Images are viewable.... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.