Go direct to moved topic

Started by Kays, August 22, 2009, 07:31:14 AM

Previous topic - Next topic

Kays

Link to Mod

This mod will allow a user to go directly to a moved topic from the link in the topic listing

This mod takes the id of the moved topic from "[TOPIC LINK]" in the redirect message. This needs to be left intact. It also might not work if you are using a mod which alters the url.

Version 1.3 Updated for 2.0 RC5 +. Minor change to the display in MessageIndex.template.php. (2.0 only)
Version 1.2 Fixed a bug which caused the moved topic to be deleted if the redirect topic was deleted using the moderator checkboxes or icons.
Version 1.1 Fixed a small bug for SMF 1.1.x
Version 1.0 Initial release

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Apllicmz




Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

babjusi


rölyef


AleX-r-

#6
Great mod. Thank you.

Sadly I got about 50 pages of this error:

8: Undefined variable: id_topic
File: /home/forum/public_html/Sources/MessageIndex.php
Line: 572


If this could be fixed it would be great.

Thanks again.

Kays

Thanks for that and my apologies.

The problem has been fixed and a revision uploaded. Uninstall the old version then upload and install the new version.

I would suggest that anyone with SMF 1.1.x do the same.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

AleX-r-

I just realized that I didnt post the SMF version that i'm using. Sorry.

Anyway, the new version works great. Thank you.

Kays

Great, it was just a small problem and not hard to find.

Thanks for reporting it.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

[A-US]James246

Great modification! I've been looking for one of these for a while. I really like it!

10/10!

gbsothere

Excellent, Kays!  One less thing for me to be subtly annoyed by.   :D

Great idea. 
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

_sebas_

In my theme Black22, install no problems

but this funtionallity not is active

:(

Kays

This mod is not theme dependant.

You do need to post the redirect topic leaving [TOPIC LINK] there.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Richardgm

For some reason, this doesn't work for me. (use this board as an example: http://animorphsforum.com/forum/index.php/board,29.0.html )

Kays

Sorry but it can't access that board.

Are you posting the redirect topic. The [TOPIC LINK] part needs to be in that post for it to work.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Richardgm

Quote from: Kays on September 30, 2009, 07:42:05 PM
Sorry but it can't access that board.

Are you posting the redirect topic. The [TOPIC LINK] part needs to be in that post for it to work.
You can access it now. I think it's because I have a mod that changes the URL to the name of the thread? (found the mod)

Kays

Yes, that's what's happening. The mod is looking for the "topic=1234.0" in the link.

If you're up to some manual editing, in Sources/MessageIndex look for:


$id_topic = substr(strstr($redirect_msg, 'topic='), 1);
$id_topic = floor(substr($id_topic, 5, strpos($id_topic, '.')));


and replace it with:


$id_topic = substr(strstr($redirect_msg, 'topic,'), 1);
$id_topic = floor(substr($id_topic, 5, strpos($id_topic, '.')));


I can't guaranty that it's going to work. Since I can't quite test it.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Richardgm

#19
Tried that, but didn't work...

Thanks for trying though.

Advertisement: