MyBB Support

Who's Online In Footer

Submitted by Tutti Frutti, , Thread ID: 65234

Thread Closed
14-12-2017, 09:14 PM
#1
I suck at when it comes to php so forgive me, I'm trying to move board stats and who's online in footer but someone told me it's need a code in global.php or something. If anybody could help me out I'd really appreciate it.

Thank you!

RE: Who's Online In Footer

This post was last modified: 16-12-2017, 12:03 PM by Penny
#2
Tutti Frutti
For example you can load users online from portal.php like this:


  1. Add this code into footer template
    Code:
    <script type="text/javascript">  jQuery(function(){    jQuery(".your_div_class").load("{$mybb->settings['bburl']}/portal.php .your_div_class");  });  </script>

    And
    Code:
    <div class="your_div_class"></div>
    where you want to show it.

  2. Move to portal_whosonline template and add your_div_class for everything like:
    Code:
    <div class="your_div_class">default portal_whosonline content</div>


I will be your website dev - PM

Upgraded by Deleted_44 Heart Eyes
Write if you need some link

Never argue with an idiot. They will only bring you down to their level and beat you with experience

RE: Who's Online In Footer

OP
#3
16-12-2017, 12:01 PM
Penny Wrote:
Tutti Frutti
For example you can load users online from portal.php like this:


  1. Add this code into footer template
    Code:
    <script type="text/javascript">  jQuery(function(){    jQuery(".your_div_class").load("{$mybb->settings['bburl']}/portal.php .your_div_class");  });  </script>

    And
    Code:
    <div class="your_div_class"></div>
    where you want to show it.

  2. Move to portal_whosonline template and add your_div_class for everything like:
    Code:
    <div class="your_div_class">default portal_whosonline content</div>



That's not what I was looking for, I had to do core editing and take codes from index.php to Global.php which I have and was playing with it until I got it to work.

Users browsing this thread: 1 Guest(s)