Welcome Guest, Not a member yet? Register   Sign In
  Library for generating a menu
Posted by: El Forum - 06-24-2007, 02:11 PM - No Replies

[eluser]JosGo[/eluser]
Is there anybody interested in a CI-library to generate a menu as in my pre-CI-webapplication Gardenlog? Log on using ukguest / ukguest if you're more comfortable with English than Dutch.
I'am converting it to CI. If enough people like it I will publish it.


  creating page fragments
Posted by: El Forum - 06-24-2007, 01:42 PM - No Replies

[eluser]deineMudder[/eluser]
hello again Wink
compliments first: the more i use CI the more i love it, its a wonderful framework and really speeds up coding.

tho, here is my question.
my controller 'user' got the following functions (search/list/add/edit/delete).
i guess the basic modes for a cms. there is a html template creating a basic table layout to sort all elements on the page ... just like this

Code:
<table>
<tr><td colspan="2">(header)</td></tr>
<tr><td colspan="2">(buttons - navigation for add/search/list ...)</td></tr>
<tr>
  <td>(cms navigation - user, article, gallery ...)</td>
  <td>(content area - forms for editing, adding ...)</td>
</tr>
</table>

i hope u got the idea of it. what i am missing now are the basic includes Wink back in old times before CI i just included my 2 navigations.
to use the same view i would pass a variable to the view and switch it in the content area.
tho id like to include the 2 navigations.

any ideas to make it the right way?


  Reusing the same form code for creating and editing
Posted by: El Forum - 06-24-2007, 11:42 AM - No Replies

[eluser]Unknown[/eluser]
If possible, I would like to write my form code only once and use that code for both creating new objects and for updating existing objects. Repopulating the form after a submission is easy using the validation framework. For both edit and create, I just do this:

Code:
&lt;input name="name" id="workshop_name" value="&lt;?= $this-&gt;validation->name ?&gt;" />

I saw an approach for reusing the form after validation and for editing where the code looked like this:

Code:
&lt;input name="name" id="workshop_name" value="&lt;?= ($this-&gt;validation->name) ? $this->validation->name : $workshop->name ?&gt;" />

The question is how to also use that form when I'm creating a new object. I could either create a stubbed out workshop object so that the same code that works for presenting the update form works for presenting the new form. Or I could leave out the workshop object entirely and put more logic into the view to present an empty form in the case where we're presenting something new.

Is there an established pattern for dealing with this case?

In many frameworks, you create a form backing object that you can instantiate when you're presenting the form for creation, populate from the database in cases where you're editing, and populate from the request when you're validating. Is that any approach anybody uses with CodeIgniter?


  Just a suggestion about calendar!
Posted by: El Forum - 06-24-2007, 09:15 AM - No Replies

[eluser]Unknown[/eluser]
Hi there, don't know if this is the right forum but...

When passing data to calendar, like: (as in user guide)

Code:
3  => 'http://your-site.com/news/article/2006/03/' <-- WORK
03  => 'http://your-site.com/news/article/2006/03/', <-- DON'T WORK
Just because of leading zero! Smile
I spent about 20 min trying to figure out why wasn't working!

So, the suggestion is: data could be passed with or without leading zero!

Hugs from brazil!
Sry for bad english!


  Problem with FCKeditor implementation
Posted by: El Forum - 06-24-2007, 04:59 AM - No Replies

[eluser]PoWah[/eluser]
I've done everything following http://codeigniter.com/wiki/FCKeditor/ page and I get an error: The URI you submitted has disallowed characters. when I try to load fckeditor in browser

Any ideas? :/


  Database connection issue
Posted by: El Forum - 06-24-2007, 04:17 AM - No Replies

[eluser]metalking[/eluser]
Hi everybody!

I'm having a problem with my CI app. On my computer, running PHP5 and MySQL, everything's OK, my app connects to the database, retreives datas...

The problem is, when I upload my application (with new database.php and config.php files with the actual informations of my webhost), CI cannot connect to my database, and shows the following error message:

Unable to connect to your database server using the provided settings.

What's the problem? My database infos are correct (I'm sure of this), the path to my application is correctly set in the config.php file...

Thanks Wink

PS: My webhost is running PHP5 and MySQL too


  routing and controllers
Posted by: El Forum - 06-24-2007, 12:50 AM - No Replies

[eluser]deineMudder[/eluser]
Hello,
sadly i got another basic question i guess, where i lack understanding of CI.

my actual controller folder looks like this

Code:
controllers
+ admin
  - user.php
  - navigation.php
  - article.php
  - roles.php
  - ....
