Trying to build a mutiple forums in one forum set (Features)

by Nathaniel ⌂ @, PA, Monday, December 01, 2008, 20:44 (5586 days ago)

Hi,

I'm trying to build a set of code that works similar to categories but instead of being just categorys its a set of forums mapped to a single user. So that the one site can have many forums.

The concept is basically to add a single field to the forum table that is called "forumid" this allows you to duplicate the index.inc.php code and just add a small snip it of code to make myfourmindex.inc.php just grab posts for your forum any your forum only out of the big data base pile of threads.

The problem and why I'm writing this post now is that the forum code is so complex !!!

I can't seem to figure out what its doing.

What is the plugin smarty ???? I.e. => the fallowing code uses it and it would seem as though the entire forum uses it as a "LOOKS GOOD BUILDER" for all the forums and pieces of the site I'm slowly by duplicating pieces of code experimenting but I was wondering off the top of anyones head What or how to I edit the front end stuff!

require('modules/smarty/Smarty.class.php'); // requires plugin compiler.defun.php
$smarty = new Smarty;
$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';
$smarty->config_dir = 'lang';
$smarty->config_overwrite = false;
$smarty->config_booleanize = false;
$smarty->config_load($settings['language_file']);
$lang = $smarty->get_config_vars();


____________________________________
____________________________________

code I have changed so far ... ===>>> install.sql

CREATE TABLE mlf2_banlists (name varchar(255) NOT NULL default '', list text NOT NULL) CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE mlf2_categories (id int(11) NOT NULL auto_increment, order_id int(11) NOT NULL default '0', category varchar(255) NOT NULL default '', description varchar(255) NOT NULL default '',accession tinyint(4) NOT NULL default '0', PRIMARY KEY (id)) CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE mlf2_forums (id int(11) NOT NULL auto_increment, owner int(11) NOT NULL default '0', category int(11) NOT NULL default '0', order_id int(11) NOT NULL default '0', forum_name varchar(255) NOT NULL default '', description varchar(255) NOT NULL default '',accession tinyint(4) NOT NULL default '0', PRIMARY KEY (id)) CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE mlf2_entries (id int(11) NOT NULL auto_increment, pid int(11) NOT NULL default '0', tid int(11) NOT NULL default '0', uniqid varchar(255) NOT NULL default '', time timestamp NOT NULL default CURRENT_TIMESTAMP, last_reply timestamp NOT NULL default '0000-00-00 00:00:00', edited timestamp NOT NULL default '0000-00-00 00:00:00', edited_by int(11) default NULL, user_id int(11) default '0', name varchar(255) NOT NULL default '', subject varchar(255) NOT NULL default '',category int(11) NOT NULL default '0', forumid int(11) NOT NULL default '0', email varchar(255) NOT NULL default '', hp varchar(255) NOT NULL default '', location varchar(255) NOT NULL default '', ip varchar(255) NOT NULL default '', text text NOT NULL, tags varchar(255) NOT NULL default '', show_signature tinyint(4) default '0', email_notification tinyint(4) default '0', marked tinyint(4) default '0', locked tinyint(4) default '0', sticky tinyint(4) default '0', views int(11) default '0', spam tinyint(4) default '0', spam_check_status tinyint(4) default '0', edit_key varchar(255) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY id (id), KEY tid (tid),KEY category (category), KEY forumid (forumid), KEY pid (pid), KEY sticky (sticky)) CHARSET=utf8 COLLATE=utf8_general_ci;

_______________________________________________


P.S. If I can get any were with this code ... thats a big if the next trial I wanted to preform is making a version of this forum directly compatible with facebook as an application.

locked
4974 views

Complete thread:

 RSS Feed of thread