• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » [script] User status in chat messages (tag board)
[script] User status in chat messages
Korijs
Posts: 267
Reputation: 5

Message # 1 | 12:16 PM
1. Customize design - Tag Board - Appearance of entries; before all code paste this:

Code
<?if($NUMBER$ == 1)?>       
       <script>       
       var apoallusers = '';       
       $(function() {       
       $.get('/index/62', function(apoget) {       
       aporesult = $('cmd[p="content"]', apoget).text();       
       $(aporesult).find('a').each(function() {       
       apoallusers = apoallusers + $(this).text() + " ";       
       });       
       $('span#apouname').each(function() {       
       if(apoallusers.indexOf($(this).text()) != -1) {       
       $(this).after('<img src="/.s/img/icon/ok.png" height="10px" style="margin-left:5px;" title="Сейчас онлайн" />');       
       };       
       });       
       });       
       });       
       </script>       
       <?endif?>


2. Customize design - Tag Board - Appearance of entries; find NAME code and replace with:

Code
<span id="apouname">$NAME$</span/>


3. Result:

Result gives u a green image - icon showing that user is online



© Apocalypse
Attachments: 4730106.png (21.6 Kb)
Post edited by Korijs - Monday, 2014-12-29, 12:18 PM
Xayaan
Posts: 558
Reputation: 13

Message # 2 | 1:36 PM
Korijs, Thank you for the share. Very useful tutorial. smile
My Skype : xayan123 | My Twitter : @Officialxayaan
uID : - Zayaan Ibrahim | Need a professional design? Check out my Portfolio
Cyberdasm
Posts: 639
Reputation: 7

Message # 3 | 10:27 AM
Korijs, is that a javascript??
1F4BF3B
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 4 | 10:37 AM
Cyberdasm,
Quote Korijs ()
<script>       
       var apoallusers = '';       
       $(function() {       
       $.get('/index/62', function(apoget) {       
       aporesult = $('cmd[p="content"]', apoget).text();       
       $(aporesult).find('a').each(function() {       
       apoallusers = apoallusers + $(this).text() + " ";       
       });       
       $('span#apouname').each(function() {       
       if(apoallusers.indexOf($(this).text()) != -1) {       
       $(this).after('<img src="/.s/img/icon/ok.png" height="10px" style="margin-left:5px;" title="Сейчас онлайн" />');       
       };       
       });       
       });       
       });       
       </script>       

This is JavaScript. It looks like a get-API method, but it isn't.

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ed05
Posts: 556
Reputation: 7

Message # 5 | 7:31 PM
Korijs, thanks biggrin
!
fadly
Posts: 73
Reputation: 0

Message # 6 | 3:35 AM
can use on chat box??? how to use on chat box
Cyberdasm
Posts: 639
Reputation: 7

Message # 7 | 6:13 AM
fadly, yes you can use that on tagboard or chatbox just insert that code before the chatbox code.
1F4BF3B
uCoz Community » For Webmasters » Custom Solutions » [script] User status in chat messages (tag board)
  • Page 1 of 1
  • 1
Search: