[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.
kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

You have done something wrong. URLs should look like

Code: Select all

http://www.cdkmusic.8lo.net/phpBB2/link.php?url=http://reiji.frihost.net/downloads/...0.1_spanish.zip
instead of

Code: Select all

http://www.cdkmusic.8lo.net/phpBB2/link.'.%20.%20'?url=http://reiji.frihost.net/downloads/...0.1_spanish.zip

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Hi heres a example of what I mean:

This is a link that I give out to one of my mods, it leads to a anti-robotic download page where you type in the letters:

http://www.shadowtek.net/Forum/down_db. ... file&id=11


Heres the link when on my forums (with the part your mod adds on to the front of it):

http://www.shadowtek.net/Forum/link.php ... file&id=11

The link doesnt work with the internal link. This happens in a few links like this on my site as this is just a example (for example links to something on my topsites page).

Also, What file do we make the above changes in? I dont kow whay the HTML version is so I use the php one. Thanks :)

EDIT: Figured it out what file it was :)

ShadowTek
Last edited by ShadowTek on Wed Jan 25, 2006 6:46 pm, edited 4 times in total.

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

deleted
Last edited by ShadowTek on Wed Jan 25, 2006 6:27 pm, edited 1 time in total.

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

deleted
Last edited by ShadowTek on Wed Jan 25, 2006 6:21 pm, edited 1 time in total.

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Sorry about the tripple post, the submit button kept timming out on me :(

EDIT: Hm every button is working fine for me BUT the submit button :( It just times out on me, must be busy here ATM or something.

I also keep getting:

phpBB : Critical Error

Could not connect to the database

(here that is)

ST

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

kkroo wrote: ShadowTek, did that work out for you when u said that it breaks links with modes switches attached?


No that didnt work as the link.php part still puts itself infront of the internal link (and thus wont work)

You can test this in the links I gave above :)

Is there a way so that if its a internal link, your mod compleately ignors it and doesnt put anything in front of the internal link? Or a hardcoded way where I can add my site link in as the link to ignor?

ShadowTek

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Hello ShadowTek, the problem kulinar pointed out to me is the same problem you are having. The HTML version of the MOD is if you are using html extensions for your forum, or formats that are not like ?p=1970039 and so on.

To solve this bug, view this: http://www.phpbb.com/phpBB/viewtopic.ph ... 39#1970039

tell me the results, hope it works out for you :D .
My MODs

Need a coder?

Enjoy my Mods? - Image

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Ok I had added the php part.

BTW I dont have:

'REFERAL_LINK' => $HTTP_GET_VARS['referrer'],
'U_URL' => $url

I do have:

'REFERAL_LINK' => $referer_link,
'U_URL' => $url

Is that what you ment in the link.php file?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

that means you have the normal MOD not the HTML version. But did it work out for you?
My MODs

Need a coder?

Enjoy my Mods? - Image

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Hi, I cant find the lines so I havent tried, do I need to uninstall it and reinstall the html version?

EDIT: I did add the php part of that page and that didnt work. Im not sure what your saying for me to do? Add the top code for the html part? Or add the html version?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

no just do the instructions for the php version because you don't use the HTML version
My MODs

Need a coder?

Enjoy my Mods? - Image

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Ok, no it didnt work, as a test I downloaded the link.php from the html version and added the adjustments and tried that but it didnt work either.

Thanks for your help :)

ST

EDIT:

On this part:
and if you are using php version do this:

Quote:
FIND

$url=$HTTP_GET_VARS["url"];


ADD

$string = $HTTP_SERVER_VARS["REQUEST_URI"];
preg_match('|ht(.*)$|', $string, $url_matches);
$url_encode = urlencode($url_matches[0]);
$url_decode = urldecode($url_encode);


FIND

'REFERAL_LINK' => $HTTP_GET_VARS['referrer'],
'U_URL' => $url

REPLACE WITH


'REFERAL_LINK' => $referer_link,
'U_URL' => $_GET['url']


FIND

'S_FRAME_TOP' => "link.{$phpEx}?pane=1&url=$url&referrer={$backto_link}&{$match_topic_name[0]}",
'U_URL' => $url

REPLACE WITH

'S_FRAME_TOP' => "link.{$phpEx}?pane=1&url={$url_encode}&referrer={$backto_link}&{$match_topic_name[0]}",
'U_URL' => $url_decode


This part:

Code: Select all

FIND 

'REFERAL_LINK' => $HTTP_GET_VARS['referrer'], 
'U_URL' => $url 
is not in the php version link.php, its in the html version however..

But I did figure it out, it should be (for the php change)

find:
'REFERAL_LINK' => $referer_link,
'U_URL' => $url

replace with:
'REFERAL_LINK' => $referer_link,
'U_URL' => $_GET['url']

I believe that is what you ment, however it still didnt work (If Im right about the above statment)

You can check by clicking on the link examples I posted earlyer


ST

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

ok, i have an idea, just use this: http://kkroo.pastebin.com/522913
Last edited by kkroo on Wed Jan 25, 2006 9:03 pm, edited 1 time in total.
My MODs

Need a coder?

Enjoy my Mods? - Image

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek »

Hi, thanks for all the help, but that didnt work.

What the link should do:
http://www.shadowtek.net/Forum/down_db. ... file&id=39


what the link does:
http://www.shadowtek.net/Forum/link.php ... file&id=39

Thats with the new link.php file.

ST

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

oh! i forgot to change one line in there, i am positive that this will work!

Find

header("Location: $url");

Replace With

header("Location: $url_decode");
My MODs

Need a coder?

Enjoy my Mods? - Image

Post Reply

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