0 Members and 1 Guest are viewing this topic.
When is this to be released ?
/** Samplecode Block in Block* @author PortaMx - Portal Management Extension* @author Copyright 2008-2010 by PortaMx - http://portamx.com** PHP block INIT PART*/// globals we need hereglobal $context, $smcFunc;// define the block ID's you will see$this->php_vars = array( 'blocklist' => array(37,147,3,60), // block ID's in the show order);// define the block padding$this->php_vars['padding'] = $context['PortaMx']['settings']['panels']['padding'] .'px;';$this->php_vars['padhalf'] = ceil($context['PortaMx']['settings']['panels']['padding'] / 2) .'px;';// init the object array$this->php_vars['objects'] = null;// now request the blocks$request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}portamx_blocks WHERE active = 1 AND id IN ({array_int:blocklist})', array('blocklist' => $this->php_vars['blocklist']));if($smcFunc['db_num_rows']($request) > 0){ while($row = $smcFunc['db_fetch_assoc']($request)) { // check if the classfile loaded $blocktype = 'pmxc_'. $row['blocktype']; if(!class_exists($blocktype)) require_once($context['PMx_classdir'] . $row['blocktype'] .'.php'); // call the contrutor $this->php_vars['objects'][$row['id']] = new $blocktype($row, null, $visible); // Initiate the block if visible if(!empty($visible)) $visible = $this->php_vars['objects'][$row['id']]->pmxc_InitContent(); // destroy object if invisible if(empty($visible)) unset($this->php_vars['objects'][$row['id']]); } $smcFunc['db_free_result']($request);}/* End INIT PART */
/** Samplecode Block in Block* @author PortaMx - Portal Management Extension* @author Copyright 2008-2010 by PortaMx - http://portamx.com** PHP block SHOW PART*/// the block output "function"$blockoutfunc = ' $objid = array_shift($this->php_vars[\'blocklist\']); if(isset($this->php_vars[\'objects\'][$objid])) $this->php_vars[\'objects\'][$objid]->pmxc_ShowBlock(0, \'\'); else echo \'Block object \'. $objid .\' not exist.\';';echo ' <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr valign="top" height="5%"> <td valign="top"> <div style="width:175px; padding-right:'. $this->php_vars['padhalf'] .'">';eval($blockoutfunc); // output the blockecho ' </div> </td> <td valign="top" width="90%" style="padding:0 '. $this->php_vars['padhalf'] .'">';eval($blockoutfunc); // output the blockecho ' </td> <td valign="top" rowspan="2"> <div style="width:175px; padding-left:'. $this->php_vars['padhalf'] .'">';eval($blockoutfunc); // output the blockecho ' </div> </td> </tr> <tr valign="top"> <td valign="top" colspan="2" style="padding-top:'. $this->php_vars['padding'] .' padding-right:'. $this->php_vars['padhalf'] .'">';eval($blockoutfunc); // output the blockecho ' </td> </tr> </table>';/* End SHOW PART */
echo PortaMx_Printvar(ssi_whosOnline(''), 'ssi_whosOnline return data');
Last, i wish very much a pagination function to this awesome multiple boardnews block. Will you consider them?
/** Samplecode Blocks in a YUI Block* @author PortaMx - Portal Management Extension* @author Copyright 2008-2010 by PortaMx - http://portamx.com** PHP block SHOW PART*/// the block output "function"$blockoutfunc = ' if(isset($this->php_vars[\'objects\'][$tabid])) $this->php_vars[\'objects\'][$tabid]->pmxc_ShowBlock(0, \'\'); else echo \'Block object \'. $tabid .\' not exist.\';';// Output the container tabsecho ' <div style="height:26px;"> <ul class="dropmenu">';foreach($this->php_vars['blocklist'] as $tabid => $tabdata) echo ' <li> <a id="yuihref'. $tabid .'" nohref class="'. ($tabdata['act'] ? 'active ' : '') .'firstlevel" onclick="pmx_coice_yuitab('. $tabid .')"> <span id="yuispan'. $tabid .'" class="'. ($tabdata['act'] ? '' : 'last ') .'firstlevel">'. $tabdata['title'] .'</span> </a> </li>';echo ' </ul> </div>';// Output the container contentforeach($this->php_vars['blocklist'] as $tabid => $tabdata){ echo ' <div id="yuitab'. $tabid .'" style="'. $this->php_vars['yui_height'] . (empty($tabdata['act']) ? ' display:none;' : '') .'">'; eval($blockoutfunc); // output the block echo ' </div>';}/* End SHOW PART */
/** Samplecode Blocks in a YUI Block* @author PortaMx - Portal Management Extension* @author Copyright 2008-2010 by PortaMx - http://portamx.com** PHP block INIT PART*/// globals we need hereglobal $context, $smcFunc;// define the block ID's and Tabnames in the show order.// set the 'act' to true for the default tab$this->php_vars = array( 'blocklist' => array( 37 => array( 'title' => 'Donate', 'act' => true, ), 147 => array( 'title' => 'Shoutbox', 'act' => false, ), 3 => array( 'title' => 'Recent Post', 'act' => false, ), 60 => array( 'title' => 'Newsticker', 'act' => false, ) ));// define the height type, hight, overflow of YUI block// type: height, min-height, max-height// overflow: hidden, auto$this->php_vars['yui_height'] = 'max-height:400px; overflow:auto;';// init the object array$this->php_vars['objects'] = null;// load the javasctipt code to header$context['html_headers'] .= ' <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ var yuitab_array = new Array('. implode(',', array_keys($this->php_vars['blocklist'])) .'); function pmx_coice_yuitab(tabID) { for(var i = 0; i < yuitab_array.length; i++) { document.getElementById("yuihref" + yuitab_array[i]).className = "firstlevel"; document.getElementById("yuispan" + yuitab_array[i]).className = "last firstlevel"; document.getElementById("yuitab" + yuitab_array[i]).style.display = "none"; } document.getElementById("yuihref" + tabID).className = "active firstlevel"; document.getElementById("yuispan" + tabID).className = "firstlevel"; document.getElementById("yuitab" + tabID).style.display = ""; document.cookie = "pmx_yui_tabs=" + tabID + "; path=/;"; } // ]]></script>';// now request the blocks$request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}portamx_blocks WHERE active = 1 AND id IN ({array_int:blocklist})', array('blocklist' => array_keys($this->php_vars['blocklist'])));if($smcFunc['db_num_rows']($request) > 0){ while($row = $smcFunc['db_fetch_assoc']($request)) { // check if the classfile loaded $blocktype = 'pmxc_'. $row['blocktype']; if(!class_exists($blocktype)) require_once($context['PMx_classdir'] . $row['blocktype'] .'.php'); // call the contrutor $this->php_vars['objects'][$row['id']] = new $blocktype($row, null, $visible); // Initiate the block if visible if(!empty($visible)) $visible = $this->php_vars['objects'][$row['id']]->pmxc_InitContent(); if(empty($visible)) unset($this->php_vars['objects'][$row['id']]); } $smcFunc['db_free_result']($request);}// get the yuitab cookieif(isset($_COOKIE['pmx_yui_tabs'])){ $curTab = intval($_COOKIE['pmx_yui_tabs']); foreach(array_keys($this->php_vars['blocklist']) as $tabid) $this->php_vars['blocklist'][$tabid]['act'] = ($tabid == $curTab);}/* End INIT PART */
Quote from: neverhurry on 23 Feb 10, 16:30:59Last, i wish very much a pagination function to this awesome multiple boardnews block. Will you consider them?Not on the next release .. we set this to a to do list...Fel
Is there a demo site?
When will it be release?