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

Dizkus

Bottom
Help... tables and column missing from $pntable
  • Posted: 21.08.2006, 16:32
     
    mindscream
    rank:
    Freshman Freshman
    registered:
     August 2006
    Status:
    offline
    last visit:
    21.08.06
    Posts:
    3
    Hi! I need some help...

    Here's the content of my pntables.php

    function test_pntables()
    {
    $pntable = array();

    $tableName = pnConfigGetVar('prefix') . '_test';

    $pntable['test'] = $tableName;

    $pntable['test_column'] = array('recordid' => $tableName . '.recordid');

    return $pntable;
    }

    And the partial content of my pninit.php

    function test_init()
    {
    // Reference database connection
    $dbconn =& pnDBGetConn(true);

    // Reference pnTable from PostNuke core array
    $pntable =& pnDBGetTables();

    print_r($pntable);
    die();

    The table ($pntable['test']) and column ($pntable['test_column']) I specify in pntables.php is not in the $pntable array! Where did I go wrong? Please help!

    -Ang
  • Posted: 21.08.2006, 18:28
     
    mindscream
    rank:
    Freshman Freshman
    registered:
     August 2006
    Status:
    offline
    last visit:
    21.08.06
    Posts:
    3
    Upon further investigation by inserting die() in pntables.php, I realized it was never called. icon_frown I have made sure display_error is on and error_reporting is E_ALL. Where do I go from here?

    -Ang
  • Posted: 21.08.2006, 20:06
     
    jediping
    rank:
    Helper Helper
    registered:
     November 2004
    Status:
    offline
    last visit:
    12.03.07
    Posts:
    387
    in your test_init() function, after defining $pntables, do this:

    $testtable = &$pntable['test'];
    $testcolumn = &$pntable['test_column'];

    That should work.
  • Posted: 22.08.2006, 04:44
     
    mindscream
    rank:
    Freshman Freshman
    registered:
     August 2006
    Status:
    offline
    last visit:
    21.08.06
    Posts:
    3
    Thanks for the suggestion. After one week of reading up all the documents and posting I can find, I finally found the answer at the PostNuke Modules Factory (http://home.postnuke.ru/index.php/).

    Quote


    Do I have proper permissions for module's files (0644) and directories (0755)?


    I am trying out the new Ubuntu and the file permission wasn't set correctly. PostNuke was unable to 'read' pntables.php.

    :)

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula