IPB Help > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

IPB Help

wersja drukowalna wersja Microsoft Word wersja HTML

I'm making a modification for IPB 2.3.x. I've made the XML installer file for it, which is installed with UMI. The mod is designed to tell you who viewed the particular thread you're viewing. I'm attempting to write my code in a separate PHP file independent from IPB's main files. This is to simplify mod install for people who don't know much about how to edit IPB's files.

Unfortunately the info it needs to function, I don't know exactly how to pull that info from IPB's topics.php file.

Here's the code users have to put into their topics.php file.

This calls to thedisplay users function:

if ( !is_object( $this->viewers ) )
		{
			require_once(ROOT_PATH.'sources/iAideMods/WhoViewed.php');
			$this->viewers		   =  new viewers;
			$this->viewers->ipsclass =& $this->ipsclass;
		}

		$this->viewers->display_viewers();



This calls to the update function:
if ( !is_object( $this->viewers ) )
		{
			require_once(ROOT_PATH.'sources/iAideMods/WhoViewed.php');
			$this->viewers		   =  new viewers;
			$this->viewers->ipsclass =& $this->ipsclass;
			$this->topic =& $this->topic;
		}

		$this->viewers->update_viewers();


I don't think that code has anything wrong with it, unless I need to throw something else in there to make it work.

The error I receive is:
===================================================
 Date: Wed, 03 Jun 2009 23:54:17 -0400
 Error Number: 1064
 Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
 IP Address: 127.0.0.1
 Page: /iAide/index.php?showtopic=4
 mySQL query error: SELECT * FROM ibf_topics_read WHERE read_tid=

It doesn't get the topic id like it should. Any thoughts?

pią, 24 wrzesień 2010

Komentarze:

Brak komentarzy

Imię/Nick:

Adres email:

Strona WWW:

Treść Komentarza: