Emblems

Share files with other Dawn of Light users

Moderator: Support Team

Emblems

Postby Etaew » Sun Jul 24, 2011 10:48 am

A re-upload of emblems and how to generate them from the ID in php
Attachments
emblems.rar
Display emblem images with php
(324.74 KiB) Downloaded 210 times
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7585
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Re: Emblems

Postby HunabKu » Sat Nov 24, 2012 6:27 pm

Hi Etaew and thanks for sharing your work.
I've downloaded it and when i try to use (http://localhost/emblems/emblem.php?emblem=23842) but it say me the picture can't be displayed. i tried to modify this
Code: Select all
$background = imagecreatefrompng("$baseurl/images/guildshields/$primarybin-$secondarybin-$patternbin-full.png");
$img2 = imagecreatefromgif("$baseurl/images/guildshields/Emblems/$logobin.gif");

to this
Code: Select all
$background = imagecreatefrompng("/guildshields/".$primarybin."-".$secondarybin."-".$patternbin."-full.png");
$img2 = imagecreatefromgif("/guildshields/Emblems/".$logobin.".gif");

but don't works.

Do you have an idea about this problem please ?

Hunab Ku.
Know your Database, know your content, know your commands. Argo
HunabKu
Server Representative
 
Posts: 889
Joined: Sat Jun 18, 2011 4:48 am

Re: Emblems

Postby Etaew » Sat Nov 24, 2012 9:18 pm

It has been a long time but I'm guessing something is up with the location of the files.

I would keep the original URL and file structure, make sure you change the $baseurl variable to be relevant to yours.

Using /guildshields/etc will make it look for the guildshields folder at the root of your web folder, so if you are running localhost then it would be looking at http://localhost/guildshields/

I would change the $baseurl to /emblems and give that a go. Make sure you have the guildshields folder inside the emblems folder.

A tip is to view the source when it says the picture can't be displayed, it means that the header has been sent out as an image, but it contains some invalid code. This will be a useful HTML error and will tell you what is going on.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7585
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Re: Emblems

Postby HunabKu » Sun Nov 25, 2012 6:11 am

Thanks to reply Etaew.
I've maked another script.
Know your Database, know your content, know your commands. Argo
HunabKu
Server Representative
 
Posts: 889
Joined: Sat Jun 18, 2011 4:48 am


Return to User Files

Who is online

Users browsing this forum: No registered users and 1 guest