TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 926
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 337
  • Total: 338
  • @rjen

Shoutbox help

Started by pvcblue, May 02, 2007, 06:16:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pvcblue

On every theme the shout box user colors are the same, red for the shouter, how and where can I change this? I tried to change the user colors for each membergroup but that did not work, and  I looked in the style css and nothing, help?

G6Cad

In what theme, and do you have color legend mod installed to your forum ? (or some other mod that changes the membergroups in some way )

pvcblue

Quote from: G6â„¢ on May 02, 2007, 06:58:53 AM
In what theme, and do you have color legend mod installed to your forum ? (or some other mod that changes the membergroups in some way )

No no color mods, it is a theme I made myself based off of the default.

http://www.gmendias.com/

G6Cad

In sources/TPortal.php  make sure you have this code in there

// collect the color for shoutbox
      $request=db_query("SELECT grp.onlineColor FROM ({$db_prefix}members as m, {$db_prefix}membergroups as grp)
         WHERE m.ID_GROUP=grp.ID_GROUP
         AND ID_MEMBER=$ID_MEMBER LIMIT 1", __FILE__, __LINE__);
      if(mysql_num_rows($request)>0){
         $row=mysql_fetch_row($request);
         $context['TPortal']['usercolor']=$row[0];
         mysql_free_result($request);
      }

      if(is_numeric($context['TPortal']['shoutbox_limit']))
         $limit=$context['TPortal']['shoutbox_limit'];
      else
         $limit=10;

      if(isset($_GET['sa']) && $_GET['sa']=='shoutbox'){
         if(isset($_GET['shouts']) && is_numeric($_GET['shouts']))
            $limit=$_GET['shouts'];
      }

      if($limit>100) $limit=100;
      $request = db_query("SELECT * FROM {$tp_prefix}shoutbox WHERE 1 ORDER BY value2 DESC LIMIT $limit", __FILE__, __LINE__);
      if (mysql_num_rows($request) > 0)
      {
         $shouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'<hr />';

         while($row = mysql_fetch_assoc($request))
         {
            $shouts .='<div style="margin: 4px;"><div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b></div><div style="padding: 2px;"> '.timeformat($row['value2']).'</div><div style="padding: 4px;">';
            $myshout='';
            $myshout=$row['value1'];
            $shouts .= doUBBC(censorText($myshout));
            $shouts .= '</div></div>';
         }
         $context['TPortal']['shoutbox']=$shouts;
         mysql_free_result($request);
      }
   }

pvcblue

Yes that is there, and I have the Admin set to black in the membergroups settings, but in the shoutbox my name shows red.

tick

Not to interrupt but i had a problem similar to this where all of my users in the shoutbox were blue.  Even the admins   Itchibin and bloc were looking into it but I dont know what they came up with.  Might be related.

IchBin

You may need to do a hard refresh to see the different colors.

pvcblue

Quote from: IchBinâ„¢ on May 02, 2007, 11:30:34 PM
You may need to do a hard refresh to see the different colors.

Tried, and didn't work.............

IchBin

How about showing the shoutbox or giving a test account so we can see it?

pvcblue

Quote from: IchBinâ„¢ on May 03, 2007, 01:53:46 AM
How about showing the shoutbox or giving a test account so we can see it?

The shoutbox is visible to guests and is on the bottom of the portal page, if you cannot still see it I have pm'd you a username and password.

This website is proudly hosted on Crocweb Cloud Website Hosting.