Register - Login
Views: 99814377
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:30:26 PM
Jul - Craziness Domain - POKéMON New poll - New thread - New reply
Pages: 1 2Next newer thread | Next older thread
plushifoxed

King Yoshi
la chica dijo...

Mood: The current mood of roxiemika at www.imood.com
Level: 119


Posts: 2767/3990
EXP: 18466573
For next: 462718

Since: 08-22-07

Pronouns: it/its or she/her
From: kamihama city

Since last post: 2 days
Last activity: 1 day

Posted on 04-12-10 09:30:46 PM Link | Quote
Supakitsune
Originally posted by Sanky
By the way, if you have the Pokemon RS font by UPC installed, I'm using that now
Hurgh. Can you use the Emerald one instead? Please?


Other than that, you've got a nice layout there. Nice job

____________________


every aspect will be reborn innovatively
Join Jul's Folding@Home team and help the science get done!
Supakitsune's Tumbln' Thoughts - Catch me on Twitter!
paulguy

Green Birdo
Level: 93


Posts: 611/2294
EXP: 8032694
For next: 20116

Since: 09-14-07

From: Buffalo, NY

Since last post: 9.7 years
Last activity: 9.7 years

Posted on 04-12-10 10:18:34 PM Link | Quote
Paulguy's Post configuration
The way I usually handle monospace fonts is something like:

font-family: "bitstream vera sans mono", "dejavu sans mono", "consolas", "monaco", "lucida console", monospace;

Pretty much anything to avoid the godawful courier/new that browsers love to default to, ugh.

____________________
Post 1088/1311 (41 days), online 1 day ago
Posted on 04-12-10 10:25:18 PM Link | Quote




#51
It'd work best with PHP+GD (passing the tag values into the URL), where you'd just draw the font into the image ... then we wouldn't have to worry about fonts and rendering (look at my status thing, for example)

But other than that, it's nice

____________________
Orlandu


Holy SwordsMan
Level: 137


Posts: 184/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-12-10 11:57:08 PM Link | Quote
I've been meaning to ask you about that, Milly. I've tried making a custom font script using gifs but couldn't get it to work. Any chance you do email me your script for the numbers font? I think I went at it the wrong way, making each letter a separate image.

This would be easier for you Sanky, since you would overlay text and not combining images. I'll see if I can work it up if you need help.

____________________
Rena
I had one (1) message in Discord deleted and proceeded to make a huge, huge mess about how it was a violation of free speech and how moderators are supposed to be spam janitors and nobody should have the right to tell me not to talk about school shootings
Level: 135


Posts: 3095/5390
EXP: 29076727
For next: 258278

Since: 07-22-07

Pronouns: he/him/whatever
From: RSP Segment 6

Since last post: 342 days
Last activity: 342 days

Posted on 04-13-10 01:47:59 AM Link | Quote
04-12-10 08:47:59 PM
Post #3095
Originally posted by Sanky
I wish I could write PHP good enough to splice images together :/
I guess people missed this part.

Anyway it looks nice on my end.

____________________


witty comment
why not?
Orlandu


Holy SwordsMan
Level: 137


Posts: 248/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 03:51:01 PM (last edited by Orlandu at 04-20-10 01:07 PM) Link | Quote
So I've been working on this for you and got a sample:



and here it is with my current stats:



This is using a font overlay with imagettftext php function. Unfortunately, for the letters to be semi legible I have to leave anti-aliasing on. If I turn it off (and make the font pixelated) then some of the numbers are cut off and don't look like numbers anymore. I could find a small font that would substitute Courier New and work at that size, or make an image with the numbers and just do what my stats image does and copy from an image instead of just plain text.

Edit: I found a font that seems to work well enough. Its not an exact match, but I think its close enough.

Edit2: Here is the source code. Save the text file and change it to a .php file. Upload it to your host.

Here is the image url:
http://url-here/pokemon.php?level=&level&&exp=&exp&&expn=&expnext&&expp=&exppct&&exppost=&expgain&&expidle=&expgaintime&&post=&numposts&

Place it in the same folder as your stats image and this font file.

____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 157/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 04:54:48 PM (last edited by Sanky at 04-20-10 02:23 PM) Link | Quote
   
Oh wow, that is so awesome!
I actually have a font here that's ripped from the game, I'll set it to use that!

Thansk again, Orlandu!

EDIT: Hm, the font I have is .fon, not TrueType...
EDIT2: I got a TrueType version. There's just one problem now:

I'm getting a Warning: Cannot modify header information - headers already sent by (output started at /data/sankysoft.com/www_data/www/pics/script.php:1) in /data/sankysoft.com/www_data/www/pics/script.php on line 1.
I tried moving the header info to the top, but it still doesn't work. Any ideas?

____________________
   
17
  
21667
3076
31.4
157
207
967.527
   
Orlandu


Holy SwordsMan
Level: 137


Posts: 250/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 05:27:25 PM Link | Quote
Whats the url of the font? I'll see if I can fix it.

____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 159/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 05:28:25 PM (last edited by Sanky at 04-20-10 02:28 PM) Link | Quote
   
http://www.sankysoft.com/pics/pokemon.ttf - though I don't think that's the cause...

Most probably there's some settings which makes the header get sent automatically, which I need to change. Hm.

____________________
   
17
  
22085
2658
40.8
159
208
949.421
   
Orlandu


Holy SwordsMan
Level: 137


Posts: 251/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 05:59:38 PM Link | Quote
Try removing this line all together.

header('Content-Type: image/png');

____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 160/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 06:02:39 PM (last edited by Sanky at 04-20-10 03:25 PM) Link | Quote
   