- homepage.php

im trying to create a small CMS for a site and thought that structure for the administration part could be handy.

each controller (i.e. user.php) has the functions insert, edit, delete ...
as soon as i try to access those controllers hes trying to load a function of admin

controller (admin), function (user)
instead of subfolder (admin), controller (user), function (index)

anyone who could help a newbie to set it up correctly? Wink


  Filters System Bug
Posted by: El Forum - 06-24-2007, 12:38 AM - No Replies

[eluser]marcoss[/eluser]
I've been using hooks for a long time now, but I've decided to try the Filters System because it seems to be a better approach to accomplish some basic routines.

Unfortunately there is a bug in the system, when you try to apply a filter to a controller placed withing a directory it won't trigger. I went over the code and find out that the way it handles the matches is where the problem resides, it is exploding the match by the '/' on in, so CI thinks it is a class instead of a directory.

As an example, if i want to apply a filter to "admin/login" where admin is the directory and login the class name it won't work.

Any ideas on a better implementation of it?


  So, I'm working on a CI-based WebApp... (Commentary)
Posted by: El Forum - 06-23-2007, 06:18 PM - No Replies

[eluser]awpti[/eluser]
Pretend you need a gallery that is:

A.) Simple enough for a designer to completely customize the layout of without learning a complicated API.
B.) Doesn't need a heavy login/plugin/module system (only need 1 user to manage it)
C.) Can password protect categories if needed
D.) Can upload files both via the web and via FTP (To a specific upload directory for later processing)..

What other features would you like to see?

My current design document looks something like this:

Code:
Technologies used:

    PHP (5+)
    mySQL / pgSQL
    Any http daemon that supports PHP
    Any OS that supports the above

Features:

    Simplified Templating (Custom Template Engine)
    XHTML / CSS Compliant Output
    Support for virtually any image format
    Categories and Sub-Categories
    Password Protect Categories
    Upload files via Web or FTP

NOT Features:

    Heavy login/authentication system (1 user, the admin)
    Complicated Layout changes via the Smarty Templating system

Obviously, this WebApp is being created utilizing the CodeIgniter framework.

I have some prototype code for some of the features (Specifically, the templating tool)

-Geoff W.


  Bootstrapping Advice
Posted by: El Forum - 06-23-2007, 03:29 PM - No Replies

[eluser]richard_ctv[/eluser]
Hello, I am new to these forums and to CodeIgniter.

I have an application I'm working on, and I have got bogged down, so I was looking for a framework to use. I'm very impressed with CodeIgniter (compared with the dozen or so other I have looked at so far) - the system actually makes sense to me - but I have a couple of issues I need to solve quite quickly, hence my post.

I will port the existing code to the framework (this is trivial given I already use a basic MVC layout).

The four problems I have are:

1. I run separate blog and forum software alongside my main app (in /blogs and /forums). I don't want these requests to code to CodeIgniter. Possible ?

2. I need to use the forum authentication within the rest of the site (the CodeIgniter bit).

3. The length of URLs is long. The 'Controller' component might have more than one level

e.g. /category/sub-cat/sub-cat/sub-cat/item-to-view/part-1/fragment-1

There can be a number of sub-categories (the use can create these, but they wont go totally crazy), then the item to view. The item to view may be split into parts, and those may have fragments. So the transistion between the controller and he action changes. If there is no part or fragment then that is the last level.

4. I need to share some components from the main site in the other applications - for example parts of the header and footer (but not all of the header).

I hope that makes sense. :-)

Many thanks for any comments.

Richard


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Update from 4.6.0 to 4.6....
by captain-sensible
7 hours ago
Ajax post failing with Ty...
by vitnibel
Yesterday, 08:52 PM
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
Yesterday, 10:33 AM
CodeIgniter Shield 1.0.0 ...
by timesprayer
Yesterday, 05:22 AM
Website Traffic Drop Afte...
by InsiteFX
Yesterday, 04:23 AM
Magic login link not work...
by InsiteFX
Yesterday, 04:16 AM
Is codeigniter 5 upco...
by InsiteFX
Yesterday, 04:10 AM
CI4 Auto-Discovery not wo...
by InsiteFX
05-09-2025, 11:04 PM
Why PHP is still worth le...
by InsiteFX
05-09-2025, 10:55 PM
Any user guid or video o...
by msnisha
05-09-2025, 02:30 PM

Forum Statistics
» Members: 145,300
» Latest member: twitframecom4
» Forum threads: 78,386
» Forum posts: 379,436

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB