custom image tag

post everything related to phpwcms templates here
Post Reply
slinkyomeara
Posts: 24
Joined: Tue 16. Sep 2008, 03:26

custom image tag

Post by slinkyomeara »

Hello,

is it possible to insert a custom tag on a html page to list a image in the phpwcms database?

Example:
<img src=<value> width=100px height=100px">
where value = imigeid or whatever value phpwcms requires

I have the contentslider script and wish to use images from the phpwcms database so i dont need to create my own
tables and php list scritpt

i can do <?php echo <img src=<php variable>

but i would like to imterface with the phpwcms image database

Thanks
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: custom image tag

Post by flip-flop »

If this script ins running in phpwcms environment, yes.
But you can´t run a html page outside phpwcms and catch images referenced by the phpwcms Database without a complex db script.
Please have a look (php calls): http://www.phpwcms-docu.de/system_tags.phtml
And the tag: [img=ID.FORMAT WxHxCROPxQUALITY]ALT-Text[/img]
in short form: [img=10 100x100]

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
slinkyomeara
Posts: 24
Joined: Tue 16. Sep 2008, 03:26

Re: custom image tag

Post by slinkyomeara »

I cannot use a specific ID becasue I want the teaser template to list the image.
I need the name of the image tag to display the article list image instead of the article detail image.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: custom image tag

Post by flip-flop »

article "list image" in teaser Template e.g.:

Code: Select all

  [IMAGE]
	<!--
	Thumbnail {THUMB_NAME}
	Relative  {THUMB_REL}
	Absolute  {THUMB_ABS}
	WxH       {THUMB_WIDTH}px x {THUMB_HEIGHT}px
	//-->[/IMAGE]
for the "detail image" there is no tag avaialble -> http://forum.phpwcms.org/viewtopic.php? ... 89#p121089

or make an issue: http://code.google.com/p/phpwcms/issues/list

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
JoshTopper
Posts: 1
Joined: Sat 9. Jan 2010, 16:22

Re: custom image tag

Post by JoshTopper »

Thanks for the code Knut, that's just what I was looking for.
Post Reply