CodeIgniter Forums

Full Version: Start to build a program together
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Mahyar Ss[/eluser]
hi friends,
im new CI user,

so trying learn how can i work that and understand somedeal...
but i cant find suitable method for somethings to do!
i want to make simple modular cms with multi templates ability so can use parser to get "site info": site name, site description &... and load to view template:

<title>{site-name}</title>

can i use this method for load all part of site together?
use {...} to load modules, menus...

i have list of module blocks in db table
how can i get this modules from modules folder and load into view template following :

<div class="content">

<div class="r-content">
{right-blocks}
</div>

<div class="c-content">
{center-blocks}
</div>

<div class="l-content">
{left-blocks}
</div>

</div>

//in template.php

for example:
{center-block} Composed of 3 block today news(news module), some text(content module), new image (image module)

or for menus from db menu table:

<div class="menu">
{menus}
</div>

please tell me best method

In addition, about design structure & pattern
Write a comment

aplication
-|controllers
-|componnents
-|libraries
-|plugins
-|models
-|modules
--|mod_name
---|tmpl
-|view(templates)

Tanx

El Forum

[eluser]jedd[/eluser]
[quote author="Mahyar Ss" date="1260855065"]
but i cant find suitable method for somethings to do!
i want to make simple modular cms ...
[/quote]

Perhaps you might be better served by assisting with an existing CMS product.

How about [url="/http://github.com/philsturgeon/pyrocms"]Phil's pyrocms[/url]?

El Forum

[eluser]Johan André[/eluser]
Building a modular CMS might be quite a challange if you are new to Codeigniter.
Try building something easier first.

Some tips:
* Obey the MVC (database stuff in model, logic in controller, html and basic logic in views)
* Extend models and controllers from a custom base-class so you can use common methods without repeating code
* If you repeat yourself alot in your views, consider writing a helper for it
* Learn and steal (not literally) techniques from experienced CI coders
* Browse the "Ignited code" forum for libraries. There's pretty much anything you will need (well, not everything) in there.
* If you post for help, try to ask for help with your code - not ask people to code for you.
* Sketch your project on paper before starting to code. Sort out what models you need, which tables they'll map to and which controllers you'll need. Design your views in pure xhtml/css first and then adapt them in your project.
* NEVER touch the system-folder. It will mess up your life. Extend the core if you need to.

Good luck!

El Forum

[eluser]Mahyar Ss[/eluser]
Yes it's true, early for me now

I work for one person and i wrote for him a program
But this was no program structure
Program must be delivered to him
I am concerned about it, my program is weak
For this reason I decided to start learning and work with a framework

Finally, I found the code igniter

This program is special
According to the request
admin of this program is written with the other language...
Before, Not need to see this information on the Internet!
Only the information stored on the database and it was enough;

Now they will
Some tables of database
Similar to the website to run
so I just need to
Reading this information safe and desirable form of database Smile