EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   Chit-Chat (https://www.eq2interface.com/forums/forumdisplay.php?f=2)
-   -   Cool dynamic sig (my own) (https://www.eq2interface.com/forums/showthread.php?t=1116)

Nightlord 03-18-2005 12:01 AM

hehe... and I thought it was just me. :)

Kales 03-23-2005 11:12 AM

I've installed PHP on my windows 2003 server and set up the EverQuest 2 Scripting Engine Generator (version 0.07) as outlined in the readme file, but it isnt working for me. :(

Here is the link for the sig image: My Sig

When I load it I see the following errors:

<br />
<b>Notice</b>: Undefined index: sn in <b>D:\WebSites\Paragon\eq2sig\image.php</b> on line <b>6</b><br />
<br />
<b>Notice</b>: Undefined index: m in <b>D:\WebSites\Paragon\eq2sig\image.php</b> on line <b>7</b><br />
<br />
<b>Notice</b>: Undefined variable: handle in <b>D:\WebSites\Paragon\eq2sig\includes\global.php</b> on line <b>40</b><br />
<br />
<b>Notice</b>: Undefined variable: handle in <b>D:\WebSites\Paragon\eq2sig\includes\global.php</b> on line <b>40</b><br />
<br />
<b>Notice</b>: Undefined variable: handle in <b>D:\WebSites\Paragon\eq2sig\includes\global.php</b> on line <b>40</b><br />
‰PNG


Any idea what I did wrong?

Nevermind... Removed PHP and manualy installed and it works perfectly. PHP windows installer is evil :p

Next question: Can I use MSSQL for the DB?

Denuve 03-27-2005 10:22 AM

No clue
 
Ok, Im a php newb. Quoting code and such doesnt work for me. I installed Octavius' files on my server, but i get this message:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /"removed my servername for privacy"/eq2sig/includes/global.php on line 8
8:Access denied for user: ' removed servername for privacy '(Using password: YES)
(note, i removed my servername on these boards, but it is correct in my address)

I wish there was a "How to install your sig generator, For Dummys" post.

Anyone able to help?

Den

Denuve 03-27-2005 10:49 AM



what is the &nbsp thing?

taco-man 03-27-2005 11:10 AM

i havent look at the code, but &nbsp; is a no breaking space (in html if there is more than 1 space they are ignored and treated as just one, so if you want to have more than one space between letters you have to use &nbsp; )

Denuve 03-27-2005 11:11 AM

How do i get rid of it? I know nothing of html

Code:

<?php
/* ------------------------------------------------------------------------ */
/* EverQuest 2 Guild Scripting Engine (global.php) 021420051720 (0ctavius)        */
/* ------------------------------------------------------------------------ */
$time = date("YmdHis");
if ($usedb == TRUE) {
        $connect = @mysql_connect($dbhost, $dbuser, $dbpass);
        mysql_select_db($dbname, $connect) or die(__LINE__.":".mysql_error());
        $query = "CREATE TABLE IF NOT EXISTS `".$dbpre."player` (`id` VARCHAR(255) NOT NULL,`name` VARCHAR(255) NOT NULL,`server` VARCHAR(255) NOT NULL,`city` VARCHAR(255) NOT NULL,`created` VARCHAR(255) NULL,`race` VARCHAR(255) NOT NULL,`adventurer` VARCHAR(255) NOT NULL,`artisan` VARCHAR(255) NOT NULL,`status` VARCHAR(255) NULL,`hp` VARCHAR(255) NULL,`pow` VARCHAR(255) NULL,`atk` VARCHAR(255) NULL,`def` VARCHAR(255) NULL,`str` VARCHAR(255) NULL,`agi` VARCHAR(255) NULL,`sta` VARCHAR(255) NULL,`int` VARCHAR(255) NULL,`wis` VARCHAR(255) NULL,`cold` VARCHAR(255) NULL,`heat` VARCHAR(255) NULL,`poison` VARCHAR(255) NULL,`disease` VARCHAR(255) NULL,`magic` VARCHAR(255) NULL,`divine` VARCHAR(255) NULL,`mental` VARCHAR(255) NULL,`rank` VARCHAR(255) NULL,`gid` VARCHAR(255) NULL,`guild` VARCHAR(255) NULL,`updated` VARCHAR(255) NOT NULL,PRIMARY KEY(`id`)) ENGINE=MyISAM;"; $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());
        $query = "CREATE TABLE IF NOT EXISTS `".$dbpre."guild` (`id` VARCHAR(255) NOT NULL,`name` VARCHAR(255) NOT NULL,`server` VARCHAR(255) NOT NULL,`created` VARCHAR(255) NULL,`rank` VARCHAR(255) NOT NULL,`members` VARCHAR(255) NOT NULL,`average` VARCHAR(255) NULL,`web` VARCHAR(255) NULL,`level` VARCHAR(255) NOT NULL,`status` VARCHAR(255) NOT NULL,`updated` VARCHAR(255) NOT NULL,PRIMARY KEY(`id`)) ENGINE=MyISAM;"; $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());}
function db_process($array, $type, $method) {global $time, $dbpre, $connect;
        if ($method=="update" && $type=="player") {
                $query = "UPDATE ".$dbpre."player SET `name`='".$array['name']."',`server`='".$array['server']."',`city`='".$array['city']."',`created`='".$array['created']."',`race`='".$array['race']."',`adventurer`='".$array['adventurer']."',`artisan`='".$array['artisan']."',`status`='".$array['status']."',`hp`='".$array['hp']."',`pow`='".$array['pow']."',`atk`='".$array['atk']."',`def`='".$array['def']."',`str`='".$array['str']."',`agi`='".$array['agi']."',`sta`='".$array['sta']."',`int`='".$array['int']."',`wis`='".$array['wis']."',`cold`='".$array['cold']."',`heat`='".$array['heat']."',`poison`='".$array['poison']."',`disease`='".$array['disease']."',`magic`='".$array['magic']."',`divine`='".$array['divine']."',`mental`='".$array['mental']."',`rank`='".$array['rank']."',`gid`='".$array['gid']."',`guild`='".$array['guild']."',`updated`='".$time."' WHERE `id`='".$array['id']."'";
                $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());}
        if ($method=="insert" && $type=="player") {
                $query = "INSERT INTO ".$dbpre."player (`id`,`name`,`server`,`city`,`created`,`race`,`adventurer`,`artisan`,`status`,`hp`,`pow`,`atk`,`def`,`str`,`agi`,`sta`,`int`,`wis`,`cold`,`heat`,`poison`,`disease`,`magic`,`divine`,`mental`,`rank`,`gid`,`guild`,`updated`) VALUES ('".$array['id']."','".$array['name']."','".$array['server']."','".$array['city']."','".$array['created']."','".$array['race']."','".$array['adventurer']."','".$array['artisan']."','".$array['status']."','".$array['hp']."','".$array['pow']."','".$array['atk']."','".$array['def']."','".$array['str']."','".$array['agi']."','".$array['sta']."','".$array['int']."','".$array['wis']."','".$array['cold']."','".$array['heat']."','".$array['poison']."','".$array['disease']."','".$array['magic']."','".$array['divine']."','".$array['mental']."','".$array['rank']."','".$array['gid']."','".$array['guild']."','".$time."')";
                $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());}
        if ($method=="update" && $type=="guild") {
                $query = "UPDATE ".$dbpre."guild SET `name`='".$array['name']."',`server`='".$array['server']."',`created`='".$array['created']."',`rank`='".$array['rank']."',`members`='".$array['members']."',`average`='".$array['average']."',`web`='".$array['web']."',`level`='".$array['level']."',`status`='".$array['status']."' WHERE `id`='".$array['id']."'";
                $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());}
        if ($method=="insert" && $type=="guild") {
                $query = "INSERT INTO ".$dbpre."guild (`id`,`name`,`server`,`created`,`rank`,`members`,`average`,`web`,`level`,`status`,`updated`) VALUES ('".$array['id']."','".$array['name']."','".$array['server']."','".$array['created']."','".$array['rank']."','".$array['members']."','".$array['average']."','".$array['web']."','".$array['level']."','".$array['status']."','".$time."')";
                $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());}}
function get_data($id, $type) {global $connect, $dbpre;
        $query = "SELECT * FROM ".$dbpre.$type." WHERE id='$id'";
        $result = mysql_query($query, $connect) or die(__LINE__.":".mysql_error());
        return $result;}
function get_var($var, $type) {global $secure, $secid, $dtheme;
        if ($type == "pid") {if ($secure['player'] == TRUE AND $secid['player'] != $var) {exit;} if ($var != "") {$out = $var;} else {exit;}}
        if ($type == "gid") {if ($secure['guild'] == TRUE AND $secure['gid'] != $var) {exit;} else {$out = "valid";}}
        if ($type == "mode") {if ($var != "") {$out = $var;} else {$out = "normal";}}
        if ($type == "surname") {if ($var != "") {$out = " ".$var;} else {$out = "";}}
        return $out;}
