Page 6 of 22

Re: Prime Links

Posted: Mon Aug 04, 2008 10:49 pm
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.

Re: Prime Links

Posted: Tue Aug 05, 2008 2:15 am
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');

Re: Prime Links

Posted: Tue Aug 05, 2008 5:34 am
by primehalo
External links are supposed to get parsed, so I don't understand your issue.

Re: Prime Links

Posted: Wed Aug 06, 2008 12:02 am
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

Re: Prime Links

Posted: Wed Aug 06, 2008 1:09 am
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.

Re: Prime Links

Posted: Wed Aug 06, 2008 3:24 am
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:

Re: Prime Links

Posted: Wed Aug 06, 2008 5:09 am
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

Re: Prime Links

Posted: Wed Aug 06, 2008 5:42 am
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.

Re: Prime Links

Posted: Wed Aug 06, 2008 12:31 pm
by danswano
Oh my god, worked, thank you very much IPB_Refugee for the code and prime for the mod :)

Re: Prime Links

Posted: Sat Aug 09, 2008 12:30 pm
by newbie1981
great mod, thanx!

Prime Links

Posted: Mon Aug 11, 2008 7:50 pm
by A_Jelly_Doughnut
MOD Updated to version 1.2.0
See first post for Download Link

Re: Prime Links

Posted: Mon Aug 11, 2008 8:34 pm
by mcdanielnc89
Is there a change log to update from previous version to 1.2.0?

Re: Prime Links

Posted: Tue Aug 12, 2008 4:17 am
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?

Re: Prime Links

Posted: Tue Aug 12, 2008 4:30 am
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.

Re: Prime Links

Posted: Tue Aug 12, 2008 5:11 am
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