Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
neggard
Hangin' Around



Joined: Jan 20, 2006
Posts: 40
Location: Seden

PostPosted: Fri Aug 04, 2006 4:23 pm Reply with quote

<?php

/************************************************************/
/* Description.: User Info Block */
/* Version.....: v0.3.0 */
/* File Name...: block-User_Info.php */
/* Last Updated: 22 July 2003 */
/* */
/* Updated for PHP-Nuke 6.x - 22/07/2003 - NukeZone */
/* Website http://www.nukezone.com */
/* 22/07/2003 - Added Security Check Image */
/* 22/07/2003 - Added User logout Link */
/* 22/07/2003 - Added Admin Logout - Visible to Admin Only */
/* ------------ */
/* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
/* website http://www.nukescripts.com */
/* ------------ */
/* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
/* website http://newsportal.homip.net */
/* ------------ */
/* (C) 2002 */
/* All rights beyond the GPL are reserved */
/* */
/* Please give a link back to my site somewhere in your own */
/* */
/************************************************************/

if (eregi("block-block-User_Info.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
}

$content = "";

Removed som code here for the forumpost shouldt be too long

$content .= "<center><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
$content .= ""._NICKNAME."<br><input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
$content .= ""._PASSWORD."<br><input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";

if (extension_loaded("gd")) {
$content .= ""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
$content .= ""._TYPESECCODE."<br><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\">\n";
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n";
} else {
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
$content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
}

$content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
$content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)</center><hr>";
}
$content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
$content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
$content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
$content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
$content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n<hr>\n";
$content .= "<img src=\"images/blocks/group-3.gif\" height=\"14\" width=\"17\"> <b><u>"._BVISIT.":</u></b>\n<br>\n";
$content .= "<img src=\"images/blocks/ur-anony.gif\" height=\"14\" width=\"17\"> "._BVIS.": <b>$guest_online_num</b><br>\n";
$content .= "<img src=\"images/blocks/ur-member.gif\" height=\"14\" width=\"17\"> "._BMEM.": <b>$member_online_num</b><br>\n";
$content .= "<img src=\"images/blocks/ur-registered.gif\" height=\"14\" width=\"17\"> "._BTT.": <b>$who_online_num</b><br>\n";
if ($member_online_num > 0) {
$content .= "<hr>\n<img src=\"images/blocks/group-1.gif\" height=\"14\" width=\"17\"> <b><u>"._BON.":</u></b><br>$who_online_now\n";
}
$content .= "</form>";

?>


The users on my page dont need to use the security pictures so I dont want it there.
The problem is that the block show a empty picture or with 1 letter in it, but I have disable the security pictures so users can log in anyway.
Well how do I remove the picture from the block?


Last edited by neggard on Fri Aug 04, 2006 5:25 pm; edited 1 time in total 
View user's profile Send private message MSN Messenger
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Aug 04, 2006 5:20 pm Reply with quote

Well, you don´t need to post such a long code here.
I ´dont know how you disabled the function but it seems you forgot to change this also in the info block.
Change: if (extension_loaded("gd")) e.g. to: if (extension_loaded("no"))
I changed this also in the your account.php and that worked.
 
View user's profile Send private message
neggard







PostPosted: Fri Aug 04, 2006 5:27 pm Reply with quote

I edit the first post, removed some code.

Thank you it works perfect now, its good yo have your help in the forum.
I am new to php and phpnuke but I learning new stuff every day.
 
Susann







PostPosted: Fri Aug 04, 2006 5:35 pm Reply with quote

Neggard

that´s the quick fix. Possible it works also if you comment out the lines :
Don´t know did tried this.

if (extension_loaded("gd")) {
$content .= ""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' etc.
 
neggard







PostPosted: Fri Aug 04, 2006 5:42 pm Reply with quote

The quick fix works, isnt good?

When I try to comment out that lines the page dissapear, the only thing I see is the menu.
 
Susann







PostPosted: Sat Aug 05, 2006 4:03 am Reply with quote

The quick fix is okay but I had in the past with my method allways some entries with that security code in the logfiles and thought about how to eliminate this completely.
You only need to remember your changes if you change this feature again.
 
helix512
Hangin' Around



Joined: Aug 07, 2006
Posts: 40

PostPosted: Wed Aug 16, 2006 10:06 pm Reply with quote

i had the same problem this fixed it:

old code:

$content .= ""._SECURITYCODE.": <img src=\"modules.php?name=Your_Account&op=gfx&random_num=$random_num\" border=\"1\" alt=\""._SECURITYCODE."\" title=\""._SECURITYCODE."\"><br>\n"

replace with this:

$content .= ""._SECURITYCODE.": <img src=\"index.php?gfx=gfx&random_num=$random_num\" border=\"1\" alt=\""._SECURITYCODE."\" title=\""._SECURITYCODE."\"><br>\n"

fixed me right up..
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©