• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Znote AAC 1.4 - [TFS 0.2.13+] & [TFS 0.3.6+/0.4]

Hey Znote,
I checked the svn of znoteAAC and thought of a potential solution to the storagevalue issue just randomly (posted 24 days ago.)
Perhaps you could use globalevents onthink system that queries the database for new storagevalues that need to be set (sent by the website), then checks if the playersname is online and if it is uses the lua function rather then a query or something similar.

That is exactly what I intend to do later. Creating a communication script which allows the AAC to do live queries through the game. :p But its not going to come on the next releases.
 
All working perfect in this "new" version, except when I click on "Admin News" i got this:

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\engine\function\users.php on line 23

I don't know nothing about php, help please =(
 
open users.php search

// NEWS

delete and paste this

Code:
// NEWS
function fetchAllNews() {
	$query = mysql_query("SELECT * FROM `znote_news` ORDER BY `id` DESC;");
	$array = array();
	while($row = mysql_fetch_assoc($query)) {
		$array[] = $row;
	}
	return !empty($array) ? $array : false;
}
 
open users.php search

// NEWS

delete and paste this

Code:
// NEWS
function fetchAllNews() {
	$query = mysql_query("SELECT * FROM `znote_news` ORDER BY `id` DESC;");
	$array = array();
	while($row = mysql_fetch_assoc($query)) {
		$array[] = $row;
	}
	return !empty($array) ? $array : false;
}

This it's for me?, if yes, then my users.php is same as yours in the NEWS part

- - - Updated - - -

the server is TFS 0.3.7_SVN (Crying Damson)
 
in config.php change server version. 02 for 0.2 and 03 for 0.4 and 0.3

didn't worked, im using Znote ACC on TFS v0.2.11pl2
i get this error when i create accounts.


Register Account

Unknown column 'name' in 'field list'
 
didn't worked, im using Znote ACC on TFS v0.2.11pl2
i get this error when i create accounts.


Register Account

Unknown column 'name' in 'field list'

TFS 0.2.11 is not supported on Znote AAC.
You need TFS 0.2.13 or newer.

All working perfect in this "new" version, except when I click on "Admin News" i got this:

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\engine\function\users.php on line 23

I don't know nothing about php, help please =(

You need to import znote_news table
SQL:
CREATE TABLE IF NOT EXISTS `znote_news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL,
  `text` text NOT NULL,
  `date` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
Last edited:
TFS 0.2.11 is not supported on Znote AAC.
You need TFS 0.2.13 or newer.



You need to import znote_news table
SQL:
CREATE TABLE IF NOT EXISTS `znote_news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL,
  `text` text NOT NULL,
  `date` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

Thanks Znote, I already solved my problem, i seen some php and Mysql tutorials and finally solved this, your're right, new table was the problem. solved yesterday :)
 
Why i can't ADD NEWS??? i login with admin account and i dont see Add news or add points or ADMIN PANEL!! WTF!!??? :blink:
 
in config.php search for

Code:
// WARNING! Account names written here will have admin access to web page!
	$config['page_admin_access'] = array(
		'your account name',
	);

and type your acc when i write account name then save and log in in your web and done
 
Why i can't ADD NEWS??? i login with admin account and i dont see Add news or add points or ADMIN PANEL!! WTF!!??? :blink:

Maybe you need to add them to your template
PHP:
<li>
	<a href='admin.php'>Admin Page</a>
</li>
<li>
	<a href='admin_news.php'>Admin News</a>
</li>
 
Maybe i need.
Maybe you need to add them to your template
PHP:
<li>
	<a href='admin.php'>Admin Page</a>
</li>
<li>
	<a href='admin_news.php'>Admin News</a>
</li>

- - - Updated - - -

Giv me Right directions wher to put.
Maybe you need to add them to your template
PHP:
<li>
	<a href='admin.php'>Admin Page</a>
</li>
<li>
	<a href='admin_news.php'>Admin News</a>
</li>
 
Show me your website, I need to know which template you are using.
 
Ohhhhhhhh!! :)

- - - Updated - - -

https://i.imgur.com/Uj0nq.png Her u go.

Thats the default template, it should already have admin panel and add news. D:

Have you configured $config['page_admin_access']? Remember you need to write account name there, not character name.
 
Back
Top