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:

Post by Jérôme »

Was hast du denn da, in Zeile 72? Zeig misch ein bisschen Code :). Weil, hellsehen kann ich nicht :mrgreen:
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

snobba wrote:Looks fantasic Jerome!!

But freetype still have to be present for GD, right? My hosting provider are a bit lazy so I do not know if I will have it or not... :cry:
Freetype is and will always be mandatory for the use of this MOD. It is clear: to handly fonts, you need a font library: freetype...
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Gehen auch GIF?

Post by Keules »

Hi Jérôme!

Sag mal , werden in Zukunft die Bildchen vielleicht auch als Gif abgespeichert?

Als JPG sind um die 5 kurze Worte etwa 6 KB groß, je nachdem was für ein Font ich nehme. Gif ist da kleiner. Vielleicht kann man ja eine Auswahl einbauen, entweder Gif, oder JPG, ist das eine Überlegung wert ? :lol:

Ansonsten erst mal ein grosses Danke, es klappt hervorragend mit dem Caching.
:P
Ciao
Keules
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

GIF wird leider von den meisten PHP-Versionen nicht unterstützt, deswegen steht das derzeit nicht zur Auswahl.

Die Auswahl des Ausgabeformats steht in der nächsten Release an, stand aber schon auf meine ToDo Liste... Dann wird auch wieder PNG möglich sein und die Transparenz. Und alles wird über die Styles zu steuern sein. Ich möchte gerne von diesen manuellen Stil-Angaben weg kommen.

Ich weiß nur noch nicht, wann ich dazu komme. Aber irgendwann bestimmt :).
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

WOW - Works great

Post by jsw_nz »

Jerome, you have out done yourself.

Have been away from the boards for awhile....
Checked in this morning to find that you just released 1.3

And what do you know - it works great in NS!.

This is awesome mod that will lead to creative design possibilities. Much thanks for your hard work and great solution! Cannot say enough of how much I appreciate your awesome mod!

Cheers from new zealand,
jsw
bertalizer
Posts: 47
Joined: Sat 21. Feb 2004, 14:24
Location: Belgium

Post by bertalizer »

super!
But wouldn't it be possible to let us choose the output format via a little conf-file; jpeg, png (and gif, if supported by the server)?

I'd like my images to be PNG's as they are "cleaner" than JPEGs (blurry edges).
I thought that some browsers only have problems with transparant png's (and this is not the case with the mod)

Thanks for your great work!
B.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Bertalizer, the next version will give you the possibility to chose the output format as you like to, and some more options... I will just need time... and some free time ;).
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

just a little note

Post by jsw_nz »

Just wanted to add this little tidbit......Jerome you can correct me if I am wrong. Seems the title of fonts does not like uppercase. I uploaded one of my favorites, and it originally did not show up in the first scan of your mod. When I renamed with lowercase letters, showed up and was easily added to the db. Worked like a charm.

Also wanted to add this little side note....perhaps the replacement tags.txt file needs to be updated from

Code: Select all

{GT:trebuchet:12:1:FFFFFF:003366}This is an example text{/GT}
to {GT:treb:12:1:FFFFFF:003366}This is an example text{/GT}
to reflect the names provided on the default installation.

cheers,
jsw
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Version 1.4 released
  • It is now possible to use fonts with capital letters. Until now, it was only possible to have files with small letters.
  • The MOD will automatically recognize, which file types (JPG, GIF, PNG) are supported on your system. In the styles area, the unsupported file types will not show up.
  • The custom replacement tags have been removed. There is only the RT {GT:style} ... {/GT} left to use. So for every combination of fonts and colors, you will have to define a style. This provides more semantic security for the output and the users are not tempted to use styles too wildly.
The next release will provide transparency for both foreground and background color and perhaps some decorative addons like underlines and borders.
srossbach
Posts: 2
Joined: Tue 11. May 2004, 17:30

Post by srossbach »

Is it planned to support the NAV_* tags in the future as well?

At the moment you only get a <a href=".... :sad: but with nice fonts! :D

Thanks for the great work!!!!!!

Stefan
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Jérôme mein Held!

Post by Keules »

Jérôme , das ist astreine Leistung!!!!

Jetzt ist dank der PNG Auswahl hat das Bild nur noch ein Bruchteil der KB wie als JPG.

THX für diesen fetten Mod!!!!


Ciao
Keules :wink:
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

srossbach wrote:Is it planned to support the NAV_* tags in the future as well?

At the moment you only get a <a href=".... :sad: but with nice fonts! :D

Thanks for the great work!!!!!!

Stefan
Within this MOD, it is not planned that it supports interactions with the original phpwcms functions (although it seems to do with some).

But the functionality of the GT MOD will be incorporated into the core of phpwcms in the next months. You can see my plans and progress when you look at the Sourceforge project site.
Last edited by Jérôme on Wed 12. May 2004, 08:31, edited 1 time in total.
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

@srossbach:
Have a look at http://www.kcomp.de/

Try this:
Add a style called "navi". Then make these changes in
/includes/inc_front/front.inc.php around line 668:

Code: Select all

// -------------------------------------------------------------

function nav_level_row($show_id, $show_home=1) {
	//returns a simple row based navigation
	
	if(strtoupper($show_id) == "CURRENT") {
		$act_cat_id = $GLOBALS['content']["cat_id"];
	} else {
		$act_cat_id = intval($show_id);
	}
	
	$nav = '';
	
	if($show_home) {
		if($GLOBALS['content']["cat_id"] == $act_cat_id) {
			$before = $GLOBALS['template_default']["nav_row"]["link_before_active"];
			$after  = $GLOBALS['template_default']["nav_row"]["link_after_active"];
		} else {
			$before = $GLOBALS['template_default']["nav_row"]["link_before"];
			$after  = $GLOBALS['template_default']["nav_row"]["link_after"];
		}
		$nav .= $before;
		$nav .= '<a href="index.php?';
		$nav .= ($GLOBALS['content']['struct'][$act_cat_id]['acat_alias']) ? html_specialchars($GLOBALS['content']['struct'][$act_cat_id]['acat_alias']) : 'id='.$act_cat_id.',0,0,1,0,0';
		$nav .= '">{GT:navi}'.html_specialchars($GLOBALS['content']['struct'][$act_cat_id]['acat_name']).'{/GT}</a>';
		$nav .= $after;
	}
	
	foreach($GLOBALS['content']['struct'] as $key => $value) {
		if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'][$key]['acat_hidden']) {
			
			if($nav) $nav .= $GLOBALS['template_default']["nav_row"]["between"];
			
			if($GLOBALS['content']["cat_id"] == $key) {
				$before = $GLOBALS['template_default']["nav_row"]["link_before_active"];
				$after  = $GLOBALS['template_default']["nav_row"]["link_after_active"];
			} else {
				$before = $GLOBALS['template_default']["nav_row"]["link_before"];
				$after  = $GLOBALS['template_default']["nav_row"]["link_after"];
			}
			
			$nav .= $before;
			$nav .= '<a href="index.php?';
			$nav .= ($GLOBALS['content']['struct'][$key]['acat_alias']) ? html_specialchars($GLOBALS['content']['struct'][$key]['acat_alias']) : 'id='.$key.',0,0,1,0,0';
			$nav .= '">{GT:navi}'.html_specialchars($GLOBALS['content']['struct'][$key]['acat_name']).'{/GT}</a>';
			$nav .= $after;
		}
	}
	if($nav) {
		$nav  = $GLOBALS['template_default']["nav_row"]["before"].$nav;
		$nav .= $GLOBALS['template_default']["nav_row"]["after"];
	}
	return $nav;
}

// -------------------------------------------------------------
Now you can use the {nav_level_row} replacement-tag and the text will be replaced as image...
srossbach
Posts: 2
Joined: Tue 11. May 2004, 17:30

Post by srossbach »

@nekket:

Thank you, that is what I'm looking for :lol:
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Version 1.5 released

This release supports full transparency support for both foreground and background color. Remember: If you enable both as transparent, you will see nothing ;).
Locked