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 02-25-2005 08:21 AM

Is it just me, or is there a problem with pulling info from the Sony site recently? I can't get my Sig to work, and can't view others. Been that way for a couple days.

NM. It's working again.

Drumstix42 02-25-2005 03:45 PM

The site was having some problems the last few days until today it seems. I know I'm having troubles right now, as per my host and GD (it's acctually something else, but I like to over simplify ;) )

Humudce 02-25-2005 04:58 PM

They had the EQ2Players.com Guild and Player Info areas down for over 24 hours, that's why the Signatures were not working they could not pull from a page that was not there...

Drumstix42 02-25-2005 06:37 PM

They said 24 hours, but I think it was a bit more than that ;)

metavirus 02-26-2005 08:08 PM

Sig tool is great
 
Many thanks for the great tool. You've helped me brush up on my PHP :).

0ctavius 02-28-2005 08:47 AM

I will continue to work on this script, although I recently quit playing EverQuest 2 for various reasons (chief among them the horrific customer service of SOE)

I may eventually come back to the game, but for right now I am unhappy with the direction it is headed. There was a reason I quit EQ1 and started playing EQ2. It wasn't so I could play EQ1 with a better engine...

taliesan 02-28-2005 12:35 PM

Database
 
What needs to be done to setup the database to cache the data? I have a MySQL database on my server and MyPhpAdmin installed, also, you make mention of using the HTACCESS to get around the image file problem, and said information about it would be in the readme.txt. I just downloaded version 0.07 and saw no reference.

Drumstix42 02-28-2005 01:57 PM

Strange. I think they have good CS.

Mithriler 03-01-2005 08:07 AM

getting an error.
 
Anyone knows why i'm getting this error?

I'm using the 0.07 version, and want to use with Db features, but i' ve got this error.

I think all imputs on config.php are right, but ...

Quote:

9:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENGINE=MyISAM' at line 1
This is the error i get when browse to image.php?cid=262808208
my knows on php and mysql is very very low. :(

Any help?

0ctavius 03-01-2005 09:16 AM

I made no reference to providing the HTACCESS information in the readme. I simply stated you could ask about how to do something like that in the forums. Drumstix may be the better person to answer that, since that is how his is currently working.

As for the MySQL error, I am not sure why you would be getting a syntax error in a script that I am absolutely sure works for me. What version of MySQL are you running, and PHP? It is possible that you have older version of one or the other, or both. The syntax required by MySQL may be different in versions previous to 4.0

Mithriler 03-01-2005 10:26 AM

php version!
 
PHP version running on my host is 4.3.8

my php info

And MySQL is 4.0.16

Andy phpMyAdmin is 2.5.4

could this information help you guys to help me in this error reported?

Thx you at all.

taliesan 03-01-2005 10:27 AM

Sytanx erro
 
I am getting the same syntax error on mine, I was wondering if there were specific database tables that needed to be created for the script to run correctly.

And I mentioned the HTAccess help reference because in post #58 you said...


Quote:

Coming Up (New Features in next version) --------------------------
- ability to set the img type to gif, jpg, or png from within the template for each background
- ability to set signature display to simple, normal, or enhanced
(simple would only have name, rank, and guild which can be used as a small img in a group of images for multiple alts)
(normal is what you see now)
(enhanced would be longer and have stats such as stamina, health, etc...)
- ability to secure the script to only be usable by members of a specific guild (your guild) or only a specific player id (you) so that no one else can use your script (be aware the database version will be multi-user capable without consequences, except for maybe bandwidth and database usage)
- ability to define in the config whether to use a database or not. If you say yes, it will automatically create a table based on the data you provide in the config file. It will store player info and guild info in tables for a basic caching functionality. A setting in the config determines the timeout before it gets new data and updates the database (basically a TTL). Each db entry is timestamped so that it can be updated on this schedule... (default timeout will be 4 hours)
- possibly a roster page that displays all members of a given guild. Would use the same database (or none if database is set to false) for caching player data.
- a better readme with version history
- instruction in the readme on how to use tinyurl.com or HTACCESS depending on which you are able to do...
- GD fonts included and configurable in the background templates
But help from anyone would be greatly appreciated.

BTW Awesom job on the script, it works great so far.

Drumstix42 03-01-2005 12:12 PM

Quote:

Originally Posted by 0ctavius
- instruction in the readme on how to use tinyurl.com or HTACCESS depending on which you are able to do...

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...

taliesan 03-01-2005 12:17 PM

Ok thanks for clearing that up and thanks for the HTACCESS info :D

taliesan 03-01-2005 12:20 PM

I believe the MySQL error, is something about permissions, Im looking into whats causing mine now, ill post what it was when I do.

Ok... fixed my layout error. I had changed the image type identifier at the bottom of the theme to gif instead of png so was confusing the image generator i think. Once i realized that and changed it back to PNG i can put the text anywhere.

Drumstix42 03-01-2005 01:23 PM

Text that doesn't show in the image has never ever caused an error for me, like.. you can make text so it shows half on the image and half off.

It must be something else methinks. But I'm not sure what. I don't hassle with templates and stuff. I keep it more basic all in 1 or 2 files ;)

taliesan 03-02-2005 03:15 PM

Well found out my host was using a 2.x version of PHP, and 3.x version of Perl, trying to get him to update those to see if the problem is resolved.

PhatBoyG 03-02-2005 03:57 PM

I wrote my own. Based on my web cache, a few others have started using it as well. :)

taliesan 03-03-2005 02:02 PM

Alright, well I may not be able to get the version of MySQL updated. Is there anyone who could help me set Octavius's script to cache the images on an hourly or daily or whatever basis if the database isnt being used?

Drumstix42 03-03-2005 02:05 PM

With Octavious's script you don't have to do DB cache, but it will parse the EQ2players page each time it loads, which is yes, slower, but not too bad unless the page is under heavy load.

taliesan 03-03-2005 03:22 PM

Ok.. I gave up on caching, and figured out what my problem with the database was.. It didnt like me defining the Engine.

By Changing This:
,PRIMARY KEY(`id`)) ENGINE=MyISAM;";

To This:
,PRIMARY KEY(`id`));";

The problem was resolved.

taliesan 03-03-2005 05:41 PM

Ok... New issue.. wierd one too.

Whenever my sig generates, it appears like this.



Notice that there is a " Server" after the name Antonia Bayle. And that after Guild Level there is no ":"

Here is my image.php file that I link to when making the image.. I have removed all instances of " Server" and placed a ":" after all instances of Guild Level.

Help?

Code:


<?php
ob_start("ob_gzhandler");
require("includes/config.php");
require("includes/global.php");
$pid = get_var($HTTP_GET_VARS['cid'], "pid");
$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]; $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]; $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]; $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");}
?>


Drumstix42 03-03-2005 09:01 PM

Umm what do you need help with?

Degolas 03-03-2005 09:31 PM

Weird thing, when i tried to use the fonction to lock the user to my char, it doesn't work. I mean the sig doesn't show at all... weird. I can still lock the guild but weird...

Nightlord 03-03-2005 11:22 PM

Question: If I use a black image then my colors work fine, but if I use some other GIF then the words all turn red no matter what I set their color too. Any suggestions?

taco-man 03-03-2005 11:47 PM

its because gif's can only have 256 colors total so either leave 1 spot for each extra color you want or use a color that is in the image already.
example you have a picture and you want to have text with the color #FF00FF which is a bright purple. in my example i am assuming #FF00FF is not currently one of the colors in your gif so you make your gif 255 colors leaving 1 color open for #FF00FF when the text is added. i hope that makes sense.

Drumstix42 03-03-2005 11:52 PM

