Forum is shutting down, join us on Discord.

- No new threads can be created
- Shoutbox has been disabled
- All chat/support/market will be on Discord
- if you have a special status on forum (ie: staff, legendary user, etc), then PM Phoenix on forum with your Discord name to reclaim your status on Discord
See you all on Discord!


  
Go Back   Twilight MU Online Forum > Community > Programming Section

Programming Section All programming related stuff goes here.


Welcome to the Twilight MU Online Forum forums.

You are currently viewing our boards as a guest which gives you limited access. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

After registering you will receive an email with a confirmation link that you will need to click in order to activate your forum account.

NOTE: It's recommanded that you use on forum a different username and password than the game username and password.

If you have any problems with the registration process or your account login, please contact contact us.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next

[Tutorial] Making a dynamic signature for Twilight :: v2.0
Old 08-02-2009   #1
Quest
Silver Member

 
Quest's Avatar
 
InGame Character:
Quest is offline
Points: 7,533, Level: 37
Points: 7,533, Level: 37 Points: 7,533, Level: 37 Points: 7,533, Level: 37
Level up: 21%, 317 Points needed
Level up: 21% Level up: 21% Level up: 21%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2007
Age: 39
Rep: Quest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant futureQuest has a brilliant future
Rep Power: 236
Casino Cash: 2715
Cool [Tutorial] Making a dynamic signature for Twilight :: v2.0

Download version 3.2 of the script. Tutorial is still for version 2. Following this tutorial you won't get a working signature, however you will have a grasp of the principles and be able to modify v.3 easily. There is no update planned for the tutorial.
{Dynamic Signatures, Tutorial v.2}
Hello everybody,

So here comes a new version of my tutorial. This one has several major changes and I decided not to modify the previous tutorial as people can still learn and use the method decribed in it. And maybe I like to leave it as a mark from where I started.

Changes
This section is dedicated to those that are already familiar with dynamic signatures and/or my previous tutorial and want to have a quick look at what's new. The rest can skip this and known that the tutorial is still written for people who are beginners.
Changes:
  • Using TTF fonts.
  • Using two images.
  • Including Elite reset.
  • Using XAMPP for quick "offline" signature creation.
If I aroused your interest then read on.

[1. Introduction]
This tutorial explains how to create dynamic signatures for Twilight MU using PHP. It's an easy tutorial and although I said it's for beginners I do expect you to know what a webserver is, what Apache & PHP are (at least vaguely), and to be generally knowledgeable with computers (e.g. no help needed for creating folders). Some things that I will mention if they don't immediately make sense, or are not explained, it means you'll get it when you make it to that part while creating your signature.

Again I am warning you that I am a n00b and that the things that make up this tutorial were learnt, copied, modified from others and sought with google. I can hardly take credit for 100% of this. Oh, and if your computer explodes while following it then you know why.

[2. Things you will need]
  • two already-made .PNG signatures. We use two because in this tutorial we learn how to display different images depending on the online status of the character. For this tutorial I used this image and this image (using Scyonx as test subject without his permission; hope I don't get KS/PKed). Do notice that the signature needs to be specially made with space left for numbers & letters to be written. You must have everything put in the signature except status numbers and guild name. Of course, it will work with any kind of signature too, but imagine how ugly it will look to have numbers written on it.
  • server with PHP AT LEAST 5.2.8 AND php functions include( ) and fsockopen( ) enabled. -- (If you just want to learn how to do dynamic signatures then this is optional, as you can use XAMPP) -- Big warning here, as most free hosting companies do NOT have include() and fsockopen() enabled, usually offering them only if you upgrade your account to a paid one. Also I noticed alot of you use DeluXe Host (dhost.info) for their dynamic signatures. That host won't work nicely with this new script, because they have PHP v5.2.6 (thanks goes to Ranita for helping me discover this). It doesn't necesarely mean you have to find a new host if you know they will update PHP or you can tell them to.{looks like they updated php}
  • This font - It's the font I used in this tutorial. You can use any other font you like when creating a signature.
  • XAMPP - This is optional for those that already know the drill and use webservers. For the rest it's helpful because it enables them to learn how to do dynamic signatures without the need for a host. Of course, if they want to use the signatures online, they will need a host.
  • again, patience.

[2. Installing XAMPP]OPTIONAL
XAMPP is a webserver package including Apache, PHP, MySQL and others. We'll use it in this tutorial to create our signature and visualize it before uploading to our host. Also, using XAMPP is faster than working with a webserver because the changes to the script are faster visualized compared to communicating with the host and waiting for the host to communicate with twilightmuonline.com.
First let's download the installer from http://www.apachefriends.org/en/xampp-windows.html .



After downloading it double click for installing it. Leave everything as it is during instalation and wait for it to complete. After finishing it you should have a new icon on your desktop named "XAMPP Control Panel". Opening it shows:



From here we can Start/Stop Apache, the only thing we need.
!Make sure you allow XAMPP when/if your firewall asks anything about it. Also, as far as I know, localhost communications don't need firewall ports opening, but if it doesn't work, then you might need to punch a whole for port 80 through your firewall.

Press Start for Apache and minimize that window.



[3. Creating the folder structure]
We are going to make a directory structure for our signature. This step refers to creating the directories for XAMPP (offline, on your PC); those who want to use hosting directly just create the folders on your server. The root folder of our XAMPP local server is located in C:\xampp\htdocs\



You can see we already have alot of stuff in there but it doesn't interest us. Just create the following folder structure:



We can access our signature by browsing the http://127.0.0.1/signature_example/sig.png/ address. At the moment nothing is there but keep the address handy as you'll view it again and again.

[4. Copying the images]
Verify that all is in order with the prepared signatures...





Name the one for when online signature.png and the other one signature_offline.png and copy them both to the C:\xampp\htdocs\signature_example\sig.png\images folder.


[5. Copying the font]
I will use the Smudger LET Plain:1.0 (TrueType) font. Download it on your PC and copy it to the C:\xampp\htdocs\signature_example\sig.png\font folder.
For the old clients: observe that we can now use TTF (and OTF too) fonts. The gain is enourmous. We don't need to convert fonts anymore and even by the converting we did before we couldn't use fancy fonts because they all needed to be "pixelized" for php use. With the new script fonts look as they really do letting the creator to make more beautiful signatures. Also it's easier now that conversion is eliminated and fonts can be used in their original file format.
As reference here's how the font would have had to look if we were using the old script:

__________________

Last edited by Quest; 21-01-2010 at 09:00 AM..
 
The Following 2 Users Like Quest's Post:
GuBR (08-02-2009), Scyonx (08-02-2009)
 

Bookmarks

Tags
dynamic signature


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -5. The time now is 04:10 PM.



vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2006 - 2019 Twilight MU. All Rights Reserved