Welcome Guest, Not a member yet? Register   Sign In
  CSS: background: transparent url(/images/menu_background.gif)
Posted by: El Forum - 02-07-2008, 04:19 PM - Replies (1)

[eluser]sawatdee[/eluser]
I am using css for my menu as such:

Code:
.horizontal_menubar
{
    background: #000000 url(/images/menu_background.gif) top left repeat-x;
}
However, my images directory is under my application directory. The following code works, but there is something about having my system directory in my css file that I don't like.
Code:
.horizontal_menubar
{
    background: #000000 url(/system/application/images/menu_background.gif) top left repeat-x;
}
I could also make my css file a php file and reference my images as URLs using site_url (), but that is a little bit of a hassle.

Has anyone else found a more graceful way to do this?


  Scaffolding does not work in "subfoldered" controller
Posted by: El Forum - 02-07-2008, 03:32 PM - Replies (8)

[eluser]Pierce[/eluser]
It would seem that the scaffolding system does not work when placed in a controller that resides in a subfolder within /controllers/

The scaffolding activation code is in the file:

e.g. /controllers/folder/session.php

You'll simply get a 404 error.

If anyone knows of a possible fix or solution, I'd be interested in using it!

Thanks


  Smileys helper - missing file
Posted by: El Forum - 02-07-2008, 03:25 PM - Replies (7)

[eluser]Lobosaurus[/eluser]
Smiley helper documentation has a link to download file with smileys: http://codeigniter.com/downloads/smileys.zip, but the file doesn´t exist.


  Is there a way to gracefully handle DB errors?
Posted by: El Forum - 02-07-2008, 02:56 PM - Replies (2)

[eluser]Jay Callicott[/eluser]
What irritates me ab CI (and I love CI I have 20+ apps running off a shared CI framework installation in production) - is that I don't see a way to gracefully handle DB errors, and in php programming most of the errors that can stop down apps are of course DB errors.

Most of us know about PEAR DB and MDB2 where you can run a query and say if PEAR:Big GrinB_Error($res) blah blah and you have a chance to log the SQL and or handle the error gracefully.

With CI if you have debugging on it shows a big DB error page with the error. I want a better way to handle DB errors. Trying a try/catch doesn't seem to work.

Anybody have ideas? It seems like the documention assumes you will never have any db errors and that's irritating. I wish I could run a query and have something like $this->db->db_error() or something where I could then handle the db error. Thoughts??


  scaffolding question
Posted by: El Forum - 02-07-2008, 02:18 PM - Replies (7)

[eluser]Peter74[/eluser]
Hi all, in the introduction movie i learn, how easy is buildt a blog with scafolding, so i need to know two thinks

1) is segure use scaffolding por this purpose or i have to buildt other similar class?
2) i need use this 2 times (one for a blog, other for a simple news system), how i declare 2 instances for scaffolding?

very txs for reading


  Forum Content Box
Posted by: El Forum - 02-07-2008, 01:13 PM - No Replies

[eluser]Kemik[/eluser]
Hello,

Seen as I have no current projects and integrating phpbb3 is as pain in the neck I thought I'd build a forum using CI.

I was considering TinyMCE's simple interface for the main content box of the reply/topic however most forums opt to use a text box and javascript to add [/b][/i][/u][/quote] etc boxes.

Validation seems the hardest in this case. Whereas TinyMCE handles valid html. I've not looked in to limiting the allowed html in great detail but it seems possible in TinyMCE.

Which do you think would be easier to code and better for the end user, a content box (like CI Forums method) or a simple TinyMCE box?

I'd also be interested in seeing other forums coded in CI to get some more ideas, even if it's just the end user view (not code).

Thanks.


  Global Includes
Posted by: El Forum - 02-07-2008, 12:58 PM - Replies (3)

[eluser]Last Pariah[/eluser]
Normally when I am developing I create a utilities.php file which includes global functions like checking if a user is logged in or if they are authorized to edit a page. I am use to just putting an include at the top of every page.

Is there a better way of doing this with CI? or do I have to just go back to my usual way of putting an includes at the top of every page? I am new to CI, the coding model and RAD so I am sort of a newbie.

I know there is probably a really simple answer to this or I am over thinking it. Any help would be appreciated.


  Form + upload, help me refactor my code
Posted by: El Forum - 02-07-2008, 12:21 PM - Replies (1)

[eluser]Référencement Google[/eluser]
Hi,

I have a piece of code that I am sure can be a lot more simpler and smart but need your advices about it.

What I am trying to do is I have a form handling user datas like Name, Surname, ...
In the same form, I have an image upload. The problem is that I am not really sure how to handle the form submiting with the 2 forms together, so here is the controller code (part that handle form submission):

Code:
// If the form is posted, run the form validation
        if($this->validation->run())
        {            
            // All ok ? We check now for the photo upload            
            $this->files = $this->photo_upload();
            if(!$this->files)
            {
                if($this->upload->display_errors('<p class="form_error">', '</p>'))
                {
                    $data['upload_message'] = $this->upload->display_errors('<p class="form_error">', '</p>');
                }
                else
                {
                    $data['upload_message'] = '<p class="form_error">You did not select any file on your computer !</p>';                    
                }
                
                $data = $this->display_formUpload($data);
                $this->display_form($data);
            }
            else
            {
                // All was fine, upload OK. We send the email and redirect
                if($this->_send_email())
                {
                    redirect('userform/success');
                    exit;
                }
                else
                {
                    // The email couldn't been sent or there was another problem.
                    $data['upload_message'] = '<h1 class="error">There was a problem while submiting your datas.</h1>';
                }
            }

As you can see, I made the form validation in 2 steps, first validate the form datas, then validate the upload. Any help on doing this in a better way?


  Cache and multilingual site
Posted by: El Forum - 02-07-2008, 11:52 AM - Replies (4)

[eluser]Référencement Google[/eluser]
Hi,

I get a problem using CI core based cache library.
I have set a multingual system usin the Wiki one that I found here:
http://codeigniter.com/wiki/Language_Selection/

All ok with this until I wanted the add cache to the website. While switching language, it still read to old cached file, then for the user it's look like the language have not changed. It's only once the cache expires that the user can see the content with switched language.

Anyone has experienced this problem, and how to solve it?

Christophe


  mySQL v. 3.23 limits on code igniter
Posted by: El Forum - 02-07-2008, 11:43 AM - Replies (11)

[eluser]blackwolf[/eluser]
Hi guys,
I'm developing a website hosted by a hosting with database mysql version 3.23
What are the limits on code igniter features, using this mysql version?
Thanks
Bye


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

Username
  

Password
  





Latest Threads
codeigniter 3.0.1 equiped...
by JustJohnQ
1 hour ago
Display a custom error if...
by b126
4 hours ago
Type error in SYSTEMPATH\...
by DXArc
4 hours ago
v4.5.1 Bug Fix Released
by LP_bnss
6 hours ago
Retaining search variable...
by Bosborne
7 hours ago
Getting supportedLocales ...
by InsiteFX
10 hours ago
composer didn't update to...
by Sarog
Yesterday, 03:56 PM
Pipe on url modified in %
by kenjis
Yesterday, 02:52 PM
Best way to create micros...
by kenjis
Yesterday, 02:50 PM
How to use Codeigniter wi...
by kenjis
Yesterday, 02:39 PM

Forum Statistics
» Members: 85,067
» Latest member: s666gamecom
» Forum threads: 77,571
» Forum posts: 375,953

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB