Template Club Package Silver Pacakage Gold Pacakage Developer Pacakage Accepted Payments Member Login
Welcome, Guest
Please Login or Register.    Lost Password?
Solution for images problem on Joomla1.5.7 + SEF (1 viewing) (1) Guest
Go to bottomPost New TopicPost Reply Favoured: 0
TOPIC: Solution for images problem on Joomla1.5.7 + SEF
#27715
Solution for images problem on Joomla1.5.7 + SEF 1 Year, 10 Months ago  
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
Code:

$param
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
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
Kristian (Visitor)

Logged Logged  
 
Reply Quote  
#27717
Re:Solution for images problem on Joomla1.5.7 + SE 1 Year, 10 Months ago Karma: 147  
great thanks guys,

what about if you share that zip file, maybe it's will help another user
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
ronysyz (Moderator)
Terus Berjuang.....
Support Team
Posts: 8310
graph
User Offline Click here to see the profile of this user
Gender: Male GlobalTor.com Location: Indonesia
Logged Logged  
 
 
Reply Quote  
#27730
Re:Solution for images problem on Joomla1.5.7 + SE 1 Year, 10 Months ago Karma: 153  
Thank you Kris...I hope Andy will add this and fix the release. Don't ask Kris to do that Ron...He already helped us much...
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
Erwin Schro (Moderator)
search 1st - learn - try - still no luck - ask
Support Team
Posts: 6255
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Somewhere on Joomlasphere
Logged Logged  
 
Get TP's templates friendly Joomla Hosting here
 
Reply Quote  
#27921
Re:Solution for images problem on Joomla1.5.7 + SEF 1 Year, 10 Months ago  
tried the above but there are still no images on te frontend.
somebody a hint?
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
roblom (Visitor)

Logged Logged  
 
Reply Quote  
#27982
Re:Solution for images problem on Joomla1.5.7 + SEF 1 Year, 10 Months ago  
Figured it out already.

Code:

url(".$basefix."plugins/


Needs to be

Code:

url(".$basefix."/plugins/
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
Roblom (Visitor)

Logged Logged  
 
Reply Quote  
#28069
Re:Solution for images problem on Joomla1.5.7 + SE 1 Year, 10 Months ago Karma: 153  
Thx again Roblom
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
Erwin Schro (Moderator)
search 1st - learn - try - still no luck - ask
Support Team
Posts: 6255
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Somewhere on Joomlasphere
Logged Logged  
 
Get TP's templates friendly Joomla Hosting here
 
Reply Quote  
Go to topPost New TopicPost Reply