Instant Post Redirect

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
dauphin1960
Registered User
Posts: 1
Joined: Tue May 12, 2009 12:33 pm

Re: Instant Post Redirect

Post by dauphin1960 »

Hi! I have just installed my first phpBB board and the first thing the users asked for was t move the vatar to the left.

I have downloaded your MOD, but although I've read just about all the 'How to install a MOD" topics I cannot work out what to do.

Please help.

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Instant Post Redirect

Post by igorw »

dauphin1960 wrote:Hi! I have just installed my first phpBB board and the first thing the users asked for was t move the vatar to the left.
Hi,

that's nothing to do with this MOD. A quick google for "phpbb avatar left" would probably help you.

http://www.phpbb.com/community/viewtopi ... 6&t=604574
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: Instant Post Redirect

Post by rageracer »

I got this Mod working well but it has killed the Advanced Quick Reply Mod I have installed.

Anyone had a similar issue?
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

User avatar
Hippie459MN
Registered User
Posts: 937
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: Instant Post Redirect

Post by Hippie459MN »

I have a QR and this and zero issues.

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: Instant Post Redirect

Post by rageracer »

Hmmmm.

Could be the Anti-Double Posts mod. Gonna take a while to get to the bottom of this one :(
EDIT: :lol: :lol: :lol: I'm a twit :lol: :lol: I found what happened. I have accidentily downloaded and uploaded the viewtopic_body.html from subsilver when installing another mod (I use twilightBB style)
It's what happens when you are applying Mods at 3:00am :lol: :lol:
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

User avatar
4yourbody
Registered User
Posts: 13
Joined: Fri Jun 05, 2009 6:30 pm
Location: Talladega, AL

Re: I'm a putz - Can't get it working

Post by 4yourbody »

I'm just stupid I guess. I can't figure this out. I've read through the board and am more confused now than when I started. I am using phpBB 3.0.5 and I did this in posting.php in my main directory

Code: Select all

			{
				meta_refresh(3, $redirect_url);
				//-- mod : Instant Post Redirect ------------------------------------------------------------
//-- add
				redirect($redirect_url);
//-- fin mod : Instant Post Redirect --------------------------------------------------------
				$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
				$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
			}
According to the instructions that's all I have to do, but it isn't working. Is the above code correct, and are there other files I have to place the code in also?
John S. Bennett

ferralcat
Registered User
Posts: 3
Joined: Sun Jun 07, 2009 2:32 am

Re: Instant Post Redirect

Post by ferralcat »

Here is what i did step by step.

Open the file named posting.php (yes it is in the root directory) and save it as OLD-posting.php.old

That will create a backup in case you need to revert to your original configuration.

Now use Dreamweaver or whatever web editor you choose to open the file named posting.php

Hit Cntrl + F and so a search for: meta_refresh(3,

on my system the line is located at line#1034

Anyways you need to inject the lines that are called for right underneath of this. Here is how it should look after you are finished (Please note that it will not say CODE: SELECT ALL inside the file posting.php):

Code: Select all

}
			else
			{
				meta_refresh(3, $redirect_url);
				//-- mod : Instant Post Redirect ------------------------------------------------------------
//-- add
				redirect($redirect_url);
//-- fin mod : Instant Post Redirect --------------------------------------------------------


				$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';


After that save the file named posting.php and then upload it to your website (this will overwrite the old one) and of course dont forget to upload the backup file that we named OLD-posting.php.old

Thats it! If that does not work for you then you must have corrupted your original posting.php or something.

Do you have any other mods? This mod is the only mod I have ever done. Has this helped you? let us know.

User avatar
4yourbody
Registered User
Posts: 13
Joined: Fri Jun 05, 2009 6:30 pm
Location: Talladega, AL

Re: Instant Post Redirect

Post by 4yourbody »

I think my problem was that I didn't understand exactly what the mod was supposed to do. When I just made a test post there was no redirect page, so that part worked just fine. Are there other mods that can do the same thing for other parts of the site - when entering UCP, MCP, or ACP, the different log-in confirmation pages for example? Or, can this mod just be placed into other files to accomplish that, and if so, what files would they be and in what directories? I think all of these redirects are just a nuisance and waist of time. I can't understand why they were even built in.
John S. Bennett

User avatar
Hippie459MN
Registered User
Posts: 937
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: Instant Post Redirect

Post by Hippie459MN »

4yourbody wrote:I think my problem was that I didn't understand exactly what the mod was supposed to do. When I just made a test post there was no redirect page, so that part worked just fine. Are there other mods that can do the same thing for other parts of the site - when entering UCP, MCP, or ACP, the different log-in confirmation pages for example? Or, can this mod just be placed into other files to accomplish that, and if so, what files would they be and in what directories? I think all of these redirects are just a nuisance and waist of time. I can't understand why they were even built in.
Read through this entire topic, The edits for ACP and Log in redirects are in here somewhere. :)

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5065
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Instant Post Redirect

Post by VSE »

So I noticed an annoyance with this mod installed - definitely experienced in Safari for Mac, not sure about other browsers.

When I submit a post and get redirected to the topic, all of the forum's images and CSS, etc. are re-downloaded as if they were not cached. That is, you see the whole page rebuild itself.

Has anybody else experienced this? And is there a fix?

Oh I was just using the original mod - the one line addition to the posting.php page (not the ucp or IE fixes)
Official phpBB Extensions ⭐️ My Extensions & MODs 🔔 YES!!! They ALL work with phpBB 3.3.x 🔔
Please do not PM me for support.

misfit69
Registered User
Posts: 65
Joined: Fri Sep 11, 2009 4:25 am
Contact:

Re: Instant Post Redirect

Post by misfit69 »

Hey everybody, I was going to install this but I have the Ultimate Points installed so my starting code is a bit different. The point system puts up a bunch of info that is cool the first few times but I would rather it just go away. This is the code that I have installed.

Code: Select all

// Start Ultimate Points
				if ( $auth->acl_get('u_use_points') && $config['points_enable'] )
				{
					meta_refresh(3, $redirect_url); // Increased the refresh time to give user the chance to read their points

					$sql_array = array(
					    'SELECT'    => 'user_points',
					    'FROM'      => array(
					        USERS_TABLE => 'v',
					    ),
						'WHERE'		=> 'user_id = ' . $user->data['user_id'],
					);
					$sql = $db->sql_build_query('SELECT', $sql_array);
					$result = $db->sql_query($sql);
					$user_points_new = $db->sql_fetchfield('user_points');

					$user_points_received = ($user_points_new - $user_points_old);

					if ( $mode == 'quote' OR $mode == 'reply' )
					{
						$points_received = sprintf($user->lang['POINTS_RECEIVED_REPLY_MESSAGE'], (number_format_points($user_points_received)), $config['points_name']);
					}
					else if ( $mode == 'edit' )
					{
						$points_received = sprintf($user->lang['POINTS_RECEIVED_EDIT_MESSAGE'], (number_format_points($user_points_received)), $config['points_name']);
					}
					else
					{
						$points_received = sprintf($user->lang['POINTS_RECEIVED_POST_MESSAGE'], (number_format_points($user_points_received)), $config['points_name']);
					}

					$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
					$message = $user->lang[$message] . '<br /><br />' . $points_received . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
				}
				else
				{
					meta_refresh(3, $redirect_url); // Show normal refresh time
					
					$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
					$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
				}
				// End Ultimate Points
As you can see, the "meta_refresh(3, $redirect_url);" comes up twice, is there an easy fix to make all this just go away and not blow anything up. My guess is that I could just replace all this code with.

Code: Select all

meta_refresh(3, $redirect_url);
//-- mod : Instant Post Redirect ------------------------------------------------------------
//-- add
				redirect($redirect_url);
//-- fin mod : Instant Post Redirect --------------------------------------------------------
But before I do that, would just like to know if that's a waste of time or not.

thanks guys.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Instant Post Redirect

Post by iftitaj »

Just follow file edit of that MOD in reverse order - taking it back to original.

You can also get the new file from freshly downloaded phpBB and replace it and apply other MOD's edits if any.

misfit69
Registered User
Posts: 65
Joined: Fri Sep 11, 2009 4:25 am
Contact:

Re: Instant Post Redirect

Post by misfit69 »

I don't want to remove the mod to say, just get rid of the graphic part after posting. I don't know this stuff well enough to be able to tell if that part of the code is actually doing anything or just displaying information. I might just do a quick back up and replace it with what I "think" might work. :shock:

misfit69
Registered User
Posts: 65
Joined: Fri Sep 11, 2009 4:25 am
Contact:

Re: Instant Post Redirect

Post by misfit69 »

Well, I took a small chance and tried what I thought, works great with Firefox. It seems like my points still work and it's absolutely instant.

Great mod, thank you.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Instant Post Redirect

Post by iftitaj »

I was also talking about front end part.

Just remember what ever is in .php files are back-end code (real work) and whatever in style's folders with .html extensions are front-end graphical part. Thats my understanding. And as far as I know .php does its work without .html files. And you can amend .html files to your liking for the "graphical" part controlling what information generated by .php file to be shown to user or not.

Locked

Return to “[3.0.x] MOD Database Releases”