+COOLPIX Posted May 8 Report Share Posted May 8 Salut! Cine ma poate ajuta, sa extrag variabila din widget. Se va intelege mai bine din poza: Eu doresc sa extrag doar partea cu citi membri sunt online pe forum, sa sa o pot integra pe orice parte a forumului, mai exact in globalTemplate. Multumes! Quote Link to comment Share on other sites More sharing options...
0 +Juliano Dillon Posted May 9 Report Share Posted May 9 Variabila in sine nu ai cum sa o extragi, ce poti face in schimb e sa utilizezi javascript sa ti-o citeasca de acolo si sa ti-o puna unde vrei tu in globalTemplate, cauta pe net ca gasesti repede, eu nu le mai am deloc cu js si nu vreau sa-ti scriu vreo prostie de cod. Quote Link to comment Share on other sites More sharing options...
0 +COOLPIX Posted May 12 Author Report Share Posted May 12 On 5/9/2023 at 12:32 PM, Juliano Dillon said: Variabila in sine nu ai cum sa o extragi, ce poti face in schimb e sa utilizezi javascript sa ti-o citeasca de acolo si sa ti-o puna unde vrei tu in globalTemplate, cauta pe net ca gasesti repede, eu nu le mai am deloc cu js si nu vreau sa-ti scriu vreo prostie de cod. Am asa ceva, dar nu reusesc. /* Init */ $members = array(); $anonymous = 0; $users = \IPS\Session\Store::i()->getOnlineUsers( \IPS\Session\Store::ONLINE_MEMBERS, 'desc', NULL, NULL, TRUE ); foreach( $users as $row ) { switch ( $row['login_type'] ) { /* Not-anonymous Member */ case \IPS\Session\Front::LOGIN_TYPE_MEMBER: if ( $row['member_name'] ) { $members[ $row['member_id'] ] = $row; } break; /* Anonymous member */ case \IPS\Session\Front::LOGIN_TYPE_ANONYMOUS: $anonymous += 1; break; } } $memberCount = \count( $members ); echo $memberCount; Quote Link to comment Share on other sites More sharing options...
0 +Juliano Dillon Posted May 13 Report Share Posted May 13 Pai asta iti spun, nu ai cum sa extragi variabila din template-ul aplicatiei pentru ca nu ti-o va recunoaste, aplicatia se foloseste de numarul total al membrilor si verifica cati au statusul de "Online" activ, singura varianta e sa utilizezi javascript pentru a lua valoarea din acel "span", "div", "li" etc. al widget-ului. Quote Link to comment Share on other sites More sharing options...
Question
+COOLPIX
Salut!
Cine ma poate ajuta, sa extrag variabila din widget.
Se va intelege mai bine din poza:
Eu doresc sa extrag doar partea cu citi membri sunt online pe forum, sa sa o pot integra pe orice parte a forumului, mai exact in globalTemplate.
Multumes!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.