Originally posted by Orlandu
Try removing this line all together.

header('Content-Type: image/png');

The script still won't work after that:


I tried the following to see what's actually sent, which forbids the header change:

headers_sent(&$file, &$line) 

var_dump($file, $line)


And I got:

string(48) "/data/sankysoft.com/www_data/www/pics/script.php"

int(1)



I'll try a different server.

EDIT: I did. It's getting better! It sends the header correctly now, so it shows up as an image if you open it in a new window. But the image is broken, and if I open it in a text editor, I get:
Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/free/tym.cz/b/budanka/root/www/jul/script.php on line 16

Lines:

15	$fontf="http://budanka.tym.cz/jul/pokemon.ttf";

16 imagettftext ($dest, 6, 0, $x, $y, -$black, $fontf, $text)


And I'm entirely sure the font is there, you can try download it.

Haha, this post is so long it broke my layout!

____________________
   
17
  
22296
2447
45.5
160
209
940.626
   
Orlandu


Holy SwordsMan
Level: 137


Posts: 252/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 06:32:40 PM Link | Quote
Instead of the full path to the font, put just ./pokemon.ttf and make sure the font is in the same folder as the php file.

____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 161/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 06:34:51 PM (last edited by Sanky at 04-20-10 03:42 PM) Link | Quote
   
Originally posted by Orlandu
Instead of the full path to the font, put just ./pokemon.ttf and make sure the font is in the same folder as the php file.

Yeah, I did that but didn't edit the last post.
Changed it to $fontf="./pokemon.ttf"; as per your source code, and:

Still a broken image. However, if you download it and open in a text editor, it shows up as binary data, no PHP errors or such. Wonder why it doesn't display properly...

EDIT:
IT WORKS NOW YAY REJOICE
The last problem was fixed by changing the encoding from UTF-8 to ANSI.
Thanks a lot for the help, Orlandu!
And now I'll change the layout..


____________________
   
17
  
22507
2236
50.2
161
209
931.962
   
Orlandu


Holy SwordsMan
Level: 137


Posts: 254/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 06:43:27 PM (last edited by Orlandu at 04-20-10 03:44 PM) Link | Quote
I made a few modifications so it looks more aligned. Change this section to the code below:

addtext($level,"120","23",$dest);
addtext($exp,"40","86",$dest);
addtext($expn,"40","102",$dest);
addtext($expp,"49","110",$dest);
addtext($exppost,"40","126",$dest);
addtext($expidle,"35","134",$dest);
addtext($post,"103","118",$dest);

And change this variable at the top to round the exp idle so it doesn't cut off

$expidle=round($_GET['expidle'],0);


____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 162/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 06:44:23 PM (last edited by Sanky at 04-20-10 03:44 PM) Link | Quote
   
Originally posted by Orlandu
I made a few modifications so it looks more aligned. Change this section to the code below:

...

And change this variable at the top to round the exp idle so it doesn't cut off

$expidle=round($_GET['expidle'],0);

I was just going to do that I'll play with it a bit more to get it look as I want it to...

____________________
   
17
  
22718
2025
54.9
162
210
923.371
   
Orlandu


Holy SwordsMan
Level: 137


Posts: 255/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-20-10 06:50:15 PM Link | Quote
Glad I could help. Its fun making this kind of stuff. I may have to make a completely new layout just so I can work on it again.

____________________
 
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 163/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-20-10 07:12:22 PM (last edited by Sanky at 04-20-10 04:12 PM) Link | Quote
   
Yeah, it's fun! Now that I know how to generate that thing, I could make a lot more things.
...if there were %tags% for it, of course...
I'll probably make a G/S styled version sometime. I'm keeping this one for now, though!
Works! ->


____________________
   
   
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 198/2066
EXP: 6311566
For next: 81208

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 15 days
Last activity: 1 day

Posted on 04-25-10 07:10:49 PM (last edited by Sanky at 04-25-10 05:00 PM) Link | Quote
   Bump for the great justice!

I updated my layout to show stats. Since there aren't &tags& for them, I had to come up with my own solution.
The script will get the stats from Jul every day and save them in a MySQL database, while I hand over the script the day I posted the post, using a &'date& tag which makes all this possible.
The final image looks like this:


If there's a problem with the MySQL database (which can happen because of my freehosting), or the date isn't valid, the script fallbacks to the earlier version:

E: well this doesn't work and it did a few minutes ago! Let's see how to fix this.
E2: fixed. Problem was, I had day 0-0-0 saved in the database (which it tried to get, and succeeded).
This is the first recorded day! I hope it won't break sometime when I'm asleep and won't flood Jul with requests.

(I also got a new minipic.)

____________________
   
   
MilesH
the one hundred dollar golden name
Level: 56


Posts: 519/746
EXP: 1356726
For next: 41450

Since: 03-13-10


Since last post: 12.0 years
Last activity: 12.0 years

Posted on 04-25-10 07:19:41 PM Link | Quote
Looking really good, Sanky! Not to mention that you had to write your own solution for those few non-existent tags, which I happen to think was a really neat idea on your part.

Orlandu


Holy SwordsMan
Level: 137


Posts: 329/5913
EXP: 30480221
For next: 392634

Since: 01-12-10

From: Las Vegas, NV

Since last post: 4.0 years
Last activity: 208 days

Posted on 04-26-10 01:36:28 PM Link | Quote
How do you have it pull in your stats? I want to do this for mine also.

____________________
 
Pages: 1 2Next newer thread | Next older thread
Jul - Craziness Domain - POKéMON New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries.
Query execution time: 0.102443 seconds
Script execution time: 0.065870 seconds
Total render time: 0.168313 seconds