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: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 209
  • Total: 209

Tiny Portal 98 is throw out errors

Started by Shadow Queen, April 22, 2007, 11:07:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shadow

Tp is throw out errors on my forum and I dont know why. I am getting these errors by members and guests. All these started on April 18, 2007, 02:39:23 AM.

Here the errors All the errors is on the same line too

http://www.shadowskingdom.com/index.php?page=12
Apply Filter: Only show the errors with the same message
8: Use of undefined constant r - assumed 'r'
File: /home/kingdom/public_html/Themes/default/TPortal.template.php (eval?)
Line: 41

Any idea?

IchBin

Could be something in your page. Doesn't necessarily mean its a TinyPortal error. Does it only happen on that page?

Crip

that is a menu link error....check all your links, one has a '' <-problem --> that should hve a ' , <-- fix.
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Shadow

@Ich -- Well, the error is on (TPortal.template.php (eval?) Line: 41)  I always thought if tp give errors its always be on one of the files in tp.  Or I thought wrong about this one....

@Crip -- That is the only page is giving out the errors.  And I am using a php Article with a rss feed code I get off of here.  And I have other Articles is on the forum but not php format. 

How can I tell if the link is wrong?  All the other links is correct far as I know they are

Edited --

Sorry, I dont know what to name the topic....

IchBin

No, it does not mean that TP is the one throwing the errors just because of the file name. Often it happens when something you put in TP can't find something or has some other type of error. Does this error happen on any other page than page=12 ?

Shadow

Thank you for clearing this up for me Ich  ;)

The last thing I put in TP is a rss code and I am using a php Article for that code too.

Well, I just found out some pages is giving out errors too.
http://www.shadowskingdom.com/index.php?page=11 
and page 12.

Both of the pages is using a rss feed code I get off of here.  And both of them is a php article

IchBin


Shadow

Sure thing, I can do for you Ich

I am using this code for both feeds

   // An RSS Reader to grab news from whichever site you choose
$backend = "http://www.smfoogle.com/rss.php?list=top&s=P&p=1"; //change this to match the rss feed url you wish to display.
// end


function endtheElement($parser, $tagName) {
// This function is used when an end-tag is encountered.
global $insideitem, $tag, $title, $description, $link;
 
  if ($tagName == "ITEM") {
    echo '<table width="100%" border="0"><tr>
      <td class="main-table">
      <span class="nav-head"><strong>
      ';
    printf("<p><b><a href='%s'>%s</a></b></p>", // make our title into an actual link
    trim($link),htmlspecialchars(trim($title))); // remove html characters from the title
 
    echo "</tr>";
    echo '<tr>
      <td class="nav">';
    printf("<p>%s</p>",$description); // Print out the live journal entry
    echo"</td>";
    echo "</tr>";
    echo "</table>";
    echo "<br>";
    $title = $description = $link = $insideitem = false;
   }
}

// Now to the parsing itself. Starts by creating it:

$xml_parser = xml_parser_create();

// Then setup the handlers:

xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");

// Open the actual datafile:

$fp = fopen($backend, r);

// Run through it line by line and parse:

while ($data = fread($fp, 4096)) {
  xml_parse($xml_parser, $data, feof($fp))
    or die(sprintf("XML error: %s at line %d",
           xml_error_string(xml_get_error_code($xml_parser)),
           xml_get_current_line_number($xml_parser)));
}

// Close the datafile

fclose($fp);

// Free any memmory used

xml_parser_free($xml_parser);

IchBin

Try chaning this line:

$fp = fopen($backend, r);

To this:

$fp = fopen($backend, "r");


See if that helps get rid of the error.

Shadow


This website is proudly hosted on Crocweb Cloud Website Hosting.