CMS MADE SIMPLE FORGE

CGSmartImage

 

[#9040] Need to add a slash before the file location

avatar
Created By: Jocelyn Lusseau (kraygoon)
Date Submitted: Mon Mar 11 12:21:25 -0400 2013

Assigned To: Robert Campbell (calguy1000)
Version: 1.10.5
CMSMS Version: None
Severity: Major
Resolution: Invalid
State: Closed
Summary:
Need to add a slash before the file location
Detailed Description:
In previous version of CGSmartImage, I call the picture with :

[[CGSmartImage src="folder/file.png" width="32" notag="1"]]

And now, I need to prefix the path with a slash :

[[CGSmartImage src="/folder/file.png" width="32" notag="1"]]

Else, the <img/> tag did not appear.

Thanx


History

Comments
avatar
Date: 2013-03-11 12:29
Posted By: cb2004 (cb2004)

Confirmed, I literally just posted about this on another bug report then spotted
this.
      
avatar
Date: 2013-03-11 12:36
Posted By: Robert Campbell (calguy1000)

paths starting with a / are assumed to start from the site root.   paths
starting without one are assumed to be relative to the uploads directory.
      
avatar
Date: 2013-03-11 12:43
Posted By: Jocelyn Lusseau (kraygoon)

It would have been great if this change was documented. In the help section of
the module, examples are like {CGSmartImage src='uploads/images/picture.jpg'}
and not like {CGSmartImage src='/uploads/images/picture.jpg'} or {CGSmartImage
src='images/picture.jpg'}.

But thank you for this fantastic module ;-)
      
avatar
Date: 2013-03-13 05:26
Posted By: cb2004 (cb2004)

Yes this change should of been documented or mentioned in the changelog. I have
a UDT which uses:

$images = glob('uploads/images/home-slideshow/*.*');

This was returning nothing. I now have to use:

src1='/' src2=$image

Within my template to get my UDT (which spits out an array so I can foreach) to
work. At least now I know functionality has changed since 1.10.1.
      
avatar
Date: 2013-03-14 04:23
Posted By: cb2004 (cb2004)

Fixed in 1.10.7 so this can now be closed.
      
Updates

Updated: 2013-08-30 23:55
cmsms_version_id: 29887 => -1
state: Open => Closed

Updated: 2013-03-11 12:36
resolution_id: => 9