• 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] Simple news system

I will release it today or tomorrow with edit options.,
 
Awesome job on the news system, here I was just about to code one my self then I run into yours... Saved me some time of coding haha.
 
go to yourpage.com/addnews.php
You must be admin of the website
 
im sorry, i am recently learning how to configurate an sql server and i have a trouble adding a new in my localhost page, it says

Table 'otserv.znote_news' doesn't exist

also i cant add a query in my otserv database, can someone help me to do that, please ?
 
go to localhost/phpmyadmin
select your database, click on the SQL tab
paste this

PHP:
CREATE TABLE IF NOT EXISTS `znote_news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(20) NOT NULL,
  `body` text NOT NULL,
  `date` date NOT NULL,
  `author` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 ;

and enter it,
 
go to localhost/phpmyadmin
select your database, click on the SQL tab
paste this

PHP:
CREATE TABLE IF NOT EXISTS `znote_news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(20) NOT NULL,
  `body` text NOT NULL,
  `date` date NOT NULL,
  `author` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 ;

and enter it,

thanks you're a genius <3
 
Sorry for the bump, but it isnt working :eek:
Tried another template, but here what's more weird:
If i replace your index with my old index, the news show up correctly, but i cant add them anymore.
Take a look:
DarkBird OT
Thats with your index.php :s
 
Take a look at your database znote_news table, maybe you are using the now integrated znote news system
 
Take a look at your database znote_news table, maybe you are using the now integrated znote news system

Found a fix, deleting the old znote_news table and re-creating it with your code worked
Thanks :)
 
Notice: Undefined index: body in C:\xampp\htdocs\index.php on line 9

Notice: Undefined index: author in C:\xampp\htdocs\index.php on line 11

Server - posted on 2014 - by
 
Why dont just use Znote news system? :3 this is very outdated
 
No changelogs submitted.string(165) "SELECT `n`.`id`, `n`.`title`, `n`.`text`, `n`.`date`, `p`.`name` FROM `znote_news` AS `n` INNER JOIN `players` AS `p` ON `n`.`pid` = `p`.`id` ORDER BY `n`.`id` DESC;"
(query - SQL error)
Type: select_multi (select multiple rows from database)

Unknown column 'n.text' in 'field list'
 
No changelogs submitted.string(165) "SELECT `n`.`id`, `n`.`title`, `n`.`text`, `n`.`date`, `p`.`name` FROM `znote_news` AS `n` INNER JOIN `players` AS `p` ON `n`.`pid` = `p`.`id` ORDER BY `n`.`id` DESC;"
(query - SQL error)
Type: select_multi (select multiple rows from database)

Unknown column 'n.text' in 'field list'
same...
 
Back
Top