function get_html($id, $type) {
                if ($type == "guild") {$data = get_page("http://eq2players.station.sony.com/en/guild.vm?guildId=$id", "Server:</span>", "<img src=\"images/en/guilds/guild_roster.gif\" width=\"190\" height=\"42\" border=\"0\">"); $data = str_replace("class=\"field_data_small\">", ">*", $data); $data = str_replace("class=\"field_name_small\">", ">*", $data); $data = (strip_tags($data)); $data = ereg_replace("[ \t\r\n]+", " ", $data); $data = str_replace(" *", "*", $data);}
                if ($type == "roster") {$data = get_page("http://eq2players.station.sony.com/en/guild_roster.vm?guildId=$id", "Join Date</td>", "<td width=\"12\"  background=\"/images/en/boxes/dark/tile_right.gif\">"); $data = str_replace("<td", "*<td", $data); $data = str_replace("*<td>&nbsp;</td>", "", $data); $data = (strip_tags($data)); $data = ereg_replace("[ \t\r\n]+", " ", $data); $data = str_replace(" *", "*", $data); $data = str_replace(" (", "*", $data); $data = str_replace(")", "", $data); $data = str_replace("Initiate", "Guild Initiate", $data); $data = str_replace("Officer", "Guild Officer", $data); $data = str_replace("Member", "Guild Member", $data);}
                if ($type == "player") {$data = get_page("http://eq2players.station.sony.com/en/pplayer.vm?characterId=$id", "<span class=\"field_name_small\">Name</span>", "images/en/guilds/bottom_scrollwork.jpg"); $data = str_replace("class=\"field_data_small\">", ">*", $data); $data = str_replace("class=\"field_name_small\">", ">*", $data); $data = str_replace("Upgrade", "*----", $data); $data = str_replace("<a href=\"guild.vm?guildId=", "<a href=\"guild.vm?guildId=\">*", $data); $data = (strip_tags($data)); $data = str_replace("\" >*", "*",$data); $data = ereg_replace("[ \t\r\n]+"," ",$data); $data = str_replace(" &nbsp;","",$data); $data = str_replace("* ","*",$data); $data = str_replace(" *","*",$data); $data = str_replace(" var characterID = '","*",$data); $data = str_replace(" Unguilded","**Unguilded",$data);}
                $data = explode("*",$data); return $data;}
function get_page($url, $start, $end) {
        while (!$handle) {$handle = fopen($url, "rb");}
        $contents = ""; while (!feof($handle)) {$contents .= fread($handle, 1024);}
        fclose ($handle); if (!$contents) {exit;}
        $a = strpos($contents, $start) + strlen($start); $b = strpos($contents, $end, $a);
        if($a != FALSE && $b != FALSE) {
                $length = $b - $a; $code = Substr($contents, $a, $length); return $code;}}
function get_array($array) {echo '<pre>'.str_replace(array("\n" , " "), array('<br>', '&nbsp;'), print_r($array, true)).'</pre>';}
function build_array($array, $type) {
        if ($type == "player") {$out = array("id" => $array[0],"name" => $array[1],"race" => $array[9],"server" => $array[3],"city" => $array[5],"created" => $array[7],"adventurer" => "Level ".$array[13]." ".$array[11],"artisan" => "Level ".$array[17]." ".$array[15],"death" => "by ".$array[21]." on ".$array[19]." in ".$array[23],"gid" => $array[25],"guild" => $array[26],"status" => $array[32],"hp" => $array[36],"pow" => $array[38],"atk" => $array[40],"def" => $array[42],"str" => $array[44],"agi" => $array[46],"sta" => $array[48],"int" => $array[50],"wis" => $array[52],"cold" => $array[54],"heat" => $array[56],"poison" => $array[58],"disease" => $array[60],"magic" => $array[62],"divine" => $array[64],"mental" => $array[66],"rank" => $array[67]);}
        if ($type == "guild") {$out = array("id" => $array[0],"name" => $array[1],"server" => $array[2],"created" => $array[3],"rank" => $array[5],"members" => $array[7],"average" => $array[9],"level" => $array[21],"status" => $array[23],"web" => $array[11]);}
        return $out;}
?>


cabral91 03-28-2005 09:39 PM

Alright I think I figured it out. I am not a hardcore programmer but I like to play around. So instead of that error we got I replaced it with Player status. Here is what I got for you:

Go into the Dir: /themes/default open the file themes.php in notepad
change the following lines in NORMAL SIGNATURE MODE
from
Code:

imagestring($image_out, 2, 15, 56, $player['rank'], $color);
TO
Code:

imagestring($image_out, 2, 15, 56, "Player Status: ".$player['status'], $color);
Its seems there must have been a eq2players.com update and wiped out the rank area. Make sure you do not change the numbers as I think that is where the text gets displayed.
You can also change this for the other file in the panel folder if you want to use the other backround. view below to see my Sig

mad 04-04-2005 07:40 PM

Quote:

Originally Posted by Drumstix42
meaning:
instructions for the tinyurl.com....
but if you know how to do HTACCESS, you can do that.


Anyhow, I was the the one that mentioned I use HTACCESS.

-I put my pid inside the file, and save the file as just .php
-Rename the extension to .gif
-create .HTACCESS file in the same directory as file
-then I paste thie code into the HTACCESS file:

Code:

<FilesMatch eq2sig.gif>
SetHandler application/x-httpd-php
</FilesMatch>

replacing eq2sig.gif with the name/location of your image file.

Then I call on my .gif file (which was once a php file) and there ya go...

Ok I understand the .htaccess file it is easy enough. However, you said you put your pid in the .php file, I assume you mean Player Id, now you just put that alone or is there code I: am not thinking about that should be in there.

If I follow what you say to the T, when I link to the "fake" image, I end up with it just showing my player id, what am I missing if you do not mind sharing. Thanks.

Drumstix42 04-04-2005 07:44 PM

in the image.php change:

Code:

$pid = get_var($HTTP_GET_VARS['cid'], "pid");
to:

Code:

$pid = "000000000";
replacing the zero's with your player's EQ2Player Site ID.

this way you won't have to have any extra stuff on the URL of your signature, allowing it to function on all sites that allow images.

mad 04-05-2005 12:35 AM

got it thanks a lot! :)

mad 04-05-2005 03:00 AM

One last question. I been searching everywhere but can't find the answer. I have this code in my theme.php:
Code:

imagestring($image_out, 2, 135, 4, "Player Status: ".$player['status'], $color);
I would like it to say how many quests completed. I have had no luck finding the parse code for this. I searched here and at the SOE site and of course on google. I have no idea how you guys find what to parse but I salute you for it.
:nana:

Drumstix42 04-05-2005 08:49 AM

The code w/ database caching your using is not setup to parse the Achievments page. However, mine is. Mine is also much more "readable" in coding standards of my own at least. There's no theme files, or anything like that. 2 files, config, and image. Difference in mine is that I use a different php command to do the text, so I don't get that crappy default GD font.

So... if you wanted Quests Completed, you would have to add code parse the achievements page, and then add the SQL to cache it if wanted. Or maybe I'll just post the code later :rolleyes:

mad 04-05-2005 10:22 AM

Quote:

Originally Posted by Drumstix42
Mine is also much more "readable" in coding standards of my own at least.

I agree yours is pretty nice judging by your sig. Is yours pretty much payed out the same as this one I am using? It looks like you enabled the db caching, does it support themes too? I am not looking to use it on a public forum only on my guild forum. I liked the theming and the fact that anyone in my guild would be able to genrate one. As for the fonts I am sure they could be changed if I were to dive into the code but I am not currently looking to spend that much time on this project. This one is functional even if the font blows. That kind of thing can be fixed.

All I need is the quest completed equivalent of "$player['status']". I figured I would have to add the proper tables etc but without knowing this key piece of info it makes it a little hard. While I can do a lot with PHP I have never really done HTML parsing before. So while the answer may be obvious to you it is not to everyone. ;)

Anyways, if yours supports the same thing as his and has the generation capabilities and themes etc then I would not complain about receiving an IM with it attached :D Thanks for your time.

mad 04-06-2005 01:31 PM

Well I am working on a remake of this mod by octavius. As Drum said it is some very messy code. I will be commenting it all, at least the parts I understand enough too lol. I am also changing where he has Rank to Quests completed. I would also like to add lastkilled, lastkilledby and where.

That will not be until a later version. I so far have it using TTF instead of the crap default stuff. So if your server doesn't have support for TTF in your GD install you are going to be out of luck.

Now I will be IM'ing Octavius soon to make sure he is ok with me releasing my remake of his system. So as long as he doesn't deny it I will try to get something put together in a week or two.

In my plan is to also add a UI for users to navigate to to generate the link. It is easy enough to do but again it will not be for a week or two at the soonest. Have too much going on and not enough time to do it lol.

If anyone can offer up the parse information for the last killed stuff I would appreciate it. I know some people don't like to share and if not that is fine I am sure it can be found if I keep trying lol.

Thanks!

P.S. If released I will start my own thread so to have a fresh start :)

Examples:



Drumstix42 04-06-2005 02:15 PM

Yeah, my code is based off his.

Mine isn't set up in theme-friendly-format. But... all the things you need to edit are in one place so, it doesn't matter.


As for the parsing of pages. I have a format that makes it, if I might say, hella easy to figure out what number matches which stat, ect. Indeed this thread is quite long for someone looking at it the first time, so anything new, I would say it's best to start a new thread. Plus, this topic was just started as me showing my sig, and not really "how" to make one... but like I said, I may as well give it out... but I'm not including the text lines to my whole sig because I know someone will just change the player id, and have some identical sig... which makes it very boring :)

mad 04-06-2005 08:25 PM

Yeah mine is only for use with my guild at my guild site. It is too bad your thread got highjacked lol :)

If you would not mind IM'ing the code to me to save me some time cleaning his current code. I do need the intergration with the db so my entire guild can use this. So I mainly want the code you commented maybe that would explain some of the stuff I am currently confused about ;)

Gotta run talk to you later.

Drumstix42 04-06-2005 09:29 PM

Best I can do is within 2 or 3 days time worth... but I'll post it.

mad 04-07-2005 01:08 AM

Nice Thanks Drum :) I will put this on the backburner until then. :nana:

predawnia 04-13-2005 01:32 AM

With reference to Octavius's themed sig gen, to make a sig with transparent background you use the following code in your theme.php file.

Code:

$image_get = "themes/theme1/sig.png";
$image_src = imagecreatefrompng($image_get);
$transcolor = imagecolorresolve($image_src, 239, 239, 239); //sets transparent color to 239,239,239
$image_out = imagecreatetruecolor(400, 200);
imagepalettecopy($image_out, $image_src); //copies source palette to new output image
imagefill($image_out,0,0,$transcolor); //fills the output image with transparent color
imagecolortransparent($image_out, $transcolor); //set output image color to transparent
imagecopyresized($image_out, $image_src, 0, 0, 0, 0, 400, 200, 400, 200); // copies source image over output image
imagedestroy($image_src);
$color = imagecolorallocate($image_out,220,220,255);
imagestring($image_out, 3, 30, 70, $player['name'].$surname, $color);
.
.
.

Here is a sample of a transparent background sig.
http://av.mmog-tng.com/sig/image.php...nye&img=ornate
Hope this helps whoever trying to make cool themes :)

Drumstix42 04-13-2005 02:47 AM

lol if the original image already has a transparent background (like a gif) you don't have to do anything special to it.

and for those waiting for me to post the code, it's coming. I've been busy.

predawnia 04-13-2005 04:06 AM

Apparently, the original Octavius theme.php code could not output the PNG with transparency even if the original PNG image is transparent, hence the mod suggested here. ;)

Khimaira 04-25-2005 01:51 PM

Hey all,

I'm pretty much a neophyte at all this kind of stuff, but I have been able to get Octavius' script to work, add new backgrounds, move text around (I know, not a big deal to most ;) )...but I was wondering if someone could either give me tips on how to change the font or point me in the right direction...hopefully somewhere with the beginner in mind :)

I can change the font size no problem, but as for changing the default font or using a truetype font...that I haven't figured out yet.

Khimaira 04-27-2005 10:04 AM

Anyone?

Okay...how about this...over at http://www.eqsig.com/ it looks like you can add your own picture (character portrait) to the signature. Is there a way to add a similar feature to Octavius' script?

yoda 05-08-2005 05:35 PM

parsing
 
Ok I've been learning php recently and started customizing Octavius's signature code. I got my custom colors, fonts, and placements down. What I am having trouble doing is parsing the html in order to get extra stats, like number of kills and such. I realize some stats are on different pages. Perhaps someone here can explain how html parsing works or provide a link or 2 for some good reference docs, so that i may learn on my own. I have tried google but can't find anything substantial.

