Page Builder

I created a new page in bagebuilder and my events block is not there so I inserted this entry in the pagecompose table.


INSERT INTO `PageCompose` VALUES (340, 'mynewpage', '966px', 'Events', '_Events', 3, 3, 'Events', '', 1, 33, 'non,memb', 0);

Then:

added code to bottom of /inc/classes/BxDolPageView.php

//start of code
function getBlockCode_Events() {
global $site;

$mode = $_REQUEST['events_mode'];
if( $mode != 'rand' and $mode != 'latest' )
$mode = 'latest';

$aDBTopMenu = array();
//$menu = '<div class="dbTopMenu">';
foreach( array( 'latest', 'rand' ) as $myMode ) {
switch( $myMode ) {
case 'latest':
$sTabTitle  = _t( '_Latest' );
break;
case 'rand':
$sTabTitle  = _t( '_Random' );
break;
}

/*if( $mode == $myMode ) {
$menu .= "<div class=\"active\">$sTabTitle</div>";
} else {
$menu .= "
<div class=\"notActive\">
<a href=\"{$_SERVER['PHP_SELF']}?events_mode=$myMode\" class=\"top_members_menu\" onclick=\"getHtmlData( 'show_events', this.href+'&amp;show_only=events'); return false;\">$sTabTitle[/url]
</div>";
}*/
$aDBTopMenu[$sTabTitle] = array('href' => "{$_SERVER['PHP_SELF']}?events_mode=$myMode", 'dynamic' => true, 'active' => ( $myMode == $mode ));
}
/*$menu .= '
<div class="clear_both"></div>
</div>';*/

$iTotalNum = db_value("SELECT COUNT(*) AS 'Cnt' FROM `SDatingEvents` WHERE `Status` = 'Active'");

$oEvents = new BxDolEvents();
if( $iTotalNum ) {
$iResPerPage = (int)getParam("max_blogs_on_home");
$iTotalPages = ceil( $iTotalNum / $iResPerPage );
$page = (int)$_REQUEST['events_page'];

if( $page < 1 or $mode == 'rand' )
$page = 1;
if( $page > $iTotalPages )
$page = $iTotalPages;
$sqlLimitFrom = ( $page - 1 ) * $iResPerPage;

$sBlocks = $oEvents->GenAnyBlockContent($mode, 0, "LIMIT $sqlLimitFrom, $iResPerPage");
$ret = $sBlocks;
} else
$ret .= '<div class="no_result"><div>'._t("_No events available").'</div></div>';

$aDBBottomMenu = array();
if( $iTotalPages > 1 ) {
//$ret .= '<div class="dbBottomMenu">';

if( $page > 1 ) {
$prevPage = $page - 1;
$aDBBottomMenu[ _t('_Back') ] = array( 'href' => "{$_SERVER['PHP_SELF']}?events_mode={$mode}&amp;events_page={$prevPage}", 'dynamic' => true, 'class' => 'backMembers' );
$sBackC = _t('_Back');
/*$ret .= <<<EOF
<a href="{$_SERVER['PHP_SELF']}?events_mode={$mode}&amp;events_page={$prevPage}" class="backMembers" onclick="getHtmlData( 'show_events', this.href+'&amp;show_only=events'); return false;">
{$sBackC}
[/url]
EOF;*/
}

if( $page < $iTotalPages ) {
$nextPage = $page + 1;
$aDBBottomMenu[ _t('_Next') ] = array( 'href' => "{$_SERVER['PHP_SELF']}?events_mode={$mode}&amp;events_page={$nextPage}", 'dynamic' => true, 'class' => 'moreMembers' );
/*$sNextC = _t('_Next');
$ret .= <<<EOF
<a href="{$_SERVER['PHP_SELF']}?events_mode={$mode}&amp;events_page={$nextPage}" class="moreMembers" onclick="getHtmlData( 'show_events', this.href+'&amp;show_only=events'); return false;">
{$sNextC}
[/url]
EOF;*/
}
$sBMViewAllLink = ($oEvents->bUseFriendlyLinks) ? "{$site['url']}events/" : "{$site['url']}events.php?show_events=all&action=show";
$aDBBottomMenu[ _t('_View All') ] = array( 'href' => $sBMViewAllLink, 'dynamic' => false, 'class' => 'viewAllMembers' );
//$ret .= '<div class="clear_both"></div></div>';
}

return array( $ret, $aDBTopMenu, $aDBBottomMenu );
//return $ret;
}

//end of code

I also changed this in the above code:

I changed '$_SERVER['PHP_SELF']}?' to 'domain.com/pageview.php?' and still no luck.

The events block show but when I click on the tabs it disappears. There's probably something else I need to change? All help is appreciated.

My main goal is to add events, ads, and polls to this new page.

Thanks

Wonell


Quote · 6 Apr 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.