Dynamic Signature Olympus

Stand-alone scripts designed for a specific function, but not neccessarily part of normal forum browsing.
Forum rules
Image Please feel free to download any Scripts here, support for each Script is located it's own thread.

To post your own Script, please first read the MOD / Script Guidelines

Re: Dynamic Signature Olympus

Postby Smix_cz » 02 Feb 2007, 12:25

Yes it works, but in the signature doesn´t ...

This
imagestring($this_img, 1, 4, 49, utf8_normalize_nfc($config['site_desc']), $color);
and this
imagestring($this_img, 1, 4, 49, utf8_clean_string($config['site_desc']), $color);
... have same result ...

I am actually confused ... Because if I am thinking about that - right characters are properly added to phpBB (probably with that functions) but aren´t shown in right way in php scripts ... So I think that functions are good, but not useful for those functions like imagestring() ... So I´ll have a look in php documentation ...

And I probably found that ...
http://cz2.php.net/manual/en/function.imagestring.php wrote:Piotr dot Sulecki at traxelektronik dot pl
09-Nov-2006 12:18
The built-in fonts used to be in latin-2 (iso8859-2) encoding. For some time, they are in latin-1 (iso8859-1) encoding. There is no way to change the encoding at all. If you need to use any other encoding, you have to use TrueType fonts.

... So I tried to check it if it´s true, so I make my own function ...
Code: Select all
function toiso($text){
  iconv('UTF-8', 'iso8859-2',$text);
  return $text;
}

but it´s true, php don´t like it ... "Detected an illegal character in input string" Wink

So it´s necessary to use imagettftext and font which knows right characters ... So ...
I added and used imagettftext instead of imagestring ... Wink
Code: Select all
$font = "framd.ttf";
imagettftext($this_img, 10, 0, 1, 50, $color, $font, $config['site_desc']);

... Result is visible in my signature Wink
Smix_cz    
Borg Drone
Borg Drone
 
Posts: 226
Joined: 25 Jan 2007, 09:25
Location: Czech Republic, EU
Favorite Team: Chelsea
Gender: Male
phpBB Knowledge: 9




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Dynamic Signature Olympus

Postby Handyman » 02 Feb 2007, 13:51

so using a true type font worked for you?
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7456
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Dynamic Signature Olympus

Postby Smix_cz » 02 Feb 2007, 17:22

(I think Grin ) Yea, there is no other way ... Than use true type fonts ... as I already wrote ...
Smix_cz    
Borg Drone
Borg Drone
 
Posts: 226
Joined: 25 Jan 2007, 09:25
Location: Czech Republic, EU
Favorite Team: Chelsea
Gender: Male
phpBB Knowledge: 9

Re: Dynamic Signature Olympus

Postby Patricia » 13 Feb 2007, 05:47

Hi Guy's,

I get this error:
Fatal error: Call to undefined function imagecreatetruecolor() in C:\wamp\www\sig.php on line 35

Image
Beg

Forum:
Phpbb 3 Beta 5

Thanks,
Patricia
User avatar
Patricia    
STG Moderator
STG Moderator
 
Posts: 833
Joined: 09 Feb 2007, 08:27
Location: latitude: 51.00 - longitude: 5.87
Gender: Female

Re: Dynamic Signature Olympus

Postby Smix_cz » 13 Feb 2007, 12:00

Show phpinfo() and check out if you have GD Support enabled on your hosting ...
Smix_cz    
Borg Drone
Borg Drone
 
Posts: 226
Joined: 25 Jan 2007, 09:25
Location: Czech Republic, EU
Favorite Team: Chelsea
Gender: Male
phpBB Knowledge: 9

Re: Dynamic Signature Olympus

Postby Patricia » 13 Feb 2007, 14:29

No GD running
User avatar
Patricia    
STG Moderator
STG Moderator
 
Posts: 833
Joined: 09 Feb 2007, 08:27
Location: latitude: 51.00 - longitude: 5.87
Gender: Female

Re: Dynamic Signature Olympus

Postby Highway of Life » 13 Feb 2007, 14:45

You are running on WAMP?

Okay, I'm not a WAMP expert, so someone else should point patsi to the correct adjustment that needs to be made,
but AFAIK, WAMP supports GD (on) by default. Scratch
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Dynamic Signature Olympus

Postby Smix_cz » 13 Feb 2007, 16:15

GD must be always enabled manually (I think) ...

But I´m not sure about the sentence
"No GD running"
it means - No, GD is running or GD isn´t running :?: ...

if you are running on WAMP (I´m not using any WAMP pack - I installed it part by part) than you have to manually edit php.ini and delete ; on row
Code: Select all
;extension=php_gd2.dll   
so the result must be
Code: Select all
extension=php_gd2.dll   
Smix_cz    
Borg Drone
Borg Drone
 
Posts: 226
Joined: 25 Jan 2007, 09:25
Location: Czech Republic, EU
Favorite Team: Chelsea
Gender: Male
phpBB Knowledge: 9

Re: Dynamic Signature Olympus

Postby Michaelo » 19 Feb 2007, 03:48

It is enabled on my version... Version 2.3 I think...
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Re: Dynamic Signature Olympus

Postby Patricia » 28 Feb 2007, 05:58

Thanks Guy's, but doesn't work on my forum. It's ok I will look to it in the future.

Thanks for your help.
User avatar
Patricia    
STG Moderator
STG Moderator
 
Posts: 833
Joined: 09 Feb 2007, 08:27
Location: latitude: 51.00 - longitude: 5.87
Gender: Female

PreviousNext

Return to Scripts

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests