PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Developers Corner ::  Block Development ::  Adding a new item to incoming content of menu/incoming block

Moderated by: Support Team

Bottom
Adding a new item to incoming content of menu/incoming block

  • Link to this postingPosted: 16.09.2006, 03:46
    Profile Homepage
    pnDev
    rank:
    pnHelper pnHelper
    registered:
     July 2004
    Status:
    offline
    last visit:
    10.12.07
    Posts:
    446
    Hi all,

    I'm trying to add interfaces to some 3rd party modules for the incoming content area of the menu block. I've followed the code in /includes/blocks/menu.php that supports the core modules but I've run into a problem. One of the modules I tried was for incoming business listings in the bizpages module. It only works when I'm on the bizpages module page. If I'm on the home page or any other page it will not display the incoming content on the menu or incoming block. The core module stuff works no matter what page you have loaded. I've referenced http://communit...ic-49229.htm for DB connection information but still cannot understand why it only works when the module is loaded. Is the database tables for 3rd party modules loaded only when the page is loaded and not global like the core module tables ?? Any help with clues on this problem would be appreciated.

    Here is my code:

    Quote // bizpages module :: Pending new and changed bizpage listings.
    ///////////////////////////////////////////////////////////////
    if (pnSecAuthAction(0, "bizpages::", '::', ACCESS_ADD) && pnModAvailable('bizpages')) {
    $result =& $dbconn->Execute("SELECT count(1) FROM $pntable[bizpages_bizpending]");
    if ($dbconn->ErrorNo() == 0) {
    list($fnum) = $result->fields;
    $result->Close();
    if ($fnum) {
    $waiting .= addMenuStyledUrl($vars['style'], "BizPages: $fnum", "index.php?module=bizpages&type=admin&func=bizselect&swhere=pending&bfield=status&btable=bizpending", "");
    }
    }




    -----
    pnDev.com ~ featuring the PostNuke paid services forum
  • Link to this postingPosted: 12.10.2006, 22:41
    Profile Homepage
    pnDev
    rank:
    pnHelper pnHelper
    registered:
     July 2004
    Status:
    offline
    last visit:
    10.12.07
    Posts:
    446
    shameless bump since 1 month no posts in this forum

    -----
    pnDev.com ~ featuring the PostNuke paid services forum
  • Link to this postingPosted: 13.10.2006, 17:00
    Profile Homepage
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    online
    Posts:
    13326
    You would be better off writing a module API function and calling that to get your items...

    -----
    Regards,
    Simon

    itbegins.co.uk - PostNuke Consulting

    Please read the Support Guide
  • Link to this postingPosted: 03.11.2006, 23:54
    Profile Homepage
    pnDev
    rank:
    pnHelper pnHelper
    registered:
     July 2004
    Status:
    offline
    last visit:
    10.12.07
    Posts:
    446
    Good call. Thanks HammerHead. I'll do that and post the code here in case anybody is interested. Still wondering about how and when module-specific database tables are loaded for other projects. Are all the core tables loaded globally for some reason but 3rd party are not? I saw in code for PNphpBB2 when they check private messages they have access to the 'Messages' module tables and column, but it wouldn't work like that for when I tried to change it to the new 'pnMessages' tables and columns. Luckily due to your suggestion I realize that was the wrong approach anyways and should do as you suggest in your reply for that also. However I'm still curious to know more about why some seem accessible and others arent? Just to get better at PostNuke development overall. I read in the dev docs that tables get loaded when the module get loaded but this leaves me confused about how sometimes the table for the core modules seem accessible?

    Shortly after posting this I may have found my own answer. Is this it?

    QuotepnModLoad('pnMessages');




    edited by: pnDev, Nov 04, 2006 - 12:33 AM

    -----
    pnDev.com ~ featuring the PostNuke paid services forum
  • Link to this postingPosted: 04.01.2008, 08:56
    Profile Homepage
    crespowu
    rank:
    Registered User Registered User
    registered:
     January 2008
    Status:
    offline
    last visit:
    04.01.08
    Posts:
    1
    pnDev,I'm really looking forward to your code.

Start ::  Developers Corner ::  Block Development ::  Adding a new item to incoming content of menu/incoming block

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke