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, 51 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 - Posts marked as read... Fixed? [ ]
 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
Kinetix
Corporal
Corporal


Joined: Aug 16, 2003
Posts: 52


PostPosted: Sat May 29, 2004 11:53 am Reply with quoteBack to top

I just decided to bring this up in a seperate topic than the sticky one, so I could figure some things out and not interfere with that.

Alright, so for his cookie suggestions. He said to leave the cookie settings blank. This would essentially render it unable to set a cookie, right? So that's what I tried, however, the second you chose a forum, all topics in BBtoNuke would immediately be marked as READ. This was because it was unable to find the user's current SID in the db, meaning it had to make a new one with the CURRENT time. That means any posts older than current time (all) would be marked as read.
It could not find that SID because there was no cookie to get the SID from. This is also why you have SID in the URL, because it needs to make a new one every visit to your forums.

Now, I've gone through some of the php scripts, and come up with some things. It turns out that the (read post) _t cookie was being deleted every time you exited the browser, because it's expiration was set to 0. The same went for the _sid cookie, which held your session id. Now, all I had to do was change the 0 to $current_time + 604800 (one week). This would mean that every week, all posts would be marked as read, instead of every visit to the site.

There are a few instances of this in includes/sessions.php:
Code:
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);

Code:
setcookie($cookiename . '_sid', $session_id, $current_time + 604800, $cookiepath, $cookiedomain, $cookiesecure);


This also had to be changed:
Code:
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;

Code:
$last_visit = ( $userdata['user_session_time'] > $current_time ) ? $userdata['user_session_time'] : $current_time;


Then, in your modules/Forums/viewtopic.php, you have this:
Code:
($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);

That means that every time you exit the browser, it will delete the read topics cookie. However, if you replace it with this:
Code:
($board_config['cookie_name'] . '_t', serialize($tracking_topics), $current_time + 604800, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);

The browser will save the cookie for a week, every time a user views a new topic, it will be updated for a week from that time as well. This means instead of ALL topics being marked as read, or even all that are older, it will only mark the ones you have ACTUALLY READ.

In modules/Forums/viewforum.php:
Code:
setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);

This cookie has the same problem as the _t one.
Code:
setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), $current_time + 604800, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);


As for cookie settings, do not set them all empty. It should be as follows:
Cookie domain *BLANK*
Cookie name anything_you_want
Cookie path /
Cookie secure
If your server is running via SSL, set this to enabled, else leave as disabled Disabled Enabled *DISABLED*
Session length [ seconds ] 3600

Leaving the domain blank means that from any subdomain that the user accesses your website from it will use the same cookie. Instead of a different one for www.website.com and http://website.com - Only set it to something if your domain has more than one site on it, in subdomains. In that case, it would be set to subdomain.website.com


Apart from those settings, I changed and added some bits here and there, so I'm not too sure if they changed anything, which is why I didn't post them here. I'm no PHP professional, but I think this would work.
Also, I'm not too sure how big the site_t cookie would get after having viewed 500 topics or so... But if a user logs out, the _t cookie SHOULD be erased, and their session id's user_lastvisit would be set to the current time, so all posts older than when they log in would be marked as read.

This fix also makes the "Mark all as read" link work.

Does anyone have anything extra to add to this? Because I'm really not too sure about everything I've done.

_________________
http://www.ikrontik.tk/
Ikrontik Server & Web Developer
So maybe I like posting my website in my sig, maybe google likes to cache it.
Find all posts by KinetixView user's profileSend private messageVisit poster's website
Frmg
Nuke Cadet
Nuke Cadet


Joined: Jul 01, 2004
Posts: 4


PostPosted: Thu Jul 01, 2004 4:13 pm Reply with quoteBack to top

Ok but ...

1st - You need fix this topic because the 1st method that leave the cookie settings blanked dont work in PhpNuke 7.3 patched.

2th - Why you dont make new bbtonuke version with this corrections ?

3th - There are possibilities to resolve this bug forever ?
Find all posts by FrmgView user's profileSend private message
Lady_Juniper
Nuke Soldier
Nuke Soldier


Joined: Oct 24, 2004
Posts: 23

Location: Belgium

PostPosted: Sun Nov 21, 2004 4:13 am Reply with quoteBack to top

Just wanted to bump this up to see if more people had succes with this fix?
I tried the sticky fix as well, but ended up with same results as stated above.
Find all posts by Lady_JuniperView user's profileSend private message
massdigitalmedia
Corporal
Corporal


Joined: Sep 01, 2003
Posts: 57

Location: Huntington Beach, CA USA

PostPosted: Fri Jun 03, 2005 5:25 am Reply with quoteBack to top

I'm having this issue as well...all posts being marked as read as soon as you leave the main forums page.

_________________
________________________
Scott Salvi
Mass Digital Media
http://www.massdigitalmedia.com
3912903 - ICQ
massdigitalmedia - AIM
Find all posts by massdigitalmediaView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressICQ Number
nuke014
Nuke Soldier
Nuke Soldier


Joined: Feb 05, 2005
Posts: 32


PostPosted: Thu Feb 23, 2006 3:46 pm Reply with quoteBack to top

Ok the fix seems to stop it from marking all read by itself. The problem still exsist but now marking all forums as read just keeps the unread flag. and marking all topics as read is now blank.

Logging out and back in does mark all forums read though. It just seems that the button to press to mark it as read doesnt work.
Find all posts by nuke014View user's profileSend private messageVisit poster's website
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.207 Seconds - 291 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::