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, 52 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - unread forums post notification in modules 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
mordikar
Nuke Cadet
Nuke Cadet


Joined: Mar 11, 2005
Posts: 4


PostPosted: Fri Mar 11, 2005 5:21 pm Reply with quoteBack to top

ok maybe this is the right place to ask.

I've managed to make it so when users log into the site the modules block will check for new pms and if there are some it will display a flashing message icon next to the private mesaging link in the modules block..

so feelin kinda proud of myself i figure "hey i'll do the same thing for unread forums messages so users can immediatly tell if there are new messages ... should be easy enough right?"

How incredibly wrong can a person be .... appearently trying to determine of there are unread forum messages is much much more difficult than private messages.

I'm using nuke 7.5 with bb port built in downloaded from here ..

Any ideas cause i'm kinda lost.
Find all posts by mordikarView user's profileSend private message
Sugs
Lieutenant
Lieutenant


Joined: Jan 10, 2004
Posts: 188

Location: UK

PostPosted: Sat Mar 12, 2005 8:12 am Reply with quoteBack to top

The code below is by Adam ismay who did this mod for phpbb forums.
Where in the forums it says "view posts since last visit" it adds the number of posts in brackets after it ie; "view posts since last visit (21)"
The same thing ( or similar ) is used on this site.

Not sure if you can use this code or hack it in......I have treid something similar with my site visitors block but never got very far with it.
It somehow has to be added into $content but all I keep getting is errors.......but then again I havn't spent much time on it


Code:
#
#-----[ OPEN ]-------------------------------------
#

index.php

#
#-----[ FIND ]-------------------------------------
#

//
// End session management
//

#
#-----[ AFTER, ADD ]-------------------------------------
#

if( $userdata['session_logged_in'] )
{
   $sql = "SELECT COUNT(post_id) as total
      FROM " . POSTS_TABLE . "
      WHERE post_time >= " . $userdata['user_lastvisit'] . "
            AND poster_id != " . $userdata['user_id'];


   $result = $db->sql_query($sql);
   if( $result )
   {
      $row = $db->sql_fetchrow($result);
      $lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
   }
}


#
#-----[ SAVE ALL FILES ]------------------------------------------
#
# EoM

_________________
Help Me !!! The Humphries are after me milk.
Find all posts by SugsView user's profileSend private message
mordikar
Nuke Cadet
Nuke Cadet


Joined: Mar 11, 2005
Posts: 4


PostPosted: Sun Mar 13, 2005 12:12 am Reply with quoteBack to top

Thanks .. it's definately a start ... looks like i may need to pull the session management into the modules block as well .. What i really need is a way to pull the unread forums data .. so maybe if i look at it i can find what triggers is and then do an if loop to modify the link like i did with the priveate messages.

You have given me an excellent starting point to work from and i am very appreciative.
Find all posts by mordikarView user's profileSend private message
Sugs
Lieutenant
Lieutenant


Joined: Jan 10, 2004
Posts: 188

Location: UK

PostPosted: Sun Mar 13, 2005 12:34 am Reply with quoteBack to top

Let me know how you get on.......Would be handy on my site aswell

_________________
Help Me !!! The Humphries are after me milk.
Find all posts by SugsView user's profileSend private message
mordikar
Nuke Cadet
Nuke Cadet


Joined: Mar 11, 2005
Posts: 4


PostPosted: Sun Mar 13, 2005 8:19 am Reply with quoteBack to top

well,

I've been working on it all morning and i'm not getting anywhere.

The problem i'm currently facing is i can't get the values for user_id or user_last_visit into from the userdata array in nuke ..

I think if i can get those values i might be able to get it going ...
Find all posts by mordikarView 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.191 Seconds - 216 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::