[2.0.11] Redirect User Fix

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
14
45%
Very Good
2
6%
Good
2
6%
Fair
0
No votes
Poor
13
42%
 
Total votes: 31

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27919
Joined: Sat Aug 16, 2003 7:36 am

[2.0.11] Redirect User Fix

Post by Extensions Robot » Fri Feb 18, 2005 1:03 am

MOD Name: Redirect User Fix
Author: solo forever
MOD Description: redirect users directly to their message after making a new post, instead of the "Click here to view your message, here for Forum index" message screen.


MOD Version: 1.0.0

Download File: Redirect_User_Fix 1.0.0.zip
mods overview page: View
File Size: 1663 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

Darkmonkey
Former Team Member
Posts: 1707
Joined: Fri Oct 24, 2003 3:48 pm
Location: Where the trout streams flow and the air is nice

Post by Darkmonkey » Tue Feb 22, 2005 9:47 pm

MOD Validated/Released

Notes:
This MOD redirects users to their message after making a new post, without showing the successful post screen.

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Wed Feb 23, 2005 7:42 pm

Thanks solo forever. That message has always annoyed me. IMHO, that was a totally unnecessary step added to the code, which only served to slow things down rather than speed things up...

This MOD installed in my 2.0.11 board using EasyMod. I only had to change one thing to get it to work with EM...

I changed this:

Code: Select all

#
#-----[ FIND ]------------------------------------------------
#
#$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">'; 
To this:

Code: Select all

#
#-----[ FIND ]------------------------------------------------
#
#$meta = '<meta http-equiv="refresh" content="1;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">'; 
Since I have a heavily modified board, I have no idea whether the difference is due to MODed changes or what...

Nice MOD solo forever...

:lol:

solo forever
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 12:25 am
Contact:

Ah!

Post by solo forever » Fri Feb 25, 2005 1:41 am

Oh thx for pointing that error out, but they may occur if your board is heavy moded, because it worked with a clean fresh of of the latest php board 2.0.11 & 2.0.12 when I tryed it. But anyways, I was glad the mod was a assistance to you.
Solo

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Fri Feb 25, 2005 3:11 am

Ok, this MOD seems to come with a small negative side-effect. I receive both New and Replied topic notices through email from my board. The New Topic notices are continuing as normal, but the Replied topics are missing the Subject line in the email. Do you have any idea what caused this? This problem started immediately after installing this MOD and I hadn't installed anything before or after it...

I'm still running on 2.0.11 and this was installed using EM as I stated previously...

:?:

solo forever
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 12:25 am
Contact:

hi

Post by solo forever » Fri Feb 25, 2005 5:54 pm

PHPBB2>language>lang_english>email

In the Topic Notify.tpl it should look like this:

Code: Select all

Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1

Hello {USERNAME},

You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

{U_TOPIC}

If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link:

{U_STOP_WATCHING_TOPIC}

{EMAIL_SIG}
Solo

nfs2
Registered User
Posts: 51
Joined: Tue Feb 01, 2005 1:08 pm

Post by nfs2 » Fri Feb 25, 2005 8:49 pm

I noticed after installing this mod, some posts that have been read will still have that "rew reply" image beside them, even if there are no new replies.

How do i fix that?

EDIT//

To be more clear on exactly whats happening. I read all the posts in the forum so that there are no "new reply" images left at all. Then i make a new post or reply to one, and all the messages i had just read appear unread, with that "new reply" image beside them.

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Fri Feb 25, 2005 10:21 pm

Ok, I have the same problem as nfs2 as well, but I'm not exactly sure when it started. So I have no way of knowing whether the "Redirect User Fix" MOD caused the problem or not...

However, the Topic Notify problem I mentioned earlier did start immediately after applying this MOD, so I have no doubt that the missing Subject in the notification email was somehow caused by this MOD. Here is the code to my current topic_notify.tpl file from the email sub-directory. It looks about the same as the code you provided solo forever...

Code: Select all

Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1

Hello {USERNAME},

You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

{U_TOPIC}

If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link:

{U_STOP_WATCHING_TOPIC}

{EMAIL_SIG}
What else could be wrong? It had to do something with the code from this MOD...

:!:

Larnu
Registered User
Posts: 17
Joined: Mon Apr 05, 2004 2:11 pm

Post by Larnu » Fri Feb 25, 2005 10:47 pm

Hmm interesting Mod, RV's looking to install that at the moment, I'll give Cosmos the thumbs up :D
Post by Larnu

solo forever
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 12:25 am
Contact:

Hi

Post by solo forever » Sat Feb 26, 2005 1:09 am

Orginal File:

Code: Select all

$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
	$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');

	return false;
}
Moded:

Code: Select all

 #-----[ REPLACE WITH ]---------------------------------------- 
#
// $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">'; 
// $message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>'); 

if ( $mode != 'editpost' ) 
{ 
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; 
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); 
} 

if ($error_msg == '' && $mode != 'poll_delete') 
{ 
user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); 
} 

if ( $mode == 'newtopic' || $mode == 'reply' ) 
{ 
$tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); 
$tracking_forums = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array(); 

if ( count($tracking_topics) + count($tracking_forums) == 100 && empty($tracking_topics[$topic_id]) ) 
{ 
asort($tracking_topics); 
unset($tracking_topics[key($tracking_topics)]); 
} 

$tracking_topics[$topic_id] = time(); 

setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); 
} 
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id, true);
replace with the orginal for now while I sort this problem out.
Solo

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Sat Feb 26, 2005 2:34 am

Is this a workaround/solution to both problems, solo? I really like the idea of this MOD, so if your code above doesn't completely fix the problem, let me know if there is anything I can do to help resolve it. I am by no means a php expert, but I would be happy to test any changes you might offer...

I am being told by some of my members that the topic marking problem started at about the same time as when I installed this MOD, so it does seem to be an additional related issue...

:?

Larnu
Registered User
Posts: 17
Joined: Mon Apr 05, 2004 2:11 pm

Post by Larnu » Sun Feb 27, 2005 12:33 am

I was just having a chat wit people on RV, is it possible that you could code it so that you could have an option in your profile to chose wether you are returned to the index, the post or the normal screen. That would be useful if you can.
Post by Larnu

User avatar
drumstix42
Registered User
Posts: 1100
Joined: Tue Sep 24, 2002 11:01 pm
Location: NJ
Contact:

Post by drumstix42 » Mon Feb 28, 2005 7:35 pm

If you have PCP installed it's very possible, and quite easy. It's what I've done at my forum. I usually make it user-optional for mods such as these.
Need a phpBB update or mod installed? PM me for any questions and pricing!
HostMonster.com (Unlimited Space, Unlimited Transfer, Unlimited Domains, $6.95/month )

Larnu
Registered User
Posts: 17
Joined: Mon Apr 05, 2004 2:11 pm

Post by Larnu » Mon Feb 28, 2005 8:05 pm

Well it's not me installing the mod you see, it's Runevillage that's considering the mod. I don't have a role in it, i'm just doing research on it's possibilities for it.
Post by Larnu

nfs2
Registered User
Posts: 51
Joined: Tue Feb 01, 2005 1:08 pm

Post by nfs2 » Tue Mar 01, 2005 9:15 pm

nfs2 wrote: I noticed after installing this mod, some posts that have been read will still have that "rew reply" image beside them, even if there are no new replies.

How do i fix that?

EDIT//

To be more clear on exactly whats happening. I read all the posts in the forum so that there are no "new reply" images left at all. Then i make a new post or reply to one, and all the messages i had just read appear unread, with that "new reply" image beside them.


I fixed it by removing the line

Code: Select all

setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); 
I havent noticed any other problems from this, but i dont use "watch topic" on my board, so it might cause problems for others.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”