Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Calling Blocks/modules like an SSI call
  • Posted: 25.09.2003, 21:45
     
    LonnyS
    rank:
    Softmore Softmore
    registered:
     September 2003
    Status:
    offline
    last visit:
    07.11.05
    Posts:
    74
    Hi All,

    Just to pose a question on how one would include a block/module on a standard PHP or shtml page... Can it be done....

    For example.. Let's say you wanted to just to have the news/calendar/links/etc. show up on a hard coded page, even though there has been a session created, the user goes to this "NOT PostNuke PAGE" but it has post nuke modules working inside it.... Just like calling an SSI include or EXEC Command to bring the program into the page..

    Check out www.longislandguide.com for an example of a calendar being called from an SSI call and embedding in the page. And the calendar passes it's variables to highlight the events. This site is not post nuke...


    I hope you understand and can help....

    Best regards,

    Lonny
  • Posted: 25.09.2003, 22:18
     
    N!cklas
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    08.12.05
    Posts:
    147
    Sorry, no input. Also interested in the answer. I don't believe it's that easy, but it would be really nice!

    --
    /N!cklas
    Bingo | BlueCow | Blogg
  • Posted: 26.09.2003, 03:52
     
    ctimmer
    rank:
    Helper Helper
    registered:
     February 2003
    Status:
    offline
    last visit:
    11.06.08
    Posts:
    226
    This isn't the complete answer but it may get you started. In my Recipe module I pass data between sites via XML. Check out the link (XML):
    http://curttimmerman…ipe_name_like=bread

    Here is the module backend.php code:

    Code

    <?php
    // $Id: pnuser.php,v 1.1.1.1 2002/09/15 22:26:15 root Exp $
    // ----------------------------------------------------------------------
    // POST-NUKE Content Management System
    // Copyright (C) 2002 by the PostNuke Development Team.
    // http://www.postnuke.com/
    // ----------------------------------------------------------------------
    // Based on:
    // PHP-NUKE Web Portal System - http://phpnuke.org/
    // Thatware - http://thatware.org/
    // ----------------------------------------------------------------------
    // LICENSE
    //
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License (GPL)
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WIthOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // To read the license please visit http://www.gnu.org/copyleft/gpl.html
    // ----------------------------------------------------------------------
    // Original Author of file: Curt Timmerman
    // Purpose of file:  Call functions returning xml,images, etc.
    // ----------------------------------------------------------------------

    chdir ('../../') ;

    include 'includes/pnAPI.php' ;
    pnInit () ;
    //include 'modules/Recipes/pntables.php' ;    // no database access here

    if (! pnModLoad ('Recipe', 'user'))
        {
        die (_LOAD_FAILED) ;
        }

    if (! pnModAPILoad ('Recipe', 'user'))
        {
        die (_LOAD_FAILED) ;
        }

    //
    //---- call function ----//
    //
    $function = pnVarCleanFromInput ('function') ;
    switch ($function)
        {                                // limit functions that can be called
        case 'xml_server' :
        case 'image_return' :
            $Result = pnModFunc('Recipe',
                             'user',
                             $function) ;
            break ;
        default :
            $Result = 'No access' ;
            break ;
        }

    if (empty ($Result)
            || $Result == true)
        {
        }
    else
        {
        print ($Result) ;
        }

    ?>


    This was simple because there was no forms or input involved.

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula