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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-09-2011, 02:24 AM   #1
Inter-Sex
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>
But now is the file .ext not always .jpg, but often .JPG

What is the easiest way around this ?

Don't forget to leave your contact details please.

~ Renaldo,

(Disclaimer : max 1 winner)
Inter-Sex is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 02:36 AM   #2
darksoul
Confirmed User
 
darksoul's Avatar
 
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'
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 02:36 AM   #3
DarkJedi
No Refunds Issued.
 
DarkJedi's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: GFY
Posts: 28,300
run a script to convert your .JPG to .jpg
DarkJedi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 02:41 AM   #4
darksoul
Confirmed User
 
darksoul's Avatar
 
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
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 02:47 AM   #5
Inter-Sex
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.
Inter-Sex is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 02:54 AM   #6
georgeyw
58008 53773
 
georgeyw's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: Australia
Posts: 9,864
Quote:
Originally Posted by DarkJedi View Post
run a script to convert your .JPG to .jpg
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'; }

}

Last edited by georgeyw; 10-09-2011 at 03:06 AM..
georgeyw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-09-2011, 03:09 AM   #7
VladS
Available for Coding Work
 
VladS's Avatar
 
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 / KVS / PHP / MySQL / HTML5 / CSS3 / jQuery
Email: vlad [at] faxite.com
Telegram: @dangerouscoding
VladS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.