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,973
  • Latest: NonStop
Stats
  • Total Posts: 196,225
  • Total Topics: 21,352
  • Online today: 633
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 427
  • Total: 428
  • @rjen

Simple Shoutbox admin manage

Started by raid, October 23, 2008, 04:29:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raid

I saw on my forum and on a system with smf 1.1.6 and TP 1.0.6 beta2 just installed that on Simple Shout box admin menu isn't possible to browse the various shout message indexed by page, at least is possible to read only First page.

I think it is a bug, but I am not sure so I will wait to open a ticket (I didn't found something similar already opened)

Here how I fixed (the code was present on another TP file), I share it to help other admins that needs Shoutbox full working like me:
Code (TPShout.php, Find this code) Select
if(isset($memID))
{
$request = db_query("SELECT COUNT(*) FROM {$tp_prefix}shoutbox WHERE type='shoutbox' AND value5=$memID AND value7=0", __FILE__, __LINE__);
$weh=mysql_fetch_row($request);
mysql_free_result($request);
$allshouts=$weh[0];
$context['TPortal']['admin_shoutbox_items_number']=$allshouts;
$context['TPortal']['shoutbox_pageindex'] = 'Member '.$memID.' filtered (<a href="'.$scripturl.'?action=tpmod;shout=admin">' . $txt[193] . '</a>) <br />'.TPageIndex($scripturl.'?action=tpmod;shout=admin;u='.$memID, $tpstart, $allshouts, 10, true);
$request = db_query("SELECT * FROM {$tp_prefix}shoutbox WHERE type='shoutbox' AND value5=$memID AND value7=0 ORDER BY value2 DESC LIMIT $tpstart,10", __FILE__, __LINE__);
}

Code (Add before) Select
  $tpstart=0;

if(isset($_GET['tpstart']))
{
$context['TPortal']['tpstart']=$_GET['tpstart'];
$tpstart=$_GET['tpstart'];
}
else
{
$context['TPortal']['tpstart']=0;
$tpstart='0';
}


this should fix the page problem.
SMF 2.0 + TP RC2

G6Cad

What shoutbox is this you use ?  There are 2 diffrent  ;)

raid

Sorry I forgot, the Simple Shoutbox. I miss becouse the Advanced one isn't loaded by default
SMF 2.0 + TP RC2

G6Cad

Non of the shoutboxes loads on the default, both needs to be installed as modules ( if the package still have both offcourse   ???)

miky1

I had the same problem with smf 1.1.7 and TP 1.0.5 beta1 Simple Shoutbox.

Raid's solution works fine !      :coolsmiley:

Thanks a lot.    :)

clickbouyow

#5
This causes sql errors for me.  What do you mean by "add before?"  Add before what?  This is a bug, because it is the same for both simple and adv shoutboxes.  You cannot browse the shouts in admin.

NM.  I figured it out.

This website is proudly hosted on Crocweb Cloud Website Hosting.