member location on index page

Support for PhpBB3. Post here to get help with any phpBB3 related issue here
There is no support here! Only Read Access!
Forum rules
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.
Else your topic may be ignored or locked!
Denny
BBCoder II
BBCoder II
Posts: 29
Joined: 10 Mar 2010, 17:48

member location on index page

Post 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
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: member location on index page

Post by Stoker »

I have never heard of such mod.
Board rules! No PM support
Denny
BBCoder II
BBCoder II
Posts: 29
Joined: 10 Mar 2010, 17:48

Re: member location on index page

Post 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. :D
Image
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: member location on index page

Post by cisco007 »

if you don't mind me asking Denny, where did you find that?
Denny
BBCoder II
BBCoder II
Posts: 29
Joined: 10 Mar 2010, 17:48

Re: member location on index page

Post by Denny »

Sure thing. I hope a link is ok.
http://sbctango.activeboard.com/
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: member location on index page

Post by Stoker »

Its a non phpBB board.
Board rules! No PM support
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: member location on index page

Post by cisco007 »

yeah, i don't even know what type of script that is!
Denny
BBCoder II
BBCoder II
Posts: 29
Joined: 10 Mar 2010, 17:48

Re: member location on index page

Post by Denny »

It shows up in the HTML, if you have firebug installed. I can't copy it though, to show you.
Denny
BBCoder II
BBCoder II
Posts: 29
Joined: 10 Mar 2010, 17:48

Re: member location on index page

Post 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."')\" >
";
?>
Last edited by cisco007 on 04 Jun 2010, 18:14, edited 1 time in total.
Reason: added code to code bbcode!
User avatar
Oliver
BBCoder III
BBCoder III
Posts: 120
Joined: 07 Mar 2010, 11:55

Re: member location on index page

Post by Oliver »

Very good work denny. When you are ready and code works, please tell us ;)
Locked