Is it possible to get and use the uploads_path (/var/www/domain.com/uploads) in a template or do i need to hard code it?
I'm trying to use getimagesize($item->image) in a template but I can't use {uploads_url} as i get no output. If i hardcode the uploads_path instead i get a result for getimagesize.
Get and use uploads_path in a template
Re: Get and use uploads_path in a template
I'm guessing this is LISE, if you look at the default templates they use ->GetImagePath(true), which you could probably adapt.
If you can't get that to work, you can always brute force it:
{$myimagepath = "{uploads_url}/{$item->image}"}
getimagesize($myimagepath)
If you can't get that to work, you can always brute force it:
{$myimagepath = "{uploads_url}/{$item->image}"}
getimagesize($myimagepath)
Not getting the answer you need? CMSMS support options
Re: Get and use uploads_path in a template
Forgot about ->GetImagePath(true), so i will try it, thanks.
For some reason getimagesize() doesn't work on this host if i use {uploads_url}. But it does work if i use the server uploads path = /var/www/domain.com/uploads/{$item->image}.
Can i get the uploads path from the config in an UDT? I can see in System Information under "CMS Made Simple Config Settings" there is a uploads_path with the required value.
For some reason getimagesize() doesn't work on this host if i use {uploads_url}. But it does work if i use the server uploads path = /var/www/domain.com/uploads/{$item->image}.
Can i get the uploads path from the config in an UDT? I can see in System Information under "CMS Made Simple Config Settings" there is a uploads_path with the required value.


