• 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!

Simple forum script

Status
Not open for further replies.

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,967
Solutions
99
Reaction score
3,383
Location
Poland
GitHub
gesior
Simple forum script (script in one file, post and topics in one table)
It looks like RL tibia forum:
Warots server - Forum
Download:
http://uploadhyper.com/file/10160/simpleforum.zip.html
execute SQL:
PHP:
CREATE TABLE `z_forum` (
  `id` int(11) NOT NULL auto_increment,
  `first_post` int(11) NOT NULL default '0',
  `last_post` int(11) NOT NULL default '0',
  `section` int(3) NOT NULL default '0',
  `replies` int(20) NOT NULL default '0',
  `views` int(20) NOT NULL default '0',
  `author_aid` int(20) NOT NULL default '0',
  `author_guid` int(20) NOT NULL default '0',
  `post_text` text NOT NULL,
  `post_topic` varchar(255) NOT NULL,
  `post_smile` tinyint(1) NOT NULL default '0',
  `post_date` int(20) NOT NULL default '0',
  `last_edit_aid` int(20) NOT NULL default '0',
  `edit_date` int(20) NOT NULL default '0',
  `post_ip` varchar(32) NOT NULL default '0.0.0.0',
  PRIMARY KEY  (`id`),
  KEY `section` (`section`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
and:
PHP:
ALTER TABLE `accounts` ADD `last_post` INT( 11 ) NOT NULL DEFAULT '0';
(if someone spam much you can delete his post [first post in topic = topic, post and topics in one table, if you delete first post its like remove topic] by IP/account id)
Config (boards - sections) is in forum.php file:
ON BOARD (sections in config file) WITH ID = 1 ONLY MODERATORS CAN MAKE NEW THREADS (its board for 'news')
PHP:
$level_limit = 10; // minimum 1 character with 50 lvl on account to post
$post_interval = 30; // 30 seconds between posts
$group_not_blocked = 1; // page access of player that can always post, remove post, remove threads, edit other players posts
$posts_per_page = 20;
$threads_per_page = 20;
$sections = array(1 => 'News', 2 => 'Trade', 3 => 'Quests', 4 => 'Pictures', 5 => 'Bug Report');
$sections_desc = array(1 => 'Tutaj mozna komentowac newsy.', 2 => 'Oferty sprzedam/kupie', 3 => 'Informacje o questach', 4 => 'Tematy z zdjeciami z gry', 5 => 'Raporty bledow w grze/na stronie');
$group_not_blocked is 'page_access' column in 'accounts' (database)
Functions:
- Add post, topic
- Edit post, topic (show date and nick of editor [like when GM edit post])
- Delete post, topic [only 'moderator' (account with special rights) or site admin]
- Showing stats of players (like rl tibia forum)
- Counting posts/views
- Emoticons (player can disable emots in post)
- player can use:
[c0de],[qu0te],,[img],[b],[i],[u],[player](make li..."]- banned/deleted accounts cant post[/COLOR]
 
Last edited:
Nice.
Possible to sticky threads & close?
 
Last edited:
nice ++ one question: For 0.3.4 (TFS) ?
 
OMG. Perfect version.

Thanks.
=p

So need to add topics fixed.
 
Last edited:
This is very nice man no bug but I think you can improve the smileys by like have an option button next to them same as Code and other. Its more efficient
 
Keeps on going, awesome :D

I've got a question though, I'm not the best with php and such, but is this more secure than Paxton OTForum ?
 
I got an error, Would be happy if someone responds and help me out asap
Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\forum.php on line 202
 
Status
Not open for further replies.
Back
Top