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: 407
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 209
  • Total: 209

Latest shout block

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Sakuragi

still not working  :(
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

IchBin

this one should work. I don't know what you got going on in your menu though. lol

Sakuragi

#12
perfect, thank you!!
if some one would display it as a bloc on index.template.php :
//<!-- begin shoutbox -->
         echo '
<div class="tborder" style="margin-bottom: 5px;"><div class="titlebg" style="padding: 4px; font-weight: bold;"><a href="http://www.site.com/index.php?action=tpmod&sub=shoutbox">Last shout :</a></div><div class="windowbg" style="padding: 4px;">
                  <div style="padding: 5px;" class="smalltext">';

                                          $tp_prefix = 'tportal_';
   
   $request = db_query("SELECT * FROM {$tp_prefix}variables WHERE type='shoutbox'  ORDER BY value2 DESC LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
  $shouts='';
  while($row = mysql_fetch_assoc($request)){
  $shouts .= tp_doUBBC($row['value1'],true);
  $shouts .='<br /> by <b>'.$row['value3'].'</b> on '.timeformat($row['value2']).'<br />';
  }
  echo $shouts;
  mysql_free_result($request);
}
echo '
                                                </div>
                  </div></div>';

// <!-- end shoutbox -->

Moocat

just wondering, what are you guys using this for? wouldn't a latest shout block be useless if you can just look over at the shoutbox? lol... just wondering! :)

bloc

One thing could be...permit only some groups to see/use the shoutbox, and permit everyone to see the latest. ;)

Moocat

that would be mean ! lol
just to tease them! :o

WizardHawk

The other reason is I put my shout block on the right side bar which most people keep collapsed. Having the last shout block means that everyone can still see what was said.

USO_Joe

#17
Idea:

Any chance anyone could design a block, using Javascript, to scroll the last two shouts accross the bottom browser status bar? You know, ... where they sometimes put useless crap about the website, or there's some scripts that show a welcome message down there... I think that would be pretty sweet. That way people can ALWAYS see the most recent shout. Even if they aren't even in the forum! Many websites have many other pages that aren't attached to the forums, where people might be located. It would be great to be able to see the most recent shout,... I've entertained the thought of a pop up window, but that would be too annoying. I haven't found too many that work with Firefox though, so if someone makes something, can you try to make it work with Firefox too? 

Thanks!

WizardHawk

WARNING: Do NOT use this code as is with TP .8x or higher!!!!!!!

The prefix for the DB entries for TP have changed in the new version. Using the code as is will cause the forum to bomb (not load at all)!

I'd imagin Bloc will edit his post and correct the code, but for now you MUST change this:
$tp_prefix = 'tportal_';


to this:
$tp_prefix = 'smf_tp_';


Otherwise the block is great.  ;D

bloc


This website is proudly hosted on Crocweb Cloud Website Hosting.