Welcome Guest, Not a member yet? Register   Sign In
  can't appear on google
Posted by: El Forum - 09-08-2008, 08:53 AM - Replies (6)

[eluser]sisiharmoni[/eluser]
i have create web with CI and already add to google , but i can't find my web in google...

please give me advise about that..

my domain is bizmediahost.com


thank you


  Simple question about directories...
Posted by: El Forum - 09-08-2008, 08:06 AM - Replies (2)

[eluser]Unknown[/eluser]
Hey everyone,

I'm very new to CodeIgnitor (assuming control over a website, http://www.codekindness.org, built on CI) and have recently added a JS to control browser types into a new directory in root, JS.

However, if you check out the site, it's clear the JS directory isn't active (or isn't contributing the script for browser checking). Is there a way to activate directories in root web (public_html) through CI, to ensure that the script is bring read?

Thanks!
--Dave


  Pagination once again
Posted by: El Forum - 09-08-2008, 08:03 AM - No Replies

[eluser]Unknown[/eluser]
Is it possible to append something at the end of each link generated by Pagination class ?

I am trying to make my website urls seo friendly and cannot figure out how to turn this:
http://www.site.com/index.php/category/27/oldest/10
into something like:
http://www.site.com/category-27-oldest-10.html


  CI and Enterprice Architect
Posted by: El Forum - 09-08-2008, 03:15 AM - No Replies

[eluser]Unknown[/eluser]
Hi Everyone,

I am curious if anyone has any experience with CI and Enterprice Architect from sparxsystems.

I am trying to combine these progs together, and was wondering if anyone created maybe any customized gode generation template for it, witch maybe could give me inspiration and best practice insight etc.

I'm developing one at the moment, and would be great to see if anyone else thought about this.

I think the combination between the two can speed up developement even more, and could be very usefull for team development.


Greetz


  Using sessions and setting variables in pre_controller hook
Posted by: El Forum - 09-08-2008, 02:52 AM - Replies (2)

[eluser]FinalFrag[/eluser]
I have a website that has a menu at the top. The items of this menu are in a database. I could load a model in all of my controllers, but I rather have a piece of common code somewhere so that I don't have to think about loading the model and calling the getMenuItems() function myself.

From the userguide, the only possible solution I see are hooks, a pre_controller one to be exact.

I've been fooling around with this, but I'm stuck with 2 problems:
1) How do I pass the session to a pre_controller hook
2) How do I set variables that I can use later on

I need to have access to the session because the menu when you are not logged in is different from the one you get when you are.

The need to set a variable is to call the $header_menu variable in my view.

Thnx in advance


  Validation library and blank form fields
Posted by: El Forum - 09-08-2008, 02:33 AM - Replies (7)

[eluser]Oggy[/eluser]
I discovered a problem when working with the validation library.

Imagine having a form with two fields, for example phone number and e-mail address.

When both fields are empty, an error message should be displayed, for example 'You must either have to specify the phone number or the e-mail address'.

The following code in the library avoids the validation of blank fields, when they are not required.

[...]
// Is the field required? If not, if the field is blank we'll move on to the next test
if ( ! in_array('required', $ex, TRUE))
{
if ( ! isset($_POST[$field]) OR $_POST[$field] == '')
{
continue;
}
}
[...]

What about adding a special marker command in order to continue with the validation even if the field is blank?

I know that I am able to extend the core library with my own implementation, but it would be sensible to integrate it into the CI core, wouldn't it?

I appreciate any comments.


  Working Modularly with codeigniter
Posted by: El Forum - 09-08-2008, 01:23 AM - Replies (10)

[eluser]JamesMare[/eluser]
Hi, i have recently been introduced to the modular method of codeigniter development by Eliot Haughin's third screencast. I love that way of working and want to do that myself.
However i have been unable to setup codeigniter to work this way, and Eliot did not go into detail about how it was done. I have tried installing some of the packages out there to do just this, but to no avail.

Could somebody please give me a rundown of how to do this?

Much appreciated
-J Mare


  Fatal error
Posted by: El Forum - 09-08-2008, 01:00 AM - Replies (5)

[eluser]barun the michael[/eluser]
Fatal error: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in /backup/ldaphome/mahesh/system/libraries/Exceptions.php on line 160

Can any one help me.....


  Slashes in routes
Posted by: El Forum - 09-07-2008, 10:37 PM - Replies (1)

[eluser]DPrevite[/eluser]
Is it possible to do slashes inside a regex match? I want to match

Code:
/controller/display/path/to/something

And then have that go into my display function with the string "path/to/something"

I tried this in my routes file, but didn't have any luck.
Code:
$route['controller/([A-Z0-9/])'] = 'controller/display/$1';


  Sessions not working in IE 7
Posted by: El Forum - 09-07-2008, 09:59 PM - Replies (73)

[eluser]spider pig[/eluser]
I am working on a backend of a site. The login uses CI sessions and works fine in Safari, Firefox and IE 6 but not IE 7. Here's the code that verifies the user and sets the session variables. Session is set to autoload.

Code:
function submit() {
    $this->main->load_settings();

    // Verify Data
    $errorMessage = NULL;
    if ($_POST['username'] == NULL)
        $errorMessage = 'Your Username is required.<br />';
    if ($_POST['password'] == NULL)
        $errorMessage .= 'Your Password is required.<br />';
    if ($_POST['username'] != NULL and $_POST['password'] != NULL) {
        $query = $this->db->get_where('admin_user', array('userUsername' => $_POST['username'], 'userPassword' => md5($_POST['password'])));
        if ($query->num_rows() == 0) {
            $errorMessage .= 'The Username or Password is incorrect.<br />';
        } else {
            $row = $query->row();
            if ($row->userStatus != 'Active')
                $errorMessage .= 'Your account has been de-activated.<br />';
        }
    }
    if ($errorMessage != NULL) {
        // re-display login form
        return;
    }

    $this->session->set_userdata('userID', $row->userID);
    $this->session->set_userdata('userGroup', $row->userGroup);

    $this->load->helper('url');
    redirect('main_menu', 'refresh');
}

This function is called a to check if the person is logged in:

Code:
function check() {
    $data = array('userID' => $this->session->userdata('userID'),
            'userGroup' => $this->session->userdata('userGroup')
        );
    $query = $this->db->get_where('admin_user', $data);
    if ($query->num_rows() == 0) {
        echo $this->load->view('redirect', NULL, TRUE);
        return FALSE;
    }
    return TRUE;
}

These are the session settings:

Code:
$config['encryption_key'] = "apassword";

$config['sess_cookie_name']    = 'ci_session';
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = TRUE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']         = 300;

Is there a way to fix the problem with IE 7?

Thanks


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

Username
  

Password
  





Latest Threads
Retaining search variable...
by Bosborne
47 minutes ago
v4.5.1 Bug Fix Released
by LP_bnss
1 hour ago
Getting supportedLocales ...
by InsiteFX
3 hours ago
Type error in SYSTEMPATH\...
by kenjis
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
extend url_to helper
by kenjis
Yesterday, 02:33 PM
Limiting Stack Trace Erro...
by byrallier
Yesterday, 05:43 AM

Forum Statistics
» Members: 85,012
» Latest member: esmogshop
» Forum threads: 77,570
» Forum posts: 375,947

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB