SunQuest
           Suggestions & Feedback
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsForum InformationSuggestions & Feedback

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 30th, 2002, 12:06 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
marking topics "new"

how is this done on this site matt?

i am trying to help the admin of one serbian forum site to make this thing work like it works on this site.

by marking, i mean boldin (or what ever) topics that contain posts that i havent read.

i know it stores last time of my visit into a cookie, or db, but we cant get it to work as good as here...

Reply With Quote
  #2  
Old September 30th, 2002, 01:10 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: marking topics

Just a simple comparision:

if (latestpostime > lastvisittime)
print it bolded out
else
print it normal



the lastvisit is set with a function like so:

php Code:
Original - php Code
  1. function lastvisit()
  2. {
  3.     global $forumsess,$realm,$config,$eflastvisit;
  4.    
  5.     if (!session_is_registered("forumsess"))
  6.         session_register("forumsess");
  7.    
  8.     if ($eflastvisit)   
  9.         $forumsess[$realm][lastvisit] = $eflastvisit;
  10.    
  11.     $expire = time() + (60*60*24*365);
  12.     setcookie("eflastvisit", time(), $expire);
  13.  
  14.     if (!$forumsess[$realm][lastvisit]) 
  15.         $forumsess[$realm][lastvisit] = $eflastvisit;
  16.    
  17. }


and every page load (in the index.php) gets this:

php Code:
Original - php Code
  1.  
  2. if (!$forumsess[$realm][lastvisit])
  3.     lastvisit();


Reply With Quote
  #3  
Old September 30th, 2002, 01:46 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: marking topics

wow. i love simple solutions!

this only shows me that even thoe i consider my self to be very smart, and i have a reasonable amount of expiriense, i stil can't asume to know everything, and i am not ashame to admit it ;)

Reply With Quote
Reply

Viewing: Codewalkers ForumsForum InformationSuggestions & Feedback > marking topics "new"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway