Username Color Mod - Question

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Locked
User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Username Color Mod - Question

Post by EnjoyNIRVANA! »

hello everyone....

i have phpbb fetch all + Username Color Mod installed and i want that the Admin and Moderator color is the same as on the index.php - i just want it on my hp.php

http://www.nirvanabootlegs.com/hp.php

do u know what i mean? if yes, is it possible?
~andrew

kooky
Registered User
Posts: 510
Joined: Wed Dec 11, 2002 7:15 pm
Location: Where's Your Head At
Contact:

Post by kooky »

in your file something.php, there is a SELECT u.user_id, u.username.... ?
Add the row user_level.
Then, you should have a variable which defines the username. There, you need to add the switch which introduces the levels+colors.


PS: you should ask in the MODs' topic
My Contribs (included the User Class, ModCP...) | My blog

My Station: Image :: My Browser: Image

User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Post by EnjoyNIRVANA! »

no, there´s not SELECT u.user_id, u.username ... or something like that! it´s NOT a forum page, no phpbb. just a normal php page... :?

kooky
Registered User
Posts: 510
Joined: Wed Dec 11, 2002 7:15 pm
Location: Where's Your Head At
Contact:

Post by kooky »

But how do you display the username?
There is a query or a variable!!!

You are asking for the box at the bottom and right corner? EJN COMMUNITY
My Contribs (included the User Class, ModCP...) | My blog

My Station: Image :: My Browser: Image

User avatar
-jm-
Former Team Member
Posts: 2025
Joined: Fri Jul 16, 2004 10:56 am
Location: Inside the mind of the machine
Contact:

Post by -jm- »

Maybe you should look for that string in the file where you fetch data from your forum.
-jm- (a.k.a. juanm) - *NO* private support
Hacked?
With so many beautiful colors in the world it’s a shame to make everything black and white - Dennis R. Little
my links: tips&stuff :: stuff only

User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Post by EnjoyNIRVANA! »

this is how it looks on my hp.php:

Image

and i want it to look like this: (the admin is bold and yellow and the mod is bold and green...)

Image

and here´s my code from the hp.php:

Code: Select all

<?php
//
// This path points to the directory where phpBB is installed. Do
// not enter an URL here. The path must end with a trailing
// slash.
//
// Examples:
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ccc/
// --> $phpbb_root_path = './';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
// --> $phpbb_root_path = './ccc/';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
// --> $phpbb_root_path = '../ccc/';
//

$phpbb_root_path = '';

define ('IN_PHPBB', true);

if (!file_exists($phpbb_root_path . 'extension.inc'))
{
    die ('<tt><b>phpBB Fetch All:</b>
          $phpbb_root_path is wrong and does not point to your forum.</tt>');
}

//
// phpBB related files
//

include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);

//
// Fetch All related files - we do need all these because the portal is a
// huge example
//

include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/stats.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/users.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/polls.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/forums.' . $phpEx);

//
// start session management
//

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

//
// since we are demonstrating span pages we need to set the page offset
//

if (isset($HTTP_GET_VARS['start']) or isset($HTTP_POST_VARS['start']))
{
	$CFG['posts_span_pages_offset'] = isset($HTTP_GET_VARS['start']) ? $HTTP_GET_VARS['start'] : $HTTP_POST_VARS['start'];
	if (!intval($CFG['posts_span_pages_offset']))
	{
		$CFG['posts_span_pages_offset'] = 0;
	}
}

// fetch new posts since last visit
$new_posts = phpbb_fetch_new_posts();

// fetch user online, total posts, etc
$stats = phpbb_fetch_stats();

// fetch online users
$online = phpbb_fetch_online_users();

// fetch five users by total posts
$top_poster = phpbb_fetch_top_poster();

// fetch a random user
$random_user = phpbb_fetch_random_user();

// fetch forum structure
$forums = phpbb_fetch_forums();

// fetch user of a specific group
// This function is disabled because fetching without a specific
// user group can produces a lot of results (all registered users)
// and this may result in an internal server error. If you want to
// use this feature please specify the group id.
#$member = phpbb_fetch_users();

// fetch a poll
$poll = phpbb_fetch_poll();

// fetch a single topic by topic id
// You will need to specify a certain topic id to use this function.
// The first post of that topic will be displayed in a box to the upper right.
#$topic = phpbb_fetch_topics();

// fetch latest postings
$CFG['posts_trim_topic_number'] = 25;
$recent = phpbb_fetch_posts(null, POSTS_FETCH_LAST);

// fetch postings
$CFG['posts_trim_topic_number'] = 0;
$CFG['posts_span_pages']        = true;
$news = phpbb_fetch_posts();

//
// disconnect from the database
//

phpbb_disconnect();

?>
<html>
<head>
<title> * enjoyNIRVANA ~ EJN * Home/news</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a:link {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFCC; text-decoration: none}
a:active {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; text-decoration: none}
a:visited {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFCC; text-decoration: none}
a:hover {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; text-decoration: underline}
td {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; text-decoration: none}
select {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFCC; text-decoration: none}
input {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; border: 1px #FFFFFF solid; background-color: #000000}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" background="images/bgr.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
  <table width="41%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="89%"><img src="images/spacer.gif" width="569" height="1"></td>
      <td width="0%"><img src="images/spacer.gif" width="30" height="1"></td>
      <td width="11%"><img src="images/spacer.gif" width="73" height="1"></td>
    </tr>
    <tr> 
      <td width="89%" bgcolor="#000000"><img src="images/top1.jpg" width="569" height="92"></td>
      <td rowspan="4" width="0%">&nbsp;</td>
      <td rowspan="6" background="images/rightejn.jpg">&nbsp;</td>
    </tr>
    <tr> 
      <td width="89%" bgcolor="#000000"><img src="images/top2.jpg" width="228" height="21"><a href="hp.php"><img src="images/m_home.jpg" width="36" height="21" border="0" alt="EJN home"></a><a href="index.php"><img src="images/m_forums.jpg" width="47" height="21" border="0" alt="EJN forums"></a><a href="pictures.php"><img src="images/m_pics.jpg" width="56" height="21" border="0" alt="EJN pictures"></a><a href="bootleg.php"><img src="images/m_bootlegs.jpg" width="61" height="21" border="0" alt="EJN bootlegs"></a><a href="lyrics.php"><img src="images/m_lyrics.jpg" width="44" height="21" border="0" alt="EJN lyrics"></a><a href="tabs.php"><img src="images/m_tabs.jpg" width="36" height="21" border="0" alt="EJN tabs"></a><?php 
	  
	  if ($userdata['session_logged_in']) 
	  { ?><a href="<?php echo append_sid($phpbb_root_path . 'login.php?logout=true&sid=') . $userdata['session_id']; ?>"><img src="images/m_logout.jpg" width="61" height="21" border="0" alt="logout"></a></td>
       <?php } else { ?><a href="login.php"><img src="images/m_login.jpg" width="61" height="21" border="0" alt="login"></a><?php } ?></tr>
    <tr> 
      <td width="89%" bgcolor="#000000"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="46%"><img src="images/top3.jpg" width="282" height="50"></td>
            <td width="54%" valign="top"><font color="#CCCC99" size="2"> 
              <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline">
                <tr> 
                  <td class="row1" align="left" width="100%"> 
                    <!-- USER -->
                    <?php if ($userdata['session_logged_in']) { ?>
                    <table cellpadding="0" cellspacing="0" width="100%">
                      <tr> 
                        <td valign="middle"> <span class="gensmall"> <br>
                          Welcome back, <b> 
                          <?php echo $userdata['username']; ?>
                          </b><a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $userdata['user_id']); ?>"><img src="http://www.nirvanabootlegs.com/templates/NoseBleed/images/info.gif" width="12" height="13" border="0" alt="View your Profile"></a> 
                          <a href="mail.php"><img src="http://www.nirvanabootlegs.com/templates/NoseBleed/images/mail.gif" width="12" height="13" border="0" alt="Send free eMails..."></a> 
                          <br />
                          &#149; <a href="<?php echo append_sid($phpbb_root_path . 'privmsg.php?folder=inbox'); ?>"title="Check your Inbox"> 
                          <?php
if ($userdata['user_new_privmsg'] == 0) {
echo $lang['No_new_pm']; }
elseif ($userdata['user_new_privmsg'] == 1) {
echo printf($lang['New_pm'], $userdata['user_new_privmsg']); }
else {
printf($lang['New_pms'], $userdata['user_new_privmsg']); }
?>
                          </a> * <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=editprofile'); ?>"title="Edit your Profile">Edit 
                          Profile</a> </span> * <a href="<?php echo append_sid($phpbb_root_path . 'search.php?search_id=newposts'); ?>"title="View new Posts"> 
                          new Posts ( 
                          <?php echo $new_posts['total']; ?>
                          )</a> </td>
                      </tr>
                    </table>
                    <?php } else { ?>
                    <table cellpadding="0" cellspacing="0" width="100%">
                      <tr> 
                        <td valign="middle"> <span class="gensmall"> <b><br>
                          Welcome to enjoyNIRVANA.com</b><br>
                          Please <a href="login.php">Login</a> or <a href="new_member.php">Register</a> 
                          </span> </td>
                      </tr>
                    </table>
                    <?php } ?>
                    <!-- USER -->
                  </td>
                </tr>
              </table>
              </font></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr> 
      <td width="89%" bgcolor="#000000"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td> 
              <table width="96%" cellpadding="2" cellspacing="1" border="0" class="forumline" align="center">
                <tr> 
                  <td> 
                    <div align="center"> 
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td width="49%" valign="top"> 
                            <div align="center"></div>
                            <div align="left"> <span class="gen"><b><img src="images/back.gif" width="9" height="9"> 
                              </b><a href="javascript:history.go(-1)"><font color="#FFFF00">back</font></a><b> 
                              <br>
                              <b><font size="3">EJN HOME</font></b></b><font size="3">/NEWS<br>
                              <br>
                              <a href="http://top25.nirvana-music.com/in.php?site=1082390264" target="_blank"><img src="images/top25button4.gif" width="88" height="31" border="0"></a> 
                              <br>
                              <br>
                              </font></span><span class="gen"><font size="3"> 
                              </font></span> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0" height="213">
                                <tr> 
                                  <td width="96%" valign="top"> <span class="gen"><font size="3"></font></span> 
                                    <div align="left"></div>
                                    <p><font color="#FFFFCC"><b><font size="2">August 
                                      31, 2005</font></b></font><br>
                                      Well, it&acute;s done, the new Design is 
                                      online. PLEASE leave your comments <a href="http://www.nirvanabootlegs.com/viewtopic.php?t=712">here</a>!</p>
                                    <p><font color="#FFFFCC"><b><font size="2">August 
                                      03, 2005</font></b></font><br>
                                      I&acute;ve added a <a href="auction.php">Auction 
                                      Section</a> to the Site. Read more <a href="http://www.nirvanabootlegs.com/viewtopic.php?t=568">here</a> 
                                      (you must be logged in) </p>
                                    <p><font color="#FFFFCC"><b><font size="2">July 
                                      21, 2005</font></b></font><br>
                                      New Bootleg is online: January 19-21, 1993 
                                      - Ariola Ltda BMG, Rio de Janeiro, BR. And 
                                      hey...Some Videos are back... -></p>
                                    <p><font color="#FFFFCC"><b><font size="2">July 
                                      11, 2005</font></b></font><br>
                                      It seems the Site is working again. I had 
                                      to do some style changes in the forum and 
                                      i removed that motherfucking User Photo 
                                      Gallery which caused the error...please 
                                      report bugs (if you found one..;-)</p>
                                    <p><font color="#FFFFCC"><b><font size="2">July 
                                      6, 2005</font></b></font><br>
                                      A new feature has been added for the EJN 
                                      Community: The User Photo Gallery. Every 
                                      User has an own Gallery, which can be seen 
                                      by all other Members... <a href="http://www.nirvanabootlegs.com/viewtopic.php?t=323">Please 
                                      leave your comments and/or ideas here</a>.<br>
                                      And don&acute;t forget to VOTE (click on 
                                      the button at the right) for EJN... <br>
                                    </p>
                                    <p><font color="#FFFFCC"><b><font size="2">July 
                                      1, 2005</font></b></font><br>
                                      Well, i&acute;ve just changed the Layout 
                                      a bit. I wanted to make it more comfortable. 
                                      Please <a href="http://www.nirvanabootlegs.com/viewtopic.php?t=297">leave 
                                      your comments here</a>.</p>
                                    <p><font color="#FFFFCC" size="2"><b>June 
                                      29, 2005</b></font><br>
                                      A new Bootleg is online: 06-24-92 - check 
                                      the Bootleg Section</p>
                                    <p>Happy 24th Birthday to my brothe<font size="2" color="#FFFFCC">r!</font></p>
                                  </td>
                                  <td width="4%">&nbsp;</td>
                                </tr>
                              </table>
                              <p><span class="gen"><font size="3"> </font></span></p>
                            </div>
                          </td>
                          <td width="51%" valign="top"> 
                            <table width="100%" border="0" cellspacing="1" cellpadding="2">
                              <tr> 
                                <td colspan="2"><span class="gensmall"></span> 
                                  <!-- LOGIN -->
                                  <?php if (!$userdata or !$userdata['session_logged_in']) { ?>
                                  <table width="100%" border="0" cellspacing="1" cellpadding="2">
                                    <form action="login.php" method="post" target="_top">
                                      <tr> 
                                        <td width="38%"> Username:<br>
                                          <input type="text" name="username" size="19">
                                        </td>
                                        <td width="4%"><img src="images/spacer_nocol.gif" width="15" height="8"></td>
                                        <td width="58%"> Password:<br>
                                          <input type="password" name="password" size="19">
                                        </td>
                                      </tr>
                                      <tr> 
                                        <td colspan="3"> 
                                          <input type="submit" class="mainoption" name="login" value=" <?php echo $lang['Login']; ?> " />
                                          <img src="images/spacer_nocol.gif" width="20" height="8"> 
                                          <a href="new_member.php">Register</a> 
                                          ** <a href="profile.php?mode=sendpassword">Forgot 
                                          your Password?</a> </td>
                                      </tr>
                                    </form>
                                  </table>
                                  <?php } ?>
                                  <!-- LOGIN -->
                                  <span class="gensmall"><br>
                                  <?php if ($userdata['session_logged_in']) { ?>
                                  </span><span class="gen"> 
                                  <?php printf($lang['You_last_visit'], create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone'])); ?>
                                  </span><span class="gensmall"> </span></td>
                              </tr>
                              <tr> 
                                <td width="58%" valign="top"> 
                                  <p><span class="gen"> </span></p>
                                  <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline">
                                    <tr> 
                                      <td class="catHead"><b>EJN</b> Seach:</td>
                                    </tr>
                                    <tr> 
                                      <td class="row1" align="center" width="100%"> 
                                        <form action="<?php echo append_sid($phpbb_root_path . 'search.php?mode=results'); ?>" method="post" target="_top">
                                          <div align="left"> 
                                            <input type="text" class="post" name="search_keywords22" size="15" />
                                            <input type="submit" class="mainoption" name="login22" value=" GO " />
                                            <br />
                                            <span class="gensmall"> <a href="<?php echo append_sid($phpbb_root_path . 'search.php'); ?>"> 
                                            <?php echo $lang['Search_options']; ?>
                                            <br>
                                            </a></span> </div>
                                        </form>
                                      </td>
                                    </tr>
                                  </table>
                                </td>
                                <td width="42%" valign="top"> 
                                  <div align="center"><br>
                                    <?php echo phpbb_avatar_image($userdata['user_avatar_type'], $userdata['user_avatar']); ?>
                                  </div>
                                </td>
                              </tr>
                              <tr> 
                                <td colspan="2"> 
                                  <?php } ?>
                                  <br>
                                  <table width="100%" border="1" cellspacing="1" cellpadding="1" bgcolor="#333333" bordercolor="#666666">
                                    <tr> 
                                      <td> 
                                        <table width="100%" border="0" cellspacing="1" cellpadding="1">
                                          <tr> 
                                            <td> 
                                              <div align="center"><b>EJN</b> VIDEOS</div>
                                            </td>
                                          </tr>
                                        </table>
                                      </td>
                                    </tr>
                                  </table>
                                  <br>
                                </td>
                              </tr>
                            </table>
                            <table width="100%" border="0" cellpadding="2" cellspacing="1">
                              <tr> 
                                <td valign="top" width="32%"><img src="images/videos/you_know_youre_right.jpg" width="140" height="91"></td>
                                <td valign="top" width="68%"> 
                                  <!-- USER -->
                                  <?php if ($userdata['session_logged_in']) { ?>
                                  <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr> 
                                      <td valign="middle"> <span class="gensmall"> 
                                        <b>Download Video:</b> <br>
                                        <a href="http://www.mysoftstore.de/nirvanabootlegs/you_know_you%B4re_right.mpeg">You 
                                        Know You&acute;re Right</a><br>
                                        <b>Released: </b><br>
                                        10/02<br>
                                        <b>Director: </b><br>
                                        Chris Hafner </span></td>
                                    </tr>
                                  </table>
                                  <?php } else { ?>
                                  <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr> 
                                      <td valign="middle"> <span class="gensmall"> 
                                        <b>Download Video:</b> <br>
                                        Please <a href="login.php">LogIn</a> or 
                                        <a href="new_member.php">Register</a> 
                                        </span> </td>
                                    </tr>
                                  </table>
                                  <?php } ?>
                                  <!-- USER -->
                                </td>
                              </tr>
                            </table>
                            <br>
                            <table width="100%" border="0" cellpadding="2" cellspacing="1">
                              <tr> 
                                <td valign="top" width="32%"><img src="images/videos/sliver.jpg" width="140" height="91"></td>
                                <td valign="top" width="68%"> 
                                  <!-- USER -->
                                  <?php if ($userdata['session_logged_in']) { ?>
                                  <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr> 
                                      <td valign="middle"> <span class="gensmall"> 
                                        <b>Download Video:</b> <br>
                                        <a href="http://www.mysoftstore.de/nirvanabootlegs/sliver.mpeg">Sliver</a><br>
                                        <b>Released: </b><br>
                                        03/93<br>
                                        <b>Director: </b><br>
                                        Kevin Kerslake </span></td>
                                    </tr>
                                  </table>
                                  <?php } else { ?>
                                  <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr> 
                                      <td valign="middle"> <span class="gensmall"> 
                                        <b>Download Video:</b> <br>
                                        Please <a href="login.php">LogIn</a> or 
                                        <a href="new_member.php">Register</a> 
                                        </span> </td>
                                    </tr>
                                  </table>
                                  <?php } ?>
                                  <!-- USER -->
                                </td>
                              </tr>
                            </table>
                            <br>
                            <table width="100%" border="0">
                              <tr> 
                                <td> 
                                  <table width="100%" border="1" cellspacing="1" cellpadding="1" bgcolor="#333333" bordercolor="#666666">
                                    <tr> 
                                      <td> 
                                        <table width="100%" border="0" cellspacing="1" cellpadding="1">
                                          <tr> 
                                            <td> 
                                              <div align="center"><b>EJN</b> COMMUNITY</div>
                                            </td>
                                          </tr>
                                        </table>
                                      </td>
                                    </tr>
                                  </table>
                                  <p><img src="http://www.nirvanabootlegs.com/templates/NoseBleed/images/top_users.gif" width="150" height="25" border="0"><br>
                                    <!-- ONLINE USERS -->
                                    <?php if (isset($online)) { ?>
                                  <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
                                    <tr> 
                                      <td class="row1" align="left" width="100%"> 
                                        <p><span class="gensmall"> 
                                          <?php if ($stats['user_online'] - $i == 1) { printf($lang['Guest_user_total'], $stats['user_online'] - $i); }
 else { printf($lang['Guest_users_total'], $stats['user_online'] - $i); } ?>
                                          </span> <br>
                                          <b>Registered Members:</b><br>
                                          <span class="gensmall"> 
                                          <?php for ($i = 0; $i < count($online); $i++) { ?>
                                          <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $online[$i]['user_id']); ?>"> 
                                          <?php echo $online[$i]['username'];?>
                                          </a> 
                                          <?php if ($i < count($online) - 1) { ?>
                                          , 
                                          <?php } ?>
                                          <?php } ?>
                                          <?php if ($i) { ?>
                                          <?php } ?>
                                          <br>
                                          <br>
                                          <?php printf($lang['Posted_articles_total'], $stats['total_posts']); ?>
                                          <br />
                                          <?php printf($lang['Registered_users_total'], $stats['total_users']); ?>
                                          <br />
                                          <?php printf($lang['Newest_user'], '<a href="' . append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $stats['user_id']) . '">', $stats['username'], '</a>'); ?>
                                          </span></p>
                                      </td>
                                    </tr>
                                  </table>
                                  <?php } ?>
                                  <!-- ONLINE USERS -->
                                </td>
                              </tr>
                            </table>
                            <!-- RECENT -->
                            <?php if (isset($recent)) { ?>
                            <table width="100%" cellpadding="6" cellspacing="1" border="0" class="forumline">
                              <tr> 
                                <td class="catHead"><span class="cattitle"><b><font color="#FFFFCC" size="2">Last 
                                  active Topics</font></b></span></td>
                              </tr>
                              <tr> 
                                <td class="row1" align="left" width="100%"> <span class="gensmall"> 
                                  <?php for ($i = 0; $i < count($recent); $i++) { ?>
                                  <?php echo create_date($board_config['default_dateformat'], $recent[$i]['post_time'], $board_config['board_timezone']); ?>
                                  <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $recent[$i]['user_id']); ?>"> 
                                  <?php echo $recent[$i]['username']; ?>
                                  </a><br />
                                  <img src="<?php echo $phpbb_root_path; ?>templates/NoseBleed/images/icon_latest_reply.gif" border="0" align="absmiddle" /> 
                                  <a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?p=' . $recent[$i]['post_id'] . '#' . $recent[$i]['post_id']); ?>"><b> 
                                  <?php echo $recent[$i]['topic_title']; ?>
                                  <?php if ($recent[$i]['topic_trimmed']) { echo '...'; } ?>
                                  </b></a><br />
                                  <?php } ?>
                                  </span> </td>
                              </tr>
                            </table>
                            <?php } ?>
                            <!-- RECENT -->
                          </td>
                        </tr>
                      </table>
                    </div>
                  </td>
                </tr>
                <tr> 
                  <td bgcolor="#666666"><img src="images/spacer_nocol.gif" width="30" height="1"></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="right"> 
                      <?php

