Welcome to Geeklog, Anonymous Monday, December 30 2024 @ 09:51 am EST
Geeklog Forums
lib custom
Status: offline
Jinx
Forum User
Newbie
Registered: 06/24/03
Posts: 3
I really really need help with placing in blocks in my gl, like i tired adding affiliates and memos block and its not working I get an error mesg in the blocks i created saying this
"Error in PHP Block. Function, function phpblock_Affiliate, does not exist."
"Error in PHP Block. Function, phpblock_getmemos, does not exist."
can someone plze help?????? (
10
11
Quote
Status: offline
Jinx
Forum User
Newbie
Registered: 06/24/03
Posts: 3
yes i did
want to see them.......
"
function phpblock_getmemos()
{
global $_USER, $_NEWM, $_NOM, $new_memos;
$result = mysql_query("SELECT count(id) FROM gl_memo WHERE username = '$_USER[username]' AND rd = ''");
while($row = mysql_fetch_assoc($result)){
$new_memos = $row['count(id)'];
}
if($new_memos <= 0){
$_NOM = "";
return $_NOM;
}else{
$_NEWM .= "<b><u><FONT face="verdana"><hr>
<FONT COLOR="#FFFFFF">You have <A href="memo_read.php">(" .
$new_memos .")</a> new memo</u></b></FONT><hr>";
return $_NEWM ;
}
}
function phpblock_Affiliate()
{
global $_CONF, $_TABLES, $LANG10;
$result = DB_query( "SELECT lid,url,title,hits from {$_TABLES['links']} WHERE category = 'Affiliates' ORDER BY title" );
$nrows = DB_numRows( $result );
$affil_templates = new Template( $_CONF['path_layout'] . 'stats' );
$affil_templates->set_file( array(
'itemstats'=>'itemstatistics.thtml',
'statrow'=>'singlestat.thtml'
));
if( $nrows > 0 )
{
//uncomment if you would like the links/stats headers to display
//$affil_templates->set_var( 'item_label', $LANG10[19] );
//$affil_templates->set_var( 'stat_name', $LANG10[20] );
for( $i = 0; $i < $nrows; $i++ )
{
$A = DB_fetchArray( $result );
$affil_templates->set_var( 'item_url', $_CONF['site_url'] . '/portal.php?url=' . $A['url'] . '&what=link&item=' . $A['lid'] );
$affil_templates->set_var( 'item_text', stripslashes( str_replace( '$', '$', $A['title'] )));
// uncomment if you would like the stats to display next to the affiliate
//$affil_templates->set_var( 'item_stat', $A['hits'] );
$affil_templates->parse( 'stat_row', 'statrow', true );
}
$affil_templates->parse( 'output', 'itemstats' );
$retval .= $affil_templates->finish( $affil_templates->get_var( 'output' ));
}
else
{
$retval .= $LANG10[21];
}
return $retval;
}
?>
this is how it looks inside my lib file???????????
Text Formatted Code
function phpblock_getmemos()
{
global $_USER, $_NEWM, $_NOM, $new_memos;
$result = mysql_query("SELECT count(id) FROM gl_memo WHERE username = '$_USER[username]' AND rd = ''");
while($row = mysql_fetch_assoc($result)){
$new_memos = $row['count(id)'];
}
if($new_memos <= 0){
$_NOM = "";
return $_NOM;
}else{
$_NEWM .= "<b><u><FONT face="verdana"><hr>
<FONT COLOR="#FFFFFF">You have <A href="memo_read.php">(" .
$new_memos .")</a> new memo</u></b></FONT><hr>";
return $_NEWM ;
}
}
11
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, so you've edited the correct file and placed it in the correct directory (just checking ...)?
Are there any error messages displayed on the site (other than the one about the blocks not being found)? For example, if you have a parse error in lib-custom.php, it won't work either ...
URL?
bye, Dirk
9
9
Quote
Jinx
Anonymous
i have no other error on my site, my url is www.clanpol.com
11
7
Quote
Tommy22
Anonymous
Did anyone ever determine the problem here? I am having the same problem with the memo block.
Cheers,
Tommy22
7
10
Quote
All times are EST. The time is now 09:51 am.
- 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