Welcome, Guest. Please Login or Register.
May 10, 2025, 12:54:56 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  "Online Users" in a new row in template.php? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: "Online Users" in a new row in template.php?  (Read 2259 times)
anibal
Jr. Member
**
Posts: 83


Yo

WWW
"Online Users" in a new row in template.php?
« on: January 30, 2003, 09:59:12 AM »
Reply with quote

Hello to all, is it possible to create a mod that can modify the template.php file to add a new line or row and to place the function there "Online Users?" , is that possible?
 
Because I find that it is better does this way one realize this way, who are in it lines while this seeing the topics.... is that come in several forums...
 
 
Greetings   ;D

for example:

« Last Edit: January 30, 2003, 10:44:02 AM by anibal » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:"Online Users" in a new row in template.php?
« Reply #1 on: January 30, 2003, 09:16:05 PM »
Reply with quote

its editable in BoardIndex.php, not your forum template :)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
anibal
Jr. Member
**
Posts: 83


Yo

WWW
Re:"Online Users" in a new row in template.php?
« Reply #2 on: January 30, 2003, 11:45:53 PM »
Reply with quote

Quote from: Spaceman-Spiff on January 30, 2003, 09:16:05 PMits editable in BoardIndex.php, not your forum template :)

Spaceman-Spiff, you can give me an example of as making it, please!!... because I have opened the file and I am lost   ;D

 ::)
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:"Online Users" in a new row in template.php?
« Reply #3 on: January 31, 2003, 05:17:31 AM »
Reply with quote

here if u want to show it in EVERY page in your forum:
open Subs.php, search for "function yytop", and put this inside the brackets: { }
  global $db_prefix, $txt, $scripturl;
 
  // load the number of users online right now
  $guests = 0;
  $tmpusers = array();
  $request3 = mysql_query("
     SELECT m.memberName AS identity,  m.realName,  m.memberGroup
     FROM {$db_prefix}log_online AS lo
        LEFT JOIN {$db_prefix}members AS m ON (m.ID_MEMBER=lo.identity)
     WHERE 1
     ORDER BY logTime DESC") or database_error(__FILE__, __LINE__);
  while ($tmp = mysql_fetch_assoc($request3))
  {
     $identity = $tmp['identity'];
     $request4 = mysql_query("SELECT realName, memberGroup FROM {$db_prefix}members WHERE (memberName='$identity') LIMIT 1") or database_error(__FILE__, __LINE__);
     if (mysql_num_rows($request4) > 0){
        $tmp2 = mysql_fetch_array($request4);
        if ($tmp2['memberGroup'] == "Administrator")
           $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"red\">$tmp2[realName]</font></a>";
        elseif ($tmp2['memberGroup']=="Global Moderator")
           $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"blue\">$tmp2[realName]</font></a>";
        elseif ($tmp2['memberGroup']=="YaBB SE Developer")
           $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"green\">$tmp2[realName]</font></a>";
        elseif ($tmp2['memberGroup']=="Mod Team")
           $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"orange\">$tmp2[realName]</font></a>";
        else
           $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\">$tmp2[realName]</a>";
     }
        else
           $guests ++;
  }
  $users = '<font size="1">' . implode(', ', $tmpusers) . '</font>';
  $numusersonline = sizeof($tmpusers);
  echo $guests . ' ' . $txt[141] . ', ' . $numusersonline . ' ' . $txt[142] . '<br />' . $users;


in your template, put <yabb top> somewhere, and u'll have that ;)
« Last Edit: March 20, 2003, 06:31:19 AM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
anibal
Jr. Member
**
Posts: 83


Yo

WWW
Re:"Online Users" in a new row in template.php?
« Reply #4 on: January 31, 2003, 05:31:50 AM »
Reply with quote

thanks Spaceman-Spiff !   :)
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:"Online Users" in a new row in template.php?
« Reply #5 on: January 31, 2003, 06:07:15 AM »
Reply with quote

Another option is to make your own yy function and then you can place it as a tag where ever you wish in your template.
Logged

Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:"Online Users" in a new row in template.php?
« Reply #6 on: January 31, 2003, 08:50:27 AM »
Reply with quote

yup, i just did that cuz yytop and yybottom are not used
i've also noticed function phphighlight() that's not used in YSE, but exists in Subs.php
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:"Online Users" in a new row in template.php?
« Reply #7 on: February 22, 2003, 02:53:27 PM »
Reply with quote

Is this the same as "users online today" mod.
That was a great mod, but I cannot find it for SE1.5.1?
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:"Online Users" in a new row in template.php?
« Reply #8 on: February 22, 2003, 02:54:25 PM »
Reply with quote

Sorry about this
I keep getting server timeout when I hit "post"
« Last Edit: February 22, 2003, 02:56:41 PM by GWP » Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:"Online Users" in a new row in template.php?
« Reply #9 on: February 22, 2003, 08:42:23 PM »
Reply with quote

Quote from: GWP on February 22, 2003, 02:53:27 PM
Is this the same as "users online today" mod.
That was a great mod, but I cannot find it for SE1.5.1?

no, this mod only shows the current ppl online, like the one in BoardIndex info center
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:"Online Users" in a new row in template.php?
« Reply #10 on: February 22, 2003, 08:49:34 PM »
Reply with quote

Thanks
i'll just have to wait for someone to update that mod for 1.5.1 (hint) :)
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:"Online Users" in a new row in template.php?
« Reply #11 on: February 22, 2003, 08:50:47 PM »
Reply with quote

if u have found the mod, u can try contacting the mod writer to update it ;)
this reminds me to update my mods... ^^;
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:"Online Users" in a new row in template.php?
« Reply #12 on: February 25, 2003, 09:22:49 AM »
Reply with quote

I have tried to contact the original author of the Sp.1.1 mod "users online today.mod" his name is Daicogra.
His website : http://www.daicogra.de is not longer available, so have no way of contacting him.
Is it acceptable to ask someone else to mod someone else's mod??
It is only 2 files english.lng and boardindex.pl
I still have the mod on my comp.
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  "Online Users" in a new row in template.php? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.015 seconds with 20 queries.