4images Forum & Community

4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: nicky9 on May 20, 2008, 10:37:09 PM

Title: {whos_online} random error?
Post by: nicky9 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???
Title: Re: {whos_online} random error?
Post by: † manurom 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.
Title: Re: {whos_online} random error?
Post by: nicky9 on May 20, 2008, 11:04:21 PM
It didn't work.
Title: Re: {whos_online} random error?
Post by: nicky9 on May 20, 2008, 11:05:07 PM
Ok, parsed.... how do I parse it?
Title: Re: {whos_online} random error?
Post by: † manurom on May 20, 2008, 11:06:03 PM
What template do you use, please?
Title: Re: {whos_online} random error?
Post by: † manurom 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
Title: Re: {whos_online} random error?
Post by: KurtW 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
Title: Re: {whos_online} random error?
Post by: † manurom 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
Title: Re: {whos_online} random error?
Post by: surferboy 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
Title: Re: {whos_online} random error?
Post by: Rembrandt 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
Title: Re: {whos_online} random error?
Post by: surferboy on February 24, 2010, 09:41:41 AM
Perfect!  Thank you so much!

Thank you.

Thank you.

Thank you.

- Brian