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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 476
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 182
  • Total: 182

Latest shout block

Started by Lesmond, October 15, 2005, 10:18:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phoenixoverlord

Not wanting to spam, but I'm afraid that there's too many cases of abuse like that possible. People could also use periods and enter or a single letter/number/sign/whatever and line breaks.

WizardHawk

#31
ok, this code bombs big time in 0.9.5

Causes the rest of the board not to load after that point. I shut it off for now, but I seriously either need an alternative way to show the last two shouts or a fix for this. The latest shout box is one of the most popular things on my board.

Specific error message displayed in box:

QuoteFatal error: Call to undefined function: tp_doubbc() in /home/xxxx/xxxx/xxxx/Sources/Load.php(1619) : eval()'d code(35) : eval()'d code on line 10

Part of path changed to x's for protection.

HELP! lol

----------- edit ----------
Nevermind, I removed the tp_ from tp_doubbc() in the code and it works fine. Guess I hadn't done that since mine was working. I see the main one has been changed at some point to that so nothing needs to be done here. :)

WizardHawk

I need help with .983

Block is empty after updating. Anyone know what was changed in the shouts that needs updating on this script?

And yes, I realize I may be the only one on earth using it lol. My people go crazy when this block isn't working. Any help would be great.

bloc

Its the database table itself. Replace "variables" with "shoutbox" and you should be fine.

IchBin

edited first post to reflect the change.

tribalost

#35
Tweaked the code a lil so that it whould look like the original shoutbox  :2funny:...
this was what I was looking for when I suggested the "XX post count needed to post in the shoutbox restriction". But since you can make permissions on viewing blocks its all :coolsmiley:.. and a great thank you to bloc for coding this  ::)


global $settings;

$tp_prefix = $settings['tp_prefix'];
   
   $request = db_query("SELECT * FROM {$tp_prefix}shoutbox WHERE type='shoutbox'  ORDER BY value2 DESC LIMIT 10", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
  $shouts='';
  while($row = mysql_fetch_assoc($request)){
  $shouts .='<font size="1"><div style="margin: 4px;"><div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b></div></font>';
  $shouts .='<font size="1"><div style="padding: 2px;">'.timeformat($row['value2']).'</div></font>';
  $shouts .='<font size="1"><div style="padding: 2px;">'.doUBBC($row['value1'],true).'</div></font></div>';
  }
  echo '<font size=1><div class=smalltext style=width: 99%; height: 100%px; overflow: auto; margin-bottom: 2px;>Last 10 Shouts:</font><hr />'.$shouts.'</div><div style=text-align: center; margin-top: 5px; class=smalltext align=center><a href=http://www.trivu.net/index.php?action=tpmod;sa=shoutbox;shouts=50>Show last 50</a></div>';
  mysql_free_result($request);
}


note:this displays the last 10 shots...

This website is proudly hosted on Crocweb Cloud Website Hosting.