remove tabs from polls

Hello All, and happy new year.  Has anyone successfully removed any of the tabs from polls.  I have successfully altered my polls so that 'admin' instead of 'latest' is the default tab, but now i need to remove the 'rand' tab.  i tried removing rand from the code that sets polling mode in BxBaseIndex.php which removes the rand tab from the home page, but if you click on 'top' or 'latest' the random tab reappears.

 $mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'admin';
                $aDBTopMenu = array();
                //$menu = '<div class="dbTopMenu">';
                foreach( array( 'admin', 'last', 'top' ) as $sMyMode )
                {

 

if the array above there was an additional entry after 'admin','last','top'  which was rand.  am i chasing my tail here?

thanks in advance for your help.

 

 

Quote · 3 Jan 2009

I don't know this is just a logical guest, but you can tried. Because you eliminate the random tab, you need to eliminate the function part or wherever it is called. Eliminate the blue code that it below. Clear your cache in your browser and see what happens. If you a find a error, be sure to make a back u of the original BxBaseIndex.php file. Just in case. Good luck.


-----------------------------------------CODE on BxBaseIndex.php---------------------------------------------------

$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'admin';

$aDBTopMenu = array();
//$menu = '<div class="dbTopMenu">';
foreach( array('admin', 'last', 'top') as $sMyMode )
{
switch ( $sMyMode )
{

//admin polls
case 'admin':
$sModeTitle = _t( '_Admin' );
break;

// random polls
case 'rand':
if( $mode == $sMyMode )
$query .= " ORDER BY RAND() LIMIT 2";
$sModeTitle = _t( '_Random' );
break;


// latest polls
case 'last':
if( $mode == $sMyMode )
$query .= " ORDER BY id_poll DESC LIMIT 2";
$sModeTitle = _t( '_Latest' );
break;

// top polls
case 'top':
if( $mode == $sMyMode )
$query .= " ORDER BY poll_total_votes DESC LIMIT 2";
$sModeTitle = _t( '_Top' );
break;
}

Quote · 24 Feb 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.