TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 125
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

mark as read

Started by Ray, October 01, 2005, 05:33:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ray

When I try to use the mark as read on this site i get a
An Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.
lol what up with that?? I thought only my site did stuff like that ::)

bloc

I haven't updated the themes yet..only default theme is working. :/

Nokonium

I get that on RC1 in my themes but not in a 'virgin' default theme, the theme needs updating.

RoarinRow

When I use 'Mark As Read' on TP .75 with Techhead TP, it brings me to the Home page instead of back to the Forum page that I came from.

How can I fix this?

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

bloc

does the board(s) get marked as read?

gerrymo

Quote from: RoarinRow on January 15, 2006, 06:27:20 PM
When I use 'Mark As Read' on TP .75 with Techhead TP, it brings me to the Home page instead of back to the Forum page that I came from.

How can I fix this?

It happens all the time on my sites if you hit Mark Read on /index.php?action=forum It takes me back to index.php with all posts marked read. But in the boards themselves, it works as it should.

RoarinRow

Quote from: gerrymo on January 16, 2006, 12:11:59 PM
Quote from: RoarinRow on January 15, 2006, 06:27:20 PM
When I use 'Mark As Read' on TP .75 with Techhead TP, it brings me to the Home page instead of back to the Forum page that I came from.

How can I fix this?

It happens all the time on my sites if you hit Mark Read on /index.php?action=forum It takes me back to index.php with all posts marked read. But in the boards themselves, it works as it should.

Yup, this is exactly what happens to me. 

Quote from: Bloc on January 16, 2006, 12:04:32 PM
does the board(s) get marked as read?

It does.

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

bloc

hm, maybe its missing a session variable in the link?

Rasyr

More than likely the redirect function is set so that if you are in the forums when you hit the mark as read button, it takes you directly back to the BoardIndex, only it thinks that the BoardIndex is index.php, not index.php?action=forum.


Rasyr

Found it!!  ;D

In Sub-Boards.php (in Sources, around lines 207-229) find the following:


if (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'all')
{
// Find all the boards this user can see.
$result = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]", __FILE__, __LINE__);
$boards = array();
while ($row = mysql_fetch_assoc($result))
$boards[] = $row['ID_BOARD'];
mysql_free_result($result);

if (!empty($boards))
markBoardsRead($boards, isset($_REQUEST['unread']));

$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit();



Change it to the following (note: this change ONLY affects the last line of code - the rest was given to make it easier to find):

if (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'all')
{
// Find all the boards this user can see.
$result = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]", __FILE__, __LINE__);
$boards = array();
while ($row = mysql_fetch_assoc($result))
$boards[] = $row['ID_BOARD'];
mysql_free_result($result);

if (!empty($boards))
markBoardsRead($boards, isset($_REQUEST['unread']));

$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit('action=forum');


I tried this locally and it worked for redirecting me back to BoardIndex without a hassle.


This website is proudly hosted on Crocweb Cloud Website Hosting.