• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

Silva01

Alteração do título de tabs

1 mensagem neste tópico

Boas não sei se isto é assim , chega-se e pede-se logo ajuda, mas cá vai.

É o seguinte estou a usar um plugin do joomla que funciona desta forma http://demo.joomlaworks.gr/ (descer até à zona dos vídeos)

Pronto o que necessito é de colocar os título por baixo em vez de estarem em cima.

Presumo que seja só php, já andei a ver e não consegui nada.

Se alguém conseguir ajudar um pouco agredeço, aqui fica o ficheiro php :

<?php
/*
// JoomlaWorks "Tabs & Slides" Plugin for Joomla! 1.0.x - Version 2.3
// License: http://www.gnu.org/copyleft/gpl.html
// Authors: Fotis Evangelou - George Chouliaras
// Copyright (c) 2006 - 2007 JoomlaWorks.gr - http://www.joomlaworks.gr
// Project page at http://www.joomlaworks.gr - Demos at http://demo.joomlaworks.gr
// Support forum at http://forum.joomlaworks.gr
// ***Last update: August 30th, 2007***
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$_MAMBOTS->registerFunction( 'onPrepareContent', 'jwTabs' );
function jwTabs( $published, &$row, &$params, $page=0
) {
// JS loader selection
$use_optimized_loader = 0; // Use optimized JS code loader? 0=no and 1=yes. Default is 0.
if (!$published) {
if (preg_match_all("/{tab=.+?}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = str_replace("{tab=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{tab=".$match."}", "", $row->text );
$row->text = str_replace( "{/tabs}", "", $row->text );
}
}
if (preg_match_all("/{slide=.+?}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = str_replace("{slide=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{slide=".$match."}", "", $row->text );
$row->text = str_replace( "{/slide}", "", $row->text );
}
}
return;
}
global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_session_type, $mainframe, $database, $loadJWTSscripts;
static $tabid;
$query = "SELECT id FROM #__mambots WHERE element = 'plugin_jw_ts' AND folder = 'content'";
$database->setQuery( $query );
$id = $database->loadResult();
$mambot = new mosMambot( $database );
$mambot->load( $id );
$param =& new mosParameters( $mambot->params );
// parameters
$enable_tabs = $param->get('enable_tabs', 1);
$enable_slides = $param->get('enable_slides', 1);
$slides_slidespeed = $param->get('slides_slidespeed', '30');
$slides_timer = $param->get('slides_timer', '10');
if(!$loadJWTSscripts) {
$loadJWTSscripts=1;
$header = "
<!-- JoomlaWorks \"Tabs & Slides\" Plugin (v2.3) starts here -->
<style type=\"text/css\" media=\"screen\">
@import \"$mosConfig_live_site/mambots/content/plugin_jw_ts/tabs_slides.css\";
</style>
<style type=\"text/css\" media=\"print\">.jwts_tabbernav{display:none;}</style>
<script type=\"text/javascript\">var jwts_slideSpeed=".$slides_slidespeed."; var jwts_timer=".$slides_timer.";</script>
<script type=\"text/javascript\" src=\"$mosConfig_live_site/mambots/content/plugin_jw_ts/tabs_slides_comp.js\"></script>
";
if($use_optimized_loader) {
$header .= "<script type=\"text/javascript\" src=\"$mosConfig_live_site/mambots/content/plugin_jw_ts/tabs_slides_opt_loader.js\"></script>";
} else {
$header .= "<script type=\"text/javascript\" src=\"$mosConfig_live_site/mambots/content/plugin_jw_ts/tabs_slides_def_loader.js\"></script>";
}
$header .= "
<!-- JoomlaWorks \"Tabs & Slides\" Plugin (v2.3) ends here -->
";
// cache check
if($mainframe->getCfg('caching') && ($option=='com_frontpage' || $option=='')) {
echo $header;
} else {
$mainframe->addCustomHeadTag($header);
}
}
// Start Tabs Replacement
// index.php
if($enable_tabs) {
if(strpos($_SERVER['PHP_SELF'], "index.php")) {
$b=1;
if (preg_match_all("/{tab=.+?}{tab=.+?}|{tab=.+?}|{\/tabs}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
if($b==1 && $match!="{/tabs}") {
$tabs[] = 1;
$b=2;
}
elseif($match=="{/tabs}"){
$tabs[]=3;
$b=1;
}
elseif(preg_match("/{tab=.+?}{tab=.+?}/", $match)){
$tabs[]=2;
$tabs[]=1;
$b=2;
}
else {
$tabs[]=2;
}
}
}
@reset($tabs);
$tabscount = 0;
if (preg_match_all("/{tab=.+?}|{\/tabs}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
if($tabs[$tabscount]==1) {
$match = str_replace("{tab=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{tab=".$match."}", "
<div class=\"jwts_tabber\" id=\"jwts_tab".$tabid."\"><div class=\"jwts_tabbertab\" title=\"".$match."\"><h2><a href=\"javascript:void(null);\" name=\"advtab\">".$match."</a></h2>", $row->text );
$tabid++;
} elseif($tabs[$tabscount]==2) {
$match = str_replace("{tab=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{tab=".$match."}", "</div><div class=\"jwts_tabbertab\" title=\"".$match."\"><h2><a href=\"javascript:void(null);\" name=\"advtab\">".$match."</a></h2>", $row->text );
} elseif($tabs[$tabscount]==3) {
$row->text = str_replace( "{/tabs}", "</div></div><div class=\"jwts_clr\"></div>", $row->text );
}
$tabscount++;
}
}
// index2.php
} else {
if (preg_match_all("/{tab=.+?}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = str_replace("{tab=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{tab=".$match."}", "</div><div><h3>".$match."</h3>", $row->text );
$row->text = str_replace( "{/tabs}", "", $row->text );
}
}
}
}
// End Tabs Replacement
// Start Slides Replacement
// index.php
if($enable_slides) {
if(strpos($_SERVER['PHP_SELF'], "index.php")) {
if (preg_match_all("/{slide=.+?}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = str_replace("{slide=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{slide=".$match."}", "<div class=\"jwts_title\"><div class=\"jwts_title_left\"><a href=\"javascript:void(null);\" title=\"Click to open!\" class=\"jwts_title_text\">".$match."</a></div></div><div class=\"jwts_slidewrapper\"><div>", $row->text );
$row->text = str_replace( "{/slide}", "</div></div>", $row->text );
}
}
// index2.php
} else {
if (preg_match_all("/{slide=.+?}/", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = str_replace("{slide=", "", $match);
$match = str_replace("}", "", $match);
$row->text = str_replace( "{slide=".$match."}", "<h3> ".$match."</h3><div>", $row->text );
$row->text = str_replace( "{/slide}", "</div>", $row->text );
}
}
}
}
// End Slides Replacement
}
?>

0

Partilhar esta mensagem


Link para a mensagem
Partilhar noutros sites

Crie uma conta ou ligue-se para comentar

Só membros podem comentar

Criar nova conta

Registe para ter uma conta na nossa comunidade. É fácil!


Registar nova conta

Entra

Já tem conta? Inicie sessão aqui.


Entrar Agora