I think what I need to do is to create a copy of the index file for the module that I am referring to on each tab...and then link to that new index page.
For example, say on one of the tabs, I want to display the main page for the Yogurt image gallery.
If I just link to the index.php page, it does show this page in the tab, but it basically loads the entire site in the tab as well...which I don't want.
What do I need to strip away from this page, so that only the module contents, and not the side bars, header area, and footer area display as well?
here is the code for the index.php file for the Yogurt module:
Any ideas on what needs to be removed, so that it only displays the mod contents?
Thanks!
/**
* XOOPS header
*/
include_once("../../mainfile.php");
$xoopsOption['template_main'] = 'yogurt_index.html';
include_once("../../header.php");
/**
* Module classes
*/
include("class/yogurt_images.php");
/**
* Is a member looking ?
*/
if (!empty($xoopsUser)){
/**
* If no $_GET['uid'] then redirect to own
*/
if ( isset($_GET['uid']))
{
$uid = $_GET['uid'];
} else {
header("Location: ".XOOPS_URL."/modules/album/index.php?uid=".$xoopsUser->getVar('uid'));
}
/**
* Is the user the owner of the album ?
*/
$isOwner = ($xoopsUser->getVar('uid')==$_GET['uid'])?true:false;
/**
* If it is an anonym
*/
} else {
if ( isset($_GET['uid']))
{
$uid = $_GET['uid'];
} else {
header("Location: ".XOOPS_URL."/modules/album/index.php?uid=1");
$isOwner = false;
}
}
/**
* Filter for search pictures in database
*/
$criteria_uid = new criteria('uid_owner',$uid);
/**
* Creating a factory of pictures
*/
$album_factory = new Xoopsyogurt_imagesHandler($xoopsDB);
/**
* Fetch picturesfrom de factory
*/
$pictures_object_array = $album_factory->getObjects($criteria_uid);
/**
* How many pictures are on the user album
*/
$pictures_number = $album_factory->getCount($criteria_uid);
/**
* If there is no pictures in the album
*/
if ($pictures_number==0){
$nopicturesyet = _MD_YOGURT_NOTHINGYET;
$xoopsTpl->assign('lang_nopicyet',$nopicturesyet);
} else {
/**
* Lets populate an array with the dati from the pictures
*/
$i = 0;
foreach ($pictures_object_array as $picture){
$pictures_array[$i]['url'] = $picture->getVar("url","s");
$pictures_array[$i]['desc'] = $picture->getVar("title","s");
$pictures_array[$i]['cod_img'] = $picture->getVar("cod_img","s");
$xoopsTpl->assign('pics_array', $pictures_array);
$i++;
}
}
/**
* Show the form if it is the owner and he can still upload pictures
*/
if (!empty($xoopsUser)){
if ($isOwner && $xoopsModuleConfig['nb_pict']>$pictures_number){
$maxfilebytes = $xoopsModuleConfig['maxfilesize'];
$album_factory->renderFormSubmit($maxfilebytes,$xoopsTpl);
}
}
/**
* Let's get the user name of the owner of the album
*/
$owner = new XoopsUser();
$identifier = $owner->getUnameFromId($uid);
/**
* Adding to the module js and css of the lightbox and new ones
*/
$header_lightbox = '
';
/**
* Assigning smarty variables
*/
$xoopsTpl->assign('lang_albumtitle',sprintf(_MD_YOGURT_ALBUMTITLE,"
".$identifier.""));
$xoopsTpl->assign('path_yogurt_uploads',$xoopsModuleConfig['link_path_upload']);
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar("name"). " - ".$identifier."'s album");
$xoopsTpl->assign('nome_modulo', $xoopsModule->getVar('name'));
$xoopsTpl->assign('lang_max_nb_pict', sprintf(_MD_YOGURT_YOUCANHAVE,$xoopsModuleConfig['nb_pict']));
$xoopsTpl->assign('lang_delete',_MD_YOGURT_DELETE );
$xoopsTpl->assign('lang_editdesc',_MD_YOGURT_EDITDESC );
$xoopsTpl->assign('isOwner',$isOwner);
$xoopsTpl->assign('lang_nb_pict', sprintf(_MD_YOGURT_YOUHAVE,$pictures_number));
$xoopsTpl->assign('xoops_module_header', $header_lightbox);
$xoopsTpl->assign('campo_token',$GLOBALS['xoopsSecurity']->getTokenHTML());
/**
* Adding the comment system
*/
include XOOPS_ROOT_PATH.'/include/comment_view.php';
/**
* Closing the page
*/
include("../../footer.php");
?>