EllisLab text mark
Advanced Search
     
Looking for opinions for developing new site using CI
Posted: 29 July 2007 07:06 PM
Joined: 2007-03-21
25 posts

In the past I wrote all my own classes and functions. The I found CI, and while it’s been useful, I’ve still been using my old mentality of doing it all myself.

I’ve seen so many references to what sound like great user contributions, but have had little time to try them all out. Now I’ve got a quick project that has a very small budget. It’s for a local non-profit, and I’d like to try out using the great work others have done instead of re-inventing the wheel once again.

What I need to do is create a site that has a public front end, and an admin section with different levels of authentication. The site needs to have the following:

1. Update-able news and information (blog style perhaps)
2. An easily update-able calender
3. A nice clean gallery section for their annual events, easily update-able of course
4. Easy to use category management would be nice.
5. User authorization with multiple levels of authorization.

Any recommendations for existing libraries, etc. would be appreciated. I want to see how fast I can put this together since it’s going to be a break even deal, at best.

Thanks in advance!

 
Posted: 30 July 2007 10:11 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-03-21
25 posts

Well, I thought for sure someone would have an opinion. Since it appears not to be the case, I’ll post back with the contributions I find that work best as I go.

If anyone does have an opinion, feel free to post it…

 
Posted: 30 July 2007 01:30 PM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-06
743 posts
kbauman - 29 July 2007 11:06 PM

I’ve got a quick project that has a very small budget.

This looks like a lot of work! It also looks like a perfect fit for a CMS like Expression Engine. If you are going the CI route, you might want to use the zend ACL for authorization.

 Signature 

“I am the terror that flaps in the night”

 
Posted: 30 July 2007 01:48 PM   [ # 3 ]   [ Rating: 0 ]
Joined: 2007-03-21
25 posts

Thanks, EE would be great. Unfortunately $100 would eat up a good chunk of the budget.

I’ve written a very simple CMS using CI that I’ve used for a few sites, using RTE for the text editor, my own authorization library, and a category management library as well. It works, but I want to extend the CMS for a larger number of users with different levels of authentication, capability to use more than two levels of categories, and a better, cleaner text editor than RTE. RTE works, but it doesn’t seem to have had any updates in a long time.

I’ll take a look into Zend ACL. There are several other libraries in the wiki as well, such as Freak Auth, Sentry, Auth, etc. I’m just not sure which one to go with.

Same with text editors. There is Xinha, FCKeditor, SPAW, TinyMCE, etc. I tried FCKeditor in the past, and had a few problems setting it up. I don’t need lots of capabilities, as that only allows the users to put in blue text in a 37pt font, all in italics. Simple is better.

Finally I’ve written my own category management library, but it’s really limited to two levels. I want more, but I’d like to see if someone else has written such a thing before I go re-write this library myself.

 
Posted: 03 August 2007 09:03 AM   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2007-07-19
18 posts

Hi Kbauman, for user authentication I can really reccomend “FreakAuth”. I haven’t given the others a try, but it’s quite complete with autherisation levels, CAPTCHA and an admin panel. It took me a while to set up, the docs are okay (but I would love to see a very simple, basic step-by-step installation of the basic functionality—and not the small example website that comes with it, like they have now, with images and CSS and stuff).

But I agree with Rick Jolly that you should maybe use a CMS if you want “the easy way”.

I am curious what solution you have found for the blog part.

 
Posted: 03 August 2007 09:50 AM   [ # 5 ]   [ Rating: 0 ]
Joined: 2007-03-21
25 posts

I’ll check out FreakAuth, it seems to be mentioned in the forums more than others.

I agree that a CMS would be good, but I’ve not found that they are usually easy and cheap, which is what I need. The cheap (free ones) mostly seem to be a pain to customize, and the easier ones seem to cost more than my budget will allow.

I haven’t found a solution for the blog part yet, though since it won’t need to have comments, it shouldn’t be to hard. I’ve added such features to other sites before, so I guess I’ll write it myself. After reading more about the different text editors, I think Xinha sounds the best, though I know how to set up RTE, so that’ll be my fall back.

I’ll post back what I end up cobbling together.

 
Posted: 06 August 2007 12:29 PM   [ # 6 ]   [ Rating: 0 ]
Joined: 2007-03-21
25 posts

I’ve got a question about best practice in using MySql for the category management that I mentioned in the original post in this thread.

I’ve used a category management library I quickly wrote for a couple of small applications that uses a different table for each category.

I don’t think this is the best way to do this, but I did it because it was the best way form my feeble mind to figure out how to have different categories, and sub-categories, while having the ability to set the order of the categories, sub-categories, and the items in the sub-categories independently of each other in an admin section, as well as being able to delete items, and sub-categories, and having the order reset automatically without interfering with other items in other sub-categories, etc.

It’s worked fine so far, but I see one obvious problem, which is that if an item is in two sub-categories, it has to be entered into the db twice (once for each sub-category). The other issue, of which I have little knowledge, is at what point would this become a major resource problem?

I’d like to try using nested sets, but am wondering how much of an issue it would be to make everything from top down order-able independent of the other categories, sub-categories, and items in those cats and sub-cats.

 
Posted: 26 October 2007 11:50 AM   [ # 7 ]   [ Rating: 0 ]
Joined: 2007-10-24
27 posts

Your mileage might be best storing categories in one table where we have say an ID, PARENT_ID, and CATEGORY_NAME
Parent(top level) categories get a PARENT_ID of 0 with children getting a PARENT_ID relative to the parent.

Ex.

ID   |   PID   |  CATEGORY     
----------------------------------------
1    |   0     |  Home             
2    
|   0     |  Gallery            
3    
|   0     |  Contact
4    
|   2     |  Current Exhibit
5    
|   2     |  Artists
---------------------------------------- 

Here ‘Current Exhibit’ and ‘Artists’ have a PID of 2 telling us that they are children of Gallery having an ID of 2 as the Parent. Read that again.

Get main categories by isolating based on PID of 0
Select * from categories where pid = 0

Get sub categories for Gallery by
Select * from categories where pid = 2

 

If you want to sort categories, you could add a weight field

ID   |   PID   |  WEIGHT  |    CATEGORY         
--------------------------------------------------
1    |   0     |  0       |    Home                 
2    
|   0     |  2       |    Gallery               
3    
|   0     |  1       |    Contact              
4    
|   2     |  0       |    Current Exhibit   
5    
|   2     |  0       |    Artists                 
-------------------------------------------------- 

If your going by the logic, lower the number lighter the load, you would have:
Home, Contact, Gallery for the root categories
Current Exhibit, Artist for sub categories as they are both at 0. If the Category name was indexed however it would be Artist then Current Exhibit

Want to switch position of Contact and Gallery give Contact a weight of 100 or anything above 2 and it drops down the list.

 Signature 

————————————————————————————————————————————————————————
+
+  Current inspiration
+

Artist: Telefon Tel Aviv | Song: 8 Track Project Cut | Album: Immediate Action (2002)
Listen to demo (LAST.FM)
————————————————————————————————————————————————————————

 
Posted: 26 October 2007 02:41 PM   [ # 8 ]   [ Rating: 0 ]
Joined: 2007-03-21
25 posts

Thanks. I ended up doing something similar to your suggestion. I used an id, and a parent id, and the I added a column called display_order, which would be similar to weight. It gives me the option to display alphabetically or by display_order.

I played around with the pre-order tree-traversal or whatever it’s called, and it looks like a good way to go, but this way was easier to wrap my head around to start. However getting the recursive function to work just right was a pain.