Thank you for your time.

Khimaira 05-08-2005 08:42 PM

Quote:

Originally Posted by yoda
I got my custom colors, fonts, and placements down.

Yoda, may I ask how you do the custom fonts?

yoda 05-08-2005 09:16 PM

that was relatively easy. in Octavius's sig files you need to edit the theme.php file.

instead of imagestring use imagettftext

example:
Code:

imagettftext($image_out, 9, 0, 10, 36, $color, $font, $player['adventurer']);
you also need to upload the font file *.ttf and provide the path

example:
Code:

$font = 'font/arial.ttf';

yoda 05-10-2005 04:27 PM

So no one can point me in the right direction to learn how to parse html?

Drumstix42 05-10-2005 04:37 PM

Well I was supposed to post my code on how to easily take each txt piece from the various pages, and post my examples, but I've 1) been low on time, and 2) really don't play EQ2 anymore.

Hopefully I'll post it one of these days.

Basically you'll want the parser code, and instead of displaying the specific array numbers onto your graphic, you just want to echo all of what's in the array.

just a simple FOR loop, then you take the numbers you want for your "newly wanted stats" ect. I've modified the parser a bit since Octavious, because somethings just don't work, if they're multi-worded or you only want 1 part of it to have custom text, or whatever.

The "real" PITA (pain in the ...) is to add in for extra pages like Achievements page, because you have to add all the DB stuff for All of those, and with SQL, need them in order, ect.

I did that already, and just need to post it, but I'll need to find what I did to put it out into a simply array for you.

Anyhow, sorry for saying little in many words.

yoda 05-11-2005 07:23 PM

Ok, so lets see if i understand you any. The Octavius code is parsing for specific text and what I should do is parse the entire page and echo the parse output so i know where the text is that i want?

If i sort of have that right it kinda brings me back to my original question. is there a website or something where I can learn about html parsing commands and what its doing? maybe somewhere in www.php.net? I tried a search on that site but can't get many parsing commands to show up.

I do appreciate you taking your time to reply and help a php beginner :)

godsfshrmn 05-13-2005 06:54 PM

New Dynamic Sig generator eqsig.com
 
Hey guys I have been working out the bugs on my sig generator in the past few weeks and it is now working pretty well. Its only been up for about two weeks and already have over 100 people sign up. I am using it right now in my signature, and there are random example sigs on the website.

http://www.eqsig.com

EDIT: for some reason this got merged w/ this post, which was totally a different service. remotely hosted and i have wrote my own code

Landiin 05-18-2005 09:38 PM

With the .htaccess tag Drums posted you can still use options on the end of the url. You just need to put somthing like null=.gif and the end to fool the forums checking code.

This is my normal url to my sig
http://www.crusadersvalorous.org/lan.../sig/toran.gif


and here is one I use for soe restricted site
http://www.crusadersvalorous.org/lan...=soe&null=.gif


and here is one I use sites that have odd ball size restriction
http://www.crusadersvalorous.org/lan...=300&null=.gif


Yes I am still working on the transparency when the image gets resized:/ Other then that it works pritty good.

Landiin 05-20-2005 11:06 PM

Ok whats up with IE? In Firefox the back ground is tranparent like it is coded to do but when I look at it with IE it has black (10,10,10) back ground I used. Does IE blow that bad it can't even display graphics right? /sigh

0ctavius 05-31-2005 04:09 PM

Hi guys, I have been 'offline' for some time, but started getting a bit of nostalgia so thought I would look in to see how the progress os going. Feel free to bounce ideas off me if you need. I don't intend to pick this script back up again, as it would not be fair to anyone else who has made progress with it, nor would it be fair to anyone if I picked it up, and dropped it again later.

I can at least offer my experience and knowledge on how I originally wrote the script, for those of you wishing to adapt it to your own needs. Good work to those who have made changes for the better.

And no, I have not returned to Eq2, now I doubt will I ever. Just not in the cards right now. The web features I see have not made the move to live xml feeds, which is unfortunate, and part of the reason I am glad I am not a part of that community anymore. XML feeds would have made this script SO much easier to design / manage for more of the community.

0ctavius 05-31-2005 04:12 PM

Quote:

Originally Posted by Landiin
Ok whats up with IE? In Firefox the back ground is tranparent like it is coded to do but when I look at it with IE it has black (10,10,10) back ground I used. Does IE blow that bad it can't even display graphics right? /sigh

