You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 72 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - nukecops' User Info block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Nargul
Nuke Cadet
Nuke Cadet


Joined: Apr 06, 2003
Posts: 8


PostPosted: Wed Jun 25, 2003 1:43 am Reply with quoteBack to top

Try adding this to the place where you need to have it:
Code:
   $content .= "<a href=\"modules.php?name=Your_Account&op=logout\">Logout</a>\n";
Find all posts by NargulView user's profileSend private message
Viper
Lieutenant
Lieutenant


Joined: May 04, 2003
Posts: 282

Location: Louisville, KY USA

PostPosted: Wed Jun 25, 2003 5:15 am Reply with quoteBack to top

gent wrote:
Dooes anybody know how to do this:

How to put the "logout" link there when I'm logged in?

My site is at www.hundkatt.se


Hi gent,

Here is the code in the user info block, the first piece of code shows what should already be there, the second piece of code shows the logout line:

Code:
if (is_user($user)) {
    $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
    $sql = "SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $uid = $row[user_id];
    $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
    $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
    $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
    $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
    $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";


Code:
if (is_user($user)) {
    $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n";
    $sql = "SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'";
    $content .= "<img src=images/blocks/icon_dot.gif>&<a href=\"modules.php?name=Your_Account&op=logout\">Logout</a><BR>\n<hr>\n";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $uid = $row[user_id];
    $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='1' OR privmsgs_type='5')"));
    $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
    $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
    $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
    $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";

This is how I have it set on my site. Please let me know if this helps, if not, I can get with you on ICQ or MSN and help you out further.

Linzilla
Find all posts by ViperView user's profileSend private messageVisit poster's website
Kommius
Nuke Soldier
Nuke Soldier


Joined: Jul 09, 2003
Posts: 32


PostPosted: Mon Jul 14, 2003 5:21 am Reply with quoteBack to top

What's the line of code i have to use so that i may allow users who are currently online to add other users to their buddy list (like on the NukeCop Site Visitors block)?? I'm not sure what info it is that i have to retrieve from the database to fetch the members profile number...
Find all posts by KommiusView user's profileSend private message
sting
Site Admin
Site Admin


Joined: Jul 24, 2003
Posts: 1985

Location: Apparently ALWAYS Online. . .

PostPosted: Tue Aug 05, 2003 12:40 pm Reply with quoteBack to top

Linzilla:

Thanks for the code - it works with the exception that I see a "&" on the screen, and I of course had to put the icon_dot.gif file in the appropriate directory. I may try removing the & to see if that works... Seems logical.

Thanks again
-sting

_________________
Is it paranoia if they are really out to get you?

-------------------------------------------------------
sting usually hangs out at nukehaven.net
Find all posts by stingView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
natten
Nuke Soldier
Nuke Soldier


Joined: May 22, 2003
Posts: 16


PostPosted: Tue Aug 05, 2003 1:29 pm Reply with quoteBack to top

The little section saying, for example:

Private Messages
Unread: 5
Read: 0


does NOT work at all... It simply states wrong number, why is that?
Find all posts by nattenView user's profileSend private message
natten
Nuke Soldier
Nuke Soldier


Joined: May 22, 2003
Posts: 16


PostPosted: Tue Aug 05, 2003 2:16 pm Reply with quoteBack to top

I fixed it by replacing the

$newpms

with
$newpm , from the old "who_is_online" block! (remember to add and "S")



Here is how you do it:

find the
$newpms(...) in the "block-User"_info" file

and then overwrite the line with:

$newpms = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));



That should do it!
Find all posts by nattenView user's profileSend private message
sdanks
Nuke Cadet
Nuke Cadet


Joined: Aug 12, 2003
Posts: 3


PostPosted: Wed Aug 13, 2003 1:55 pm Reply with quoteBack to top

Since Nukemods has been closed down, is there somewhere else I can get the site_vistors module?
Find all posts by sdanksView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.562 Seconds - 192 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::