Author Topic: How to get sh404SEF working with SobiSEF  (Read 47158 times)

0 Members and 3 Guests are viewing this topic.

Offline Diarmiud

Re: How to get sh404SEF working with SobiSEF
« Reply #70 on: 14. December 2009, 10:42:32 »
I tried again and got a 404 on http://menage.domijob.fr/Annonces/Ile-de-France/75-Paris/PARIS-10E.html

You have only a few entries in your categories - the problems came when you must have a pagination. So I think your site is not such a good example.
Country: Germany Germany |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile

Offline thibzh

  • SobiPro Silver Club Member
  • Sobi User
  • *
  • Posts: 64
  • Reviews:

    What is it?

Re: How to get sh404SEF working with SobiSEF
« Reply #71 on: 14. December 2009, 12:01:31 »
Ok, I'm going to wait that the site grows up and look closely to the paginaton, the edition and suppression.

If i find a bug, i will tell us.
Thibault
Country: France France |  OS: Windows Vista/Server 2008 Windows Vista/Server 2008 |  Browser: Chrome 3.0.195.33 Chrome 3.0.195.33 | View Profile Emploi garde enfants

Do you want continued ongoing development, new features and active support?
Please write a review or just vote for SOBI on JED.

Offline trecords

Re: How to get sh404SEF working with SobiSEF
« Reply #72 on: 18. December 2009, 11:55:42 »
ARTİO sef also has problem with pagination, is there any solution for ARTIO?
I also opened post about this on troubleshooting section.
Country: Azerbaijan Azerbaijan |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.6 Firefox 3.5.6 | View Profile

Offline drmmr763

Re: How to get sh404SEF working with SobiSEF
« Reply #73 on: 25. January 2010, 19:47:02 »
I just ran this hack and it works wonderfully for me. I did have to set up my htaccess a bit differently. Here's what I'm using:

RewriteEngine On

Code: [Select]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section

 
 
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
Country: United States United States |  OS: Mac OS X 10.6 Mac OS X 10.6 |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline antonio66

Re: How to get sh404SEF working with SobiSEF
« Reply #74 on: 25. January 2010, 23:56:39 »
Joomla! 1.0.15 Stable
sigsiu RC 2.9.2.3
sh404SEF_1.3.9_build_357.joomla1.0.x

Hello,

I have a problem in sh404SEF configuration.

I want to add the url to the "id" of the entry.

I configure the advanced configuration of sh404 1, but it does not work.

Can you help me. Thank you.

Here is my code:

Code: [Select]
<?php
/**
 * sh404SEF support for com_content component.
 * Copyright Yannick Gaultier (shumisha) - 2007
 * shumisha@gmail.com
 * {shSourceVersionTag: Version w - 2007-08-31}
 */

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

// ------------------  standard plugin initialize function - don't change ---------------------------
global $sh_LANG$sefConfig;  
$shLangName '';
$shLangIso '';
$title = array();
$shItemidString '';
$dosef shInitializePlugin$lang$shLangName$shLangIso$option);
// ------------------  standard plugin initialize function - don't change ---------------------------

// ------------------  load language file - adjust as needed ----------------------------------------
$shLangIso shLoadPluginLanguage'com_sobi2'$shLangIso'_SH404SEF_SOBI2_CREATE_NEW');
// ------------------  load language file - adjust as needed ----------------------------------------

shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
if (!empty(
$Itemid))  
  
shRemoveFromGETVarsList('Itemid');

// based on Sigsiu Online Business Index 2 sef_ext.php file for OpenSEF

global 
$shsobi2CatParents;
$shsobi2CatParents = array();
$shsobi2Details false;
$sobiMenuId null;
$shLimit null;
    
    if (!
function_exists('shsobi2GetLimit')) {
    function 
shsobi2GetLimit() {
    
global $database;
    
$query "SELECT `configValue` FROM `#__sobi2_config` WHERE (`configKey` = 'itemsInLine' OR `configKey` = 'lineOnSite')";
    
$database->setQuery$query );
    
$l $database->loadObjectList();
    
return (int)$l[0]->configValue * (int)$l[1]->configValue;
    }
    }
    
    if (!
function_exists('shsobi2GetCatName')) {
    function 
shsobi2GetCatName($cid, &$title) {
      global 
$database$shsobi2CatParents;
  shsobi2GetParentCats($cid);
  if (!empty($shsobi2CatParents)) {
    $shsobi2CatParents array_reverse($shsobi2CatParents);
     $catName null;
  
  foreach($shsobi2CatParents as $cid) {
     $query "SELECT `name` FROM `#__sobi2_categories` WHERE (`catid`= $cid AND `published` = 1)";
     $database->setQuery$query );
     $cat $database->loadResult();
      $title[] = html_entity_decode($cat); // V 1.2.4.T added html_entity_decode
    }  
   }
    }
    }
    
    if (!
function_exists('shsobi2GetItemName')) {
    function 
shsobi2GetItemName($id){
    global 
$database;
    

    
$query "SELECT `title` FROM `#__sobi2_item` WHERE (`itemid`=$id AND `published` = 1)";
$database->setQuery$query );
return html_entity_decode($database->loadResult()); // V 1.2.4.t added html_entit_decode   
    
}
    }
    
    if (!
function_exists('shsobi2GetParentCats')) {
  function shsobi2GetParentCats ($catid) {
global $database$shsobi2CatParents;
$query "SELECT `parentid` from `#__sobi2_cats_relations` WHERE `catid`= $catid";
$database->setQuery$query );
if($catid != 1)
    
array_push($shsobi2CatParents$catid);
    if(
sizeof($database->loadResult()) != 0)
shsobi2GetParentCats($database->loadResult());
  }
    }
    
  $sobi2Task = isset($sobi2Task) ? @$sobi2Task null;
//echo '$sobi2Task = '.$sobi2Task.'<br />';   
        /* get the task */
        
switch ($sobi2Task) {
          case 
'addNew':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_CREATE_NEW'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'search':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_SEARCH_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'editsobi':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_EDIT_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'deletesobi':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_DELETE_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'sobi2Details' :
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_ENTRY_DETAILS'];
            
shRemoveFromGETVarsList('sobi2Task');
            
$shsobi2Details true;
          break;
          case
'':
            
$title[] = getMenuTitle($optionnull$Itemidnull$shLangName );
            
$title[] = '/';
          break;
          default:
            
$dosef false;
          break;
        }
        
/* get catid */
        
if (isset($catid)) {
          
shsobi2GetCatName($catid$title);
          
shRemoveFromGETVarsList('catid');
        }
       
/* and now get sobiid */
        
if (!empty($sobi2Id) && $shsobi2Details) {
          
$shTemp shsobi2GetItemName($sobi2Id);
          
//echo 'Itemname = '.$shTemp.'<br />';
          //echo 'Itemname decode = '.html_entity_decode($shTemp).'<br />';
          
$title[] = empty($shTemp) ? $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_ENTRY'].$sobi2Id $shTemp;
          
shRemoveFromGETVarsList('sobi2Id');
        }
        
/* if next listing page */
        /* leave page numbers out of URL, as may take up too much space in DB
        else if(!$details) {
          if (!empty($limit)) {
            $shLimit = $limit;
            shRemoveFromGETVarsList('sobi2Id');
          }
         else if(empty($shLimit)) 
         $shLimit = shsobi2GetLimit();
        
        $limitstart = empty($limitstart) ? 0 : $limitstart;
      $page = $limitstart / $shLimit;
      $page = (int)$page + 1;
     
      if (!is_numeric( $page )) {
      mosRedirect( "/index.php", "Error: creating SEF URL");
      return null;
      }
  if ($page > 1) {
    if (strpos($sefConfig->pagetext, '%s') === false)
      $title[] = $sefConfig->pagetext.$sefConfig->pagerep.$page; 
    else  
           $title[] = str_replace( '%s', $page, $sefConfig->pagetext );
  }     
      }
      */

// ------------------  standard plugin finalize function - don't change ---------------------------  
if ($dosef){
   
$string shFinalizePlugin$string$title$shAppendString$shItemidString
      (isset(
$limit) ? @$limit null), (isset($limitstart) ? @$limitstart null), 
      (isset(
$shLangName) ? @$shLangName null));
}      
// ------------------  standard plugin finalize function - don't change ---------------------------
 
?>


I try with the following code, it works, but there are no categories and subcategories that appear on the title page. Code :

Code: [Select]
<?php
/**
 * sh404SEF support for com_content component.
 * Copyright Yannick Gaultier (shumisha) - 2007
 * shumisha@gmail.com
 * @version     $Id: com_sobi2.php 312 2008-04-01 19:03:42Z silianacom-svn $
 * {shSourceVersionTag: Version x - 2007-09-20}
 */

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

// ------------------  standard plugin initialize function - don't change ---------------------------
global $sh_LANG;  
$shLangName '';
$shLangIso '';
$title = array();
$shItemidString '';
$dosef shInitializePlugin$lang$shLangName$shLangIso$option);
if (
$dosef == false) return;
// ------------------  standard plugin initialize function - don't change ---------------------------

// ------------------  load language file - adjust as needed ----------------------------------------
$shLangIso shLoadPluginLanguage'com_sobi2'$shLangIso'_SH404SEF_SOBI2_CREATE_NEW');
// ------------------  load language file - adjust as needed ----------------------------------------

shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
if (!empty(
$Itemid))  
  
shRemoveFromGETVarsList('Itemid');

// based on Sigsiu Online Business Index 2 sef_ext.php file for OpenSEF

global 
$shSobi2CatParents;
$shSobi2CatParents = array();
$shSobi2Details false;
$sobiMenuId null;
$shLimit null;
    
    if (!
function_exists('shSobi2GetLimit')) {
    function 
shSobi2GetLimit() {
    
global $database;
    
$query "SELECT `configValue` FROM `#__sobi2_config` WHERE (`configKey` = 'itemsInLine' OR `configKey` = 'lineOnSite')";
    
$database->setQuery$query );
    
$l $database->loadObjectList();
    
return (int)$l[0]->configValue * (int)$l[1]->configValue;
    }
    }
    
    if (!
function_exists('shSobi2GetCatName')) {
    function 
shSobi2GetCatName($cid, &$title) {
      global 
$database$sefConfig$shSobi2CatParents;
  shSobi2GetParentCats($cid);
  if (!empty($shSobi2CatParents)) {
    $shSobi2CatParents array_reverse($shSobi2CatParents);
     $catName null;
  
  foreach($shSobi2CatParents as $cid) {
     $query "SELECT `name` FROM `#__sobi2_categories` WHERE (`catid`= $cid AND `published` = 1)";
     $database->setQuery$query );
     $cat $database->loadResult();
      $title[] = (sh404SEF_SOBI2_PARAMS_INCLUDE_CAT_ID $cid.$sefConfig->replacement:'')
       .html_entity_decode($cat); // V 1.2.4.T added html_entity_decode
    }  
   }
    }
    }
    
    if (!
function_exists('shSobi2GetItemName')) {
    function 
shSobi2GetItemName($id){
    global 
$database$sefConfig;
    

    
if (empty($id)) return '';
    
$query "SELECT `title` FROM `#__sobi2_item` WHERE (`itemid`=$id AND `published` = 1)";
    
$database->setQuery$query );
$ret = (sh404SEF_SOBI2_PARAMS_INCLUDE_ENTRY_ID $id.$sefConfig->replacement:'')  // add id if setup to  
.html_entity_decode($database->loadResult()); // V 1.2.4.t added html_entit_decode
return $ret;   
    }
    }
    
    if (!
function_exists('shSobi2GetItemCat')) {
    function 
shSobi2GetItemCat($id){
    
global $database;

    
if (empty($id)) return '';
    
$query "SELECT `catid` FROM `#__sobi2_cat_items_relations` WHERE (`itemid`=$id )";
    
$database->setQuery$query );
  $ret $database->loadResult(); // V 1.2.4.t added html_entit_decode
return $ret;   
    }
    }
    
    if (!
function_exists('shSobi2GetParentCats')) {
  function shSobi2GetParentCats ($catid) {
global $database$shSobi2CatParents;
$query "SELECT `parentid` from `#__sobi2_cats_relations` WHERE `catid`= $catid";
$database->setQuery$query );
if($catid != 1)
array_push($shSobi2CatParents$catid);
if(sizeof($database->loadResult()) != 0)
shSobi2GetParentCats($database->loadResult());
  }
    }
    
    
$shSobi2Name shGetComponentPrefix($option);
if (!empty($shSobi2Name)) $title[] = $shSobi2Name;

  $sobi2Task = isset($sobi2Task) ? @$sobi2Task null;
        
/* get the task */
        
switch ($sobi2Task) {
          case 
'addNew':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_CREATE_NEW'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'search':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_SEARCH_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'editSobi':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_EDIT_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'deleteSobi':
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_DELETE_ENTRY'];
            
shRemoveFromGETVarsList('sobi2Task');
          break;
          case 
'sobi2Details' :
            
$title[] = $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_ENTRY_DETAILS'];
            
shRemoveFromGETVarsList('sobi2Task');
            
$shSobi2Details true;
          break;
          case
'':
            
$title[] = getMenuTitle($optionnull$Itemidnull$shLangName );
            
$title[] = '/';
          break;
          default:
            
$dosef false;
          break;
        }
        
shRemoveFromGETVarsList('catid');
        
/* get catid */
        
if (isset($catid) && !$shSobi2Details) {  // if task=sobi2Details, catid is NOT item category, but Current category!
          
shSobi2GetCatName($catid$title);
        }
       
/* and now get sobiid */
        
if (!empty($sobi2Id) && $shSobi2Details) {
          
$shTemp shSobi2GetItemName($sobi2Id);
          if (
sh404SEF_SOBI2_PARAMS_ALWAYS_INCLUDE_CATS) {  // params say include cat, but there is no cat id  
          
$shCatId shSobi2GetItemCat($sobi2Id);
          
if (!empty($shCatId)) {
          
shSobi2GetCatName($shCatId$title);
          
}
          }
          
$title[] = empty($shTemp) ? $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_ENTRY'].$sobi2Id $shTemp;
          
shRemoveFromGETVarsList('sobi2Id');
        }

// ------------------  standard plugin finalize function - don't change ---------------------------  
if ($dosef){
   
$string shFinalizePlugin$string$title$shAppendString$shItemidString
      (isset(
$limit) ? @$limit null), (isset($limitstart) ? @$limitstart null), 
      (isset(
$shLangName) ? @$shLangName null));
}      
// ------------------  standard plugin finalize function - don't change ---------------------------
 
?>

« Last Edit: 26. January 2010, 00:00:16 by antonio66 »
Country: France France |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: MS Internet Explorer 7.0 MS Internet Explorer 7.0 | View Profile

Offline Belaire Technologies

  • Bronze Sponsor
  • Sobi Experte
  • *
  • Posts: 565
  • formerly - yoobuild
  • Reviews:

    What is it?

Re: How to get sh404SEF working with SobiSEF
« Reply #75 on: 26. January 2010, 00:02:29 »
Here is my honest input on this.  SH404SEF is going through some growing pains and from a year ago things have changed.  I've recently looked at AceSEF and am really satisfied with the product.  I've dropped sh404 and it's many hassles and hacks.  I never tried their payed product though.

No one answering your sobi2 questions? Try our secondary support @ belairetech.com.  Sign in an open a ticket.  Sorry no large development questions please.  For now the service is free to sobi2 members.
Country: United States United States |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile Belaire Technologies

Offline antonio66

Re: How to get sh404SEF working with SobiSEF
« Reply #76 on: 26. January 2010, 11:17:59 »
Yes I know, but it works well for me, I just want to know the difference between the first version and second version, to add the "id" of the entrance to the url, having the categories and subcategories in the title bar.
Country: France France |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: MS Internet Explorer 7.0 MS Internet Explorer 7.0 | View Profile

Offline antonio66

Re: How to get sh404SEF working with SobiSEF
« Reply #77 on: 26. January 2010, 23:41:46 »
 :( Can anyone help me, I really need this feature.
Country: France France |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: MS Internet Explorer 7.0 MS Internet Explorer 7.0 | View Profile

Offline antonio66

Re: How to get sh404SEF working with SobiSEF
« Reply #78 on: 27. January 2010, 22:08:29 »
I'll try other sef components.
Country: France France |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: MS Internet Explorer 7.0 MS Internet Explorer 7.0 | View Profile

Offline Belaire Technologies

  • Bronze Sponsor
  • Sobi Experte
  • *
  • Posts: 565
  • formerly - yoobuild
  • Reviews:

    What is it?

Re: How to get sh404SEF working with SobiSEF
« Reply #79 on: 27. January 2010, 23:10:21 »
Sorry for the lack of support on SH404.  For one it's and old version and there is 0 support from the developers on this outdated version.  Also, I think you will be wasting your time trying to fix it because there are other little known bugs here in there in that version.

I think you would be very satisfied (or pretty close) with AceSEF.  You can try it out free and you can migrate your URLS and Meta data. 
No one answering your sobi2 questions? Try our secondary support @ belairetech.com.  Sign in an open a ticket.  Sorry no large development questions please.  For now the service is free to sobi2 members.
Country: United States United States |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile Belaire Technologies

Tags: