Page 1 of 11
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: 246
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(22Kb)
Post edited by Korijs - Monday, 2014-12-29, 12:18 PM
Xayaan
Posts: 555
Reputation: 14
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: 583
Reputation: 3
Message # 3 | 10:27 AM
Korijs, is that a javascript??
1F4BF3B

admin@lizeal.tk
www.lizeal.tk
bigblog
REEEEEE
Posts: 1329
Reputation: 63
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.

i breathe... sometimes
Ed05
Posts: 556
Reputation: 7
Message # 5 | 7:31 PM
Korijs, thanks biggrin
!
fadly
Posts: 45
Reputation: 0
Message # 6 | 3:35 AM
can use on chat box??? how to use on chat box
Cyberdasm
Posts: 583
Reputation: 3
Message # 7 | 6:13 AM
fadly, yes you can use that on tagboard or chatbox just insert that code before the chatbox code.
1F4BF3B

admin@lizeal.tk
www.lizeal.tk
uCoz Community » For Webmasters » Custom Solutions » [script] User status in chat messages (tag board)
Page 1 of 11
Search: