TinyPortal

Development => Support => Topic started by: pvcblue on May 02, 2007, 06:16:18 AM

Title: Shoutbox help
Post by: pvcblue on May 02, 2007, 06:16:18 AM
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?
Title: Re: Shoutbox help
Post by: G6Cad 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 )
Title: Re: Shoutbox help
Post by: pvcblue on May 02, 2007, 09:47:17 PM
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/ (http://www.gmendias.com/)
Title: Re: Shoutbox help
Post by: G6Cad on May 02, 2007, 10:31:35 PM
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);
      }
   }
Title: Re: Shoutbox help
Post by: pvcblue on May 02, 2007, 10:37:07 PM
Yes that is there, and I have the Admin set to black in the membergroups settings, but in the shoutbox my name shows red.
Title: Re: Shoutbox help
Post by: tick on May 02, 2007, 10:52:54 PM
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.
Title: Re: Shoutbox help
Post by: IchBin on May 02, 2007, 11:30:34 PM
You may need to do a hard refresh to see the different colors.
Title: Re: Shoutbox help
Post by: pvcblue on May 03, 2007, 01:33:08 AM
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.............
Title: Re: Shoutbox help
Post by: IchBin on May 03, 2007, 01:53:46 AM
How about showing the shoutbox or giving a test account so we can see it?
Title: Re: Shoutbox help
Post by: pvcblue on May 04, 2007, 12:32:49 AM
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.
Title: Re: Shoutbox help
Post by: tick on May 04, 2007, 12:39:25 AM
Thats what mine is doing.  Except they are blue
Title: Re: Shoutbox help
Post by: IchBin on May 04, 2007, 01:30:25 AM
Are you changing the member group color and then posting a shout? I think the member group colors are stored in the shouts so they don't change unless you post a new shout with the new member group color.
Title: Re: Shoutbox help
Post by: pvcblue on May 04, 2007, 03:08:56 AM
You are right Ich - it stores the previous color information. Thanks for the answer!!  :D
Title: Re: Shoutbox help
Post by: IchBin on May 04, 2007, 03:22:27 AM
ahhh.... the simple things in life. For a minute you had me worried. lol