Page 1 of 2
member location on index page
Posted: 31 May 2010, 07:08
by Denny
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
I was looking for a mod so when a member is online, and you get to the index page, you can mouse over their name, on the index page, and a box, or pop up, would display to show where that member is at. Which forum, weather reading, or replying to. Similar to the who's online page. This would make a quick reference for me, and the other members, at a glance to see where members are at. I have seen similar mods on other free type forums. I think this is kind of slick to have.
I am using subsilver2, 3.0.5
Re: member location on index page
Posted: 31 May 2010, 08:53
by Stoker
I have never heard of such mod.
Re: member location on index page
Posted: 01 Jun 2010, 17:37
by Denny
Well, no disrespect Stoker, but this is what I mean. I just don't know how to associate it to the right places. Very neat idea.
Re: member location on index page
Posted: 01 Jun 2010, 17:54
by cisco007
if you don't mind me asking Denny, where did you find that?
Re: member location on index page
Posted: 01 Jun 2010, 20:24
by Denny
Sure thing. I hope a link is ok.
http://sbctango.activeboard.com/
Re: member location on index page
Posted: 01 Jun 2010, 20:37
by Stoker
Its a non phpBB board.
Re: member location on index page
Posted: 01 Jun 2010, 21:26
by cisco007
yeah, i don't even know what type of script that is!
Re: member location on index page
Posted: 01 Jun 2010, 21:38
by Denny
It shows up in the HTML, if you have firebug installed. I can't copy it though, to show you.
Re: member location on index page
Posted: 04 Jun 2010, 05:10
by Denny
It uses html along with javascript. I have some workings going on, but, I'm having a little trouble with finding all the things, or the right place to link it to. I have to link it to. I'm getting closer.
Code: Select all
<td class="row1"><p class="genmed"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></p></td>
<script language="javascript">
function SelectRowColor(rowevent,rown,rownum,pbgc,mbgc,dbgc) {
var rows = document.getElementById(rown);
var curcolor = null;
var newcolor = null;
var domDetect = null;
if (typeof(window.opera) == 'undefined' && typeof(rows.getAttribute) != 'undefined') {
curcolor = rows.getAttribute('bgcolor');
domDetect = true;
}else{
curcolor = rows.style.backgroundColor;
domDetect = false;
}
if(curcolor == '' || curcolor.toLowerCase() == dbgc.toLowerCase()) {
if (rowevent == 'over' && pbgc != '') {
newcolor = pbgc;
}else if (rowevent == 'click' && mbgc != '') {
newcolor = mbgc;
sw[rownum] = true;
}
}else if (curcolor.toLowerCase() == pbgc.toLowerCase()&& (typeof(sw[rownum]) == 'undefined' || !sw[rownum])) {
if (rowevent == 'out') {
newcolor = dbgc;
}else if (rowevent == 'click' && mbgc != '') {
newcolor = mbgc;
sw[rownum] = true;
}
}else if (curcolor.toLowerCase() == mbgc.toLowerCase()) {
if (rowevent == 'click') {
newcolor = (pbgc != '') ? pbgc : dbgc;
sw[rownum] = (typeof(sw[rownum]) == 'undefined' || !sw[rownum]) ? true : null;
}
}
if (newcolor) {
if (domDetect) {
rows.setAttribute('bgcolor', newcolor, 0);
} else {
rows.style.backgroundColor = newcolor;
}
}
}
</script>
you can invoke the function by adding the following lines:
Code: Select all
<?php
$bgcolor = "#D7DEDE";
$pointcolor = "#A1C3C9"
$markcolor = "#FF9C71";
Echo"
<tr bgcolor=\"".$bgcolor."\" onMouseOver=\"SelectRowColor('over','tr".$i."','".$i."','".$pointcolor."','".$markcolor."','".$bgcolor."')\" onMouseOut=\"SelectRowColor('out','tr".$i."','".$i."','".$pointcolor."','".$markcolor."','".$bgcolor."') onMouseDown=\"SelectRowColor('click','tr".$i."','".$i."','".$pointcolor."','".$markcolor."','".$bgcolor."')\" >
";
?>
Re: member location on index page
Posted: 04 Jun 2010, 18:11
by Oliver
Very good work denny. When you are ready and code works, please tell us