Author Topic: {whos_online} random error?  (Read 10666 times)

0 Members and 1 Guest are viewing this topic.

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
{whos_online} random error?
« on: May 20, 2008, 10:37:09 PM »
The function {whos_online} doesn't seem to work in all my templates. For example: In FAQ.html it's visible, but not in Top Photos, although it's present in the source code. Very strange???

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: {whos_online} random error?
« Reply #1 on: May 20, 2008, 10:58:49 PM »
Hello;
don't know what your own template is, but try to change in "top.php":
Code: [Select]
$main_template = 'top';

by
Code: [Select]
$templates_used = 'top,whos_online';
$main_template = 'top';

By the way, "whos_online" does not appear in the default "top.html" template page.
Maybe "top.php" is not coded to parse "whos_online"...
I never tried, sorry.

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: {whos_online} random error?
« Reply #2 on: May 20, 2008, 11:04:21 PM »
It didn't work.

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: {whos_online} random error?
« Reply #3 on: May 20, 2008, 11:05:07 PM »
Ok, parsed.... how do I parse it?

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: {whos_online} random error?
« Reply #4 on: May 20, 2008, 11:06:03 PM »
What template do you use, please?

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: {whos_online} random error?
« Reply #5 on: May 20, 2008, 11:10:05 PM »
Ok, parsed.... how do I parse it?
I did not really hope it should work.
I'm not anyway a PHP Guru.Please give me sometime to make some tests, or also, KurtW, Mawenzi or anyother code champ will see your topic and have a solution.

Regards.

manurom

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: {whos_online} random error?
« Reply #6 on: May 21, 2008, 07:59:09 AM »
Hi @

to add the {whos_online} in every template:

- first step from manurom is right  :wink:
- second step:

eg. in top.php
search:
Code: [Select]
define('ROOT_PATH', './'); after add:
Code: [Select]
define('GET_USER_ONLINE', 1);
Finish  :D


Kurt

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: {whos_online} random error?
« Reply #7 on: May 21, 2008, 08:15:13 AM »
Wow!
I knew you should be here, KurtW!
Awesome, as usual!

Hey, Nicky9, trust KurtW. It should work! :D
« Last Edit: May 21, 2008, 09:43:58 AM by manurom »

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: {whos_online} random error?
« Reply #8 on: February 24, 2010, 04:46:09 AM »
Hi -

I am using 1.7.7 and using the default templates.  Have been successful in installing about 5 mods so far. Thank you for all of your work everyone.

I would like to feature the who's online in the left column of the all of the templates.  I was successful in moving the who's online code on the home.html template and it displays just like I want:

<table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{whos_online}</td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_last_action_box}</td>
                    </tr>
                  </table>

But when I paste the same code into the other templates, I only see the user last action box.  I made the changes you outlined in this topic.  Do I need to somehow create a {whos_online_box} somewhere and change my code to add that?  It's confusing because the whos_online code works great as is in the home.html template .

Thanks,

Brian

Rembrandt

  • Guest
Re: {whos_online} random error?
« Reply #9 on: February 24, 2010, 07:36:45 AM »
Hi!

search in index.php:

define
('GET_USER_ONLINE'1);

replace:

//define('GET_USER_ONLINE', 1);


search in includes/constans.php:
// Table names
insert above:
define('GET_USER_ONLINE'1);

search in all template where you want see:
Code: [Select]
<tr>
  <td align="center" class="row1">{user_box}</td>
</tr>
insert below:
Code: [Select]
<tr>
  <td align="center" class="row1">{whos_online}</td>
</tr>

mfg Andi

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: {whos_online} random error?
« Reply #10 on: February 24, 2010, 09:41:41 AM »
Perfect!  Thank you so much!

Thank you.

Thank you.

Thank you.

- Brian