Pages: 123

  2008-07-19 17:38:10

andHa
» FTalkWhiz
FTalk Level: zero
3386
0
1969-12-31

[hr][hr] [align=center][color=grey][b]Customize Your Own Font Type[/b] Credit : andHa[/color][/align] [hr][hr] [table][tr][td][b]Description[/b][hr][/td][/tr][/table] Sedikit penjelasan mengenai scr

[hr][hr] [align=center][color=grey][b]Customize Your Own Font Type[/b] Credit : andHa[/color][/align] [hr][hr] [table][tr][td][b]Description[/b][hr][/td][/tr][/table] Sedikit penjelasan mengenai script yg bakal gw share berikut ini. Dgn script ini, lu bisa nulis text di profile fs lu, baik di more about me, wiwtm, header, comment, dll dgn berbagai jenis font yg ada. Lu juga bisa ngatur derajat kemiringan dari text lu. Dan bakal bekerja walopun di kompi sang viewer ga ter-[i]install[/i] jenis font tersebut. Dan script ini ga ngebutuhin js external. [table][tr][td][b]Tutorial[/b][hr][/td][/tr][/table] [li]1. Download jenis font yg lu mau di [url=http://cooltext.com/Fonts]cooltext.com[/url], ada lebih dari 1000 koleksi font di sono.[/li] [li]2. Buat folder baru di folder utama hostingan lu dengan judul [b]fonts[/b].[/li] [li]3. Upload file font yg udah lu download di web hosting lu ke dalam folder fonts.[/li] [li]4. Buat file php baru di folder utama hostingan lu, dengan judul bebas. eg : [b]customized_text.php[/b][/li] [li]5. Masukkan script di bawah ini ke dalam file php tersebut.[/li] [spoiler]<?php /* Customized Font Type || By si-andha Visit http://si-andha.web44.net */ class andhaCostumizedText { var $font = 'fonts/[color=red][b]fontname.ttf[/b][/color]'; function andhaCostumizedText($width,$height,$text) { $font_size = [color=green][b]30[/b][/color]; $image = @imagecreate($width, $height) or die('Text is missing'); $background_color = imagecolorallocate($image, [color=darkblue][b] 255, 255, 255[/b][/color]); $text_color = imagecolorallocate($image,[color=darkred][b] 0, 0, 0[/b][/color]); $textbox = imagettfbbox($font_size, 0, $this->font, $text); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; imagettftext($image, $font_size, [color=blue][b]0[/b][/color], $x, $y, $text_color, $this->font , $text); imagejpeg($image); } } $width = isset($_GET['width']) ? $_GET['width'] : ''; $height = isset($_GET['height']) ? $_GET['height'] : ''; $text = isset($_GET['text']) ? $_GET['text'] : ''; header('Content-Type: image/jpeg'); $andha = new andhaCostumizedText($width,$height,$text); ?>[/spoiler] Keterangan [quote][color=red][b]Merah[/b][/color] : Nama dari font yg udah lu upload di hostingan lu. [color=green][b]Hijau[/b][/color] : Ukuran dari font. [color=darkblue][b]Biru Tua[/b][/color] : Warna dari background, setting menggunakan RGB (contoh di atas adalah untuk warna putih) [color=darkred][b]Merah Tua[/b][/color] : Warna dari font, setting menggunakan RGB (contoh di atas adalah untuk warna hitam) [color=blue][b]Biru[/b][/color] : Derajat kemiringan dari font.[/quote] [li]6. Gunakan kode di bawah ini untuk masukin customized text di profile fs lu.[/li] [spoiler]<img src="[color=darkred][b]http://si-andha.web44.net/customized_text.php[/b][/color]?width=[color=red][b]350[/b][/color]&height=[color=green][b]90[/b][/color]&text=[color=blue][b]Text[/b][/color]">[/spoiler] Keterangan [quote][color=darkred][b]Merah Tua[/b][/color] : URL dari file .php lu. [color=red][b]Merah[/b][/color] : Lebar dari text. [color=green][b]Hijau[/b][/color] : Tinggi dari text. [color=blue][b]Biru[/b][/color] : Text yg lu mau.[/quote] [li]7. Done ![/li] [table][tr][td][b]Preview[/b][hr][/td][/tr][/table] [align=center][img]http://si-andha.web44.net/customized_text.php?width=250&height=40&text=Hypmotizin[/img] [img]http://si-andha.web44.net/for_ftalk/font_dekha_21.php?width=300&height=40&text=gravitysucks[/img][/align] atau Silahkan tulis text apapun yg lu mau di bagian yg gw [b]bold[/b] di bawah ini. [quote]http://si-andha.web44.net/customized_text.php?width=350&height=80&text=[b]Text[/b][/quote] Dan buka URL tersebut di browser lu untuk ngeliat hasil nya. [table][tr][td][b]Important Note[/b][hr][/td][/tr][/table] [li]Pastiin hostingan lu support untuk php.[/li] [li]Text ini berbentuk image, jadi lu musti sesuaikan besar image dengan panjang text lu.[/li] [li]Gunakan [url=http://www.colorcombo.com/bghex.html]converter[/url] untuk merubah kode hex menjadi rgb.[/li] [hr][hr] [align=center][flash=250x50]http://si-andha.web44.net/for_friendster/flash/siggy.swf[/flash][/align] [hr][hr]

Last edited by andHa (2008-08-25 19:52:24)

Pages: 123

Board footer

© 2025 F Talk

Current time is 13:19

[ 12 queries - 0.008 second ]
Privacy Policy