Sorry...here's the code:
<?php
if(!(defined('_VALID_MOS') || defined( '_JEXEC' ))){
die( 'Restricted access' );
}
/* simple xml for php4 */
$simpe_xml_native =true;
if(!function_exists("simplexml_load_file")){
require_once "administrator/components/com_pwframework/classes/class.simplexml.php";
function simplexml_load_file($file){
$sx = new simplexml;
return $sx->xml_load_file($file);
}
$simpe_xml_native =false;
}
/* make this configurabel */
require_once("administrator/components/com_pwframework/lib/joomla.support.php");
require_once("administrator/components/com_rokin/lib/rokin.common.php");
loadFrameWork();
require_once("administrator/components/com_rokin/lib/classdef.php");
require_once 'administrator/components/com_rokin/lib/classloader.php';
require_once 'administrator/components/com_rokin/lib/picasa_api.php';
//get the correct class file
if(isJoomlaOne()){
require_once("administrator/components/com_rokin/rokin.j10.class.php");
}else{
require_once("administrator/components/com_rokin/rokin.j15.class.php");
}
/*================================================= ========================= */
?>
<style>
table .pw-template{
width: 100%;
}
table .pw-template td{
/*border:1px solid #cccccc;*/
border-spacing: 2px;
}
</style>
<?php
/* loading the rokin specific settings */
$database = getDBase();
$setting = new rokinSetting($database);
$setting->loadById(1);
if(isset($setting->description)){
echo "<p>" . $setting->description ."</p>";
}
$command = new crudcommand();
$GLOBALS['command'] = $command;
$command->optionUrlTag = "unit";
$command->actionUrlTag = "act";
$command->preNavUrl = "index1.php?option=com_rokin&Itemid=" . getReqParamVal('Itemid');
$command->newCommand("gallery", new commandAction("show","Gallery", -1, null, array("Itemid","gid")));
$command->newCommand("album", new commandAction("show","Album", -1, null, array("Itemid","albumid")));
$command->newCommand("photo", new commandAction("show","Photo", -1, null, array("Itemdid","albumid","photoid","photoindex")) );
$rokinRequest = get_rokin_request();
plugins_pre();
echo "<table cellpadding=\"1\" cellspacing=\"1\" class=\"pw-template\" >";
$extensionsTopMost = get_active_subs_per_position(POSITION_TOP_MOST, $rokinRequest->stage);
$extensionsTop = get_active_subs_per_position(POSITION_TOP, $rokinRequest->stage);
$extensionsLeft = get_active_subs_per_position(POSITION_LEFT, $rokinRequest->stage);
$extensionsRight = get_active_subs_per_position(POSITION_RIGHT, $rokinRequest->stage);
$extensionsBottom = get_active_subs_per_position(POSITION_BOTTOM, $rokinRequest->stage);
$extensionsBottomMost = get_active_subs_per_position(POSITION_BOTTOMMOST, $rokinRequest->stage);
$colspan = 1;
if(count($extensionsLeft) > 0){
$colspan++;
}
if(count($extensionsRight) > 0){
$colspan++;
}
if(count($extensionsTopMost)> 0){
echo "<tr><td colspan=\"$colspan\">";
foreach ($extensionsTopMost as $ext){
$ext->render($rokinRequest);
}
echo "</td></tr>";
}
if(count($extensionsTop)> 0){
echo "<tr><td colspan=\"$colspan\">";
foreach ($extensionsTop as $ext){
$ext->render($rokinRequest);
}
echo "</td></tr>";
}
if(count($extensionsLeft)> 0){
echo "<td valign=\"top\">";
foreach ($extensionsLeft as $ext){
$ext->render($rokinRequest);
}
echo "</td>";
}
echo "<td>";
// print_r($command);
// echo "<hr>";
// global $command; //reload from globals (php4 hack)
// print_r($command);
// echo $_REQUEST['unit'];
$command->run();
echo "</td>";
if(count($extensionsRight)> 0){
echo "<td valign=\"top\">";
foreach ($extensionsRight as $ext){
$ext->render($rokinRequest);
}
echo "</td></tr>";
}
if(count($extensionsBottom)> 0){
echo "<tr><td colspan=\"$colspan\">";
foreach ($extensionsBottom as $ext){
$ext->render($rokinRequest);
}
echo "</td></tr>";
}
if(count($extensionsBottomMost)> 0){
echo "<tr><td colspan=\"$colspan\">";
foreach ($extensionsBottomMost as $ext){
$ext->render($rokinRequest);
}
echo "</td></tr>";
}
echo "<tr><td colspan=\"$colspan\" >";
//echo "<span ><a style='font-size:6pt; margin-left

; margin-right

;color:#cccccc;' href='http://www.pageworks.nl'>PageWorks - RokinWeb Gallery ". getRokinVersion() . "</a></span>";
echo "</td></tr></table>";
plugins_post();
function plugins_pre(){
$rokinRequest = get_rokin_request();
$ext = get_plugings();
foreach ($ext as $e){
$e->renderPre($rokinRequest);
}
}
function plugins_post(){
$rokinRequest = get_rokin_request();
$ext = get_plugings();
foreach ($ext as $e){
$e->renderPost($rokinRequest);
}
}
/**
* initialisation function of the framework called as default
*
*/
function init(){
$Itemid = getReqParamVal("Itemid");
$Itemid = getReqParamVal("gid");
gallery_show($Itemid);
}
/* exectues the active gallery extension */
function gallery_show($Itemid, $gid=null){
$rokinRequest = get_rokin_request();
$ext = get_active_extension_per_stage(STAGE_GALLERY, STAGE_TYPE_EXT);
$ext[0]->render($rokinRequest);
}
/* exectues the active album extension */
function album_show($Itemid, $albumid){
$rokinRequest = get_rokin_request();
$ext = get_active_extension_per_stage(STAGE_ALBUM, STAGE_TYPE_EXT);
$ext[0]->render($rokinRequest);
}
/* executes the active photo extension */
function photo_show($Itemid, $albumid, $photoid){
$rokinRequest = get_rokin_request();
$ext = get_active_extension_per_stage(STAGE_PHOTO, STAGE_TYPE_EXT);
$ext[0]->render($rokinRequest);
}
?>