useing the imagecreatepng results in the best quality, as stated by the devs of it themselves :)

*edit* and for clarification, you can use any type image background you want, png, gif, jpg, color will work, you just need to use the right PHP code ;)

Mithriler 03-04-2005 08:09 AM

Thx a lot.
 
Quote:

Originally Posted by taliesan
Ok.. I gave up on caching, and figured out what my problem with the database was.. It didnt like me defining the Engine.

By Changing This:
,PRIMARY KEY(`id`)) ENGINE=MyISAM;";

To This:
,PRIMARY KEY(`id`));";

The problem was resolved.

Thanks a ton, Taliesan, this resolve my error too.


anyway, great job this script, Octavius, ... i'm waiting for "Roster script" as it was announced, but .... maybe, if you don't play EQ2 anymore, this release will not happen but .... i'm waiting for if it's possible,:D

taliesan 03-04-2005 10:02 AM

Boggle, well the problem fixed itself, maybe it was just the way my browser was caching the image.

Mithriler I have a roster that I use My Roster If you PM me with your email address I can send it to you.

Elenna 03-04-2005 12:19 PM

I'd like to create some more themes for use with this dynamic sig code.

There are a few UIs here that use some very cool borders... if I wanted to snag their graphics to make some themes for this - I am guessing I need to contact each author and make sure I have their permission first?

taliesan 03-04-2005 05:23 PM

Would be polite even if not necessary.

Drumstix42 03-04-2005 06:45 PM

Welp back to coding mines some more, got my GD library back up and I've seen that they've implemented playing time and last on in the achievements page ;)

Nightlord 03-04-2005 07:18 PM

Drum, I got the colors.
 
Quick thanks to Drum. I got the colors issue worked out by using PNG files like you said. Also, the .ataccess idea to make GIFs work as PhP gets my vote for: Kicks more ass than Jackie Chan. Good job.

Only issue now is that the code only pulls from the first page of the Player section: Stats, attributes, guild info and resists. I'm trying to figure out how to add accomplishments to the data being parsed.
I checked out Oct's code and it apparently doesn't parse this info either.

Kale27 03-08-2005 05:43 PM

I have a question!

Ive got it up and running etc. My guild name is too long so I just edited the PHP and image files. However Id like to add some things to my sig (kills etc). I realize someone asked for this before but Im a bit unsure if its been answered.
1. Do I edit the config.php?
2 .Is this where I need to enable the database settings?
3. If so what name and PW do I use? Station name or my server name and PW?

Then Im concerned that if I put that info in the config file that someone can grab it..

Thanks

Kale27 03-08-2005 05:47 PM

Ok to answer my own stupid question - I forgot I cant view the source of PHP if its set up correctly so just ignore my worries about someone sneaking my user/pw etc heh.

Drumstix42 03-08-2005 05:48 PM

Nightlord: Cool. Yeah gotta do edits for the other stuff. For me I did a lot of editing to mold the code easier to add different things (at least for me).

Kale27: Kinda the same thing here, it was kind of a pain to parse in the attributes page and all the odds and ends. Plus, if you want to cache it you have to add the SQL lines or modify them (most of them with which order counts). It's kind of a painfully long process, but the result pays off.

Kale27 03-08-2005 05:59 PM

Ok im a bit lost.. (sorry for that). I still am unsure where the starting point is to add dynamic information to the sig.

Which PHP file am I to be editing?

Do I set database to TRUE?

Kale27 03-08-2005 06:11 PM

Ok helps to have the right database name../bonk self


My DB is set up ready to rock. Just need to figure out how to add the additional stats.

JuanKa 03-16-2005 04:43 AM

the code is broken? i see error in the signatures.

Mikeablah 03-17-2005 12:26 PM

Just change it :D

That ;nsbps thingy on the bottom left is what you referring to? Its been doing that since the update to eq2players.


All times are GMT -5. The time now is 10:58 AM.

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