Online/Offline in showteam.php

by linkzy - 10-08-2015, 02:21 PM
i'm so divine
Posts:
6,351
Joined:
Jan 2015
Likes:
319
Credits:
1
Reputation:
172
3 Years of Service
#1
OP
Posted: 10-08-2015, 02:21 PM (This post was last modified: 10-08-2015, 02:31 PM by linkzy.)
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- Best forever .. | v4hl - ;) | Slavowitz | Senpai | Sui | Sensei | H | fdigl |


Posts:
10,793
Joined:
Apr 2015
Likes:
890
Credits:
18,632
Reputation:
166
2 Years of Service
#2
Posted: 10-08-2015, 02:55 PM
Considering you're probably making it for RF, I don't think Sozin will help you.
もうあなたから愛されることも
必要とされることもない
そして私はこうして一人ぼっちで
i'm so divine
Posts:
6,351
Joined:
Jan 2015
Likes:
319
Credits:
1
Reputation:
172
3 Years of Service
#3
OP
Posted: 10-08-2015, 03:08 PM (This post was last modified: 10-08-2015, 03:13 PM by linkzy.)
(10-08-2015, 02: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- Best forever .. | v4hl - ;) | Slavowitz | Senpai | Sui | Sensei | H | fdigl |


Posts:
10,793
Joined:
Apr 2015
Likes:
890
Credits:
18,632
Reputation:
166
2 Years of Service
#4
Posted: 10-08-2015, 03:19 PM
(10-08-2015, 03:08 PM)Believer Wrote:
(10-08-2015, 02: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'?
もうあなたから愛されることも
必要とされることもない
そして私はこうして一人ぼっちで
i'm so divine
Posts:
6,351
Joined:
Jan 2015
Likes:
319
Credits:
1
Reputation:
172
3 Years of Service
#5
OP
Posted: 10-08-2015, 03:27 PM (This post was last modified: 10-08-2015, 03:29 PM by linkzy.)
(10-08-2015, 03:19 PM)Faded Wrote:
(10-08-2015, 03:08 PM)Believer Wrote:
(10-08-2015, 02: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- Best forever .. | v4hl - ;) | Slavowitz | Senpai | Sui | Sensei | H | fdigl |

Nan Ihier Gelair Mordor
Divine
Posts:
2,635
Joined:
Jan 2015
Likes:
321
Credits:
8,602
Reputation:
92
3 Years of Service
#6
Posted: 10-08-2015, 06:42 PM
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.
i'm so divine
Posts:
6,351
Joined:
Jan 2015
Likes:
319
Credits:
1
Reputation:
172
3 Years of Service
#7
OP
Posted: 10-08-2015, 07:00 PM
(10-08-2015, 06: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- Best forever .. | v4hl - ;) | Slavowitz | Senpai | Sui | Sensei | H | fdigl |

The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)