Welcome to Geeklog Thursday, April 02 2020 @ 10:51 pm EDT

Geeklog Forums

who is new


Status: offline

Sniper12

Forum User
Regular Poster
Registered: 25/11/03
Posts: 81
Location:Denmark
I get this error on top of my page after I have added this in my lib-custom, there is an error in the block to.
---------
Error in top of page

Parse error: parse error, unexpected $ in /customers/prideofvbk.dk/prideofvbk.dk/httpd.www/prideofvbk/geeklog/system/lib-custom.php on line 282

Warning: Cannot add header information - headers already sent by (output started at /customers/prideofvbk.dk/prideofvbk.dk/httpd.www/prideofvbk/geeklog/system/lib-custom.php:282) in /customers/prideofvbk.dk/prideofvbk.dk/httpd.www/prideofvbk/geeklog/system/lib-sessions.php on line 180

Warning: Cannot add header information - headers already sent by (output started at /customers/prideofvbk.dk/prideofvbk.dk/httpd.www/prideofvbk/geeklog/system/lib-custom.php:282) in /customers/prideofvbk.dk/prideofvbk.dk/httpd.www/prideofvbk/geeklog/system/lib-sessions.php on line 192
-------------
error in block

Error in PHP Block. Function, phpblock_whos_new, does not exist.
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 06/07/02
Posts: 324
I added the following to my /path/to/geeklog/system/lib-custom.php:
PHP Formatted Code

function phpblock_whos_new()
{
global $_CONF,$_TABLES;

// Set the number of new members to show
$numToShow = 5;

$result = DB_query("SELECT uid,username,photo FROM {$_TABLES['users']} users ORDER BY regdate DESC limit $numToShow");

$nrows = DB_numRows($result);
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '">' . $A['username'] .
'</a>';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="
'
. $_CONF['layout_url'] . '/images/smallcamera.gif" border="0"></a>';
}
$retval .= '<br>';
}
return $retval;
}


 


Also, make sure you don't have any white-space after the closing ?> in the lib-common.php. (the ?> is the very last line, no empty lines after it)
-- destr0yr "I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

All times are EDT. The time is now 10:51 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