TinyPortal
Development => Resources => Modules => Topic started by: darkangel on January 30, 2011, 09:19:49 AM
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
***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=" " />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt=" " />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt=" " />');
$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.
For TinyPortal 1.0 RC1, please refer to this post --> http://www.tinyportal.net/index.php?topic=33001.msg268708#msg268708
ZarPrime
thanks ZarPrime, I went there, got the code and applied...now members will be happy I hope.