TinyPortal

Development => Support => Topic started by: raid on October 23, 2008, 04:29:18 PM

Title: Simple Shoutbox admin manage
Post by: raid on October 23, 2008, 04:29:18 PM
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.
Title: Re: Shoutbox admin manage
Post by: G6Cad on October 23, 2008, 05:00:23 PM
What shoutbox is this you use ?  There are 2 diffrent  ;)
Title: Re: Simple Shoutbox admin manage
Post by: raid on October 23, 2008, 05:05:29 PM
Sorry I forgot, the Simple Shoutbox. I miss becouse the Advanced one isn't loaded by default
Title: Re: Simple Shoutbox admin manage
Post by: G6Cad on October 23, 2008, 05:10:43 PM
Non of the shoutboxes loads on the default, both needs to be installed as modules ( if the package still have both offcourse   ???)
Title: Re: Simple Shoutbox admin manage
Post by: miky1 on November 29, 2008, 07:33:32 AM
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.    :)
Title: Re: Simple Shoutbox admin manage
Post by: clickbouyow on December 27, 2008, 03:56:45 PM
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.