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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 488
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 90
  • Total: 90

Maintenance Mode

Started by sloopz, October 08, 2008, 03:34:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Horme Gaming

ok i have just applied a code so Global Moderators can see forum, the code I put in was

index.php
if (!empty($maintenance) && !allowedTo('admin_forum') && !in_array(2, $user_info['groups']))

The problem is that the TP blocks dont show for group 2 while in maintenance mode... how can we fix this?

IchBin

TP checks the maintenance mode as well in TPortal.php. About line 100 you need to add the same check for your global moderator otherwise it hides all the sidebars.
// if we are in maintance mode, just hide panels and return
if (!empty($maintenance) && !allowedTo('admin_forum'))
{
tp_hidebars('all');
return;
}

Horme Gaming

#2
nope giving

QuoteParse error: syntax error, unexpected T_IF in ***/public_html/Sources/TPortal.php on line 1

// if we are in maintance mode, just hide panels and return

if (!empty($maintenance) && !allowedTo('admin_forum') && !in_array(2, $user_info['groups'])) {

tp_hidebars('all');

return;

}

G6Cad

Is the first line yellow ?   ( Marked out )
Seems like the error tells you that it isent, the IF in the first line is called and therefore you get the error.

IchBin

I don't see an error in your code. I tested it on my site and it works. If you want to post your TPortal.php file I'll take a look at it.

Horme Gaming


IchBin

Hmm... this is weird. I just replace my file with yours. And I don't get any errors. How about I attach mine and see if it works for you. I'll make the edit while I'm at it.

Horme Gaming

I get

Fatal error: require_once() [function.require]: Failed opening required '/home/pforum/public_html/Sources/TPSubs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pforum/public_html/Sources/TPortal.php on line 35

with that

Crip

umm.. I can see everything fine ?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Horme Gaming

think it could be a setting stopping it :S

This website is proudly hosted on Crocweb Cloud Website Hosting.