Joomla.it Forum
Componenti per Joomla! => SEO => : sbazaars 06 Dec 2010, 12:05:10
-
salve come da titolo vorrei sapere se questi due componenti sef possono convivere ,la domanda nasce da un bisogno di fare indirizzi sef sia per il componente virtuemart sia per adsmanager gratuitamente perchè ognuno dei due sef non ha o lo ha a pagamento il plugin relativo cioè acesef non ha il plugin virtuemart(solo a pagamento) ed ****** non ha il plugin adsmanager (lo aveva ed ora non si trova)mi servirebbero quindi entrambi grazie per chiunque mi risponda
-
ho risolto da me ho installato il componente ****** e poi ho inserito in components/com_******/sef_ext
un file chiamato com_adsmanager.php contenente questo script
<?php
// Security check to ensure this file is being included by a parent file.
if (!defined('_VALID_MOS')) 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 -----------------
// remove common URL from GET vars list, so that they don't show up as query string in the URL
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
if (!empty($Itemid))
shRemoveFromGETVarsList('Itemid');
if (!empty($limit))
shRemoveFromGETVarsList('limit');
if (isset($limitstart))
shRemoveFromGETVarsList('limitstart');
if (file_exists($GLOBALS['mosConfig_absolute_path'] .'/components/com_adsmanager/lang/lang_' . $GLOBALS['mosConfig_lang'] . '.php')){
include_once($GLOBALS['mosConfig_absolute_path'] .'/components/com_adsmanager/lang/lang_' . $GLOBALS['mosConfig_lang'] . '.php');
}
else
include_once( $GLOBALS['mosConfig_absolute_path'] .'/components/com_adsmanager/lang/lang_english.php' );
$title[] = ADSMANAGER_SEF_ADS;
if (isset($adid)) {
$database->setQuery("SELECT category, ad_headline FROM #__adsmanager_ads WHERE id=$adid");
$rows = $database->loadObjectList();
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
$ad_text = substr($rows[0]->ad_headline, 0, 40)."-".$adid;
shRemoveFromGETVarsList('adid');
$catid = $rows[0]->category;
}
if (isset($catid)) {
$database->setQuery("SELECT c.* FROM #__adsmanager_categories as c WHERE c.published = 1 ORDER BY c.parent,c.ordering");
$rows = $database->loadObjectList();
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
// establish the hierarchy of the menu
$orderlist = array();
$current_list = array();
// first pass - collect children
foreach ($rows as $v ) {
$orderlist[$v->id] = $v;
}
$current = $catid;
while($orderlist[$current]->id != 0)
{
$current_list[] = $orderlist[$current]->name;
$current = $orderlist[$current]->parent;
}
for($i = count($current_list)-1; $i>=0; $i--)
{
$title[] = $current_list[$i];
}
shRemoveFromGETVarsList('catid');
}
if (isset($ad_text)) {
$title[] = $ad_text;
}
if($page != 'show_search' && $page != 'show_result')
{
switch ($page) {
case 'show_profile':
$title[] = ADSMANAGER_SEF_PROFILE.$userid."/".ADSMANAGER_SEF_EDIT;
break;
case 'save_profile':
$title[] = ADSMANAGER_SEF_PROFILE.$userid."/".ADSMANAGER_SEF_SAVE;
break;
case 'show_user':
if (isset($userid)) $title[] = ADSMANAGER_SEF_USER."-".$userid;
else $title[] = ADSMANAGER_SEF_MY_ADS;
break;
case 'show_category':
break;
case 'show_rules':
$title[] = ADSMANAGER_RULES;
break;
case 'show_ad':
break;
case 'write_ad':
if (!isset($adid)) $title[] = ADSMANAGER_SEF_WRITE_AD;
else $title[] = ADSMANAGER_SEF_UPDATE;
break;
case 'save_ad':
if (!isset($adid)) $title[] = ADSMANAGER_SEF_SAVE_AD;
else $title[] = ADSMANAGER_SEF_SAVE;
break;
case 'delete_ad':
if (!isset($adid)) $title[] = ADSMANAGER_SEF_DELETE_AD;
else $title[] = ADSMANAGER_SEF_DELETE;
break;
case 'show_all':
$title[] = ADSMANAGER_SEF_ALL_ADS;
break;
case 'show_search':
//$title[] = ADSMANAGER_SEF_SHOW_SEARCH; //commented this code, as it was breaking the advance search after installation of
break;
case 'show_result':
//$title[] = ADSMANAGER_SEF_SHOW_RESULT; //commented this code, as it was breaking the advance search after installation of
default:
$title[] = $page;
break;
}
shRemoveFromGETVarsList('page');
if (isset($expand) && !$expand) shRemoveFromGETVarsList('expand');
if (isset($order) && !$order) shRemoveFromGETVarsList('order');
if (isset($text_search) && !$text_search) shRemoveFromGETVarsList('text_search');
// ------------------ 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 ---------------------------
}
?>
spero sia utile anche ad altre persone indicizza perfettamente
@@ --->IL CODICE E' STATO MODIFICATO!!!
-
il tuo messaggio sarà editato in quanto parla di componenti commerciali, se riesci inibisci i nomi, grazie.
-
Per cortesia, evitiamo di trattare di componenti commerciali.... i post sono stati editati, compreso il codice ... NON PROVATELO CHE MANCANO DELLE PARTI!!!
-
scusate essendo da poco un componente comemrciale non avevo fatto caso cmq non è proprio commerciale..vabbè,
cmq il codice funziona perfettamente...a quali parti ti riferisci?
-
Le parti dove era citato il componente... che non è più totalmente gratuito da diversi mesi.