[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
Locked
ryorevo
Registered User
Posts: 53
Joined: Thu Jan 31, 2008 12:06 pm
Location: US
Contact:

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

Post by ryorevo » Sat Feb 16, 2008 7:52 pm

Hi Prime, Nice mod but I'm having some problems.

Background; I originally had installed the Open Links in New Windows KB version, those changes were removed.

Any link that is now posted without the URL tags disappears, including links that were showing properly before such as "magic urls" to forum topic links.

I've also tried to make the subforum change you mentioned here:
Open the prime_links.php file and set ALL_SUBDOMAINS_INTERNAL to false.
http://www.phpbb.com/community/viewtopi ... 5#p3434355

but couldn't find that code. In v1.0.4 the line appears to actually be;
function remove_subdomains($url, $remove_subdomains = true)
so I changed it to
function remove_subdomains($url, $remove_subdomains = false)

But I'm still having the same problems.
The smoker's are revolting, Join the RYO Revolution!

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Sat Feb 16, 2008 8:02 pm

ryorevo wrote:Hi Prime, Nice mod but I'm having some problems.

Background; I originally had installed the Open Links in New Windows KB version, those changes were removed.

Any link that is now posted without the URL tags disappears, including links that were showing properly before such as "magic urls" to forum topic links.

I've also tried to make the subforum change you mentioned here:
Open the prime_links.php file and set ALL_SUBDOMAINS_INTERNAL to false.
http://www.phpbb.com/community/viewtopi ... 5#p3434355

but couldn't find that code. In v1.0.4 the line appears to actually be;
function remove_subdomains($url, $remove_subdomains = true)
so I changed it to
function remove_subdomains($url, $remove_subdomains = false)

But I'm still having the same problems.
I'd say first ensure that it works after removing the old MOD and before installing Prime Links. Only then, go ahead and install Prime Links. My MOD doesn't distinguish between magic URLs or BBCode urls. By the time my MOD starts working on the message, both types of links have already been changed into standard HTML links.

In version 1.0.4, it is REMOVE_SUBDOMAINS. I renamed it because now you are able to specify specific subdomains in addition to simply all (true) or none (false).

Code: Select all

    // Options
    define('REMOVE_SUBDOMAINS', true);            // Remove these subdomains before checking the link (true will remove all subdomains)
    define('ANONYMIZE_EXTERNAL_LINKS', '');        // Example: 'http://anonym.to?'
    define('USE_TARGET_ATTRIBUTE', false);        // The attribute "target" is not valid for STRICT doctypes

    // Link relationships
    define('INTERNAL_LINK_REL', '');
    define('EXTERNAL_LINK_REL', 'nofollow');

    // Link targets
    define('INTERNAL_LINK_TARGET', '');
    define('EXTERNAL_LINK_TARGET', '_blank');

    // Link classes
    define('INTERNAL_LINK_CLASS', 'postlink-local');
    define('EXTERNAL_LINK_CLASS', '');
     
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ryorevo
Registered User
Posts: 53
Joined: Thu Jan 31, 2008 12:06 pm
Location: US
Contact:

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

Post by ryorevo » Sat Feb 16, 2008 10:28 pm

Thanks for the reply, I apparently still had something wrong with the MAGIC_URL_ code
in includes/functions_content.php

Once I replaced that section with original code the problem with disappearing Magic URL's was resolved. Thanks again for your MOD!
The smoker's are revolting, Join the RYO Revolution!

HR25
Registered User
Posts: 26
Joined: Fri Apr 27, 2007 7:46 pm

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

Post by HR25 » Sun Feb 17, 2008 12:08 am

primehalo wrote:
HR25 wrote:I've tried to install this mod twice now, but my links stil open in the same window. Is there some setting that I need to activate or something?

Thanks in advance!
Not really, it should work without any other changes. Did you clear your board's cache?
Yes several times :cry:

xnitelifex
Registered User
Posts: 126
Joined: Wed Jun 27, 2007 6:35 pm

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

Post by xnitelifex » Mon Feb 18, 2008 8:41 pm

Does this automatically place nofollow to all external links? I didn't see this in the description of the first post.

TIA

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Tue Feb 19, 2008 4:18 am

xnitelifex wrote:Does this automatically place nofollow to all external links? I didn't see this in the description of the first post.

TIA
It has the ability, but I don't remember if it's enabled by default.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ryndog
Registered User
Posts: 77
Joined: Thu Mar 27, 2003 9:59 am

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

Post by ryndog » Wed Feb 27, 2008 5:47 am

Hey there, I just wanna verify this mod is what im looking for. I want to have all external links outside my own domain to be opened in a new window. All links within my own site to be opened in the same window within posts. Is this correct?

Actually I was searching for a bbc code that would allow me or a poster to choose a seperate bbc code that would allow a link to open in a new window, such as

Code: Select all

[urltarget1="www.url.com"]www.url.com[/urltarget1]
.... but after an our and a half I never found one. There was one made for phpbb2, but that wont work of course for our new phpbb3 site ( see: http://www.phpbbhacks.com/download/258)

I do believe all links in phpbb3 posted in a forum thread will always be defaulted to /self, which is fine for most links (users link to other posts open in the same window.... etc.... etc.), but for linking to another website it would be nice to have a new window.

Though it would be nice to have the option per induvidual linke via bbc (let me know if I missed a mod or hack somewhere), I would still be able to live with just having all external links open as a new window.

Let me know, I may give her a shot if thats the case :)

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Wed Feb 27, 2008 6:02 am

ryndog wrote:Hey there, I just wanna verify this mod is what im looking for. I want to have all external links outside my own domain to be opened in a new window. All links within my own site to be opened in the same window within posts. Is this correct?
Yes.
ryndog wrote:Actually I was searching for a bbc code that would allow me or a poster to choose a seperate bbc code that would allow a link to open in a new window, such as

Code: Select all

[urltarget1="www.url.com"]www.url.com[/urltarget1]
.... but after an our and a half I never found one. There was one made for phpbb2, but that wont work of course for our new phpbb3 site ( see: http://www.phpbbhacks.com/download/258)

I do believe all links in phpbb3 posted in a forum thread will always be defaulted to /self, which is fine for most links (users link to other posts open in the same window.... etc.... etc.), but for linking to another website it would be nice to have a new window.

Though it would be nice to have the option per induvidual linke via bbc (let me know if I missed a mod or hack somewhere), I would still be able to live with just having all external links open as a new window.

Let me know, I may give her a shot if thats the case :)
In phpBB3, you can make custom BBCodes without a MOD.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ryndog
Registered User
Posts: 77
Joined: Thu Mar 27, 2003 9:59 am

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

Post by ryndog » Thu Feb 28, 2008 9:38 pm

Worked like a charm. Another great mod Prime. I have used quit a few of you mods, including your birthday require mod (which I love by the way). I notice you have put a lot of time and effort and have great support. I would like to donate, do you have a donation link somewhere?

Also, you mentions custom bbc codes without a mod. Yes I looked into that for the URL target, but I didn't find one. If its possible to write a custom bbc code in phpbb3's custom bbc code area, could you point me in the right direction. Still new to that area, not sure how its done. I see all the samples and addons for other things, but nothing to specify the target of a window for a link thats a url. Make sense?

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Thu Feb 28, 2008 10:31 pm

ryndog wrote:Worked like a charm. Another great mod Prime. I have used quit a few of you mods, including your birthday require mod (which I love by the way). I notice you have put a lot of time and effort and have great support. I would like to donate, do you have a donation link somewhere?
I didn't, but since that sounds like a good idea I went ahead and set one up:
http://www.absoluteanime.com/admin/mods.htm
ryndog wrote:Also, you mentions custom bbc codes without a mod. Yes I looked into that for the URL target, but I didn't find one. If its possible to write a custom bbc code in phpbb3's custom bbc code area, could you point me in the right direction. Still new to that area, not sure how its done. I see all the samples and addons for other things, but nothing to specify the target of a window for a link thats a url. Make sense?
Create a new BBCode from the ACP and make it something like this:
BBCode: [link={URL}]{TEXT}[/link]
HTML Replacement: <a href="{URL}" onclick="this.target='_blank'">{TEXT}</a>
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ryndog
Registered User
Posts: 77
Joined: Thu Mar 27, 2003 9:59 am

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

Post by ryndog » Thu Feb 28, 2008 10:42 pm

Tested both _top and _blank options with sepeate bbc codes, works like a charm! Man, I can't thank you enough for post that for me, well help out alot! Oh, yeah, sent you a little gift. Much thanks Prime.

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Thu Feb 28, 2008 10:45 pm

Thanks, it's greatly appreciated!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

kevinp63
Registered User
Posts: 33
Joined: Tue Jan 29, 2008 3:22 pm

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

Post by kevinp63 » Sun Mar 02, 2008 9:11 pm

Man I am ashamed to have to ask this but...

I loaded this per the instructions.
added file to includes directory, edited functions_content.
Cleared cache.

My links still open in same window.
Also (here is the embarrassing part) how do link to local content?!

viewtopic.php?f=70&t=581660
[url=viewtopic.php?f=70&t=581660}no link here{/URL]

EDIT------------------------------------------------------------------------------------
setting 'REMOVE_SUBDOMAINS', true); to false made it work foir me...
and I figured out the question I asked...
I am a genius. :oops:

cooldbz
Registered User
Posts: 33
Joined: Sat Dec 08, 2007 3:53 am

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

Post by cooldbz » Wed Mar 05, 2008 6:06 am

Just wanted to know if there is a possibility of this.

The External links opening in same window, but the Site image over it, so that it opens sort of in a frame. What i am asking may be out of context, but its a possibility

User avatar
primehalo
Former Team Member
Posts: 2821
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo » Wed Mar 05, 2008 6:19 am

cooldbz wrote:Just wanted to know if there is a possibility of this.

The External links opening in same window, but the Site image over it, so that it opens sort of in a frame. What i am asking may be out of context, but its a possibility
Sorry, I don't understand.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Locked

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