Welcome Guest, Not a member yet? Register   Sign In
  multi domain in codeigniter
Posted by: El Forum - 12-01-2008, 05:20 AM - Replies (7)

[eluser]mom_maj[/eluser]
Hi all
I write application in codeigniter and i need to run that application in multi domain.

Cane i do that and if i can how ?

Regards.

Thanks for your help.


  CodeIgniter and Hebrew (or other languages..)
Posted by: El Forum - 12-01-2008, 04:30 AM - No Replies

[eluser]davidIgniter[/eluser]
Hi,

I'm using <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=windows-1255" />

in order to present hebrew character, but I get weird chars: ׳’׳“׳›׳“׳’׳›׳“׳’׳›׳“׳’׳›
׳›׳¢׳›׳’׳¢׳›׳’׳¢׳›׳’׳¢

the data in the dataBase is ok, and the strange thing is when I'm saving
the page as ".htm" and open it, I can see hebrew.

so why I can't see hebrew in codeIgniter, and what I should do?

thanks

David


  DX Auth 1.0.6 (Authentication library)
Posted by: El Forum - 12-01-2008, 04:14 AM - Replies (628)

[eluser]dexcell[/eluser]
Introduction
DX Auth is an authentication library for Code Igniter. It's goal to enable you to easily include secure and easy to use authentication library to your project, while giving you the flexibility to choose from simple authentication system to full fledged authentication system.

DX Auth is also build with internationalization in mind, so every string is available in language file. (Except the examples because that is your code, not the library).

It's based on CL Auth 0.2.5 beta developed by Jason Ashdown.

What is the feature of DX Auth?

* Basic auth (Login, logout, register, change password).
* Remember me.
* Login using username or email address or both (depend on config settings).
* Forgot password.
* Ban user.
* Last login IP address and time (optional).
* Email activation (optional).
* User Profile (optional).
* Role based (admin, user, moderator, etc). Inheritance also supported (optional)
* Restrict page based on URI and role (optional).
* Custom permission for each role (optional).
* Login attempt (optional). You can use this to display catpcha after specified try to login to prevent bot.
* Event feature (For example: You can put your own code like PM welcome message after user activated, etc).
* Captcha (optional, native and reCAPTCHA is available).
* Simple admin panel (So you can customize it, include it into your own admin panel, or delete if you don't need it).
* Most of the feature is optional, means you can turn it off in config file, delete it, or just don't use it.


What is changed since CL Auth 0.2.5

If you are ever using CL Auth before, you might want to know what's changed since CL Auth 0.2.5

* Bug fixes.
* Add and change function.
* Changed code structure.
* Group changed to role.
* Compatible with CI bundled session without hacking it.
* Added language file for internationalization.
* All function named lower_case instead of camelCase.
* Source code writing following CI User guide.
* Commented source code so you can follow along.
* Code Igniter style user guide with detailed explanation.
* And other that i don't remember Smile.

DX Auth is tested in CI 1.7.0, but should be working for above version.

DX Auth is licensed under MIT license.

Here is the link:

Documentation (Very well documented)

Download link

Simple example on how to use DX Auth (See how easy to use it)

Version 1.0.6 (See how to upgrade below)

Release Date: January 3, 2009

It's recommended to download the latest version.


  Destructor and Database Connection
Posted by: El Forum - 12-01-2008, 03:20 AM - No Replies

[eluser]petewulf[/eluser]
Hello there,

i'm new to codeigniter and currently developing my first project with it. I have implemented many own classes which have to interact with the database itself and have to read data in the Constructor and write them back in the Destructor.

The Problem is, that when the Destructor on my own class is called, the Database connection is already closed by CI and i have to manually reconnect or create a method which is called at the end of the code. This is not a very smooth way to code i think so my question is if there is any possibility to close the CI_DB later?

Wouldn't it be a nice feature if the classes are destructed from 'inside' to 'outside', so that all CI core functions are still accessible till the end?

Regards,
Daniel


  Documentaion bugs in 1.7
Posted by: El Forum - 12-01-2008, 02:28 AM - Replies (1)

[eluser]Unknown[/eluser]
1)Something wrong with http://localhost/user_guide/general/controllers.html - the page is not correctly rendered in Firefox&IE;.
The same stuff with Views...
2)http://localhost/user_guide/installation/index.html - Getting started link is wrong ...


  add dates
Posted by: El Forum - 12-01-2008, 02:10 AM - Replies (4)

[eluser]chinedubond[/eluser]
hello please i need some help in adding dates.
I have this date lets say 12/12/09 i want to make it 13/12/10.i.e add i year to it .
how do i do that in php?


  Newbie "Logical" Observation: Get your sytax Correct!!!!!!!
Posted by: El Forum - 12-01-2008, 02:07 AM - Replies (3)

[eluser]featureBlend[/eluser]
Im on a local Apache 2.06 / PHP 5.2.6 / MY SQL 5+ Environment

A simple logical observation and explanation ---> I am not using short tags and the tutes that Derek posted do, so if you are in the same position as me then read on..

I had done everything according to the tute, but when i pressed the submit button in the comments_view there was no response..Heres the files BEFORE i figured it out:

1. blog.php (Front Controller)

Code:
<?php
    class Blog extends Controller {
        
        function Blog()
        {
            parent::Controller();
            
            $this->load->scaffolding('entries');
            $this->load->database();
            
            $this->load->helper('url');
            $this->load->helper('form'); //loaded the helpers
        }
        
        function index()
        {
            $data['title']="Ahads Page with CI";
            $data['heading']="My Blog Heading";
            $data['query']= $this->db->get('entries');
            
            
            $this->load->view('blog_view', $data);
        }
        
        function comments()
        {
            $data['title']="My Comment Title";
            $data['heading']="My Comment Heading";
            $this->load->view('comment_view', $data);
        }
        
        function comment_insert()
        {
            echo 'testing 1,2,3'; //lets test that function in the comment_view
        }
}
?>

2. comment_view.php (View file for comment page)

Code:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1>&lt;?php echo $heading; ?&gt;</h1>

///hmmm what could be wrong with the syntax here?
//should i open the form tag with the html syntax &lt;form&gt;?
//i tried to use the form syntax, the button started working but not quite the way i wanted it
&lt;?php form_open('blog/comment_insert'); ?&gt;

&lt;?php form_hidden('entry_id',$this->uri->segment(3));?&gt;

<p>&lt;textarea name="body" rows="10"&gt;&lt;/textarea></p>
<p>&lt;input type="text" name = "author" /&gt;&lt;/p>
<p>&lt;input type="submit" value="Submit Comment" /&gt;&lt;/p>

&lt;/form&gt;
    

&lt;/body&gt;
&lt;/html&gt;

No response from the Submit button from the above code..Why? I knew it was something with my syntax in one of the files. Was it the &lt;form&gt; tag in the comments_view (but i called the form helper class from the controller so it should handle the request right?, RIGHT), or some other syntax error. See below:

Code:
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
<h1>&lt;?php echo $heading; ?&gt;</h1>


&lt;?php echo form_open('blog/comment_insert'); ?&gt;

&lt;?php echo form_hidden('entry_id',$this->uri->segment(3));?&gt;

<p>&lt;textarea name="body" rows="10"&gt;&lt;/textarea></p>
<p>&lt;input type="text" name = "author" /&gt;&lt;/p>
<p>&lt;input type="submit" value="Submit Comment" /&gt;&lt;/p>

&lt;/form&gt;
    

&lt;/body&gt;
&lt;/html&gt;

I failed to add the "echo" STATEMENT before (1) form_open and (2) form_hidden in my comments_view file.

What is the echo statement?

In flat files the syntax would be:

Code:
void echo (string argument [,...string argumentN])

The echo() statement operates similarily to print(), except for two differences.

1 - It cannot be used as a part of a complex expression because it returns void()
2 - echo() is capable of outputting multiple strings (see below)

For example:

Code:
&lt;?php
   $easier = "Code Igniter";
   $harder = "Symfony";
   echo $easier,  " and " , $harder, " are great frameworks. ", " Learn CI first though.....If the dudes who created CI follow the KISS approach, then so shall we. ";
?&gt;

Try to develop good habits and "familiarize" yourself with flat php syntax as well....


  generating jpeg of pdf file
Posted by: El Forum - 12-01-2008, 01:14 AM - Replies (1)

[eluser]ray73864[/eluser]
I wonder, is it possible using perhaps the Image Manipulation class to create a jpeg thumbnail preview of a pdf file.

Or is there an even better way of doing it?


  Loading not working for models?
Posted by: El Forum - 11-30-2008, 10:34 PM - Replies (2)

[eluser]mattbman[/eluser]
I have just installed CI and for some reason, my models are not properly loading the libraries. Here is my code for my model:

Code:
class Usermodel extends Model {
    
    function Usermodel() {
        parent::Model();
    }
    
    function login() {
        if ($this->input->post('username') && $this->input->post('password')) {
            if ($this->checkpassword($this->input->post('username'),$this->input->post('password'))) {
                $this->session->set_userdata('username',$this->input->post('username'));
            }
        }
        
    }
    
    function logoff() {
        $this->session->unset_userdata('username');
    }
    
    function checkpassword($username,$password) {
        $query = $this->db->query("SELECT * FROM users WHERE username='".$username."'");
        $obj = $query->result();
        $obj = $obj[0];
        if (md5($password)==$obj->password) {
            return TRUE;
        } else {
            return FALSE;
        }
        
    }

}
I need session and database, and I have tried the autoload, I have tried loading in the individual functions, and in the constructor and nothing seems to work. Is there something I am missing?


  how to according domain to change web layout
Posted by: El Forum - 11-30-2008, 07:53 PM - Replies (5)

[eluser]elfkid[/eluser]
dear all
make very kinds of views ?


thanks


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

Username
  

Password
  





Latest Threads
Codeigniter Shield Bannin...
by kenjis
6 minutes ago
SQL server connection not...
by kenjis
28 minutes ago
Best way to create micros...
by kenjis
2 hours ago
How to use Codeigniter wi...
by kenjis
2 hours ago
Getting supportedLocales ...
by kcs
8 hours ago
Component help
by FlashMaster
Today, 01:41 AM
Show logo in email inbox
by WiParson
Today, 12:48 AM
CI 4.5.1 CSRF - The actio...
by jackvaughn03
Yesterday, 10:17 PM
Limiting Stack Trace Erro...
by byrallier
Yesterday, 02:21 PM
Bug with sessions CI 4.5....
by ALTITUDE_DEV
Yesterday, 01:36 PM

Forum Statistics
» Members: 85,226
» Latest member: dewi188
» Forum threads: 77,577
» Forum posts: 375,977

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB