Welcome Guest, Not a member yet? Register   Sign In
  CI license question
Posted by: El Forum - 11-01-2007, 10:13 AM - Replies (2)

[eluser]feri_soft[/eluser]
Today i read the CI license in the user guide but it didnt get very clean. Can i use the software for developping a commercial applications reserving the comments showing that it is based on codeigniter?

Thanks!


  uri_to_assoc problem
Posted by: El Forum - 11-01-2007, 10:09 AM - Replies (5)

[eluser]smith[/eluser]
When controller is executed, first uri_to_assoc(model) will execute and set false to var3 if var3 is not found inside uri segment, but second execution (controller), inside index function will not set var1 and var2 to false if they are not found inside uri segment. Looks like uri_to_assoc can only be called once?

Code Sample:

controller:

Code:
class Some_class extends Controller {

    var $data = array();
    function Some_class()
    {
        parent::Controller();
        
        $this->load->database();
        $this->load->model('my_model');
        $this->my_model->some_function();
    }
    
    function index()
    {
        $default = array('var1','var2');
        $array = $this->uri->uri_to_assoc(3, $default);
        print_r ($array);
    }
}

model:
Code:
class My_model extends Model {

    function some_function()
    {
        $default = array('var3');
        $array = $this->uri->uri_to_assoc(3, $default);
        print_r ($array);
    }
}

I would expect to have this as a result:

Array ( [var3] => )
Array ( [var1] => [var2] => )

But instead i am getting this:

Array ( [var3] => )
Array ( [var3] => )


  When I switch to another controller do I really have to rebuild every part on the page?
Posted by: El Forum - 11-01-2007, 06:20 AM - Replies (5)

[eluser]Scouser[/eluser]
What I mean is, I have a page, build up of several partial page 'blocks', with an optional link to "login" which is in fact a different controller. But when I display the login page I still need some (or all) of the page 'blocks' or elements surrounding the login page.

The question is, when I switch to another controller do I really have to rebuild every part on the page or can I just replace the (for example) body part of the page with this new part called "login page"?


  Setting event using a date, not a day in every month?
Posted by: El Forum - 11-01-2007, 05:00 AM - Replies (4)

[eluser]stef569[/eluser]
Hi,

When I add a event to my calendar I want to set it to a specific date.

atm I use

Code:
<?php $events = array(
    1/11/2007  => 'AAAAAAAAAAAAAAA',
  7  => 'B',
  13 => 'C',
  26 => 'D'
  ); ?>

But it appears to only work with days, I tried to put a date in but AAA is not showing up.
Does the calender only support reoccuring events over months?

nvm reading uri.. can't delete this topic.


  Restricted Timezones
Posted by: El Forum - 11-01-2007, 03:57 AM - Replies (1)

[eluser]Unknown[/eluser]
I need to offer a set of restriced timezones (just -8 -> -3.5) for Canadians.

I've modified date_helper.php to accomodate this:

Code:
function timezone_menu($default = 'UTC', $class = "", $name = 'timezones',$options = array('UM25','UM4','UM5','UM6','UM7','UM8'))
{
    $CI =& get_instance();
    $CI->lang->load('date');
    
    if ($default == 'GMT')
        $default = 'UTC';

    $menu = '<select name="'.$name.'"';
    
    if ($class != '')
    {
        $menu .= ' class="'.$class.'"';
    }
    
    $menu .= ">\n";
    
    foreach (timezones() as $key => $val)
    {
      if(in_array($key,$options)) {
          $selected = ($default == $key) ? " selected='selected'" : '';
          $menu .= "<option value='{$key}'{$selected}>".$CI->lang->line($key)."</option>\n";
      }
    }

    $menu .= "</select>";

    return $menu;
}

Jee


  CodeIgniter Image Uploader Tutorial
Posted by: El Forum - 11-01-2007, 03:54 AM - Replies (19)

[eluser]lszanto[/eluser]
Yeah, its my first tutorial so please let me know what you think and the video can be found at http://www.filepanda.com/get/ey7laa13/ and will soon be available on my blog to which I will post a link to.

I know I messed up a few times but constructive criticism would be good and hints on what I can do better next time.

thanks, Luke


  Execute controller from view
Posted by: El Forum - 11-01-2007, 03:23 AM - Replies (26)

[eluser]Base Willy[/eluser]
I wonder if it is possible to execute a controller from view?
For example, a have a view of user's page and i want to display his last photos, fresh entries from his blog, last comments etc. by executing corresponding models. How can i do that? Thanks.


  how to mask credit card number (using regex?)
Posted by: El Forum - 11-01-2007, 12:24 AM - Replies (25)

[eluser]coolfactor[/eluser]
I'm trying to find an elegant way to turn 1234-4567-7890-4433 into xxxx-xxxx-xxxx-4433.

I found this tutorial, but I'm not much of a regex person and don't know how to rewrite that for use in PHP.

Here's the code from that tuturial, in Rails:

Code:
@card_masked = card_masked.sub(/^([0-9]+)([0-9]{4})$/) { '*' * $1.length + $2 }

Which PHP function should I be using?

Your help is appreciated. Thanks!


  Is there a CI function to UNZIP?
Posted by: El Forum - 10-31-2007, 10:57 PM - Replies (5)

[eluser]Eric Cope[/eluser]
I am trying to upload a zip file of photos. I hoped that there was a CI function to unzip those files. I can not find anything. Does anyone know who to do this?
Thanks!


  URL links
Posted by: El Forum - 10-31-2007, 10:45 PM - Replies (4)

[eluser]mistress_shiira[/eluser]
hi guys!i was wondering if you could help me out with this one..
i have a certain project that im doing right now...i am sending it to people's email address(this is not spam).more or less like a special occasion card.
now,the problem that i have right now is that on some email providers like gmail and hotmail,links like www.google.com that i have inserted within my paragraph are underlined and treated as links instead of just being plain text..and whats more when i hover into them,there is an annoying light blue hover background..i have tried to customize it using css but it reli doesnt work..

help pls..
thanks


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

Username
  

Password
  





Latest Threads
Show logo in email inbox
by WiParson
4 minutes ago
Best way to create micros...
by jean5769
1 hour ago
Limiting Stack Trace Erro...
by byrallier
10 hours ago
Bug with sessions CI 4.5....
by ALTITUDE_DEV
11 hours ago
codeigniter 3.0.1 equiped...
by JustJohnQ
Yesterday, 10:05 AM
Display a custom error if...
by b126
Yesterday, 06:22 AM
Type error in SYSTEMPATH\...
by DXArc
Yesterday, 06:20 AM
v4.5.1 Bug Fix Released
by LP_bnss
Yesterday, 04:52 AM
Retaining search variable...
by Bosborne
Yesterday, 03:20 AM
Getting supportedLocales ...
by InsiteFX
Yesterday, 12:24 AM

Forum Statistics
» Members: 85,133
» Latest member: dafabetsystems
» Forum threads: 77,573
» Forum posts: 375,959

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB