Page 1 of 22

Prime Links

Posted: Sat Apr 05, 2008 7:39 pm
by Extensions Robot
Modification name: Prime Links
Author: primehalo
Modification description: This MOD will fix links inside posts so that local links are correctly classified as such. It will also apply a target to external links.
Modification version: 1.3.0
Tested on phpBB version: 3.0.10

Download file: Prime Links.zip
File size: 59.54 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--

Prime Links

Posted: Sat Apr 05, 2008 7:39 pm
by Paul
Modification validated/released

Notes:

Prime Links

Posted: Sat Apr 05, 2008 7:39 pm
by primehalo
The latest, non-approved version can be found here: http://www.absoluteanime.com/admin/mods.htm

Re: Prime Links

Posted: Sat Apr 05, 2008 8:54 pm
by pavobe
I do not speak english well. Do I understand description correctly?

This mod will repair local links, so when i post index.php as url, it will work as http://mydomain.com/index.php?

Re: Prime Links

Posted: Sat Apr 05, 2008 10:38 pm
by primehalo
pavobe wrote:I do not speak english well. Do I understand description correctly?

This mod will repair local links, so when i post index.php as url, it will work as http://mydomain.com/index.php?
No, sorry, it won't do that.

Re: Prime Links

Posted: Sat Apr 05, 2008 11:02 pm
by bonelifer
What it does is allow you to Classify link as either Local or External. In doing so external links will be a different color which can be changed. It also allows you to put in a link to an anonyizer an example is (http://anonym.to?). You can also choose to add the NOFOLLOW attribute to external links(default) and even add it to internal links if you choose to in(prime_links.php in the includes folder). Most webspiders will not add PR to a site when the NOFOLLOW attribute is added to a linkback URL, in order to help combat spam farms from being able to jack up another websites PR(page rank) by spamming it all over the internet. It also adds the "_blank" target to external links by default so that they open in a new tab(window). You can also choose to add it to internal links.


For the ability to fully customize the External LINK color here are some directions:

OPEN
includes/prime_links.php

FIND

Code: Select all

       define('EXTERNAL_LINK_CLASS', ' ');
REPLACE WITH

Code: Select all

       define('EXTERNAL_LINK_CLASS', 'postlink');

OPEN
styles/YOURSTYLENAME/theme/colours.css (parential search the line is longer)

FIND

Code: Select all

    a:active
AFTER, ADD(in the next line):

Code: Select all

/*postlink */
a.postlink:link {color: #694489; }
a.postlink:visited {color: #694489; }
a.postlink:hover {color: #694489; }
a.postlink:active {color: #694489; }

Re: Prime Links

Posted: Sat Apr 05, 2008 11:24 pm
by SecondShoe
Great mod! All of my users used to complain about the external links being opened at the same tab. Now it's much better. Thank You!

Re: Prime Links

Posted: Mon Apr 07, 2008 4:10 am
by luckyou03
I really like this mod, excellent job. keeps my internal links on my page and external on new pages.

Re: Prime Links

Posted: Wed Apr 09, 2008 9:18 pm
by Komanche
great mod, thank you! :)

Re: Prime Links

Posted: Thu Apr 10, 2008 12:35 pm
by DutchToxophilite
Is there a way to tread "link forums" as external links as well. I have approx. 250 "link forum" links, and they open in the same window, while you would expect them to open in a new window.

grtz,
Twan

Re: Prime Links

Posted: Thu Apr 10, 2008 2:40 pm
by mdvaldosta
Great modification, glad to see it has finally made it's way into the mod db.

Re: Prime Links

Posted: Fri Apr 11, 2008 9:00 am
by ckcow
great mod, but i don't know why sometimes occur the error message as below:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 82: parse_url(http://www.@@@@/thread-32191-1-1.html) [function.parse-url]: Unable to parse URL
why, can you fix it???

the link of error : http://phpbb.ckfreehost.com/bc3/viewtopic.php?f=9&t=3

Re: Prime Links

Posted: Fri Apr 11, 2008 12:09 pm
by DaannO
Does anyone has a screen how internal and extranel links look like then?

Re: Prime Links

Posted: Fri Apr 11, 2008 12:33 pm
by DutchToxophilite
DaannO wrote:Does anyone has a screen how internal and extranel links look like then?
You would not really "see" it.
An "external" link is just treated differently.

IE if you would link to the FAQ page of your board without using the url bbcode, it would show as "faq.php" instead of www.board.com/faq.php

External links, so links that are not on your server, will open automatically into a new window instead of the same window.

grtz,
Twan

Re: Prime Links

Posted: Fri Apr 11, 2008 5:44 pm
by primehalo
DutchToxophilite wrote:Is there a way to tread "link forums" as external links as well. I have approx. 250 "link forum" links, and they open in the same window, while you would expect them to open in a new window.

grtz,
Twan
Not currently. So far this MOD only works with links in posts.
ckcow wrote:great mod, but i don't know why sometimes occur the error message as below:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 82: parse_url(http://www.@@@@/thread-32191-1-1.html) [function.parse-url]: Unable to parse URL
why, can you fix it???

the link of error : http://phpbb.ckfreehost.com/bc3/viewtopic.php?f=9&t=3
That is an invalid link. I have modified the code so that you will not see the error message on improper links. Please update to version 1.0.6: http://www.absoluteanime.com/admin/mods.htm#links

To update, just overwrite the prime_links.php file.