1
wammes
smarty load_filter in xoops?
  • 2006/10/8 13:16

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Hello,

I´d like to use the imagetext function in my theme:
<{imagetext text="Hello World" style="big_bright" dev="1"}>
like discribed athttp://www.cerdmann.com/imagetext/

I read something about loading a smarty prefilter. I should add something like:
$smarty->load_filter('pre', 'imagetext');
$smarty should be the correct name of the used smarty class.

Anybody knows where I should add this prefilter so it works with the smarty in xoops? I put the textcache folder to my root and added the files to the class/smarty/plugins/ folder.


Thanks!

2
wizanda
Re: smarty load_filter in xoops?
  • 2006/10/8 14:25

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


don't understand the point as isn't that what CSS does if this is for your theme? add a style to any texts in question?

Just wonder if it would slow the theme loading time...

As for the question unsure...

3
wammes
Re: smarty load_filter in xoops?
  • 2006/10/9 15:51

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


It will surely slow down the site, instead of just text the user would have to download some images.
But my reason to use it: I'd like to display a title in a font that probably isn't installed on the user computer. It is the native font of my boyscouts association and using it would make the site typically ours

Still hoping that somebody could help me out with this...
Thanks!

4
davidl2
Re: smarty load_filter in xoops?
  • 2006/10/9 16:27

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


I'd suggest perhaps simply using the image.. if its for a logo... as it would prevent people having to download a special font just to view one site.

5
Djiman
Re: smarty load_filter in xoops?
  • 2006/10/9 17:15

  • Djiman

  • Just popping in

  • Posts: 91

  • Since: 2006/7/26


If you want to use special font, I think y'll need 2 embed the font on the page.
Your font has to be converted into .eot format
and something like:

@font-face{font-family: "thefontname";
src:url(font.eot)
}

I have never had the need to implement that before and I really dont know much about it.

I am sure some one will know a lot more.

or try do some search on google/yahoo on how to embed font

6
wammes
Re: smarty load_filter in xoops?
  • 2006/10/9 19:13

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


@Djiman: thanks for pointing me at this!

Never knew I could embed a font on the page. After a quick google I figured that unfortunately this doesn't work in firefox, only IE.
But its a option for me to consider.

@Davidl2: my idea was indeed to let this smarty function convert all my news titles to images in the font that I wanted, not just the logo. I read somewhere this smarty-created image is cached, so the server will have to generate this image only once.
I think it could be done in a xoops-theme, since it uses smarty. At least it's a cool option to figure out, maybe others would like to use too in their themes.

Only problem, I have no clue where to put that load_filter(); function

Login

Who's Online

205 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 205


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits