• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

PHP [easy] Shop Images in GesiorACC

turs0n

New Member
Joined
Jul 3, 2010
Messages
53
Reaction score
2
How to add item images to shop without changing extension from JPG to GIF?
It's very easy. Images in images/items are in GIFs, we need JPG - NO! It's more easy.

Let's start
1) Open shopsystem.php (main folder).
2) Find line ~181
3) PHP code
Code:
        $main_content .= '<tr bgcolor="#D4C0A1"><td align="center"><img src="item_images/'.$item['id'].'.jpg"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">';
Replace for
Code:
        $main_content .= '<tr bgcolor="#D4C0A1"><td align="center"><img src="item_images/'.$item['id'].'.gif"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">';
4) Save
5) It's end.

You can now add items from images/items to item_images without changing extension.
Only change image name (ID from db).


All rights tralalala, copy and paste where you want. Include only author name (me, turson).

Good Luck!
 
How to add item images to shop without changing extension from JPG to GIF?
It's very easy. Images in images/items are in GIFs, we need JPG - NO! It's more easy.

Let's start
1) Open shopsystem.php (main folder).
2) Find line ~181
3) PHP code
Code:
        $main_content .= '<tr bgcolor="#D4C0A1"><td align="center"><img src="item_images/'.$item['id'].'[B].jpg[/B]"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">';
Replace for
Code:
        $main_content .= '<tr bgcolor="#D4C0A1"><td align="center"><img src="item_images/'.$item['id'].'[B].gif[/B]"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">';
4) Save
5) It's end.

You can now add items from images/items to item_images without changing extension.
Only change image name (ID from db).


All rights tralalala, copy and paste where you want. Include only author name (me, turson).

Good Luck!

Lal, it so easy change only .jpg to .gif and another... GIF SUCKS, use .png =)
 
Lal, it so easy change only .jpg to .gif and another... GIF SUCKS, use .png =)

png is 7 times more heavy than jpg.

so if you got a screen that's 500 kb size in jpg, if you had the same in png it would be 3,5 mb instead.
and imagine if 10 people would refresh the page, make it upload 35 mb.

People could abuse that to "attack" the server by reload the image over and over again and overflow your net (if you got a bad one and no overflow protection).
 
Back
Top