Thanks for sharing this superb plugin
But I got some problems with missing images for rounded corners, buttons and quotes on a SEF enabled Joomla 1.5.7 install in a sub-directory. Using sh404SEF with Apache mod_rewrite and a customized .htaccess file to hide index.php in URLs.
The preview in plugin settings worked and on front page too, actually all pages on the same level as front page were fine. But the images were missing on pages with an URL that contained sub-directories created by SEF for section, category etc.
So I figured out the following solution - probably not the best, but it works
In the file
| Code: |
plugins/content/xtypo.php
|
just beneath the
line in the beginning of
| Code: |
function xtypoclass(...
|
(about line 21) add the following lines of code
| Code: |
/* Begin path correction fix */
// Get document base and count number of slashes
$tmp =& JFactory::getDocument();
$base = $tmp->getBase();
$i = substr_count($base, '/');
// Now get application base and subtract the number of slashes in it
// from the number of document base slashes. Yields a number >= 0
$tmp =& JFactory::getApplication();
$base = $tmp->getBasePath();
$i = $i - substr_count($base, '/');
// Prepare baseprefix of required number of '../' entries to be used in images url
$baseprefix = str_repeat('../',$i);
// also replace ALL occurences of url(plugins/ with url(".$basefix."plugins/
// 91 occurences
/* End of path correction fix */
|
You also have to replace all 91 occurences of the string
| Code: |
[i]url(plugins/[/i]
|
in the same file with
| Code: |
[i]url(".$basefix."plugins/[/i]
|
to get the plugin look for its images at the correct location.
I hope this saves some time for you...
This information is provided with no warranty. And if you do not understand what this is all about you probably should'nt be trying this at home
Cheers
// Kristian