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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

[SOLVED] Shoutbox Error

Started by sburke930, September 07, 2009, 06:42:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sburke930

After looking at tpmodules.php file I noticed that every other line referred to something in the brackets other than [$body].  This line was the only line that looked that way and once I changed it, the error when a shout was posted disappeared.

Why would that line be different from every other line in the tpmodules.php file?

IchBin

But the other lines are looking for something in_array(). isset does not take two parameters as you have done in your code. isset() checks to see if a variable has been declared. If it "is set" then it returns true or false. in_array() takes two parameters, thats why the other lines look different.

Freddy


sburke930

So from what you are saying it should look like this:

if($context['TPortal']['action']=='tpmod' && isset($_GET['dl']))

In other words ",$body" should be removed completely?

IchBin

The more important thing is to figure out a fix, not a band aide. Why isn't $body working? Can you figure out, when you are getting this error? Are you only getting it after doing something specific? Are you only getting it if you have a certain setting disabled or enabled? All part of debugging. If you can figure it out, we can post something to the bugtracker for Bloc to fix.

sburke930

The error occurs when a post is made in the shoutbox.

More importantly to the question, why is $body not in the line for 'dl'?  That code is almost exactly the same as 'tpmod' and where line 1994 had "$body" in the brackets, the line for the dlmanager has "dl" in the brackets without $body present.  Which was the basis for changing the code on line 1994.

Shouldn't these lines reflect alike actions?

Syndel

I am having the

An Error Has Occurred!
Unable to load the 'main' template.

thing....
So, what is the practical solution for code dumbs like me?

G6Cad


This website is proudly hosted on Crocweb Cloud Website Hosting.