IE does not support transparent PNG (yet, supposedly IE7 will). Unfortunately this is one of the most contested, and angrily sought after features that MS failed to add to IE to date, and may be one of the reasons PNG has not become the defacto image format of the internet yet (replacing JPG and GIF).

For more information you should read these articles, as they cover it in great detail. From these you might begin to see why so many people consider the IE browser(despite being the most prominent) to be the worst browser in terms of compatibility and standards compliance:

http://www.w3.org/Graphics/PNG/Inline-img.html
http://www.w3.org/Graphics/PNG/all_seven.html
http://www.w3.org/Graphics/PNG/inline-alpha.html

Also go here, and scroll down to "Internet Explorer" in the list of supported browsers. This page is the official home of the PNG image format.
http://www.libpng.org/pub/png/pngapbr.html

Khimaira 06-08-2005 06:28 AM

I have no idea why, but this script is no longer working on my site (long delay and then finally just the ole red x where the sig should be) - I know I made no changes that would cause it to break. Anyone else having a problem?

Probably is my host (bravenet) but curious if anyone else experienced this - maybe a change at EQ2Players?

Any ideas on what I can do to figure this out? Pretty much at a complete loss.

Seagoat 08-11-2005 01:04 PM

Quote:

Originally Posted by yoda
instead of imagestring use imagettftext

example:
Code:

imagettftext($image_out, 9, 0, 10, 36, $color, $font, $player['adventurer']);
you also need to upload the font file *.ttf and provide the path

example:
Code:

$font = 'font/arial.ttf';

I've tried this fix, but it actually breaks my script! I get no text at all on the background image.

Does the imagettftext string parameters need to be defined in exactly the order you described, and/or does the $font definition need to be in a particular place?

I'm no newbie to coding, although PHP is new to me as of a few months back. I'm an expert tweaker, so this breakage is dumbfounding me...everything looks right. I uploaded my fonts and everything. :p

mortis42 08-11-2005 02:36 PM

Quote:

Originally Posted by LCAngela
I've tried this fix, but it actually breaks my script! I get no text at all on the background image.

Does the imagettftext string parameters need to be defined in exactly the order you described, and/or does the $font definition need to be in a particular place?

I'm no newbie to coding, although PHP is new to me as of a few months back. I'm an expert tweaker, so this breakage is dumbfounding me...everything looks right. I uploaded my fonts and everything. :p

You actually need to modify the image.php file around lines 39 - 48. At least, that was how I was able to change text on my test site.

Check this page out:
http://us2.php.net/imagettftext

Denuve 08-22-2005 11:42 AM

htaccess
 
I am trying to get the .gif extension to work so I can post on a php.nuke site, but I just cant get it going. I have the .htaccess file and changed the .php to .gif just like its posted. What could I be doing wrong? Anyone want to walk thru the steps again?

Quote:

Anyhow, I was the the one that mentioned I use HTACCESS.

-I put my pid inside the file, and save the file as just .php
-Rename the extension to .gif
-create .HTACCESS file in the same directory as file
-then I paste thie code into the HTACCESS file:
Here are the files:
Code:

<?php
ob_start("ob_gzhandler");
require("includes/config.php");
require("includes/global.php");
$pid = "219049205";
$surname = get_var($HTTP_GET_VARS['sn'], "surname");
$mode = get_var($HTTP_GET_VARS['m'], "mode");
// -----------------------------------------------------------------------------// get and update player data
if ($usedb != TRUE) {
        $phtml = get_html($pid, "player"); $phtml[0] = $pid; $check_gid = get_var($phtml[25], "gid");
        if ($phtml[26] == "Unguilded") {$phtml[67] = ""; $ghtml = array(0 => "--------------",1 => "Unguilded",2 => "--------------",3 => "--------------",5 => "--------------",7 => "--------------",9 => "--------------",11 => "--------------",21 => "--------------",23 => "--------------");}
        else {$ghtml = get_html($phtml[25], "guild"); $gserver = $ghtml[1]." Server"; $gmembers = $ghtml[7]." Total Members"; $glevel = "Guild Level ".$ghtml[21]; $gstatus = $ghtml[23]."Status"; $ghtml[0] = $phtml[25]; $ghtml[2] = $gserver; $ghtml[7] = $gmembers; $ghtml[21] = $glevel; $ghtml[23] = $gstatus; $ghtml[1] = $phtml[26]; $rhtml = get_html($phtml[25], "roster"); $k = array_search($phtml[1], $rhtml); $i = $k-1; $phtml[67] = $rhtml[$i];}
        $player = build_array($phtml, "player"); $guild = build_array($ghtml, "guild");}
