[BETA] External Link MOD

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
JLA
Registered User
Posts: 515
Joined: Tue Nov 16, 2004 5:23 pm
Location: USA
Name: JLA FORUMS
Contact:

Re: [BETA] External Link MOD

Post by JLA » Mon Jan 21, 2008 3:18 am

JLA wrote:
kkroo wrote:Currently, the mod only supports BBcode urls.

I dont understand the second part of your question regarding pane_top.tpl, could you reword it more clearly.

Omar
We normally use a piece of Javascript in the overall_footer.tpl that tracks site visitors to our site. Normally, when someone would click on an external link on our site - we would be able to see the link as a site exit. Now with your mod, external links do not show as site exits. We placed the same javascript in the panel top tpl file but it only shows the sitename :: and nothing else. Also we cannot see what the external link was unless we directly visit the topic to search through where they possibly have gone.

If there was a way to have inserted into panel top tpl the URL of the external link so it would show in the title as sitename :: External Link URL - it would make it easier to track these.

Thanks
Ok, we found a solution to this part of it. This is what we did

in Link.php

Code: Select all

$gen_simple_header = TRUE;
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
REPLACE WITH

Code: Select all

$gen_simple_header = FALSE;
include($phpbb_root_path . 'includes/page_headerl.'.$phpEx);
FIND

Code: Select all

$template->assign_vars(array(
		'L_BACK_TO' => $lang['Back_to'],
		'L_BACK_TO_TITLE' => $topic_title,
		'U_INDEX' =>  $phpbb_root_path . append_sid("index.$phpEx"),
		'REFERAL_LINK' => $backto_link,
		'U_URL' => $url_decode,
AFTER ADD

Code: Select all


'L_URL' => $url_lower,
Save and close that file

OPEN pagel_header.php
SAVE AS pagel_headerl.php
Open page_headerl.php
FIND

Code: Select all

$template->set_filenames(array(
	'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
REPLACE WITH

Code: Select all

$template->set_filenames(array(
	'overall_header' => ( empty($gen_simple_header) ) ? 'overall_headerl.tpl' : 'simple_header.tpl')
SAVE AND CLOSE

Open \templates\subSilver\overall_header.tpl
Save AS overall_headerl.tpl
Open overall_headerl.tpl
FIND, COPY and REMOVE everything AFTER

Code: Select all

<html dir="{S_CONTENT_DIRECTION}">
SAVE AND CLOSE

Open \templates\subSilver\pane_top.tpl
FIND

Code: Select all

<table width="100%" cellspacing="0" cellpadding="0" border="0">
PASTE (what you copied in the previous step from overall_headerl.tpl) BEFORE

Now FIND

Code: Select all

<title>{SITENAME} - {PAGE_TITLE}</title>
and REPLACE

Code: Select all

<title>{SITENAME} - {L_URL}}</title>
FIND

Code: Select all

</body>
PASTE BEFORE (any javascript site tracking code that you use for your pages. Now in you tracking stats, the EXTERNAL URL address that the visitor was going to will show up in your states as (YOUR SITE) - (THE EXTERNAL URL)



We will hope to find a solution to this if possible
Is there a way to have your code deal with HTML links that appears in posts such as this

<a target=_blank href=http://xxx.xxxx.xxx>Link Text...</a>

or

<a target=_blank href=http://xxx.xxxx.xxx>[img]image%20url%20not%20affected[/img]</a>

or
<a href="http://xxx.xxx.xxxx></a>

User avatar
JLA
Registered User
Posts: 515
Joined: Tue Nov 16, 2004 5:23 pm
Location: USA
Name: JLA FORUMS
Contact:

Re: [BETA] External Link MOD

Post by JLA » Mon Jan 21, 2008 5:09 am

kkroo wrote:Try this

in link.php

find:

Code: Select all

	'U_URL' => $url_decode
replace with:

Code: Select all

	'U_URL' => addslashes( htmlentities($url_decode ) )
It appears that this "update" is not included in your latest version offered for download. Is there a reason for this? Should it not be included if it addresses a true security issue?

Also, can you please explain why one would need or want to ENCODE external url links?

Thanks again!

User avatar
JLA
Registered User
Posts: 515
Joined: Tue Nov 16, 2004 5:23 pm
Location: USA
Name: JLA FORUMS
Contact:

Re: [BETA] External Link MOD

Post by JLA » Sun Feb 17, 2008 10:37 pm

JLA wrote:
kkroo wrote:Try this

in link.php

find:

Code: Select all

	'U_URL' => $url_decode
replace with:

Code: Select all

	'U_URL' => addslashes( htmlentities($url_decode ) )
It appears that this "update" is not included in your latest version offered for download. Is there a reason for this? Should it not be included if it addresses a true security issue?

Also, can you please explain why one would need or want to ENCODE external url links?

Thanks again!
Still have not received a response to this? Is the MOD author around?

Is there a way to have your code recognize HTML links in post and apply the function to those as well?

Thank You

sceltic
Registered User
Posts: 64
Joined: Fri Nov 04, 2005 1:24 pm
Location: Ontario

Re: [BETA] External Link MOD

Post by sceltic » Sat Jun 28, 2008 8:04 pm

Is this mod safe?

User avatar
JLA
Registered User
Posts: 515
Joined: Tue Nov 16, 2004 5:23 pm
Location: USA
Name: JLA FORUMS
Contact:

Re: [BETA] External Link MOD

Post by JLA » Sat Jun 28, 2008 8:16 pm

Yes, the mod is safe but the mod author has disappeared. The mod works well with the exception of:

1. Doesn't recognize html links in posts
2. You have to remove the MOD authors adsense ads from the code

We changed this mod around a bit and it works well

sceltic
Registered User
Posts: 64
Joined: Fri Nov 04, 2005 1:24 pm
Location: Ontario

Re: [BETA] External Link MOD

Post by sceltic » Sun Jun 29, 2008 11:01 pm

JLA
Thank you for thr reply.
Any chance of sharing the changes you have made for better effect.

User avatar
JLA
Registered User
Posts: 515
Joined: Tue Nov 16, 2004 5:23 pm
Location: USA
Name: JLA FORUMS
Contact:

Re: [BETA] External Link MOD

Post by JLA » Mon Jun 30, 2008 4:33 am

sceltic wrote:JLA
Thank you for thr reply.
Any chance of sharing the changes you have made for better effect.
We created an additional files/code that allows us to use an abbreviated version of our page header on all pages the link takes the user to and allows us to track their activity. It also makes the visited links merge more seamlessly with our site which encourages return to the site, etc.

Post Reply

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