Posted: Sat Oct 06, 2007 6:47 am Post subject: Renaming "Who's online"
Could the link "Who's online" at the footer of the index page be renamed to something else with a script.If Yes what script?
Thank you in advance !
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
Kana has a script that can be modified to change the text and traget of any link on a page. Its used to change a link to the colourful rules at the top of this and several other forums.
His code, which you can see at the botton of each page using "Edit->View Source" is:
Code:
<!-- RESPECT Color Codes by Kana-->
<script>
var pagename = window.location.pathname;
var folder = location.href.substring(location.href.indexOf("?") + 1,location.href.indexOf("&"));
if(pagename == '/viewforum.php') {
if(folder == 'f=6' || folder == 'f=7' || folder == 'f=24' || folder == 'f=29' || folder == 'f=33' || folder == 'f=68' || folder == 'f=44'|| folder == 'f=12') {
var max_link = document.links.length;
var line01 = "<br><center><font color=black><b>For prompt support, please 'respect' the following</b>:</font><br>";
var line02 = "<font color=blue>Use Search, or refer to our Reference Section.<br>";
var line03 = "<b>Most</b> questions are already answered.</font><br>";
var line04 = "<font color=green>Include a <b>meaningful</b> title to your question.</font><br>";
var line05 = "<font color=Orange>Ask only <b>one</b> question per topic.</font><br>";
var line06 = "<font color=red>** <b>Always</b> include your Forum URL.**</font><br>";
var line07 = "<font color=darkred>Do <b>not</b> PM Staff for support, unless requested.</font></center>";
for(var loop = 0; loop < max_link; loop++) {
switch (document.links[loop].innerHTML.substring(0,17)) {
case "Respect our Rules":
document.links[loop].innerHTML = line01 + line02 + line03 + line04 + line05 + line06 + line07;
document.links[loop].href = "http://staff.forumup.com/viewforum.php?f=20";
break;
default:
// no change //
break;
}
}
}
}
</script>
This modification changes "Who Is Online" to "See who is online now"
Code:
<!-- based on RESPECT Color Codes by Kana-->
<script>
var pagename = window.location.pathname;
var folder = location.href.substring(location.href.indexOf("?") + 1,location.href.indexOf("&"));
if(pagename == '/index.php') {
var max_link = document.links.length;
var line01 = "See who is online now";
for(var loop = 0; loop < max_link; loop++) {
switch (document.links[loop].innerHTML.substring(0,13)) {
case "Who is Online":
document.links[loop].innerHTML = line01;
break;
default:
// no change //
break;
}
}
}
</script>
Change the variable line01 to contain the text you want.
The only problem is that it needs the "index.php" in the link to identify the index page so doesn't work if the URL is "yourforum.forumup.com" instead of "yourforum.forumup.com/index.php".
To run it on every page you could remove the "if (pagename" condition (remember the closing brace at the bottom).
<!-- based on RESPECT Color Codes by Kana-->
<script>
var pagename = window.location.pathname;
var folder = location.href.substring(location.href.indexOf("?") + 1,location.href.indexOf("&"));
if(pagename == '/index.php') {
var max_link = document.links.length;
var line01 = "See who is online now";
for(var loop = 0; loop < max_link; loop++) {
switch (document.links[loop].innerHTML.substring(0,13)) {
case "Who is Online":
document.links[loop].innerHTML = line01;
break;
default:
// no change //
break;
}
}
}
</script>
My questions are:
1)How it will be saved and used?Saved as .js and link(<script src=http://url.com/name.js></script>) or other way ??!?!
I made it with the first way but nothing change.
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
Joined: 25 Feb 2007 Posts: 1258 Location: Hyperborea
Posted: Tue Oct 09, 2007 8:58 am Post subject:
kozataxakep, the script must go in the Footer -- Code at the bottom of the forum, after all topics -- if it should work.
-------
On an important side note...
This is not a good idea:
Support forum --- >
Only registered users can see links on this forum! Register or Login on forum!
The URL makes it look like it would be an official ForumUp Support forum, of some kind, and it can cause all kinds of confusion.
I know that there is no rule stated, anywhere, saying that you cannot have a forum with such a name/URL, but there should be such a rule, because it is highly inapropriate. You cannot have the username Admin on a forum, for similar reasons, for example.
I don't know what you are using it for, but I can see that you have only got three members and some eight posts at the moment.
So now would be a good time for you to open another forum for the purpose, with a more suitable URL, and close this one.
FoxLeonard
_________________
Only registered users can see links on this forum! Register or Login on forum!
Svensk Support
Only registered users can see links on this forum! Register or Login on forum!
Dansk Support
Only registered users can see links on this forum! Register or Login on forum!
Lithuanian Support
Only registered users can see links on this forum! Register or Login on forum!
Vietnamese Support
Only registered users can see links on this forum! Register or Login on forum!
Last edited by FoxLeonard on Tue Oct 09, 2007 1:54 pm; edited 1 time in total
Only registered users can see links on this forum! Register or Login on forum!
The URL makes it look like it would be an official ForumUp Support forum, of some kind, and it can cause all kinds of confusion.
I know that there is no rule stated, anywhere, saying that you cannot have a forum with such a name/URL, but there should be such a rule, because it is highly inapropriate. You cannot have the username Admin on a forum, for similar reasons, for example.
I don't know what you are using it for, but I can see that you have only got three members and some eight posts at the moment.
So now would be a good time for you to open another forum for the purpose, with a more suitable URL, and close this one.
FoxLeonard
Hmm...I'dont know what say...The "support" forum is made for all administrators and some moderators in halfbloodmania.forumup.com.There we discuss different issues.What if just change my sign to not be Support and add that it's not a forumup support forum?
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
Joined: 25 Feb 2007 Posts: 1258 Location: Hyperborea
Posted: Wed Oct 10, 2007 9:08 am Post subject:
I didn't really know what to think and say when I first saw it, Kozataxakep. For a few seconds I even thought you were linking to this forum. And you would think that I, if anyone, should know that this forum is called staff.forumup.com and not support.forumup.com
In other words, it is first and foremost the URL, and not so much the name, of the forum that is the problem. The URL looks "official", like it belonged to the ForumUp organization. If you don't have a link at hand, and if you are new to ForumUp, and want to get to the Support forum, it may seem logical to type in support.forumup.com in the browser. It will also show up on google, when you search for ForumUp support.
Keep in mind that we have users from literally all over the world, and many of them do not understand English very well, or any other language but their own really. So a "sign" on your forum will not solve the whole problem. And a re-direction, with or without link to here, would still make your forum look "official" in some ways.
If someone in the ForumUp Staff had thought about this in advance, then the word support (especially on its own), would have been blocked from the URLs (if possible).
Don't get me wrong. I fully understand that you did this with nothing but good intentions. And I know that you had no reason to imagine the confusion and problems it could cause, especially in the long run.
I hope you understand and agree if I put it this way: It is better, and more easy, if you move now -- with only a handful of posts on the forum -- compared to if we wait to "see what happens", just to realize that it has to be moved anyway, and with hundreds of posts that have built up in the meantime.
FoxLeonard
_________________
Only registered users can see links on this forum! Register or Login on forum!
Svensk Support
Only registered users can see links on this forum! Register or Login on forum!
Dansk Support
Only registered users can see links on this forum! Register or Login on forum!
Lithuanian Support
Only registered users can see links on this forum! Register or Login on forum!
Vietnamese Support
Only registered users can see links on this forum! Register or Login on forum!
This is the script i've pasted at the bottom of the forum, after all topics.
Code:
<script>
var pagename = window.location.pathname;
var folder = location.href.substring(location.href.indexOf("?") + 1,location.href.indexOf("&"));
if(pagename == '/index.php') {
var max_link = document.links.length;
var line01 = "Xитроумната карта";
for(var loop = 0; loop < max_link; loop++) {
switch (document.links[loop].innerHTML.substring(0,13)) {
case "Who is Online":
document.links[loop].innerHTML = line01;
break;
default:
// no change //
break;
}
}
}
</script>
..but the link Who's online didn't change.I have something in my mind but...what if the script doesn't work because my forum is with bulgarian language pack.I'm trying to change Who is online wich in my forum is "Кой е онлайн".Do i have to change the script to rename "Кой е онлайн" to my desired or just "Who is online" to mine?
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
Joined: 25 Feb 2007 Posts: 1258 Location: Hyperborea
Posted: Thu Oct 11, 2007 6:59 am Post subject:
kozataxakep, looking at the script I would say that you need to use "Кой е онлайн", but I'm not sure.
Try to set your testforum's default language to English, and your profile language as well, and see what happens if you change "Who is online" to something in English, to start with.
And if that does not work, try on the ordinary subSilver.
It's always good to test the basics first, and to make sure that the script works in itself.
FoxLeonard
_________________
Only registered users can see links on this forum! Register or Login on forum!
Svensk Support
Only registered users can see links on this forum! Register or Login on forum!
Dansk Support
Only registered users can see links on this forum! Register or Login on forum!
Lithuanian Support
Only registered users can see links on this forum! Register or Login on forum!
Vietnamese Support
Only registered users can see links on this forum! Register or Login on forum!
... matches the 13 characters of "Who is online").
So adjust the length (13) for the Bulgarian.
Thank you mate! God bless you !
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum