Graphical Text MOD - FINAL - Version 2.0

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Locked
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Graphical Text MOD - FINAL - Version 2.0

Post by Jérôme »

Graphical Text MOD is implemented in phpwcms core code since 2004-06-08. All questions should be posted in support forum only.

Code: Select all

############################################################################################
## MOD Title: phpwcms Graphical Text MOD
## MOD Author: Jerome < spam@jerome-gamez.de > (Jerome Gamez) http://jerome-gamez.de/
## MOD Description: Adds the possibilty to create dynamic graphical text
##                  with replacement tags
##
## MOD Version: 2.0
##
## Installation Level: Easy
## Installation Time: 5-10 Minutes
##
##
## Files To Edit:  phpwcms.php
##                 include/inc_front/content.func.inc.php
##
###########################################################################################
## For Security Purposes, Please Check http://www.phpwcms.de/forum/
## for the latest version of this MOD. Downloading this MOD from other sites could cause 
## malicious code to enter into your phpwcms-installation. As such, phpwcms will not 
## offer support for MOD's not offered at: http://www.phpwcms.de/forum/
###########################################################################################
## Author Notes:
##
##       For usage information, see the file "replacement tags.txt".
##
##       Full localisation is only available in english and german. All other languages
##       are also english and perhaps not actual. This is due to the fact that I can't
##       speak all the languages, but the folders must be available to prevent phpwcms
##       from moaning about include-errors.
##
##       If you want to translate the MOD to your native language, please feel free to
##       send me your lang.inc.php so that I can include it to the MOD.
##
###########################################################################################
## MOD History:
##
##   2004-05-17 - Version 2.0
##      * Added underline ability
##      * 2.0 final. This version will be included into the core of phpwcms. No further
##        development as a MOD.
##
##   2004-05-15 - Version 1.5
##      * Added background and foreground transparency
##        Note: Transparency can lead to worse image quality
##
##   2004-05-11 - Version 1.4
##      * Chose output format (JPG, PNG, GIF) in the styles area.
##        Unsupported formats will not show up
##      * Just one replacement tag available:  {GT:style] ... {/GT}
##      * Fixed filename issue (no capital letters were possible)
##
##   2004-05-04 - Version 1.3
##      * Perfect caching
##      * Dropped fontizer.php => no security/exploit issues anymore
##      * fixed some bugs
##      * fixed NS 4.x problem (could not handle URI parameters)
##
##   2004-05-03 - Version 1.2 BETA
##      * Added first caching engine (better, but not best)
##      * Fixed some bugs
##
##   2004-04-25 - Version 1.1.2
##      * Fixed bug which prevented from deleting a style
##      * Added font, color and style data to show how things work and to make it possible
##        directly to use the fonts, colors and styles
##
##   2004-04-13 - Version 1.1.1
##      * Fixed display bugs in the styles edit screen
##      * Fix of the fonts include problem that affects users with disadvantageous
##        open_basedir/include settings of php
##
##   2004-04-13 - Version 1.1
##      * Change in the use of the replacement tag. It is now possible to use other
##        replacement tags within a graphical text replacement tag
##      * Background color property added. This property is optional, but if it is not
##        given, the quality of the generated text will decrease massively
##      * Font preview in the backend added
##      * Anti-Aliasing switch
##      * Color presets
##        Ability to define names that represent colors. This makes subsequent changes to
##        colors easier and more effective (the changes are reflected on the whole website
##        immediately)
##      * Styles presets:
##        Ability to define combinations of font, size and colors for easier 
##        inclusion in articles and subsequent site wide changes (the changes are reflected
##        on the whole website immediately
##      * Changement of replacement tags
##        * {GT:font_shortname:size:antialiasing:fgcolor:(bgcolor)}text{/GT}
##        * {GT:style}text{/GT}
##
##   2004-04-08 - Version 1.0
##      * Initial Release
##
###########################################################################################
## Before Adding This MOD To Your phpwcms, You Should Back Up All Files Related To This MOD
###########################################################################################
Important information
  • You will first have to upload your fonts to your webspace and add them to the database before you can make use of it. More detailed information is provided on the 'Graphical Text' MOD's index page.
  • Transparent background will lead to bad image quality
Download

mod_graphical_text_2_0.zip

Replacement Tags

{GT:style}text{/GT}
This is really easy to use. You have to define styles in the backend that you can use in the frontend.


You will need freetype support enabled on your server. Search your phpinfo() for the string "freetype" to check if you have it.
For transparency you need at least PHP 4.3.2.
Last edited by Jérôme on Mon 17. May 2004, 19:50, edited 20 times in total.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Again a long night of work, but I hope it was worth it ;). The only thing that disturbs me is that nobody is awake to test the MOD immediately ;).
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

what is the GT index page?
does this mod enable you to use any font in your article by converting the font to a graphic then replace every letter with a graphic?

wiat about bold, underline, italic leading(empty pixels on the top of the letter increasing line height) and kerning(empty pixels after letter increasing letter spacing)?

if this is what I think I am very teased :)
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

I will test it and you will hear from me :D
http://www.studmed.dk Portal for doctors and medical students in Denmark
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

This is yet a very simple MOD at the moment. It enables you "only" to create graphical text whith whatever font you want in every size you want with whatever text you want wherever you want :)

You give a text, and the Replacement Tags return you one single PNG with the text in your font.

PS: The GT (= Graphical Text) Index page is the pagee you see when you click on "Graphical Text" in the Modules-Area.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

YUMMY: installing now, feed back so very soon :)
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

pSouper wrote:what is the GT index page?
does this mod enable you to use any font in your article by converting the font to a graphic then replace every letter with a graphic?
No, it creates one single image-file (PNG at the moment).
pSouper wrote:wiat about bold, underline, italic leading(empty pixels on the top of the letter increasing line height) and kerning(empty pixels after letter increasing letter spacing)?
This depends of which font you load up and use.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

With the help of frold, I found out that the install instructions are buggy (it was late again *apologize*). Until i have uploaded a cleaned up version, please notice the following [...]

EDIT: Notice the following post of pSouper, he has done it better ;)
Last edited by Jérôme on Thu 8. Apr 2004, 12:18, edited 1 time in total.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

from

Code: Select all

$wcsnav["modules"] = "<strong class=€"navtexta€">".$wcsnav["modules"]."</strong>";
to..

Code: Select all

$wcsnav["modules"] = "<strong class="navtexta">".$wcsnav["modules"]."</strong>";
only € is actualy a euro sign but this bb doesn't like that in a [ code ]much :)
Last edited by pSouper on Thu 8. Apr 2004, 12:13, edited 1 time in total.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

huh? but I don't know what you mean ;). What do you mean?

I have re-uploaded the ZIP - could someone test if the errors in the install instructions still are there, please?
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

i'm testing now but i must wait for 180mb to upload to my new isp - so I'll let you know next week ;)
@j in your amendment you missed an 'a' and in doing so use two different but valid classes. just shoot me ;)
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

There are no some fonts included in the MOD (please don't kill me for legal issues, if there are some ;))
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Some pictures to give you an impression how it looks like in the backend:

GT index page
Image


GT fonts page
Image
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

Mmmmm looks lovely too.

also for anyone looking to avoid any legal issues that may arise from using this (not sure if any, but do suspect some) I get ALL my fonts from http://www.1001fonts.com they are all free and have no legal issue to contened with.
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

great stuff this means we can use any ttf-font on the website?

and for example also only the headline for example?

coool :lol:
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
Locked