CMS MADE SIMPLE FORGE

Banners Module

 

[#1234] Banner image URL breaks when using SEF URLs (htaccess) - includes fix

avatar
Created By: Tom Butler (tcbutler)
Date Submitted: Wed Dec 20 14:21:25 -0500 2006

Assigned To:
Version: None
CMSMS Version: None
Severity: None
Resolution: None
State: Open
Summary:
Banner image URL breaks when using SEF URLs (htaccess) - includes fix
Detailed Description:
Have a standard CMSMS setup, but with the recommended SEF URL method implemented
using .htaccess.

Any page apart from the initial root (e.g. blah.com/) would cause banner images
not to appear.  Invariably, on "blah.com/home/" for example, the banner module
would look under "blah.com/home/uploads" for the images.

Simple change (inserting $dirname) to action.default.php fixes:

if( isset( $row['image'] ) && isset( $row['url'] ) ) 
      {
	$image = '<img src="'.$dirname.'/uploads';
	if( $row['image'][0] != '/' )
	  {
	    $image .= DIRECTORY_SEPARATOR;
	  } 


History