News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 10, 2019, 03:14:35 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189279
  • Total Topics: 20775
  • Online Today: 386
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 49
Total: 49

Author Topic: remove avatar from shoutbox  (Read 6490 times)

0 Members and 1 Guest are viewing this topic.

Offline darkangel

  • Beta Tester
  • *
  • Posts: 347
remove avatar from shoutbox
« on: January 30, 2011, 02:19:49 AM »
I searched and found this code for shoutbox beta 5 to remove the avatar

Code: [Select]
<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

Offline darkangel

  • Beta Tester
  • *
  • Posts: 347
Re: remove avatar from shoutbox
« Reply #1 on: January 30, 2011, 03:12:33 AM »
***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

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: remove avatar from shoutbox
« Reply #2 on: January 30, 2011, 07:29:19 AM »
For TinyPortal 1.0 RC1, please refer to this post --> http://www.tinyportal.net/index.php?topic=33001.msg268708#msg268708

ZarPrime

Offline darkangel

  • Beta Tester
  • *
  • Posts: 347
Re: remove avatar from shoutbox
« Reply #3 on: January 30, 2011, 07:52:16 AM »
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