Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 06:13 pm EDT

Geeklog Forums

forum 2.5 fatal error


Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Hey Blaine,
I seem to be missing the function ppGetUserBlocks() that is called from your config.php file. Any ideas where I might find that? I thought it would be in your lib-portalparts.php file, but that file seems to be just the same as your previous version.
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Hi,

I'll have to update the archive but here is the code for that function and your right it should go in the system/lib-portalparts.php
Text Formatted Code

function ppGetUserBlocks(&$blocks) {
    global $_TABLES, $_CONF, $_USER, $LANG21, $HTTP_SERVER_VARS, $topic, $page, $newstories;

    $retval = '';
    $sql = "SELECT name,owner_id,group_id,perm_group,perm_members,perm_anon FROM {$_TABLES['blocks']} WHERE onleft = 1 AND is_enabled = 1";

    // Get user preferences on blocks
    if( !isset( $_USER['noboxes'] ) || !isset( $_USER['boxes'] )) {
        if( !empty( $_USER['uid'] )) {
            $result = DB_query( "SELECT boxes,noboxes FROM {$_TABLES['userindex']} WHERE uid = '{$_USER['uid']}'" );
            list($_USER['boxes'], $_USER['noboxes']) = DB_fetchArray( $result );
        } else {
            $_USER['boxes'] = '';
            $_USER['noboxes'] = 0;
        }
    }
    $sql .= " AND (tid = 'all' AND type <> 'layout')";
    if( !empty( $_USER['boxes'] )) {
        $BOXES = str_replace( ' ', ',', $_USER['boxes'] );
        $sql .= " AND (bid NOT IN ($BOXES) OR bid = '-1')";
    }

    $sql .= ' ORDER BY blockorder,title asc';
    $result = DB_query( $sql );
    $nrows = DB_numRows( $result );

    for( $i = 1; $i <= $nrows; $i++ ) {
        $A = DB_fetchArray( $result );
        if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 ) {
            $blocks[] = $A['name'];
        }
    }

    return $blocks;

}

 

Geeklog components by PortalParts -- www.portalparts.com
 Quote

ldfoo

Anonymous
Thanks for this work Blaine Very Happy


I had a successful install but had the following warning comes up when selecting a forum.

Text Formatted Code
Warning: Division by zero in C:xampphtdocsgeekcvsforumindex.php on line 434
An SQL error has occurred. Please see error.log for details.
 



From error log:

10/04/05 07:24:59 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: SELECT * FROM gl_forum_topic topic WHERE forum = '1' AND pid = 0 ORDER BY sticky DESC, lastupdated DESC, id DESC LIMIT 0,


Other information

using geeklog 1.3.12cvs on xampp 1.4.14, php4.3.11, mysql4.1.12

Forum 2.3 worked fine on this installation - I uninstalled 2.3 and did new install of forum 2.5

Forum 2.5 did not find the server Pear path - changed to true in config and OK after updated the downloaded Pear archive from gl.net to include the HTML folder.

Thanks
laurie
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Regarding the SQL error: Any chance you have not setup the admin setting defaults? Check the user forum preferences as well. It looks like the page size is not being passed.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

All times are EDT. The time is now 06:13 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content