Welcome Guest, Not a member yet? Register   Sign In
Simple Forums application with a3m auth or any other 3rdparty auth
#1

[eluser]alexaaaaaaaaaa[/eluser]
Hi, i have developed a simple forums sistem with a3m auth if someone it's interested please post here and i'll share my code with you.
Here's some print screens if you want to know how it looks like
[Image: forumsl.jpg]
#2

[eluser]Rok Biderman[/eluser]
Please, do post it. Without it, you're only bragging. Smile
#3

[eluser]alexaaaaaaaaaa[/eluser]
Ok here's the code i use 3 controllers
You must also add few things into your config file

Code:
// Forum settings
$config['latest_topics'] = 10;        // Number of topics to display under "latest" on /forums
$config['posts_per_page']    = 10;    // Number of posts per page on /topics/view/<topic-slug>
$config['topics_per_page']    = 50;    // Number of topics per page on /forums/view/<forum-slug>
$config['search_results_per_page'] = 10; // Number of search results displayed on /search

and few things to the autoload...(maybe some of them you don't wanna use it i just don't have time enought to clear all)

Code:
$autoload['helper'] = array('url','auth','file','slug','js');
$autoload['libraries'] = array('session','form_validation','table','pagination','database','tinypug');

Here's the Download Forums for A3M auth to all files, if you have any problems please post here

https://rapidshare.com/files/457814075/forums.zip
#4

[eluser]Rok Biderman[/eluser]
Nice, I'll give it a try.
#5

[eluser]alexaaaaaaaaaa[/eluser]
btw the sql thing


Code:
--
-- Table structure for table `forums`
--

CREATE TABLE IF NOT EXISTS `forums` (
  `id` varchar(13) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `creator_user_name` varchar(20) NOT NULL,
  `slug` varchar(60) DEFAULT NULL,
  `sequence` int(11) NOT NULL,
  `topic_count` int(11) DEFAULT NULL,
  `post_count` int(11) DEFAULT NULL,
  `is_visible` tinyint(1) NOT NULL DEFAULT '1',
  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `modified` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `forum_slug` (`slug`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;# MySQL returned an empty result set (i.e. zero rows).

--
-- Table structure for table `posts`
--

CREATE TABLE IF NOT EXISTS `posts` (
  `id` varchar(13) NOT NULL,
  `creator_user_name` varchar(20) NOT NULL,
  `text` text NOT NULL,
  `topic_id` varchar(13) NOT NULL,
  `is_visible` tinyint(1) NOT NULL DEFAULT '1',
  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `modified` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`id`),
  KEY `posts_topic_id` (`topic_id`),
  FULLTEXT KEY `posts_fulltext` (`text`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;# MySQL returned an empty result set (i.e. zero rows).



--
-- Table structure for table `status_types`
--

CREATE TABLE IF NOT EXISTS `status_types` (
  `id` varchar(13) NOT NULL,
  `name` varchar(25) NOT NULL,
  `status_type` enum('Open','Closed','Deleted') NOT NULL DEFAULT 'Open',
  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `modified` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;# MySQL returned an empty result set (i.e. zero rows).


--
-- Dumping data for table `status_types`
--

INSERT INTO `status_types` (`id`, `name`, `status_type`, `created`, `modified`) VALUES
('none', 'None', 'Open', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('planned', 'Planned', 'Open', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('started', 'Started', 'Open', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('under-review', 'Under Review', 'Open', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('completed', 'Completed', 'Closed', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('resolved', 'Resolved', 'Closed', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('duplicate', 'Duplicate', 'Deleted', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('inappropriate', 'Inappropriate', 'Deleted', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('other', 'Other', 'Deleted', '2009-07-29 00:00:00', '2009-07-29 00:00:00'),
('spam', 'Spam', 'Deleted', '2009-07-29 00:00:00', '2009-07-29 00:00:00');# 10 row(s) affected.


--
-- Table structure for table `topics`
--

CREATE TABLE IF NOT EXISTS `topics` (
  `id` varchar(13) NOT NULL,
  `name` varchar(100) NOT NULL,
  `slug` varchar(60) DEFAULT NULL,
  `forum_id` varchar(13) NOT NULL,
  `creator_user_name` varchar(20) NOT NULL,
  `last_poster_user_name` varchar(20) DEFAULT NULL,
  `last_post_date` datetime DEFAULT NULL,
  `post_count` int(11) NOT NULL DEFAULT '0',
  `is_sticky` tinyint(1) unsigned DEFAULT '0',
  `is_locked` tinyint(1) unsigned DEFAULT '0',
  `status_type_id` varchar(13) NOT NULL DEFAULT 'none',
  `is_visible` tinyint(1) NOT NULL DEFAULT '1',
  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `modified` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `topics_slug_unique` (`slug`),
  KEY `topics_forum_id` (`forum_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;# MySQL returned an empty result set (i.e. zero rows).
#6

[eluser]samvirtual[/eluser]
I am going to try it. I was making something like this for myself. This is going to save me so much work if it works. Thanks. Do you have a link for a working demo?
#7

[eluser]samvirtual[/eluser]
Will this work with the CI 2.x.x
#8

[eluser]alexaaaaaaaaaa[/eluser]
[quote author="samvirtual" date="1306214402"]Will this work with the CI 2.x.x[/quote]
with ci 2.x.x it was tested so the answer is yes.
#9

[eluser]samvirtual[/eluser]
Will i need to make any mods for 2.x.x
Thanks for you reply
#10

[eluser]samvirtual[/eluser]
Nice work, but several compatibility issues with 2.x. and several missing dependencies




Theme © iAndrew 2016 - Forum software by © MyBB