[RC1] Prime Links - Classify Locals & Target Externals

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

[RC1] Prime Links - Classify Locals & Target Externals

Post 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.
Last edited by primehalo on Thu Jul 10, 2008 6:27 am, edited 16 times in total.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post 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
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

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

Post 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
cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm

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

Post 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
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post 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.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm

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

Post 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
User avatar
mattgid
Registered User
Posts: 339
Joined: Wed Sep 05, 2007 6:57 am
Location: Singapore

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

Post 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. :?
✖✖_Matthew Gideon_✖✖
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post 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?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
mattgid
Registered User
Posts: 339
Joined: Wed Sep 05, 2007 6:57 am
Location: Singapore

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

Post 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
✖✖_Matthew Gideon_✖✖
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post 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.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
mattgid
Registered User
Posts: 339
Joined: Wed Sep 05, 2007 6:57 am
Location: Singapore

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

Post 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?
✖✖_Matthew Gideon_✖✖
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post 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
User avatar
mattgid
Registered User
Posts: 339
Joined: Wed Sep 05, 2007 6:57 am
Location: Singapore

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

Post 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]
✖✖_Matthew Gideon_✖✖
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post 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));  
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
mattgid
Registered User
Posts: 339
Joined: Wed Sep 05, 2007 6:57 am
Location: Singapore

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

Post by mattgid »

uh.. in prime_links.php right? no difference. :shock:
✖✖_Matthew Gideon_✖✖

Return to “[3.0.x] MODs in Development”