From 1f23f323d4ce70c188c5f4e5cc100f480651379f Mon Sep 17 00:00:00 2001 From: fisharebest Date: Sun, 11 Apr 2010 16:06:34 +0000 Subject: Fix tab/module issues; default tab, ajax loading, names instead of numbers (All tab still broken) --- modules/all_tab/pgv_module.php | 16 ++++++---------- modules/lightbox/functions/lb_head.php | 1 + modules/personal_facts/pgv_module.php | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/all_tab/pgv_module.php b/modules/all_tab/pgv_module.php index 8d3f3c4def..080d4b83aa 100644 --- a/modules/all_tab/pgv_module.php +++ b/modules/all_tab/pgv_module.php @@ -82,16 +82,12 @@ class all_tab_WT_Module extends WT_Module implements WT_Module_Tab { // Implement WT_Module_Tab public function getJSCallback() { $out = 'if (selectedTab=="'.$this->getName().'") {'; - $i = 0; - foreach($this->controller->modules as $mod) { - if ($mod instanceof WT_Module_Tab) { - if ($i>0 && $mod->getName()!=$this->getName() && $mod->canLoadAjax()) { - $out .= 'if (!tabCache["'.$mod->getName().'"]) { - jQuery("#'.$mod->getName().'").load("individual.php?action=ajax&module='.$mod->getName().'&pid='.$this->controller->pid.'"); - tabCache["'.$mod->getName().'"] = true; - }'; - } - $i++; + foreach($this->controller->tabs as $tab) { + if ($tab->getName()!=$this->getName() && $tab->canLoadAjax()) { + $out .= 'if (!tabCache["'.$tab->getName().'"]) { + jQuery("#'.$tab->getName().'").load("individual.php?action=ajax&module='.$tab->getName().'&pid='.$this->controller->pid.'"); + tabCache["'.$tab->getName().'"] = true; + }'; } } diff --git a/modules/lightbox/functions/lb_head.php b/modules/lightbox/functions/lb_head.php index ac500d72d7..c80981792f 100644 --- a/modules/lightbox/functions/lb_head.php +++ b/modules/lightbox/functions/lb_head.php @@ -225,6 +225,7 @@ require_once WT_ROOT.'includes/media_reorder_count.php'; */ //Popup Reorder Media ( If media exists and is greater than 1 item ) ----- + global $tot_med_ct; if (WT_USER_CAN_EDIT && $tot_med_ct>1) { if ($LB_AL_HEAD_LINKS == "both") { print ""; diff --git a/modules/personal_facts/pgv_module.php b/modules/personal_facts/pgv_module.php index 866224986b..efc400b408 100644 --- a/modules/personal_facts/pgv_module.php +++ b/modules/personal_facts/pgv_module.php @@ -138,7 +138,8 @@ class personal_facts_WT_Module extends WT_Module implements WT_Module_Tab { } // Implement WT_Module_Tab public function canLoadAjax() { - return true; + // Don't load this tab using AJAX, otherwise search engines won't see it + return false; } // Implement WT_Module_Tab -- cgit v1.3