Module: HTML in Messages
Posted by Maurice Makaay
|
Re: Module: HTML in Messages December 09, 2009 04:20AM |
Registered: 16 years ago Posts: 41 |
|
Re: Module: HTML in Messages December 09, 2009 04:33AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: HTML in Messages December 16, 2009 05:46PM |
Registered: 16 years ago Posts: 41 |
Hi
Where & is in an url it is being added too so that it shows as &. This is causing my links to fail. Any idea how to fix it?
Regards
Edit: I notice this is related to the plugin to embed images. The urls added to the images are displaying the extra code.
Edited 1 time(s). Last edit at 12/17/2009 02:40AM by Bluesplayer.
Where & is in an url it is being added too so that it shows as &. This is causing my links to fail. Any idea how to fix it?
Regards
Edit: I notice this is related to the plugin to embed images. The urls added to the images are displaying the extra code.
Edited 1 time(s). Last edit at 12/17/2009 02:40AM by Bluesplayer.
|
Re: Module: HTML in Messages December 18, 2009 08:16PM |
Registered: 16 years ago Posts: 41 |
Hi
[code="javascript"]
<script type="text/javascript">
function assign_foreign_url_targets() {
anchors = document.getElementsByTagName("a");
for (i in anchors) {
if (anchors.href) {
ahref = anchors.href;
if (!ahref.match("[bluesplayer-shops.hopto.org"];) && !ahref.match("[bluesplayer.co.uk"];) && !ahref.match("[ukshopping-hopto.org"];) ) {
anchors.target = "_blank";
}
}
}
}
assign_foreign_url_targets();
</script>
[/code]
The above code works great but I have a problem with javascript return to previous page code. The above code stops it working. The code I am referring too is this:
[code="javascript"]
[<a href="javascript:history.go(-1)" target="_self">Go Back 1</a>]
[/code]
You can see this occuring here:
[bluesplayer.co.uk]
Is there any way to make the 2 scripts work together?
Regards
Edited 1 time(s). Last edit at 01/12/2010 03:51PM by Bluesplayer.
[code="javascript"]
<script type="text/javascript">
function assign_foreign_url_targets() {
anchors = document.getElementsByTagName("a");
for (i in anchors) {
if (anchors.href) {
ahref = anchors.href;
if (!ahref.match("[bluesplayer-shops.hopto.org"];) && !ahref.match("[bluesplayer.co.uk"];) && !ahref.match("[ukshopping-hopto.org"];) ) {
anchors.target = "_blank";
}
}
}
}
assign_foreign_url_targets();
</script>
[/code]
The above code works great but I have a problem with javascript return to previous page code. The above code stops it working. The code I am referring too is this:
[code="javascript"]
[<a href="javascript:history.go(-1)" target="_self">Go Back 1</a>]
[/code]
You can see this occuring here:
[bluesplayer.co.uk]
Is there any way to make the 2 scripts work together?
Regards
Edited 1 time(s). Last edit at 01/12/2010 03:51PM by Bluesplayer.
|
Re: Module: HTML in Messages December 19, 2009 01:34AM |
Moderator Registered: 19 years ago Posts: 1,301 |
Try adding:
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
&& !ahref.match("javascript")
to the line:
if (!ahref.match("http://bluesplayer-shops.hopto.org") && !ahref.match("http://bluesplayer.co.uk") && !ahref.match("http://ukshopping-hopto.org") ) {
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
|
Re: Module: HTML in Messages December 19, 2009 04:13AM |
Registered: 16 years ago Posts: 41 |
|
Re: Module: HTML in Messages January 12, 2010 03:54PM |
Registered: 16 years ago Posts: 41 |
This code works perfectly - but! I am now showing downloadable trial software titles and it would be a heck of a lot neater if the trial download links didn't open in a new window. This is a bit messy as the window collapses then for the download to occur. Anyway for me to stop certain links from opening a new window?
Regards
Regards
|
Re: Module: HTML in Messages January 12, 2010 04:53PM |
Admin Registered: 21 years ago Posts: 8,532 |
By not using a target in the <a href> code? This is the thread for the HTML module. As far as I know, you provide the HTML code here, so you control what the hrefs look like. If the code is adding targets on its own, then you'll have to dig into the HTML Purifier library to see if it's configurable or so.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: HTML in Messages January 12, 2010 07:04PM |
Registered: 16 years ago Posts: 41 |
Sorry I didn't make myself clear. I was referring to this code:
[code="javascript"]
<script type="text/javascript">
function assign_foreign_url_targets() {
anchors = document.getElementsByTagName("a");
for (i in anchors) {
if (anchors.href) {
ahref = anchors.href;
if (!ahref.match("[bluesplayer-shops.hopto.org"];) && !ahref.match("[bluesplayer.co.uk"];) && !ahref.match("[ukshopping-hopto.org"];) ) {
anchors.target = "_blank";
}
}
}
}
assign_foreign_url_targets();
</script>
[/code]
Works really well but like I said I was wondering if a method of bypassing the above for certain links can be had.
Regards
[code="javascript"]
<script type="text/javascript">
function assign_foreign_url_targets() {
anchors = document.getElementsByTagName("a");
for (i in anchors) {
if (anchors.href) {
ahref = anchors.href;
if (!ahref.match("[bluesplayer-shops.hopto.org"];) && !ahref.match("[bluesplayer.co.uk"];) && !ahref.match("[ukshopping-hopto.org"];) ) {
anchors.target = "_blank";
}
}
}
}
assign_foreign_url_targets();
</script>
[/code]
Works really well but like I said I was wondering if a method of bypassing the above for certain links can be had.
Regards
|
Re: Module: HTML in Messages April 18, 2010 03:28PM |
Registered: 21 years ago Posts: 121 |
Sorry, only registered users may post in this forum.

