1
Joomla! 1.5 / Re:come pubblicare articoli su pagina facebook?
« il: 22 Mag 2011, 20:36:49 »
consiglio provato ed è proprio così..ed io che cercavo chissa quale componente o plugin..ma meglio così grazie
Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.
<?phpspero sia utile anche ad altre persone indicizza perfettamente
// 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 ---------------------------
}
?>
![]() |
|