$COUNT_FILE = "hitcounter.dat";

if (file_exists($COUNT_FILE)) {
	$fp = fopen("$COUNT_FILE", "r+");
	flock($fp, 1);
	$count = fgets($fp, 4096);
	$count += 1; 
	fseek($fp,0);
	fputs($fp, $count);
	flock($fp, 3);
	fclose($fp);
} else {
	echo "Can't find file, check '\$file'<BR>";
}

?>
                      <!- enjoyNIRVANA.com -->
                      <left><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                      enjoyNIRVANA.com - Hits:</font> <b> 
                      <?php echo $count; ?>
                      <br>
                      </b><a href="links.php">Links</a><b> ** </b><a href="impressum.php">Webmaster</a><b> 
                      ** </b><a href="contact.php">Contact</a></div>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr> 
      <td width="89%"><img src="images/bottom.jpg" width="569" height="19"></td>
      <td width="0%">&nbsp;</td>
    </tr>
  </table>
</div>
</body>
</html>

kooky
Registered User
Posts: 510
Joined: Wed Dec 11, 2002 7:15 pm
Location: Where's Your Head At
Contact:

Post by kooky »

So the SELECT must be in:
stats.php OR
users.php

One of them would refer to the who's online...

i don't really like this type of method, if phpBB uses a PHP template, it's not to mix up PHP with HTML :?
My Contribs (included the User Class, ModCP...) | My blog

