![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: Spain :)
Posts: 2,231
|
Simple Smarty Question - $15 Paxum/PayPal In Thread :D
For the first one that give me, a for me quick working solution.
My path to .jpg files (as in the .tpl files) Code:
<li><a href="{$name_name2}/path/{$xxx1.xxx2}/to/01.jpg"><img style="border-color:#000000;" border="2" src="{$name_name2}/path/{$xxx1.xxx2}/thumbnails/01.jpg" /></a></li> What is the easiest way around this ? Don't forget to leave your contact details please. ![]() ~ Renaldo, ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
There is no smarty solution to this.
The best solution would be to keep the extension/filename in the database along with the other details. Alternatively you can use onerror, although I don't really like it: src="{$name_name2}/path/{$xxx1.xxx2}/thumbnails/01.JPG" onerror='this.src={$name_name2}/path/{$xxx1.xxx2}/thumbnails/01.jpg' |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
No Refunds Issued.
Industry Role:
Join Date: Feb 2001
Location: GFY
Posts: 28,300
|
run a script to convert your .JPG to .jpg
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
Or do this if its an option: http://www.osguides.net/tips-a-trick...sensitive.html
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: Spain :)
Posts: 2,231
|
I've had hoped that this could be done by updating the smarty line a bit.
Since that seems not the case, gonna upload those files again, but with the correct .ext, not uppercased. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
58008 53773
Industry Role:
Join Date: Jul 2005
Location: Australia
Posts: 9,864
|
Definitely the best solution.
Smarty is a gigantic POS! You could run some php to check if the file exists in an if else statement - however probably not going to do to well with big traffic numbers. EDIT : ie Code:
{ $file = "{$name_name2}/path/{$xxx1.xxx2}/to/01.jpg"; if(!$file_exists($file)) { $file = '{$name_name2}/path/{$xxx1.xxx2}/to/01.JPG'; } } |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Available for Coding Work
Industry Role:
Join Date: Jun 2008
Posts: 1,432
|
There's really no "perfect thing" in this case as far as i can tell, you could do a check if file exists, but that'll slow down the script. I would approach the problem in a way so that you have all images end in the same extension.
__________________
<developer> MechBunny ![]() ![]() Email: vlad [at] faxite.com Telegram: @dangerouscoding |
![]() |
![]() ![]() ![]() ![]() ![]() |