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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 06:30:06 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 240
  • Total: 240

remove avatar from shoutbox

Started by darkangel, January 30, 2011, 09:19:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkangel

I searched and found this code for shoutbox beta 5 to remove the avatar

<a href="' . $scripturl. '?action=profile;u=' . $row['value5'] . '">' . $row['avatar'] . '</a>

unfortunately the TPShout.php file in the tp-files>tp-modules-TPShout>Sources claims it does not exist in it.

Is there a way to make that avatar not show?

sorry forgot to mention that I am using the latest version 1.0RC1 of TP/SMF 1.1.12
Fantasies Realm  | Fantasy Attic

SMF 2.0.15 | TP 1.2 | many mod addons | variety of themes

darkangel

***update***

I been messing about with the file and I think I did it and maybe not kill it. The shoutbox seems to still work right.


I had earlier installed the coding given for taking away the backslash for " and ' in words so this is the code that I had...in red is what I removed.


TPShout.php file

$request =  tp_query("SELECT s.*, IFNULL(mem.realName, s.value3) as realName,
   mem.avatar,   IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
   FROM " . $tp_prefix . "shoutbox as s
   LEFT JOIN " . $db_prefix . "members AS mem ON (mem.ID_MEMBER = s.value5)
   LEFT JOIN " . $db_prefix . "attachments AS a ON (a.ID_MEMBER = s.value5 and a.attachmentType!=3)
   WHERE s.value7=0
   ORDER BY s.value2 DESC LIMIT ". $limit, __FILE__, __LINE__);
   if (tpdb_num_rows($request) > 0)
   {
      $nshouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'

<div id="allshouts'.(!$render ? '_big' : '').'" class="qscroller'.(!$render ? '_big' : '').'"></div><div class="hide'.(!$render ? '_big' : '').'">';
      $ns=array();
      while($row = tpdb_fetch_assoc($request))
      {
            $row['value1'] = stripslashes($row['value1']);
         $row['avatar'] = $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="&nbsp;"  />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="&nbsp;" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="&nbsp;" />');
         $ns[] = template_singleshout($row);
      }


did I mess things up...should I have done it differently---very new to php and meddling in unknown territory here so please let me know.
Fantasies Realm  | Fantasy Attic

SMF 2.0.15 | TP 1.2 | many mod addons | variety of themes

ZarPrime


darkangel

thanks ZarPrime, I went there, got the code and applied...now members will be happy I hope.
Fantasies Realm  | Fantasy Attic

SMF 2.0.15 | TP 1.2 | many mod addons | variety of themes