Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 24
Seite [1] 2 >
Str3ss


Wannabe poster




Beiträge: 20
# Thema - 20.02.2012 um 16:27 Uhr
Hi,

Is there any command to use in the TPL files to show if the user is online?
I tried this: {members:status}, but It didn't do something in my shoutbox.

Thanks!
Inaktiv
autotrudi


Rock the board



Herkunft: Grünow
Beiträge: 93
# Antwort: 1 - 20.02.2012 um 18:56 Uhr
sure, member online : {users:navonline}

here you can find more about this:
http://wiki.clansphere.de/Templates_Platzhalter


------------------
http://geyerstation.de

Inaktiv
|
Koffein


Going for pro




Beiträge: 536
# Antwort: 2 - 20.02.2012 um 18:58 Uhr
I think he wants something that shows the status of the user next to its name.
Like if you have an entry in the shoutbox there should be sth next to the name that shows "ON" "OFF" or sth. like this right?



Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 3 - 20.02.2012 um 18:59 Uhr
Thanks for your help autotrudi, but I want something that Koffein says.


Inaktiv
|
autotrudi


Rock the board



Herkunft: Grünow
Beiträge: 93
# Antwort: 4 - 20.02.2012 um 19:03 Uhr
ahhhhhh sry


------------------
http://geyerstation.de

Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 5 - 21.02.2012 um 16:56 Uhr
No problem Autotrudi, I hope someone can help me with this..


Inaktiv
|
hajo ClanSphere Team


VIP - Poster




Herkunft: Barsbüttel
Beiträge: 9411
# Antwort: 6 - 21.02.2012 um 17:02 Uhr
such commands must be implemented / definied in the corresponding php file that uses it and that may not be the case here.


------------------
ClanSphere - professional clan care starts here

Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 7 - 21.02.2012 um 17:04 Uhr
Can you give me an example and what file please?


Inaktiv
|
hajo ClanSphere Team


VIP - Poster




Herkunft: Barsbüttel
Beiträge: 9411
# Antwort: 8 - 21.02.2012 um 17:23 Uhr
mods/shoutbox/ and there the matching nav... file you use


------------------
ClanSphere - professional clan care starts here

Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 9 - 21.02.2012 um 17:26 Uhr
Yes there's a navlist.php, but how can I get the status of that person that posted a shoutbox message?
I'll want to see HIS/HER status from the poster.. Do you have any code please?


Inaktiv
|
hajo ClanSphere Team


VIP - Poster




Herkunft: Barsbüttel
Beiträge: 9411
# Antwort: 10 - 21.02.2012 um 17:52 Uhr
no sorry, you can maybe copy it from other locations where such status icons are already implemented and paste it there with the needed modifications.


------------------
ClanSphere - professional clan care starts here

Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 11 - 21.02.2012 um 17:55 Uhr
I did it, but doesn't work at all.. I hope a coder can do it for me or give me a 'way' how it works.


Inaktiv
|
Koffein


Going for pro




Beiträge: 536
# Antwort: 12 - 21.02.2012 um 18:16 Uhr
You should have a look at the /mods/users/navonline.php


Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 13 - 21.02.2012 um 18:39 Uhr
I doesn't see anything about status/active/online-offline in that file Koffein.


Inaktiv
|
Koffein


Going for pro




Beiträge: 536
# Antwort: 14 - 21.02.2012 um 19:06 Uhr
With some php-knowledge you could copy'n&paste the code from navonline to your shoutbox and edit it for your need.


Ahhh! In the forums you see Online and Offline! Lets have a look at this data! May you look at /mods/board/thread.php
I will have a look at it later because i dont have the time now, bot normally we should find the needed code somewhere there!


Zuletzt editiert von Koffein am 21.02.2012 um 19:06 Uhr (1x Editiert)
Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 15 - 21.02.2012 um 19:29 Uhr
Thanks! But I found on a couple of places.
But could someone explain me how the TPL syntaxes work? (E.g.: {member:status}, {shoutbox:shoutbox_date&#125

So where does it comes from?

Thanks!


Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 16 - 23.02.2012 um 10:23 Uhr
I've played with the files an other functions that does the same and now I got this script, but he doesn't work at all!
He shows at some users 3 icons (Red, green, red), then on another user (green), etc.

This is the "result":
Click... +-


And my code: http://pastebin.com/9gHNtwJv

I hope someone can help me with this!!


Inaktiv
|
Koffein


Going for pro




Beiträge: 536
# Antwort: 17 - 23.02.2012 um 14:43 Uhr
Hello Str3ss,
i made it for you
BUT be carefully if guests can post, i dont checked this.
Its the code from line 58 ... Have fun



 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
1. / 2. / ... 
 for($i 0$i $count_shoutbox$i++) {
  
$temp preg_replace($pattern,"\\0 ",$data['shoutbox'][$i]['shoutbox_text']);
  
$data['shoutbox'][$i]['shoutbox_text'] = cs_secure($temp,0,1,0);
// Here is the code for the status of the user | use {shoutbox:status} in your tpl-data
  
$user cs_sql_select(__FILE__,'users','users_id','users_nick = \'' cs_sql_escape($data['shoutbox'][$i]['shoutbox_name']) . '\'');
  
$data['users'] = cs_sql_select(__FILE__,'users','users_id, users_laston, users_invisible','users_id =' .$user['users_id']);
  
$data['shoutbox'][$i]['status'] = cs_userstatus($data['users']['users_laston'],$data['users']['users_invisible']);
// end of the status code
  
$data['shoutbox'][$i]['shoutbox_name'] = cs_secure($data['shoutbox'][$i]['shoutbox_name'],0,0,0);
  
$data['shoutbox'][$i]['shoutbox_date'] = cs_date('unix',$data['shoutbox'][$i]['shoutbox_date'],1);


Zuletzt editiert von Koffein am 23.02.2012 um 15:21 Uhr (5x Editiert)
Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 18 - 23.02.2012 um 19:07 Uhr
Hi Koffein,

Thanks for this! It works great, except you forgot the "}" at the end! But with this function I'll get a better view how ClanSphere works!

Thanks.


Inaktiv
|
Koffein


Going for pro




Beiträge: 536
# Antwort: 19 - 23.02.2012 um 19:11 Uhr
Are just registrated users able to post at your shoutbox? I dont know what happens if the status-code tries to get the status of a guest, hadnt have the time yet.

I didnt forget it, its just missing because you had included some more code at you pastebin so i havent closed the tag


Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 20 - 23.02.2012 um 20:23 Uhr
Only regged users ;-)


Inaktiv
|
Antworten: 24
Seite [1] 2 >


Sie müssen sich registrieren, um zu antworten.