Page 1 of 32

[RC1] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 7:48 am
by primehalo
MOD Title: Prime Links
MOD Description: Modifies links within posts so that local links are correctly classified as such. It will also apply a target to external links.
MOD Version: view the Installation Instructions for latest version number
MOD Download: Main Download

Demo Board: http://www.absoluteanime.com/forum/
Demo Username: Not Available
Demo Password: Not Available

For the release history, please view the Installation Instructions.

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 7:57 am
by IPB_Refugee
Hi prime,

when your MOD fulfills my request, you are my hero of the month! :D

First I'll have to upgrade my board from RC1 to RC5 and then I'll install your MOD and will give you some feedback.

Thank you so much!
Wolfgang

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 10:50 am
by saaiberke
Looks to be a great mod, I just installed it but got 2 notices:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 69: Undefined variable: click
[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 69: Undefined variable: click
Can you check this pls? ;)

Grtz,

Nic

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 4:27 pm
by cotp
Hello prime :)

Will test your MOD too ;)

What happens with sub domains, are they considered as local or external ?

Thanks in advance :)

Cotp

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 6:34 pm
by primehalo
saaiberke wrote:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 69: Undefined variable: click
[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 69: Undefined variable: click
Fixed.
cotp wrote:What happens with sub domains, are they considered as local or external ?
Just added an option so you can decide. Open "includes/prime_links.php" and set "ALL_SUBDOMAINS_INTERNAL" to true or false, depending on what you want.

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Mon Sep 24, 2007 9:54 pm
by cotp
primehalo wrote:Just added an option so you can decide. Open "includes/prime_links.php" and set "ALL_SUBDOMAINS_INTERNAL" to true or false, depending on what you want.
You rock !

Image

Cotp

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 7:44 am
by mattgid
hey!

when I use the [url] bbcode, all links, regardless of internal / external, will open in a new window. how do I fix this?

I want internal links to open in the same window. external links to open in a new window. :?

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:12 am
by primehalo
mattgid wrote:hey!

when I use the [url] bbcode, all links, regardless of internal / external, will open in a new window. how do I fix this?

I want internal links to open in the same window. external links to open in a new window. :?
I see what you mean, as in the moderators link in this post: http://forums.epoch.twilight-rhapsody.c ... 7&f=2#p447

I didn't take into account multiple subdomains, which your site uses. But even so, the domain in that moderators link matches exactly with the domain in the url, so it should still be picked up as a local link. In your Server Settings, what did you specify for your Domain Name?

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:18 am
by mattgid
SERVER URL SETTINGS

Domain name:
The domain name this board runs from (for example: http://www.foo.bar).

forums.epoch.twilight-rhapsody.com

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:33 am
by primehalo
I just updated to fix the handling of multiple subdomains, so download the new version and see if that fixes the problem. To update, just copy over the new "includes/prime_links.php" file.

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:40 am
by mattgid
wow u're fast. I just downloaded it and updated it with the new prime_links.php

still the same. could it be that my server settings are wrong?

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:41 am
by IPB_Refugee
mattgid wrote:when I use the bbcode, all links, regardless of inter ... =301]Topic (an internal BBCode URL) opens in a new window.

I also have a custom BBCode which opens in a new window, too:

BBCode:

Code: Select all

[user]{TEXT}[/user]
HTML replacement:

Code: Select all

<a class="postlink" href="memberlist.php?mode=viewprofile&un={TEXT}">{TEXT}</a>
I'll stay here to help you testing. :)

Regards
Wolfgang

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:45 am
by mattgid
:D

I feel so smart to have discovered a bug!

[edit]I'm going to take a nap since Wolfgang ( a.k.a IPB_Refugee ) will be here to test. I have to attend school later tonight.[/edit]

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:49 am
by primehalo
Weird, as my test links work fine. Maybe it has something to do with HTML entities. Try changing:

Code: Select all

$board_url = generate_board_url(true);  
To:

Code: Select all

$board_url = html_entity_decode(generate_board_url(true));  

Re: [BETA] Prime Links - Classify Locals & Target Externals

Posted: Tue Sep 25, 2007 8:52 am
by mattgid
uh.. in prime_links.php right? no difference. :shock: