• Home
  • Get help
  • Ask a question
Last post 9 hours 41 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67911
All time tickets 10496
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#1418 – url with out item id

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Saturday, 21 November 2015 17:56 UTC
sajup
 sh404sef is creating links in this format domain/24-category/26-item
But i need url in this format domain/category/item
regards
saju
Monday, 23 November 2015 08:07 UTC
wb_weeblr
Hi

1 - What are your Joomla and sh404SEF versions?
2 - What type of content are we talking about ?

Rgds
 
Monday, 23 November 2015 18:14 UTC
sajup
1.both latest versions
2.i am using sobipro

Monday, 23 November 2015 18:16 UTC
wb_weeblr
Hi

SobiPro doesn't have a plugin for sh404SEF and we don't have one for SobiPro, so we fall back on Sobi router.php file, the standard routing plugin and I think that's how they designed their URL.
To change that, you would have to write a custom sh404SEF plugin for SobiPro I'm afraid.

Rgds
 
Tuesday, 24 November 2015 17:51 UTC
sajup
yes i Have a plug in for sobipro but
that plugin is creating links in a format like domain/section/category/item
but i need to get the links in this format domain/category/item

Please go through this....

defined( '_JEXEC' ) 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);
if ($dosef == false) return;
// ------------------ End. standard plugin initialize function - don't change ---------------------------

// Get SobiPro variables
$sid = JRequest::getVar('sid');
$pid = JRequest::getVar('pid');

// Get SobiPro variables from URL links
$urloptions=explode("&",$string);
foreach($urloptions as $urloption){
$options=explode("=",$urloption);
if($options[0]=="sid"){
$sid=$options[1];
}
elseif($options[0]=="pid"){
$pid=$options[1];
}
elseif($options[0]=="Itemid"){
$itemid=$options[1];
}
}
$sid_set=0;
if(JDEBUG){
echo(__FILE__." ".__LINE__);
echo("<br/>"."sid=".$sid." pid=".$pid." itemid=".$itemid);
}


if(isset($sid)){
$sid_set=1;
$a = strpos($sid,":");
if($a!==FALSE){
$sid = substr($sid,0,$a);
}
$db =&JFactory::getDBO();
unset($op);

$break=0;
$id=$sid;
while($break==0){
$query="SELECT pid FROM #__sobipro_relations WHERE id=".$id;
$db->setQuery($query);
$rows = $db->loadObjectList();
$parent=$rows[0]->pid;

if($parent!=0){
$query="SELECT id, nid FROM #__sobipro_object WHERE id=".$parent;
$db->setQuery($query);
$rows = $db->loadObjectList();
$op[]=$rows[0]->nid;
$id=$parent;
}
else{
$break=1;
}
}

for($i=count($op)-1;$i>=0;$i--){
$title[]=$op[$i];
}
$query="SELECT id, nid FROM #__sobipro_object WHERE id=".$sid;
$db->setQuery($query);
$rows = $db->loadObjectList();
$title[]=$rows[0]->nid;

}

if(isset($pid)&&$sid_set==0){
$db =&JFactory::getDBO();
$break=0;
$id=$pid;
unset($op);
while($break==0){
$query="SELECT pid FROM #__sobipro_relations WHERE id=".$id;
$db->setQuery($query);
$rows = $db->loadObjectList();
$parent=$rows[0]->pid;

if($parent!=0){
$query="SELECT id, nid FROM #__sobipro_object WHERE id=".$parent;
$db->setQuery($query);
$rows = $db->loadObjectList();
$op[]=$rows[0]->nid;
$id=$parent;
}
else{
$break=1;
}
}
for($i=count($op)-1;$i>=0;$i--){
$title[]=$op[$i];
}
$query="SELECT id, nid FROM #__sobipro_object WHERE id=".$sid;
$db->setQuery($query);
$rows = $db->loadObjectList();
$title[]=$rows[0]->nid;
}

//cleanup
shRemoveFromGETVarsList('sid');
shRemoveFromGETVarsList('pid');
shRemoveFromGETVarsList('lang');
shRemoveFromGETVarsList('Itemid');
shRemoveFromGETVarsList('option');

// ------------------ 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 ---------------------------

?>
Wednesday, 25 November 2015 08:19 UTC
wb_weeblr
Hi

After a quick glance, I can already tell you that this:

$sid = JRequest::getVar('sid');

$pid = JRequest::getVar('pid');
is wrong, as those values are those of the current page, not the current non-sef URL being built. You can simply use $sid and $pid directly.

However, we cannot provide advice on custom programming for sh404SEF or any other extension.

Rgds
 
Wednesday, 09 December 2015 19:45 UTC
sajup
is it is possible to get a commercial support or service to develop a plug-in for sobipro
Thursday, 10 December 2015 08:08 UTC
wb_weeblr
Hi

Sorry, no we do not provide any such service. I would think a freelancer could do that?

Rgds
 
Tuesday, 29 December 2015 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.