Request - member highlight in nested quotes
Discussion
It would be a useful tool but the problem is that we look at the ID of the poster to do the highlighting and for a quoted post we do not have the quoted person's ID and thus cant match it up.
There is a possibility we could do this with a bit of clever looking at the text in the posts but we would have to evaluate how that effects the speed of the forums. Though as I write I wonder if I could do it on your browser side (thus not effecting the speed) and have a button to click (or once page is loaded) to highlight your name through the page.
I will add it on to the list but probably not something that will be done (if we can work it out) till next year.
There is a possibility we could do this with a bit of clever looking at the text in the posts but we would have to evaluate how that effects the speed of the forums. Though as I write I wonder if I could do it on your browser side (thus not effecting the speed) and have a button to click (or once page is loaded) to highlight your name through the page.
I will add it on to the list but probably not something that will be done (if we can work it out) till next year.
Taita said:
Could a greasemonkey script do this? Just input your username, then it would parse the text on the page, and highlight anything it found with both your name in, and surrounded by [ quote] tags?
Or even JScript?
Wasn't that this bit - "I could do it on your browser side (thus not effecting the speed) and have a button to click (or once page is loaded) to highlight your name through the page." Or even JScript?

RacingPete said:
Taita said:
Could a greasemonkey script do this? Just input your username, then it would parse the text on the page, and highlight anything it found with both your name in, and surrounded by [ quote] tags?
Or even JScript?
Wasn't that this bit - "I could do it on your browser side (thus not effecting the speed) and have a button to click (or once page is loaded) to highlight your name through the page." Or even JScript?


Ok. Done it
.
First, add this to the stylesheet:
Tested in just firefox but don't see why it shouldn't work in other browsers.

[Edit: Oh, and call HightlightQuotes() when the page has loaded. Add a small image at the bottom of the page and have an onload event?]
.First, add this to the stylesheet:
code said:
.quoteHighlight{ background-color: #E0E8F9;
margin: 1px 2em 1.5em 1em;
padding: 0.5em; border: 1px solid gray;
font-size: small;
}
Add this JS:margin: 1px 2em 1.5em 1em;
padding: 0.5em; border: 1px solid gray;
font-size: small;
}
code said:
function HighlightQuotes()
{
// username = document.getElementById("membername").innerHTML;
username = "Xenocide";
quotes = document.getElementsByTagName("div");
output = "";
for (i = 0; i < quotes.length; i = i + 1)
{
if( quotes[i].className == "forumQuoter")
{
tquser = quotes[i].innerHTML.match("^([a-zA-Z ]+) said:");
if(tquser != null)
{
if(tquser[1] == username)
{
quotes[i].nextSibling.nextSibling.className = "quoteHighlight";
}
}
}
}
}
Obviously delete out the second username declaration when you've implemented the usernameid do-dah.{
// username = document.getElementById("membername").innerHTML;
username = "Xenocide";
quotes = document.getElementsByTagName("div");
output = "";
for (i = 0; i < quotes.length; i = i + 1)
{
if( quotes[i].className == "forumQuoter")
{
tquser = quotes[i].innerHTML.match("^([a-zA-Z ]+) said:");
if(tquser != null)
{
if(tquser[1] == username)
{
quotes[i].nextSibling.nextSibling.className = "quoteHighlight";
}
}
}
}
}
Tested in just firefox but don't see why it shouldn't work in other browsers.

[Edit: Oh, and call HightlightQuotes() when the page has loaded. Add a small image at the bottom of the page and have an onload event?]
Edited by Xenocide on Friday 7th November 12:51
Edited by Xenocide on Friday 7th November 12:51
Edited by Xenocide on Friday 7th November 12:53
Edited by Xenocide on Friday 7th November 12:54
Did you add the new css thing to the other stylesheet?
[edit: to be more helpful. I made it for the classic skin. does it give js errors or does it just not change your quotes?! Is it public access? Call me if its any use. *removed*, edit the number out when you've got it
]
[edit: to be more helpful. I made it for the classic skin. does it give js errors or does it just not change your quotes?! Is it public access? Call me if its any use. *removed*, edit the number out when you've got it
]Edited by Xenocide on Monday 10th November 13:11
Edited by RacingPete on Monday 10th November 14:03
Gassing Station | Website Feedback | Top of Page | What's New | My Stuff


