Example #1
0
/**
 * Add single page action
 * 
 * You can use set of two params where first param is title and second one
 * is URL (the default set) and you can use array of actions as first
 * parram mapped like $title => $url
 *
 * @access public
 * @param string $title
 * @param string $url
 * @return PageAction
 */
function add_page_action()
{
    $args = func_get_args();
    if (!is_array($args) || !count($args)) {
        return;
    }
    // Array of data as first param mapped like $title => $url
    if (is_array(array_var($args, 0))) {
        foreach (array_var($args, 0) as $title => $url) {
            if (!empty($title) && !empty($url)) {
                PageActions::instance()->addAction(new PageAction($title, $url));
            }
            // if
        }
        // foreach
        // Two string params, title and URL
    } else {
        $title = array_var($args, 0);
        $url = array_var($args, 1);
        if (!empty($title) && !empty($url)) {
            PageActions::instance()->addAction(new PageAction($title, $url));
        }
        // if
    }
    // if
}
Example #2
0
/**
 * Add single page action
 * 
 * You can use set of two params where first param is title and second one
 * is URL (the default set) and you can use array of actions as first
 * parram mapped like $title => $url
 *
 * @access public
 * @param string $title
 * @param string $url
 * @return PageAction
 */
function add_page_action()
{
    $args = func_get_args();
    if (!is_array($args) || !count($args)) {
        return;
    }
    // Array of data as first param mapped like $title => $url
    if (is_array(array_var($args, 0))) {
        foreach (array_var($args, 0) as $title => $url) {
            if (!empty($title) && !empty($url)) {
                PageActions::instance()->addAction(new PageAction($title, $url, array_var($args, 1)));
            }
            // if
        }
        // foreach
        // Four string params, title, URL and name
    } else {
        $title = array_var($args, 0);
        $url = array_var($args, 1);
        $name = array_var($args, 2);
        $target = array_var($args, 3);
        $attributes = array_var($args, 4);
        $isCommon = array_var($args, 5);
        if (!empty($title) && !empty($url)) {
            PageActions::instance()->addAction(new PageAction($title, $url, $name, $target, $attributes, $isCommon));
        }
        // if
    }
    // if
}
Example #3
0
            $shown++;
        }
    }
    // foreach
    if ($hidden) {
        // close the hidden div and show the "More" link
        ?>
				</div>											
				<a id="moreOption<?php 
        echo $genid;
        ?>
" style="display:block" class="coViewAction" href="javascript: og.showMoreActions('<?php 
        echo $genid;
        ?>
')">
			    	<?php 
        echo lang('more') . '...';
        ?>
			    </a> <?php 
    }
}
PageActions::clearActions();
?>
		</td>
	</tr>
	<tr>
		<td class="coViewBottomLeft" style="width:12px;">&nbsp;</td>
		<td class="coViewBottom" style="width:216px;"></td>
		<td class="coViewBottomRight" style="width:12px;">&nbsp;&nbsp;</td>
	</tr>
</table>