Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

html_image- Problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
whoda
Smarty n00b


Joined: 09 Sep 2004
Posts: 3

PostPosted: Wed Sep 29, 2004 11:31 am    Post subject: html_image- Problem Reply with quote

hallo,

ich beziehe den namen von bildern aus einer db. bevor ich das bild ausgeben lasse frage ich ob ein eintrag in der db ist, ansonsten soll er das bild nicht anzeigen.
wenn nun aber ein eintrag in der db ist, aber kein bild auf den server mit diesen namen, wie kann ich die ausgabe des bildplatzhalter (rotes kreuz) unterbinden?
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Wed Sep 29, 2004 12:27 pm    Post subject: Re: html_image- Problem Reply with quote

whoda wrote:
hallo,

ich beziehe den namen von bildern aus einer db. bevor ich das bild ausgeben lasse frage ich ob ein eintrag in der db ist, ansonsten soll er das bild nicht anzeigen.
wenn nun aber ein eintrag in der db ist, aber kein bild auf den server mit diesen namen, wie kann ich die ausgabe des bildplatzhalter (rotes kreuz) unterbinden?


Wenn du schon die ganzen bildernamen in die DB nimmst, könntest du auch gleich das dazugehörige bild als BLOB in die DB mitnehmen.

Oder du modifierzierst dir die HTML_Image function mit ner Prüfung "if( file_exists(..))" und falls das file nicht existiert, gibts du dann ein 1px gif an
Back to top
View user's profile Send private message
whoda
Smarty n00b


Joined: 09 Sep 2004
Posts: 3

PostPosted: Wed Sep 29, 2004 12:41 pm    Post subject: Reply with quote

besten dank,

habe mich für die zweite version entschieden.
dachte nur ich kann vielleicht mit default arbeiten, aber so klappt es ja auch. nochmals danke

whoda
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Thu Sep 30, 2004 5:58 am    Post subject: Reply with quote

whoda wrote:
besten dank,

habe mich für die zweite version entschieden.
dachte nur ich kann vielleicht mit default arbeiten, aber so klappt es ja auch. nochmals danke

whoda


Vielleicht wäre das ne idee für nen feature request!

einen "default" parameter falls das image nicht vorhanden ist.
Back to top
View user's profile Send private message
ZakMc
Smarty Pro


Joined: 04 Oct 2004
Posts: 182

PostPosted: Tue Oct 05, 2004 11:29 am    Post subject: Reply with quote

@kills

Warum sollte er das Bild in der DB speichern ?? Was gibt das für einen Sinn. Bilder gehören nicht in eine DB!
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Wed Oct 06, 2004 10:42 am    Post subject: Reply with quote

ZakMc wrote:
@kills

Warum sollte er das Bild in der DB speichern ?? Was gibt das für einen Sinn. Bilder gehören nicht in eine DB!


Es war nur eine Möglichkeit das Problem zu lösen, zwar nicht die schönste, aber ein ansatz
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP