Prime Links

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
danswano
Registered User
Posts: 273
Joined: Sun Apr 06, 2008 10:43 pm

Re: Prime Links

Post by danswano »

Please i'm not asking for my own style, i jus want a simple code that can be changed for me and for others when we want to customize the colors.
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: Prime Links

Post by spaceace »

just installed this mod and internal links are displaying correctly, but external links still parse. the only way i can get them not to, is to put something in

define('EXTERNAL_LINK_PREFIX', '');

don't know what's going on :|

here's what i have:

Code: Select all

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

	// Link targets
	define('INTERNAL_LINK_TARGET', '');
	define('EXTERNAL_LINK_TARGET', '_blank');
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Prime Links

Post by primehalo »

External links are supposed to get parsed, so I don't understand your issue.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: Prime Links

Post by spaceace »

i might have misunderstood the purpose of the mod, i thought it would also keep external links from being parsed. that is something i don't want. i thought that's what to "nofollow" was supposed to do. anyway, with a prefix, it does what i want it to do :D
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Prime Links

Post by primehalo »

This MOD parses every link within a post, altering each one according to how the options are set up. Thus, saying that external links are being parsed doesn't really indicate any type of problem. Can you be more specific about what is not happening that you are expecting to happen? Examples would help as well.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: Prime Links

Post by spaceace »

what i thought would happen with a "nofollow" setting is that external links when clicked on, would go nowhere. that is what i'm looking for. i don't allow live external links on my site. but your mod is working fine other than it's not what i thought it was :lol: my mistake :roll:
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: Prime Links

Post by IPB_Refugee »

danswano wrote:Please i'm not asking for my own style, i jus want a simple code that can be changed for me and for others when we want to customize the colors.
Hello,

just an example - change postlink_external according to the settings you have in prime_links.php and play with the values:

prime_links.php:

Code: Select all

	define('EXTERNAL_LINK_CLASS', 'postlink_external');
in your .css-file (it should be links.css when you use prosilver):

Code: Select all

a.postlink_external:link, a.postlink_external:visited {
	color:#0000FF;
	text-decoration:none;
}

a.postlink_external:focus, a.postlink_external:hover, a.postlink_external:active {
	color:#FF0000;
	text-decoration:underline;
}
Hope that helps a bit to get an idea.
Wolfgang
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Prime Links

Post by primehalo »

I was also going to suggest a CSS solution, by setting the external link classes to "display:none". But I know that could end up looking weird, and it'd be a fairly simply modification to just replace the <a href="">link title</a> to <span>link title</span>, so I just implemented that.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
danswano
Registered User
Posts: 273
Joined: Sun Apr 06, 2008 10:43 pm

Re: Prime Links

Post by danswano »

Oh my god, worked, thank you very much IPB_Refugee for the code and prime for the mod :)
User avatar
newbie1981
Registered User
Posts: 23
Joined: Thu Jul 17, 2008 3:36 pm
Location: Netherlands

Re: Prime Links

Post by newbie1981 »

great mod, thanx!
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34459
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Prime Links

Post by A_Jelly_Doughnut »

MOD Updated to version 1.2.0
See first post for Download Link
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
mcdanielnc89
Registered User
Posts: 703
Joined: Tue Feb 06, 2007 10:49 pm
Location: Missouri
Contact:

Re: Prime Links

Post by mcdanielnc89 »

Is there a change log to update from previous version to 1.2.0?
nano351
Registered User
Posts: 15
Joined: Wed Aug 22, 2007 11:47 pm
Contact:

Re: Prime Links

Post by nano351 »

all of my links even the internal ones seem to be opening in a new window. Here's my configuration for the mod:

Code: Select all

	// Options
	define('PRIME_LINKS_ENABLE', true);			// Enable this MOD?
	define('REMOVE_SUBDOMAINS', true);			// Specify subdomains to be removed before checking the link, separated by semicolons (setting TRUE will remove all subdomains)
	define('USE_TARGET_ATTRIBUTE', true);		// The attribute "target" is not valid for STRICT doctypes.
	define('EXTERNAL_LINK_PREFIX', '');			// Example: 'http://anonym.to?'
	define('INTERNAL_LINK_DOMAINS', '');		// Other domains to be considered local, separated by semicolons. Example: 'http://www.alternate-domain.com/'

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

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

	// Link classes
	define('INTERNAL_LINK_CLASS', 'postlink-local');
	define('EXTERNAL_LINK_CLASS', 'postlink');

	// Link file types (separate file extensions with a vertical bar "|")
	define('PDF_LINK_TYPES', 'pdf');
	define('IMG_LINK_TYPES', 'gif|jpg|jpeg|png|bmp');
	define('ZIP_LINK_TYPES', 'zip|rar|7z');

	// Special cases for specific link types. Separate file extensions with a vertical bar (|).
	define('FORCE_EXTERNAL_LINK', '');			// Example 1: 'pdf|gif|jpg|jpeg|png|bmp|zip|rar|7z'
	define('FORCE_INTERNAL_LINK', '');			// Example 2: PDF_LINK_TYPES . '|' . IMG_LINK_TYPES . '|' . ZIP_LINK_TYPES
	define('NO_EXTERNAL_LINK_PREFIX', '');		// Don't add an external link prefix for these file types
	define('NO_LINK_PROCESSING', '');			// Don't process links to these file types

	// Link classes for specific file types.
	global $link_type_classes;
	$link_type_classes = array(
		PDF_LINK_TYPES	=> 'pdf_link',
		IMG_LINK_TYPES	=> 'img_link',
		ZIP_LINK_TYPES	=> 'zip_link',
	);
any idea why?
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Prime Links

Post by primehalo »

Looks like it's working fine to me. There are two internal links on this page that open in the same window:
http://teh.projectbnet.net/viewtopic.php?f=43&t=4

Try clearing your browser's cache.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
nano351
Registered User
Posts: 15
Joined: Wed Aug 22, 2007 11:47 pm
Contact:

Re: Prime Links

Post by nano351 »

strange, those links work for me but the link in this post won't open in the same window:
http://teh.projectbnet.net/viewtopic.ph ... 1380#p1377
Locked

Return to “[3.0.x] MOD Database Releases”