 | Keep unread flags |  |
Posted: 06/28/2007 2:52 PM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
Nightrider,
After what you said about this, iv just tried to install it after readinng the mod autors notes they have fixed most of the bugs whether that is true or not who knows lol, but i get this error:
| Code:
|
Error Detail
Critical Error
FIND FAILED: In file [viewforum.php] could not find:
//
// Handle marking posts
//
if ( $mark_read == 'topics' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
{
asort($tracking_forums);
unset($tracking_forums[key($tracking_forums)]);
}
if ( $row['last_post'] > $userdata['user_lastvisit'] )
{
$tracking_forums[$forum_id] = time();
setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
}
$message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a> ');
message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : '';
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : '';
MOD script line #823
|
Iv looked into this but i cant find the error, i had to fix to other errors before this which was just silly mistakes which was a lot easier to see, but i couldnt see anything in this |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 06/29/2007 2:54 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:04 AM
Location: St Pete, FL
|

|
|
|
|
 |
I made an adjustment to the MOD script, then tried to install it to see what would happen on your Test board, but your server was unresponsive when I tried to use EM to install it. The page kept timing out...
Hopefully when you are ready to install this again, all will be working properly again...
The problem that you encountered above was due to code added by the Simple Subforums MOD. I made the adjustments to the REPLACE WITH section in addition to the FIND section so that it hopefully won't break the Simple Subforums MOD nor the Keep Unread Flags MOD...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 06/29/2007 6:26 AM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
yeah i did think it was the sub forum mod coz it wa sin the middle of the code, but i wasnt sure what to do to fix that problem!!
Il av a look at the mod later on!! |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 06/29/2007 6:50 AM |
|
|
|
|
|
| Caravan |
| Posts |
282 |
| Word Cnt. |
31,380 |
| BDay |
Apr 14 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Nov 01, 2006
Local time: 1:04 AM
Location: Denver, PA
|

|
|
|
|
 |
| That mod was such a pain I gave up on it thw two different times I tried it. But oh how much I would love if I could get that on at least one of my boards. Good luck Karen and Blake, I hope you get it working!! |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 06/29/2007 7:34 AM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
yeah it was a pain the last time i tried it but it was before i had a test forum which mad eit harder to resolve, but reading up on it 2 days ago, they seem to have fixed bugs that was causing the problems, but we will see, maybe they have caused mor ebugs lol, id love to get it to work though it gets so annoying when im away from pc for a while and never know what are new posts!!
NR im still having host problems so il av to leave this mod till later, when its working again, this has happened before and it took 24hrs to get resolved! |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 06/30/2007 6:45 AM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
I have another error i know what the problesm is, but i cant fix it coz there the welcome news mod in th middle of the error it cant find, like with the last error, so id best leave it up to you, heres the erro:
| Code:
|
Critical Error
FIND FAILED: In file [templates/subSilver/index_body.tpl] could not find:
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
MOD script line #1829 :: FAQ :: Report
|
|
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 07/07/2007 3:46 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:04 AM
Location: St Pete, FL
|

|
|
|
|
 |
Ok, you can fix that by doing this:
OPEN
keep_unread_2-0-6.txt
FIND
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
#
#-----[ REPLACE WITH ]------------------------------------------
#
{LAST_VISIT_DATE}<br />
|
REPLACE WITH
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
<tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<tr>
#
#-----[ FIND ]------------------------------------------------
#
</tr>
<!-- END switch_user_logged_in -->
#
#-----[ REPLACE WITH ]------------------------------------------
#
</tr>
|
You will also need to make the following adjustments:
FIND & DELETE
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
#
#-----[ REPLACE WITH ]-----------------------------------------
#
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
|
FIND
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
<!-- END switch_user_logged_in -->
#
#-----[ REPLACE WITH ]-----------------------------------------
#
<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
|
REPLACE WITH
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
<td align="left">
<!-- BEGIN switch_user_logged_in -->
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td align="left">
#
#-----[ FIND ]------------------------------------------------
#
<!-- END switch_user_logged_in -->
</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
</td>
|
Save, upload, and try again using EM...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 07/07/2007 1:08 PM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 07/07/2007 2:28 PM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 6:04 AM
Location: west midlands:uk
|

|
|
|
|
 |
Ok, i added those you said above, but iv got this same error i had a while back which you had to fix earlier in this post:
| Code:
|
Critical Error
FIND FAILED: In file [viewforum.php] could not find:
//
// Handle marking posts
//
if ( $mark_read == 'topics' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
{
asort($tracking_forums);
unset($tracking_forums[key($tracking_forums)]);
}
if ( $row['last_post'] > $userdata['user_lastvisit'] )
{
$tracking_forums[$forum_id] = time();
setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
}
$message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a> ');
message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : '';
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : '';
MOD script line #823
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Keep unread flags |  |
Posted: 07/08/2007 12:41 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:04 AM
Location: St Pete, FL
|

|
|
|
|
 |
Ok, I corrected all the conflicts in the MOD script, so it should install now. The question is whether it will work correctly with the Simple Subforums MOD. They replaced a large chunk of code that included Subforum code as well. There was no way to add the Simple Subforum code to the replacement code since they are handling things much differently. So after installing this, you should test it and make sure you test your subforums as well...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|