Welcome Guest, Not a member yet? Register   Sign In
  How can i tell what version of CI i'm running if i deleted the changelog
Posted by: El Forum - 07-09-2008, 08:26 AM - Replies (3)

[eluser]johnwbaxter[/eluser]
I've stupidly forgotten what version of CI i'm running and i've also deleted the changelog.

How err... would i go about finding out what version i'm running?


  SOLVED: Error loading model
Posted by: El Forum - 07-09-2008, 07:58 AM - Replies (1)

[eluser]Bramme[/eluser]
Fatal error: Call to undefined method password_hash::_assign_libraries() in /var/www/vhosts/bramme.net/subdomains/mickm/httpdocs/systeem/libraries/Loader.php on line 178

I needed to use a class in my CI app, so I figured, since it's a class, I can just use it as a model... I took care off the variables that needed to be set etc etc, but I can't make anything off this error.

Anybody got a clue?

The error happened in a custom validation callback

Code:
function phpbbmatch($str) {
    
    $this->validation->set_message('phpbbmatch', 'The password you entered does not match with the entered username');
    $this->load->model('password_hash');
    
    if(empty($str) || !isset($str)) {
        return true;
    }
    
    $username = $this->input->post('name');        

    if($username == false) {
        return false;
    } else {
        //connect to phpbb db and get username password
        $dsn = 'mysql://';
        $phpbb = $this->load->database($dsn, true);
        $phpbb->where('username', $username);
        $query = $phpbb->get('phpbb3_users');
        $row = $query->row();
        $hash = $row->user_password;
        $check = $this->password_hash->CheckPassword($str, $hash);
        
        if($check) {
            return true;
        } else {
            return false;    
        }
    }    
}


  SQL_CALC_FOUND_ROWS. Where I can place the follow code ?
Posted by: El Forum - 07-09-2008, 07:57 AM - Replies (2)

[eluser]Unknown[/eluser]

Code:
// This function run after query with SQL_CALC_FOUND_ROWS instruction    
function found_rows()
{
    $query = $this->query('SELECT FOUND_ROWS() AS fr');
    $row = $query->row();
        return $row->fr;
}


//.....

$this->db->found_rows();


  Displaying html only if condition is true
Posted by: El Forum - 07-09-2008, 07:44 AM - Replies (5)

[eluser]Dagobert Renouf[/eluser]
Hello guys,

I have some part of my controller that populates the $data array with an "admin_notification" value only if there is a notification.
To avoid errors in my view, I first set $data['admin_notification'] = "".

Here's my problem: I can't wrap the <?= $admin_notification; ?> in any paragraph or thing like that, because in the case of no notification and depending on my css, this would display an empty box (concidering it is wrapped in a box) and I just don't want any box at all.

So as I don't know if the notification exists in the view, I need to wrap data in my controller before sending it to the view (example : $data['notification'] = '<p>' . $error . '</p>';

I'm forced to put my html in my controller and that sucks !

How do I make it clean ?


  How Smart is CodeIgniter?
Posted by: El Forum - 07-09-2008, 07:35 AM - No Replies

[eluser]AgentPhoenix[/eluser]
When it comes to DB Forge, how smart is CI? I know that MySQL has a LONGTEXT field type, but I also know that Oracle doesn't have that. They do have CLOB, but I was wondering if CI is smart enough to do those conversions, and if it is, where would I find those conversions? I poked around the drivers and couldn't find anything about that.


  Weird behaviour - image dissappears
Posted by: El Forum - 07-09-2008, 07:10 AM - Replies (6)

[eluser]The Mask[/eluser]
I have an 'About' page that is called by an 'About' controller...

function index()
{
$this->load->view( 'about_view' );
}

This works fine when called as: http://www.mysite.com/about

However, if I change my controller to include a method that does exactly the same, an image at the top of the page dissappears.

i.e.
http://www.mysite.com/about/test

and in my controller...
function test()
{
$this->load->view( 'about_view' );
}

So the same view is being loaded but an image is not shown. Any ideas, it's driving me nuts!
I have stripped everything out of the controller and view to leave basically what is above.


  .htaccess baseurl
Posted by: El Forum - 07-09-2008, 06:21 AM - Replies (1)

[eluser]dexter21[/eluser]
Hi i have following site estructure

/codeign
/several
how could i do with .htaccess that if i type www.mysite.com go to www.mysite.com/codeign ?

i have .htaccess:

Code:
RewriteCond $1 !^(index\.php|imagenes|js|descargas|tmp|public|robots\.txt)
RewriteRule ^/codeigniter/([^/\.][^\.]?)$ /codeigniter/index.php/?$1 [L]

many thanks


  autoloading languages
Posted by: El Forum - 07-09-2008, 05:34 AM - Replies (3)

[eluser]GSV Sleeper Service[/eluser]
Am I missing something here?
It looks like you can only autoload languages from the root of the languages folder, which kind of defeats the point of having separate folders for each language.


  while loop slows performance down - online
Posted by: El Forum - 07-09-2008, 03:37 AM - Replies (8)

[eluser]chops[/eluser]
i have the following while loop on a website

Code:
&lt;?php foreach($query->result() as $row): ?&gt;
        <div class="casesummary-home">

&lt;?            $random = rand();
            while (($random > 6) || ($random < 1)){
                $random = rand();
            }
            ?&gt;
            <a href="casestudies"><img src="images/&lt;?=$random ?&gt;/thumbs/image1.jpg">title ?&gt;" />  </a>


        </div>
        &lt;?php endforeach; ?&gt;

this works fine locally, however not when its online, it slows the performance of the page down and eventually doesn't load that code or anything below it.

Can anyone suggest on a better method?


  Security Tips
Posted by: El Forum - 07-09-2008, 03:23 AM - Replies (2)

[eluser]lefrog[/eluser]
Evening all

I'm currently working on my biggest project to date and using code igniter for the job and its all working fine. It's a huge product database with various little apps for selecting the product for the correct job etc.

The client wishes to do penetration testing before we go live.

So I'm just asking you guys for any tips for making my site as secure as it can be.

Its has forms and an admin area.

Cheers,
Jonny


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

Username
  

Password
  





Latest Threads
CodeIgniter v4.5.0 Releas...
by eelisland
11 minutes ago
Cache best practice?
by BhambriRohunu
1 hour ago
CI 4.5.1 CSRF - The actio...
by BhambriRohunu
1 hour ago
Bug with sessions CI 4.5....
by InsiteFX
1 hour ago
Codeigniter Shield Bannin...
by kenjis
6 hours ago
SQL server connection not...
by kenjis
6 hours ago
Best way to create micros...
by kenjis
8 hours ago
How to use Codeigniter wi...
by kenjis
8 hours ago
Getting supportedLocales ...
by kcs
Yesterday, 09:30 AM
Component help
by FlashMaster
Yesterday, 01:41 AM

Forum Statistics
» Members: 85,281
» Latest member: Chinahopelive
» Forum threads: 77,577
» Forum posts: 375,981

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB