Source for file pnajax.php
Documentation is available at pnajax.php
* Zikula Application Framework
* @copyright (c) 2001, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: pnajax.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_System_Modules
* @author Frank Schummertz
* @param blockorder array of sorted blocks (value = block id)
* @param position int zone id
* @return mixed true or Ajax error
// empty block positions for this block zone
// add new block positions
$blockplacements = array();
foreach ($blockorder as $order => $bid) {
$blockplacements[] = array('bid' => $bid, 'pid' => $position, 'order' => $order);
return array('result' => true);
* This function toggles active/inactive
* @author Frank Schummertz
* @param bid int id of block to toggle
* @return mixed true or Ajax error
// read the block information
if ($blockinfo == false) {
if ($blockinfo['active'] == 1) {
pnModAPIFunc('Blocks', 'admin', 'deactivate', array('bid' => $bid));
pnModAPIFunc('Blocks', 'admin', 'activate', array('bid' => $bid));
|