PDA

View Full Version : New Posting Features - External Links Framed


Blaine0002
04 Aug 2006, 05:50
This will make all links out of your forum, come in a nice frame :D

Upload external.php to your forum root directory

Simply Create a template 'external_link'

<body bgcolor="#CCCCCC" text="#FF6633" link="#FF6633" vlink="#FF6633" alink="#FF6633" style="margin: 0px;">
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<tr>
<td valign="top"><img src="http://www.gentendo.com/forum/images/top_bg.gif">
<a href="javascript:window.close()"><font size="7">Close Window</font></a>
</td>
</tr>
</table>
<iframe src="{$go}" height="90%" width="100%" frameborder="0">

</iframe>
</body>


Change this, this just gives you the jist of what it does.

Edit includes/class_bbcode.php
find

return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";


replace with

return "<a href=\"http://www.urltoyourexternalframe.php?go=$rightlink\" target=\"_blank\">$text</a>";


and of course replace urltoyourexternal to the url to your external...




MAKE SURE YOU CHANGE THE TEMPLATE :D
The one i made was ugly and i made it in like 5 minutes :P Dont think the example is what it will look like, it can look like anything you want


example: http://www.gentendo.com/forum/external.php?go=http://www.google.com
(they wont need to put the path to external.php on the url, vb.org dosent have it installed so i need to put the full path for the example.)
or go to http://www.gentendo.com/forum/showthread.php?p=2406#post2406 for a live link.

Kaleem
04 Aug 2006, 06:11
can we put adsense also ? :P

well nice one :)

Sean S
04 Aug 2006, 07:10
<<--install. very nice Blaine0002, thank you for this release.

apdcanari
04 Aug 2006, 09:41
Style GOOGLE :cool:

<body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#551A8B" alink="#ff0000">
<style>
<!--
body,td,div,.p,a{font-family:arial,sans-serif;font-size:10pt}
-->
</style>
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td valign="center">
<a href="http://www.apdcanari.com/" target="_top"><img src="http://www.apdcanari.com/v7/images/logo.jpg" border="0" title="Au Paradis des Canaris" width="340" height="60" hspace="5" vspace="7"></a>
</td>
<td width="100%" valign="top" nowrap>
<a href="http://www.apdcanari.com/">Au Paradis des Canaris</a><br /><img alt="" width="1" height="5" border="0"><br />
<font color="#008000">www.apdcanari.com</font><br />A vos Plumes! Donnez-vous des Ailes..<br />
<i>Notre objectif est de vous présenter en détails les canaris grâce à de nombreux articles et photos.</i>
</td>
<td nowrap width="1%" valign="top" align="right" rowspan="2">
<a href="{$go}" target="_top">
<font color="#0000cc">Supprimer ce cadre</font><img src="http://www.apdcanari.com/forum/images/frame_remove.gif" height="12" width="13" border="0"></a><br />
</td>
</tr>
<tr>
<td colspan="5" bgcolor="#efefef">
Lien externe au site <b>Au Paradis des Canaris</b>, vous vous trouvez sur la page <b><a href="{$go}" target="_top">{$go}</a></b>
</td>
</tr>
</table>
<iframe src="{$go}" height="90%" width="100%" frameborder="0">
</body>

Cédric :cool:

Blaine0002
04 Aug 2006, 13:40
yep, anything you want can go in there :)

If you like it click install!

TygerTyger
04 Aug 2006, 14:57
Um. External.php already exists in that location, it handles feed output.

Blaine0002
04 Aug 2006, 15:23
weird, in 3.6 stable? cause im still using rc1, oh well, ill rename it.

Blaine0002
04 Aug 2006, 15:31
Thanks, updated.

pedroenf
05 Aug 2006, 05:55
Hi there. Excelent add-on. I have one question, is it possible to exclude from this frame the internal links? Exemple: http://www.myforum.org/showthread.php?t=16140. Is it? Thanks.

Blaine0002
05 Aug 2006, 05:57
hmm, ill look into it.

pedroenf
05 Aug 2006, 12:36
Thanks Blaine. It would be very usefull. Hope you can do it.

MajorFm.com
05 Aug 2006, 12:55
Just installed this but on some links im getting:

http://www.myforum.com/ext.php?go=http://www.myforum.com/ext.php?go=http://www.myforum.com/profile.php?do=editavatar

Please advise!

MajorFm.com
05 Aug 2006, 12:58
^^^ i have worked it out, there is a problem with this code, every time you edit the post and save, it add's another http://www.myforum.com/ext.php?go= so this can go on forever if you edit posts alot, please fix this and repost.

Blaine0002
05 Aug 2006, 16:22
Thanks for telling me, ill look into it.

JaneWindall
06 Aug 2006, 02:02
the live example does not work in firefox. no frame appears it looks 100% normal. (live link was at http://www.gentendo.com/forum/showthread.php?p=2406#post2406)

Blaine0002
06 Aug 2006, 05:47
yeah sorry im in the process of updating to 3.6.0 :)

BCC
09 Aug 2006, 14:18
Cant Wait For this Modification to be Fixed.
Will Come in Very Very Very Handy.
Hope You Fix it Soon, Thanks

MajorFm.com
15 Aug 2006, 23:10
whats the ETA on this?

MajorFm.com
23 Aug 2006, 23:52
...any luck with this... you have many eagerly waiting people!

MajorFm.com
27 Aug 2006, 16:06
Anyone else willing to offer a fix? i can pay a small contribution.

MajorFm.com
02 Sep 2006, 20:53
This must be for external links only, there has to be a way of entering domains that you do not want framed.

MajorFm.com
06 Sep 2006, 23:13
I'm willing to pay for a fix to this... anyone?

*slaps his head against a brick wall trying to convince himself he is not talking to himself*

MajorFm.com
12 Sep 2006, 00:45
ok got the fix... (credit Hambil for fix)

use this code to replace with in class_bbcode.php instead of the above and it should work fine:

// standard URL hyperlink
if (stristr($rightlink, 'frame=true') === FALSE)
return "<a href=\"http://www.urltoyourexternalframe.php?frame=true&go=$rightlink\" target=\"_blank\">$text</a>";
else
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";

P.Jackson
12 Sep 2006, 01:23
Same on firefox

MediaHound
12 Sep 2006, 06:20
clicks subscribe

markbolyard
26 Sep 2006, 18:09
Once you use this, and then uninstall it, all previous links posted in the forum will still direct to the framed page. New links will be normal however. So the big question is, how do you remove all the old links that still point to the framed page? One by one?

SVZ
19 Dec 2006, 20:05
So I'm guessing this doesn't work?

yingzhou
20 Dec 2006, 03:16
Can it work with firefox? I dont like using the IE. :D

SiMateoAko
12 Jan 2007, 18:16
I just made a version of this that works... will post it today.

SiMateoAko
12 Jan 2007, 19:15
This has everything you guys want and more. http://www.vbulletin.org/forum/showthread.php?t=136311

I'm pretty sure it will work on 3.6, but havn't test it yet.

psico
13 Jan 2007, 21:28
This has everything you guys want and more. http://www.vbulletin.org/forum/showthread.php?t=136311

I'm pretty sure it will work on 3.6, but havn't test it yet.
I cannot access that page, what happend?

SiMateoAko
14 Jan 2007, 00:05
I cannot access that page, what happend?

Had a small security hole in the file so it was removed. It's fixed now.

http://www.vbulletin.org/forum/showthread.php?t=136333

lazydesis
22 Jan 2007, 04:14
Once you use this, and then uninstall it, all previous links posted in the forum will still direct to the framed page. New links will be normal however. So the big question is, how do you remove all the old links that still point to the framed page? One by one?

you will have to undo this step which u performed durin insallation
EDIT includes/class_bbcode.php