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,231
  • Total Topics: 21,353
  • Online today: 391
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 396
  • Total: 396

Shoutbox: now you see it, now you dont!

Started by dimdom, December 12, 2008, 03:01:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZarPrime

Quote from: dimdom on December 12, 2008, 05:56:38 PM
Thank you zarprime, that did the trick, but since I use the right panel, it is only a temporary solution.

Dimdom, no problem, I'm glad it solved the problem, at least temporarily. ;)

If and when you update your TP to 1.0.x, there are additional panel types available, "top" and "bottom", "upper" and "lower".  The center panel in 0.98 became the upper panel in the newer versions.

G6, thanks for allowing me to help.

ZarPrime

G6Cad

QuoteG6, thanks for allowing me to help.

Why shouldent i ?   Im just glad to see members jumping in with the help they can where they can , good work Zar  :up:  :)

bloc

The reason for this behavior is simply that TP 0.9.8 checks if you are using a true shoutbox type of block, then and only then: loads the shouts. If you then just use the code(which only render the shouts, not collecting them) TP will NOT read that as needing to collect them in the first place.

The way around that is several..but the easiest is perhaps to disable the check and simply fetch shouts on every call. Since you are using the rather intensive mini user CP anyway, it should make no big difference.To do that open TPortal.php and find this:

// get x number of shouts
// set context info for profile shouts hide
$context['TPortal']['profile_shouts_hide'] = empty($context['TPortal']['profile_shouts_hide']) ? '0' : '1';
$context['TPortal']['usercolor']='';
if(isset($using_shoutbox) || (isset($_GET['sa']) && $_GET['sa']=='shoutbox'))


Change that to:

// get x number of shouts
// set context info for profile shouts hide
$context['TPortal']['profile_shouts_hide'] = empty($context['TPortal']['profile_shouts_hide']) ? '0' : '1';
$context['TPortal']['usercolor']='';
$using_shoutbox = true;     
if(isset($using_shoutbox) || (isset($_GET['sa']) && $_GET['sa']=='shoutbox'))

dimdom

#13
QuoteSince you are using the rather intensive mini user CP anyway

Bloc, your solution sounds more ...permanent.

Is it going to increase the load (calls to database) even if I have not set the shoutbox to show anywhwere else except the Mini user CP (which is shown only in the front page)?


QuoteIf and when you update your TP to 1.0.x

ZarPrime, I dont indend to switch to 1.0 since my site is heavily depended on Tiny Portal and since I have a heavily modified 1.1.7 SMF script.

As long as the switching to the newer version is too complicated and the benefits for doing that doesnt seem so clear yet...

Tiny Portal 0.9.8 is an excellent script and the 1.0 version has to give a big fight with its ancestor in order to win the battle...

I will reconsider when SMF 2 and Tiny Portal 1 will be released in stable versions, fully working together...


G6, thank you once again for your help.




$context['TPortal']['usercolor']='';

By the way, the color of the membergroups does not change to my shoutbox but that is probably because I have installed the mod "membergroups legend color" (or something like that) AFTER starting use the shoutbox. If i remeber well I have to make a change in the sql tables of shoutbox in order to show the colors, but this is another discussion I guess...

Than you guys!  :)




PS:

I have saved the entire Mini user CP  script as a php file named infopanel.php which I placed in the Sources directory and I use the below code in a php block to call it:

// Declare the globals to call the main file
global $sourcedir;

// And Call the file
require_once($sourcedir . '/infopanel.php');


That is, because when you use the script as it is in a php block, it breaks the edit function of the block...

SmokyBlue


dimdom

Quote from: SmokyBlue on December 13, 2008, 12:54:40 PM
so this is solved, dimdom??  :o

Partly, yes.

I used the method that ZarPrime suggested.

SmokyBlue


This website is proudly hosted on Crocweb Cloud Website Hosting.