My Station: Image :: My Browser: Image

User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Post by EnjoyNIRVANA! »

would this be correct? it does not work... :?

from the users.php

Code: Select all

function phpbb_fetch_online_users()
{
	global $CFG;

	$sql = 'SELECT u.user_id, u.user_level, u.username, u.user_allow_viewonline, 
	            s.session_logged_in, s.session_time
				FROM ' . USERS_TABLE    . ' u, ' . SESSIONS_TABLE . ' s
				WHERE u.user_id = s.session_user_id
					AND s.session_time >= '
						. (time() - $CFG['users_session_time']) . '
				ORDER BY u.username ASC';

    // Start add - Username Color Mod
		switch ( $row['user_level'] )
		{
			case ADMIN:
				$mod_username_color = '<b>' . $row['username'] . '</b>';
				$style_color = ' style="color:#' . $theme['fontcolor3'] . '"';
				break;
			case MOD:
				$mod_username_color = '<b>' . $row['username'] . '</b>';
				$style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
				break;
			default:
				$mod_username_color = $row['username'];
				$style_color = '';
				break;
		}
		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color . '>' . $mod_username_color . '</a>';
		// End add - Username Color Mod

	$result = phpbb_fetch_rows($sql);

	//
	// delete hidden and guest users
	//

	$cleanup = array();
	$prev_user = 0;

	for ($i = 0; $i < count($result); $i++)
	{
    	if ($result[$i]['session_logged_in'])
		{
			$user_id = $result[$i]['user_id'];
			if ($user_id != $prev_user)
			{
				if ($result[$i]['user_allow_viewonline'])
				{
					$cleanup[] = $result[$i];
				}
				$prev_user = $user_id;
			}
		}
	}

	return $cleanup;
} // end func phpbb_fetch_online_users

kooky
Registered User
Posts: 510
Joined: Wed Dec 11, 2002 7:15 pm
Location: Where's Your Head At
Contact:

Post by kooky »

No don't add the switch in this file ;)

In your first file, you need to add the switch near

Code: Select all

 <?php for ($i = 0; $i < count($online); $i++) { ?>
                                          <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $online[$i]['user_id']); ?>">
                                          <?php echo $online[$i]['username'];?>
                                          </a>
Will be

Code: Select all

<?php
for ($i = 0; $i < count($online); $i++)
{
      switch ($online[$i]['user_level'])
      {
         case ADMIN:
            $style_color = ' style="color: #' . $theme['fontcolor3'] . '"';
            break;
       ...etc...
       }
?>
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $online[$i]['user_id']); ?>"<?php echo $style_color ?>><?php echo $online[$i]['username'];?></a>
My Contribs (included the User Class, ModCP...) | My blog

My Station: Image :: My Browser: Image

User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Post by EnjoyNIRVANA! »

^ THANK YOU VERY MUCH... it works... :D

Thy73
Registered User
Posts: 25
Joined: Fri Mar 11, 2005 4:48 pm
Location: Denmark
Contact:

Post by Thy73 »

I've also just installed this mod (cool it works) but i want for my members to have different colors also (not mod or admin stats) and different from regular users.
In the mod, it saids
You can easily add other color rank, e.g. with fontcolor4...

But what files to edit ?? :oops:
Or is there a hidden menu in the forum for that ?

User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Post by MHobbit »

Please try not to bump old and dead threads.

Also, please seek MOD support at the place/thread where you got the MOD from.

Locked.
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."

Locked

Return to “[2.0.x] MOD Requests”