MyBB Tutorials

Online/Offline in showteam.php

Submitted by linkzy, , Thread ID: 8735

Thread Closed
linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
10-08-2015, 03:21 PM
This post was last modified: 10-08-2015, 03:31 PM by linkzy
#1
Hello,
Iam currently using dynamic custom showteam.pgp page by hawk which is shared here. i want to add online/offline beside the username. how can i do it ?

i have tried several method but it shows offline even if the user is online.

Sozin Cuz your pro. i guess you can help me with this :3.
i tried that timecut method too which is something like current time - last active.
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Online/Offline in showteam.php

Faded
Legend
Level:
21
Reputation:
215
Posts:
10.2K
Likes:
1.12K
Credits:
15K
10-08-2015, 03:55 PM
#2
Considering you're probably making it for RF, I don't think Sozin will help you.
[Image: InZ3hGx.png]

RE: Online/Offline in showteam.php

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
10-08-2015, 04:08 PM
This post was last modified: 10-08-2015, 04:13 PM by linkzy
#3
10-08-2015, 03:55 PM
Faded Wrote:
Considering you're probably making it for RF, I don't think Sozin will help you.

well really. iam trying to do it in my localhost and for more information. RF is offline
i want it for myself. and if hawk wants to do it. he knows how to.
ur being so weird and mean.
i know aoki doesn't like RF then why would i even dare to post something for them here ?
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Online/Offline in showteam.php

Faded
Legend
Level:
21
Reputation:
215
Posts:
10.2K
Likes:
1.12K
Credits:
15K
10-08-2015, 04:19 PM
#4
10-08-2015, 04:08 PM
Believer Wrote:
10-08-2015, 03:55 PM
Faded Wrote:
Considering you're probably making it for RF, I don't think Sozin will help you.

well really. iam trying to do it in my localhost and for more information. RF is offline
i want it for myself. and if hawk wants to do it. he knows how to.
ur being so weird and mean.
i know aoki doesn't like RF then why would i even dare to post something for them here ?

>Works for RF
>Asks for dev help
>RF is a copy of NBB
>Asks stuff that's on NBB

You see the pattern right?
How is that being 'mean' and 'weird'?
[Image: InZ3hGx.png]

RE: Online/Offline in showteam.php

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
10-08-2015, 04:27 PM
This post was last modified: 10-08-2015, 04:29 PM by linkzy
#5
10-08-2015, 04:19 PM
Faded Wrote:
10-08-2015, 04:08 PM
Believer Wrote:
10-08-2015, 03:55 PM
Faded Wrote:
Considering you're probably making it for RF, I don't think Sozin will help you.

well really. iam trying to do it in my localhost and for more information. RF is offline
i want it for myself. and if hawk wants to do it. he knows how to.
ur being so weird and mean.
i know aoki doesn't like RF then why would i even dare to post something for them here ?

>Works for RF
>Asks for dev help
>RF is a copy of NBB
>Asks stuff that's on NBB

You see the pattern right?
How is that being 'mean' and 'weird'?

oh really. and then what if i want to try it out and iam not getting it ?
its not something like - iam working for rf and it doesnt mean i want everything for RF. i want to do something for myself too. :rly:

and to be more specific. iam doing it in this codes -

https://nulledbb.com/Thread-Page-ShowTea...ht=Dynamic


rf's staff page looks completely different
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Online/Offline in showteam.php

Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
374
Credits:
11K
10-08-2015, 07:42 PM
#6
Code:
$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];
$status = $db->fetch_array( $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time > '".$timesearch."' AND s.uid ='".$users['uid']."'
") );

$status = empty($status) ? 'Offline' : 'Online';

Put this inside the while loop and use $status in template.

*I did not test it.
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.

RE: Online/Offline in showteam.php

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
10-08-2015, 08:00 PM
#7
10-08-2015, 07:42 PM
Sozin Wrote:
Code:
$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];
$status = $db->fetch_array( $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time > '".$timesearch."' AND s.uid ='".$users['uid']."'
") );

$status = empty($status) ? 'Offline' : 'Online';

Put this inside the while loop and use $status in template.

*I did not test it.

Worked fine mate. Thanks alot Smile
Solved
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |



Users browsing this thread: 1 Guest(s)