Archive for myfreeforum.org Before posting please check the "stickies" in the support forums. Please ask questions in real English and not "txt". You will get a better response. Please do not ask support questions via PMs.
is there any news on opening a new tab or window when people click on a link in the forum instead of it taking you away from the forum or having to right click and open in new window.
is there any news on opening a new tab or window when people click on a link in the forum instead of it taking you away from the forum or having to right click and open in new window.
I've had to say this so many times, but I'll say it again. NO, NO NEVER NO. It should be the users choice how new links act, it SHOULD NOT be forced upon them. When links default to same window, users can do whatever they link:
open in same window - click
open in new window - right click > new window
open in new tab - click with scroll wheel
If you force a new window users have to either open in a new window, or a new tab. You should let users choose what happens with links, do not force it.
There is a mod there that does it. It really is just some code that goes in your overall_header.html. It's simple, checks the URL for all links, and if it's not the current domain then it's a new tab.
admin (no pm's please)
Nice one
Reminds me
while()
Please don't do this Surely as someone who makes websites you know this is wrong
Zudane
How so is it wrong?
The code is just javascript, it doesn't use the jquery set... it actually is just this:
Spoiler:
Code:
<script language="Javascript" type="text/javascript">
// <![CDATA[
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Open external links in new window in a XHTML 1.x compliant way.
function exlink() {
var current_domain = document.domain;
if (!current_domain || !document.getElementsByTagName) return;
var hrefels = new Array;
var hrefelslen = 0;
var hrefinner = '';
hrefels = document.getElementsByTagName("a");
hrefelslen = hrefels.length;
for (var i = 0; i < hrefelslen; i++) {
hrefinner = hrefels[i].innerHTML.toLowerCase();
if ( (hrefels[i].href == '') || (hrefels[i].href.indexOf('javascript') >=0 ) || (hrefinner.indexOf('<a') >= 0) || (hrefels[i].href.indexOf(current_domain) >= 0) ) {
continue;
}
hrefels[i].onclick = function () { window.open(this.href); return false; };
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
// ]]>
</script>
it does need to be initialized by an onload call, which can be a pain if you use lightbox or something similar, because then you need to put the onload call in (since it would override the load call from the lightbox code)
while()
I mean please don't encourage/enable people to force new window links. it's bad.
admin (no pm's please)
Zudane wrote:
How so is it wrong?
The code is just javascript, it doesn't use the jquery set...
Good example of what is probably a jquery one liner though.
Nick(NR)
well kinda, I tend to put emphasis of choice onto the person running the site, but personally, I always right click a link, I'd like to think we should enforce it like enforcing people to get rid of IE6.
New windows for a forum is a good thing though. Now, every link as a new window is one thing, but new windows for external links is good.
Think of it this way: you run a forum people tend to post links on (pictures, videos, fun sites, etc)... when people click the link normally they would be taken to a new page, and they would no longer be on the forum, and would have to manually go back, or manually open it on a new page.
But, if external links are new windows, then when a user clinks a link to another page, they are still on the forum AND the other page.
The pages open in the default mode: pop-up window, or new tab, for me it's a new tab. All members of my site use external links as new pages, and this saves the trouble.
while()
Zudane wrote:
New windows for a forum is a good thing though. Now, every link as a new window is one thing, but new windows for external links is good.
Think of it this way: you run a forum people tend to post links on (pictures, videos, fun sites, etc)... when people click the link normally they would be taken to a new page, and they would no longer be on the forum, and would have to manually go back, or manually open it on a new page.
But, if external links are new windows, then when a user clinks a link to another page, they are still on the forum AND the other page.
The pages open in the default mode: pop-up window, or new tab, for me it's a new tab. All members of my site use external links as new pages, and this saves the trouble.
That is irrelevant. You're forcing users to use a website in a specific way. Read my first post in this thread, if you force new window by default I have absolutely no way of opening in the same window, I do not want to open in a new window, if I did I would choose to have it open in a new window and I'm not changing my user habits for some shitty forum that doesn't understand basic usability. You do not under any circumstances force users to change their habits for your website.
Zudane
So... by your message all forums should act the same.
I think that any site should have behavior it feels is correct.
And if you're complaining about it... this site does worse (in my opinion). All links open in new windows.
Every site you visit you change your habits and form them to that site's activity, because that's how the site is used.
And if you REALLY want to get that picky, then disable javascript for the site.
while()
Why should I disable javascript? The default behaviour for a browser is to open new links in the same window, users then on top of this have the option to open in a new tab by clicking the scroll wheel or holding down control, they also have the option to open in a new window by right click > new window. Why should I go to a forum to find that I can't open links the way I want to? If you're so insecure that the second a user clicks a link on your forum they're going to leave then you've got bigger issues.
If you change the default behaviour of my browser you consider me never going near your site again. I'd love you to show me a major site that does this, because, funnily enough, any web developer with half a clue understands changing the default action is BAD.
I'm not saying all forums should act the same, but you should under no circumstances change how a website works away from the default. You should never change the way links open. Period.
while()
Here is an article on what I'm saying. It presents some serious examples of where this can break someones experience entirely.
Whilst essentially right, it is hardly the biggest issue in poor web design.
while()
admin (no pm's please) wrote:
Whilst essentially right, it is hardly the biggest issue in poor web design.
of course, but they all add up! Now to stop people using music on websites, flashing and bmp...
admin (no pm's please)
The biggest issue right now if you ask me is how to deal with javascript.
My book on Jquery is full of techniques that talk about failing over to what still works if people don't have Javascript enabled, and whilst that is all very laudable it is also more and more problematical.
bazfalty
Zudane wrote:
How so is it wrong?
The code is just javascript, it doesn't use the jquery set... it actually is just this:
Spoiler:
Code:
<script language="Javascript" type="text/javascript">
// <![CDATA[
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Open external links in new window in a XHTML 1.x compliant way.
function exlink() {
var current_domain = document.domain;
if (!current_domain || !document.getElementsByTagName) return;
var hrefels = new Array;
var hrefelslen = 0;
var hrefinner = '';
hrefels = document.getElementsByTagName("a");
hrefelslen = hrefels.length;
for (var i = 0; i < hrefelslen; i++) {
hrefinner = hrefels[i].innerHTML.toLowerCase();
if ( (hrefels[i].href == '') || (hrefels[i].href.indexOf('javascript') >=0 ) || (hrefinner.indexOf('<a') >= 0) || (hrefels[i].href.indexOf(current_domain) >= 0) ) {
continue;
}
hrefels[i].onclick = function () { window.open(this.href); return false; };
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
// ]]>
</script>
it does need to be initialized by an onload call, which can be a pain if you use lightbox or something similar, because then you need to put the onload call in (since it would override the load call from the lightbox code)
Zudane wrote:
How so is it wrong?
The code is just javascript, it doesn't use the jquery set... it actually is just this:
Spoiler:
Code:
<script language="Javascript" type="text/javascript">
// <![CDATA[
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Open external links in new window in a XHTML 1.x compliant way.
function exlink() {
var current_domain = document.domain;
if (!current_domain || !document.getElementsByTagName) return;
var hrefels = new Array;
var hrefelslen = 0;
var hrefinner = '';
hrefels = document.getElementsByTagName("a");
hrefelslen = hrefels.length;
for (var i = 0; i < hrefelslen; i++) {
hrefinner = hrefels[i].innerHTML.toLowerCase();
if ( (hrefels[i].href == '') || (hrefels[i].href.indexOf('javascript') >=0 ) || (hrefinner.indexOf('<a') >= 0) || (hrefels[i].href.indexOf(current_domain) >= 0) ) {
continue;
}
hrefels[i].onclick = function () { window.open(this.href); return false; };
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
// ]]>
</script>
it does need to be initialized by an onload call, which can be a pain if you use lightbox or something similar, because then you need to put the onload call in (since it would override the load call from the lightbox code)
So I can just add this in my overall header and it will work.
Zudane
Yea, just add it between the head tags and it will load any links for external domains in a new window.
Not sure if I said earlier or not, but it will count www.example.com and example.com separately. So if you have example.com showing at the top, and a link uses www.example.com it will load in a new page, even though it's the same domain.
bazfalty
The is the error i keep getting using the above code
Parse error: syntax error, unexpected $end in /home/httpd/vhosts/ford.myfunforum.org/httpdocs/phpBB3/cache/myfastf485/onlyoldskool.myfastforum.org/tpl_onlyoldskool.myfastforum.org4_overall_header.html.php on line 319
Sorry but I'm not the best when it comes to code, I 've tried adding it under the first head code.
admin (no pm's please)
Unless you post the code, we can't guess the error.
bazfalty
This is the code what zudane had posted
<script language="Javascript" type="text/javascript">
// <![CDATA[
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Open external links in new window in a XHTML 1.x compliant way.
function exlink() {
var current_domain = document.domain;
if (!current_domain || !document.getElementsByTagName) return;
var hrefels = new Array;
var hrefelslen = 0;
var hrefinner = '';
hrefels = document.getElementsByTagName("a");
hrefelslen = hrefels.length;
for (var i = 0; i < hrefelslen; i++) {
hrefinner = hrefels[i].innerHTML.toLowerCase();
if ( (hrefels[i].href == '') || (hrefels[i].href.indexOf('javascript') >=0 ) || (hrefinner.indexOf('<a') >= 0) || (hrefels[i].href.indexOf(current_domain) >= 0) ) {
continue;
}
hrefels[i].onclick = function () { window.open(this.href); return false; };
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
// ]]>
</script>
I've just viewed the source code on your vista template, bleow should be similar, what I've done below is add a line of text that should be where you should place the code:
Thanks Nick but I've tried what you said and I just get a blank screen. I've copied my style as a new one called onlyoldskool.myfastforum.org4 any chance you could add the code in that and see if it works for you.
Nick(NR)
Drop your entire overall_header into the code tags and I'll make the addition unless someone beats me to responding once the header is posted.
bazfalty
thanks nick, really appreciate it.
Spoiler:
Code:
[b]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<TITLE>The No.1 Oldskool Music Forum</TITLE>
<meta name="description" content="The No.1 Free Oldskool Music Forum with 1000's of Oldskool DJ Sets from all the Big Oldskool / Rave Events inc Fantazia, Amnesia, Dreamscape, Universe and many more.">
<meta name="Amnesia, Dreamscape, Rave, Oldskool, Hardcore, Dance, Raindance, LTJ Bukem, carl cox, grooverider, Fantazia, Top Buzz, Easygroove, Carl Cox, Hacienda, Jungle, Techno, Perception, Mythology, shellys, entropy, Eclipse, Obsession, Andromeda, universe, oldskool ">
/**
* Find a member
*/
function find_username(url)
{
popup(url, 870, 570, '_usersearch');
return false;
}
/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
var parent = document.getElementById(id);
if (!parent)
{
eval('parent = document.' + id);
}
if (!parent)
{
return;
}
var rb = parent.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
{
rb[r].checked = state;
}
}
}
<!-- IF ._file -->
/**
* Play quicktime file by determining it's width/height
* from the displayed rectangle area
*
* Only defined if there is a file block present.
*/
function play_qt_file(obj)
{
var rectangle = obj.GetRectangle();
if (rectangle)
{
rectangle = rectangle.split(',')
var x1 = parseInt(rectangle[0]);
var x2 = parseInt(rectangle[2]);
var y1 = parseInt(rectangle[1]);
var y2 = parseInt(rectangle[3]);
function selectCode(a)
{
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
/**
* Find a member
*/
function find_username(url)
{
popup(url, 870, 570, '_usersearch');
return false;
}
/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
var parent = document.getElementById(id);
if (!parent)
{
eval('parent = document.' + id);
}
if (!parent)
{
return;
}
var rb = parent.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
{
rb[r].checked = state;
}
}
}
<!-- IF ._file -->
/**
* Play quicktime file by determining it's width/height
* from the displayed rectangle area
*
* Only defined if there is a file block present.
*/
function play_qt_file(obj)
{
var rectangle = obj.GetRectangle();
if (rectangle)
{
rectangle = rectangle.split(',')
var x1 = parseInt(rectangle[0]);
var x2 = parseInt(rectangle[2]);
var y1 = parseInt(rectangle[1]);
var y2 = parseInt(rectangle[3]);
function selectCode(a)
{
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
sorry about posting it without codes. will do it next time.
Nick, still no luck. All its done is changed some of the icons, i wonder if its because of the template I'm using.
bazfalty
More great support again i see.
Bravo
bazfalty wrote:
More great support again i see.
Unbelievable cheek.
Your forum is working and working fine. That's what support you should be expecting.
These chaps have gone out of their way to help you get your desires despite you not showing any intention whatsoever to 'help yourself' and learn a little about what you intend to do, and then you have the utter shameful attitude of rolling your eyes at the support you have received because it's been less than 24 hours and nobody has stopped everything they are doing to jump to it and sort your desires out.
admin (no pm's please)
Indeed, there is simply no way are responsible for scripts you want to add to your forum. You have actually had a lot of effort from Nick here, but are you grateful?
Nick(NR)
Wow, you must forgive me for only getting around 4hrs sleep a day around my job and personall life to not respond to something that I know works, feel free to view the source code: http://portalogy.myfabforum.org/index.php
you never mentioned what template it is that is the main one or one your editing before you set it to live, the code I entered into the header you provided is the exact same as on portalogy, you've not mentioned if you've tried in other browsers as the primary one you use may have javascript disabled or if active, have myff forums on a blacklist for java.
there is always more than one thing to focus on and you never gave use more than that to ever put a more detailed answer than "that javascript is the exact one used on many sites, yours should be no different"
I'm disappointed at the fact that after over 3 years here and with as much help given as possible with minimal detail given you'd be so disrespectful, after something was posted that should work with out issue. I've even gone so far as to test this mod on the same template on a test site: http://demo.metaliation.net/phpbb/index.php the script goes in and works fine without issue.
bazfalty
Bravo wrote:
bazfalty wrote:
More great support again i see.
it's been less than 24 hours and nobody has stopped everything they are doing to jump to it and sort your desires out.
If you look at the date it has been 4 days since I last posted and nearly 2 months since I asked the original question, i wasn't having a go at Nick, has he has taken the time out to try and help me out, like I've noticed with symon as well who seems to help out people,
so sorry nick I didnt phrase it right, I was just getting a tired of not getting much support to some of the things I've asked for on here.
Nick(NR)
send me a pm with the editor accounts details and I'll have a look tomorrow for you
Bravo
bazfalty wrote:
I was just getting a tired of not getting much support to some of the things I've asked for on here.
This isn't 'support', it is friendly help.
Support is getting your forum working. There is a major difference.
Zudane
As with most support forums... the team here is focused on getting your forum to work correctly.
Any modifications you want to make we can help with, but unless we are so inclined - we have no need to do it for you.
editor
Exactly, we deal with real problems, answer questions on standard forum functions etc.
No way can we deal with every extra script or template edit at beyond a reasonable attewmpt to help people help themselves. At the end of the day if you want to htlm edit you need to learn html, if you want javascript then you at least need basic knowledge of things like the error console so you can at least help us help you!
If you make that effort it will be recipricated, plenty of people have learned a lot here, but it is a two way street.
Give us nothing to go on and we cannot go the extra mile.
bazfalty
Nick(NR) wrote:
send me a pm with the editor accounts details and I'll have a look tomorrow for you
Nick(NR) wrote:
send me a pm with the editor accounts details and I'll have a look tomorrow for you
It wont let me send a pm to you nick, shall i join your forum and send the details that way if your still up for having a look.
editor
You can pm, just not from a topic.
Nick(NR)
I'm pretty sure I've sussed this out with tweaked jquery.
FOR PHPBB3 FORUMS ONLY
Open your overall_header.html file and place the below, in between the head tags <head>
Now switch over to the web page part and click "Upload Manage Files" and after extracting the two .js files from the zip, upload them and test an external link you've posted, assuming your forum is using the template you just made these additions to