else {
        $pdata = get_data($pid, "player");
        if ($obj = mysql_fetch_object($pdata)) {
                if ($obj->updated < date('YmdHis')-$update) {
                        $phtml = get_html($pid, "player"); $phtml[0] = $pid; $check_gid = get_var($phtml[25], "gid");
                        if ($phtml[26] == "Unguilded") {$phtml[67] = "";} else {$rhtml = get_html($phtml[25], "roster"); $k = array_search($phtml[1], $rhtml); $i = $k-1; $phtml[67] = $rhtml[$i];}
                        $player = build_array($phtml, "player"); $pupdate = db_process($player, "player", "update");}}
        else {
                $phtml = get_html($pid, "player"); $phtml[0] = $pid; $check_gid = get_var($phtml[25], "gid");
                if ($phtml[26] == "Unguilded") {$phtml[67] = "";} else {$rhtml = get_html($phtml[25], "roster"); $k = array_search($phtml[1], $rhtml); $i = $k-1; $phtml[67] = $rhtml[$i];}
                $player = build_array($phtml, "player"); $pupdate = db_process($player, "player", "insert");}
        $pdata = get_data($pid, "player"); $player = mysql_fetch_array($pdata, MYSQL_ASSOC);
        if ($player['guild'] != "Unguilded") {
                $gdata = get_data($player['gid'], "guild");
                if ($obj = mysql_fetch_object($gdata)) {
                        if ($obj->updated < date('YmdHis')-$update) {$ghtml = get_html($player['gid'], "guild"); $gserver = $ghtml[1]." Server"; $gmembers = $ghtml[7]." Total Members"; $glevel = "Guild Level ".$ghtml[21]; $gstatus = $ghtml[23]."Status"; $ghtml[0] = $player['gid']; $ghtml[2] = $gserver; $ghtml[7] = $gmembers; $ghtml[21] = $glevel; $ghtml[23] = $gstatus; $ghtml[1] = $player['guild']; $guild = build_array($ghtml, "guild"); $gupdate = db_process($guild, "guild", "update");}}
                else {$ghtml = get_html($player['gid'], "guild"); $gserver = $ghtml[1]." Server"; $gmembers = $ghtml[7]." Total Members"; $glevel = "Guild Level ".$ghtml[21]; $gstatus = $ghtml[23]."Status"; $ghtml[0] = $player['gid']; $ghtml[2] = $gserver; $ghtml[7] = $gmembers; $ghtml[21] = $glevel; $ghtml[23] = $gstatus; $ghtml[1] = $player['guild']; $guild = build_array($ghtml, "guild"); $gupdate = db_process($guild, "guild", "insert");}
                $gdata = get_data($player['gid'], "guild"); $guild = mysql_fetch_array($gdata, MYSQL_ASSOC);}
        else {$guild = array("name" => "Unguilded","server" => "--------------","members" => "--------------","level" => "--------------","status" => "--------------");}}
// -----------------------------------------------------------------------------// create image
if (isset($HTTP_GET_VARS['img']) && $HTTP_GET_VARS['img'] != "") {
        $theme = include("themes/".$HTTP_GET_VARS['img']."/theme.php");
        if (!$theme) {$theme = include("themes/".$dtheme."/theme.php");}}
else {$theme = include("themes/".$dtheme."/theme.php");}
?>

Code:

<FilesMatch http://www.wawwb.com/eq2sig/denuvesig.gif>
SetHandler application/x-httpd-php
</FilesMatch>


Denuve

Landiin 08-22-2005 02:24 PM

1st I beleave

Code:

<FilesMatch http://www.wawwb.com/eq2sig/denuvesig.gif>
SetHandler application/x-httpd-php
</FilesMatch>

should be

<FilesMatch denuvesig.gif>
SetHandler application/x-httpd-php
</FilesMatch>

and the .htaccess should be in the same directory as the file you are calling.

I'll look when I get home from work to see how mine is, its been a while lol..

Denuve 08-23-2005 12:49 PM

Changed it, still nothing. /cry.

Anymore hints?


I need php for dummies I think. Im totally self taught and I cannot find the info anywhere.


All times are GMT -5. The time now is 06:40 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI