![]() |
Template: Determine if file exists possible?
I have the following conditional for a hack:
Code:
<if condition="$attachment['replay']['official']"> If the map is an official one the picture of the map is displayed, if not a placeholder picture. Now we want to display, one after the other, also pictures of unofficial maps - of course only if the file for the map exists. Question: Is it possible to create something in a template that is looking into a specified folder in order to check wether a file is present or not? |
That would be easier to do with a small bit of PHP in a plugin.
|
In the plug-in use:
Code:
$show['something'] = file_exists('./yourfolder/yourfile.php'); HTML Code:
<if condition="$show['something']"> |
All times are GMT. The time now is 01:48 PM. |
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:
|