News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Redirector

Started by digger, July 03, 2017, 10:29:06 AM

Previous topic - Next topic

digger

Link to the mod

SMF Redirector mod

Author: digger
License: The MIT License (MIT)
Hooks only: Yes
Compatible with: SMF 2.0, SMF 2.1
Languages: English, Russian, French
GitHub: https://github.com/realdigger/SMF-Redirector

Redirect for external links. Hide links from guests.

Features:
* External links redirection
* For guests only redirection
* Members websites redirection
* External links encoding
* Hide links for guests
* Delayed or instantly redirection
* Domains white list
* Option for rel="nofollow noopener".

History:
1.2.5 Fix redirect page
1.2.6 French translation by alexetgus


Shambles

Hi digger. Thanks for this mod.

What does it actually do?

digger

Quote from: Shambles on July 03, 2017, 12:43:59 PM
Hi digger. Thanks for this mod.

What does it actually do?
Hi.
Mod redirects external links over internal forum page.
For examle link https://www.simplemachines.org will be redirected to index.php?action=go;url=aHR0cHM6Ly93d3cuc2ltcGxlbWFjaGluZXMub3Jn

Shambles

Hi thanks.

I might be being thick here, but what does it redirect to? What's at url=aHR0cHM6Ly93d3cuc2ltcGxlbWFjaGluZXMub3Jn ?

digger

Quote from: Shambles on July 03, 2017, 02:19:22 PM
Hi thanks.

I might be being thick here, but what does it redirect to? What's at url=aHR0cHM6Ly93d3cuc2ltcGxlbWFjaGluZXMub3Jn ?
It's encoded string for https://www.simplemachines.org

Shambles

I'm clearly missing something here.

What happens when action=go;url=encoded_string

Apologies for not understanding something that's probably simple, but I just can't understand this. Do we have to write some code to understand the encoded_string?

digger

It's a SEO magic :)
With this mod external links looks like a forum local links pointed to action=go.
When you go to action=go;url=encoded_string mod decodes encoded url and redirect browser to original url.

Shambles

Maybe say all that in the description, yeah? ;)

shawnb61

Is it dynamic, or are the encoded links stored? 

Wondering if this might impact site moves or https conversions...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

digger

Quote from: shawnb61 on July 03, 2017, 05:02:39 PM
Is it dynamic, or are the encoded links stored? 

Wondering if this might impact site moves or https conversions...
It is dynamic. Mod change |URL| and |IURL| tags parser.

Arantor

Not sure how it actually helps with SEO, if anything I'd wonder if it would hurt because it's been well known for some years that not linking out of a site actually hurts: you want to have good reputation but you don't want to consider anything else worthy of reputation yourself, you don't trust anything, therefore Google considers that you yourself aren't as worthy of trust either.

Gryzor

Got to agree with Arantor, I don't see how this will help with SEO in the long term. I guess the concept it that you create in-site cross-linking, but since the targets are not indexed pages I doubt it will take long for a search engine to sniff out what happens...

asisehacepro

Hello,
First to all, congratulations because of your mod.
But I get the following error when I load the bridge page with x delay before accessing the final website.

Call to undefined function mimespecialchars()

Looking for that function with notepad, I get the following in the .\Sources\Subs-Post.php file

Line 73: string mimespecialchars(string text, bool with_charset = true,
Line 674: list (, $from_name) = mimespecialchars(addcslashes($from !== null ? $from : $context['forum_name'], '<>()\'\\"'), true, $hotmail_fix, $line_break);
Line 675: list (, $subject) = mimespecialchars($subject, true, $hotmail_fix, $line_break);
Line 708: list(, $plain_message) = mimespecialchars($no_html_message, false, true, $line_break);
Line 712: list($charset, $plain_charset_message, $encoding) = mimespecialchars($no_html_message, false, false, $line_break);
Line 718: list($charset, $html_message, $encoding) = mimespecialchars($orig_message, false, $hotmail_fix, $line_break);
Line 727: list(, $plain_message) = mimespecialchars($orig_message, false, true, $line_break);
Line 731: list ($charset, $encoded_message, $encoding) = mimespecialchars($orig_message, false, false, $line_break);
Line 1215: function mimespecialchars($string, $with_charset = true, $hotmail_fix = false, $line_break = "\r\n", $custom_charset = null)


If you need any more files, just ask me. I'm using SMF 2.0.17 and everything else works fine for me.

Thank you very much in advance.
Greetings.

Sir Osis of Liver

As per the earlier posts, this mod is basically useless.  mimespecialchars() is a core function, the mod is probably calling it before it's defined.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

digger

Quote from: asisehacepro on March 27, 2020, 11:28:12 AM
But I get the following error when I load the bridge page with x delay before accessing the final website.
Call to undefined function mimespecialchars()
Fixed in v1.2.5

asisehacepro

Quote from: digger on March 27, 2020, 07:22:00 PM
Quote from: asisehacepro on March 27, 2020, 11:28:12 AM
But I get the following error when I load the bridge page with x delay before accessing the final website.
Call to undefined function mimespecialchars()
Fixed in v1.2.5

Thank you very much for you answer and update!
I'm using now perfectly!

Thanks again.

Advertisement: