[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!
Anti-Spam Guide
User avatar
primehalo
Former Team Member
Posts: 2698
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

[RC1] Prime Links - Classify Locals & Target Externals

Postby primehalo » Mon Sep 24, 2007 7:48 am

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 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

Postby IPB_Refugee » Mon Sep 24, 2007 7:57 am

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
Contact:

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

Postby saaiberke » Mon Sep 24, 2007 10:50 am

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

User avatar
cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm
Contact:

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

Postby cotp » Mon Sep 24, 2007 4:27 pm

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: 2698
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Mon Sep 24, 2007 6:34 pm

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 MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm
Contact:

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

Postby cotp » Mon Sep 24, 2007 9:54 pm

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

Postby mattgid » Tue Sep 25, 2007 7:44 am

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: 2698
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Tue Sep 25, 2007 8:12 am

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 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

Postby mattgid » Tue Sep 25, 2007 8:18 am

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: 2698
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Tue Sep 25, 2007 8:33 am

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 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

Postby mattgid » Tue Sep 25, 2007 8:40 am

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

Postby IPB_Refugee » Tue Sep 25, 2007 8:41 am

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


Hi prime,

unfortunately I have exactly the same problem with Version 0.0.1. (BTW: I don't have subdomains.)

Domain name: http://www.example.com
Script path: /RC5

Even 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

Postby mattgid » Tue Sep 25, 2007 8:45 am

: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: 2698
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Postby primehalo » Tue Sep 25, 2007 8:49 am

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 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

Postby mattgid » Tue Sep 25, 2007 8:52 am

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


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

Who is online

Users browsing this forum: No registered users and 22 guests