![]() |
IF CONDITION problem
I have 2 folders for images. The 1st folder is for admin upload. And 2nd folder is for users. I would like to make a condition for first check the 1st folder, if not available then check 2nd folder and if not available there too then display the noimage file.
Something like this : Code:
<if condition="image_ID.jpg"> Any idea about how to do that ? Thanks in advance... |
I don't think there's any way to do that in a template conditional. You'd have to use code in a plugin, or maybe there's some way to insert javascript to make the browser load alternate images if one's not available.
|
thank you kh99.
actually what i wrote above was just an example. the thing i would like to do is little bit different. but main idea is like above mentioned example. let me be more clear with what i would like to do. Code:
<if condition="$castinfo[photo] != ''"> but since i do not want to display "noimage.jpg" on pages that much, i upload the pictures myself. and due to script do the logging, it's not working if i upload the picture to the "person" folder (thats where the files are stored). so i've created a "custom" folder under "person" folder. before displaying the "noimage.jpg" file if file do not exists, i would like to make it check the "person/custom" folder too... |
...
|
thanks again kh99.
let me see if i will find a solution or not... |
oops (admin, you can remove this maybe?)
|
Code:
$postbit_movieinfo_cast = ''; But i did something much easier. (maybe we can not call it a solution) Instead of noimage.jpg file, i forced <else /> condition to show the image in "person/custom" folder... If there is no image in that folder too, its not showing anything. So when i see that kind of empty columns (no picture in the table), i upload the image manually. And its showing... I know its not a proper way to display the image but since am not a coder, thats the most practical/easiest way for me :) and once again i would like to thank you for your kind answers and help kh99 |
OK - sorry I deleted my answer above, I misunderstood and thought you wanted to see if anyone else knew of an answer.
(nvm - that code was wrong...need to understnd it better). |
I did your advise but nothing changed... Thank you.
If you would like to see the live example of what i would like to do here it is : http://www.dwshare.com/f831/gran-tor...4858?langid=14 Since the website is still under construction, some posts/threads are still not showing due to the data loss during the database move... |
Looks nice.
Sorry, I keep posting before thinking. It would probably be necessary to see more of the code to be able to post a solution. |
All times are GMT. The time now is 10:09 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|