Search Results

Search found 48 results on 2 pages for 'igniter'.

Page 1/2 | 1 2  | Next Page >

  • Code Igniter Update Engine

    - by tarnfeld
    Hey, I am planning to develop a pretty awesome new web app that has a one time fee including free updates of 1.X updates (X being the update). I don't want to get people to download a new version and install it manually as it can be a real pain for some people, also it's bad if there is an important bug that needs fixing and people don't update. The app will be built with Code Igniter so I was looking for some kind of integrated system that allowed me to send out updates for the web app? All suggestions are very much appreciated!

    Read the article

  • different levels in code igniter?

    - by ajsie
    im all new to framework. so the structure of code igniter looks like: system system/application the system folder is code igniter's base folder right? so if they in the future releases a new version i just put application in the new system folder and its upgraded right? does this mean that i shouldn't put new files and so on in the system folder? cause some code could be used for other applications and i want to put them under the current application im developing, not inside the application folder. i want my application's classes to extend my base system's classes which in turn extend code igniter's base system class. so there are 3 levels. so how could i accomplish this? where to put the system level between CI and my application?

    Read the article

  • Visual Website Optimizer and Code Igniter

    - by absentx
    We are trying to integrate visual website optimizer into a site of ours that uses Code Igniter. The problem is when we go into the VWO control panel to look at stats and previews nothing seems to be working. In the previews panel, all of them come up as code igniter error pages that say "The URI you submitted has disallowed characters." I have researched some solutions to this and have tried changing the regex in system/config to allow more characters, all characters etc and I am still having the problem. Any known issues or problems trying to integrate VWO and Code Igniter? This definitely seems to be a url issue but I can't nail it down.

    Read the article

  • Can I use Code Igniter with Concrete5?

    - by SkippyFire
    I am building a site that will (obvisouly) have a front end public portion that I want to drive with Concrete5, but then it will also have a members section that I would like to build with Code Igniter. Does anyone have any idea how I could do that? I guess I could just throw the Code Igniter code into a sub directory, but would I run into any issues with that?

    Read the article

  • Assign a custom global pseudo variable in Code Igniter like {elapsed_time}

    - by Fábio Antunes
    Hello As you probably all know Code Igniter can assign pseudo variables using the Parser library, but you also know that if we want to assign a Pseudo Variable to use it in a View, we have to do it in every controller that loads those views with the pseudo variables. I would like to know if Code Igniter 1.7.2 has some way that i can assign a Global Pseudo variable (like the pseudo variables from the Benchmarking Class). The pseudo variables i want, would have simple data mostly returned from the $config array in the config.php file. If some could help me with that. Regards.

    Read the article

  • Assign a Custom Global Pseudo Variable in Code Igniter

    - by Fábio Antunes
    Hello As you probably all know Code Igniter can assign pseudo variables using the Parser library, but you also know that if we want to assign a Pseudo Variable to use it in a View, we have to do it in every do it in every controller that loads those views with the pseudo variables. I would like to know if Code Igniter 1.7.2 has some way that i can assign a Global Pseudo variable (like the pseudo variables from the Benchmarking Class). The pseudo variables i want, would have simple data mostly returned from the $config array in the config.php file. If some could help me with that. Regards.

    Read the article

  • Extending Code Igniter functions to external PHP Scripts

    - by Fábio Antunes
    Hello everybody. I'm doing a small web app, which uses CKeditor for user input, and CKfinder for file management (images/flash). Those who know CKFinder, algo know that the config file for CKFinder as a function named CheckAuthentication() that returns false or true, giving or not permissions to use CKFinder. This is were a Custom PHP Code checks if the user as authorization to access CKFinder or not. Well for my app I'm using Code Igniter, and of course I've created a model were i handle everything about User Permissions, Loggin, Session Cookies, etc. And i also have a function witch its propose is just to check if the user is Logged in. So I would like to know if someone knows a way that i can call the function isLoggedIn() inside the model security from inside the function CheckAuthentication() in CKFinder config file. Thanks in advance.

    Read the article

  • Extending Code Igniter Model functions to external PHP Scripts

    - by Fábio Antunes
    Hello everybody. I'm doing a small web app, which uses CKeditor for user input, and CKfinder for file management (images/flash). Those who know CKFinder, also know that the config file for CKFinder as a function named CheckAuthentication() that returns false or true, giving or not permissions to use CKFinder. This is were a Custom PHP Code checks if the user as authorization to access CKFinder or not. Well for my app I'm using Code Igniter, and of course I've created a model were i handle everything about User Permissions, Loggin, Session Cookies, etc. And i also have a function witch its propose is just to check if the user is Logged in. So I would like to know if someone knows a way that i can call the function isLoggedIn() inside the model security from inside the function CheckAuthentication() in CKFinder config file. Thanks in advance.

    Read the article

  • Code Igniter email protocols and rendering HTML emails?

    - by John
    I have a website built in code igniter that emails users. I use CI's email class from the controller to do mail out, but I discovered that if I use the "mail" protocol, some (not all) users see un-rendered html emails with the html mark up viewable, while others do not. But if I use the "sendmail" protocol, all users get rendered html emails. So if I did this $config['protocol'] = 'mail'; // add a few more config entries $this->email->initialize($config); Not everyone sees html emails If I did this $config['protocol'] = 'sendmail'; // add a few more config entries $this->email->initialize($config); Everyone sees html emails Why does the protocol matter? Are the email headers different between the two?

    Read the article

  • Enable Query Strings in Code Igniter

    - by tarnfeld
    Hey, I am trying to implement Twitter's OAuth into my Code Igniter web application at which the callback URL is /auth/ so once you have authenticated with Twitter you are taken to /auth/?oauth_token=SOME-TOKEN. I want to keep the nice clean URL's the framework provides using the /controller/method/ style of URL but I want to enable query strings as well, there will only ever be one name of the data oauth_token so it's ok if it has to be hard coded. Any ideas? I have tried tons of the things people are saying to do, but none work :( PS: I'm using the .htaccess method of URL rewriting.

    Read the article

  • How to send complete POST to Model in Code Igniter

    - by Constant M
    Hi there, What would be the best way to send a complete post to a model in Code Igniter? Methods I know are as follow: Name form elements as array, eg. <input type="text" name="contact[name]"> <input type="text" name="contact[surname]"> and then use: $this->Model_name->add_contact($this->input->post('contact')); The other would be to add each element to an array and then send it to the model as such: <input type="text" name="name"> <input type="text" name="surname"> and $contact_array = array('name' => $this->input->post('name'), 'surname' => $this->input->post('surname')); $this->Model_name->add_contact($this->input->post('contact')); Which one of these would be best practice, and is there a way to directly send a whole POST to a model (or a whole form maybe?)

    Read the article

  • code igniter codeigniter question, making anchor load page containing data from referenced row in DB

    - by thrice801
    Hi, Im trying to learn the code igniter library and object oriented php in general and have a question. Ok so Ive gotten as far as making a page which loads all of the rows from my database and in there, Im echoing an anchor tag which is a link to the following structure. [code]echo anchor("videos/video/$row-video_id", $row-video_title);[/code] So, I have a class called Videos which extends the controller, within that class there is index and video, which is being called correctly (when you click on the video title, it sends you to videos/video/5 for example, 5 being the primary key of the table im working with. So basically all Im trying to do is pass that 5 back to the controller, and then have the particular video page output the particular rows data from the videos table. My function in my controller for video looks like this - [code] function video() { $data['main_content'] = 'video'; $data['video_title'] = 'test'; $this-load-view('includes/template', $data); } [/code] So ya, basically test should be instead of test, a returned value of a query which says get in the table "videos", the row with the video_id of "5", and make $data['video_title'] = value of video_title in database... Should have this figured out by now but dont, any help would be appreciated!

    Read the article

  • PHP + Code Igniter Timecode Calculation Logic Error

    - by Tim
    Hello everyone, I have what I suspect to be a logic problem with an algorithm I am using to work with Video timecode in PHP. All help is appreciated. The Objective Well basically I want to work with timecode and perform calculations For those not familiar with timecode it looks like this 01:10:58:12 or HH:MM:SS:FF 'AKA' HOURS:MINUTES:SECONDS:FRAMES I have used the script from HERE to help me with working with this format. The Problem Now can i just say that this script works!!! Timecode calculations (in this case additions) are being performed correctly. However this script continually throws the following errors, yet still produces the correct output when I try and do the following calculation 00:01:26:00 + 00:02:00:12 The errors from this calculation are shown below A PHP Error was encountered Severity: Notice Message: Undefined index: key Filename: staff/tools.php Line Number: 169 A PHP Error was encountered Severity: Notice Message: Undefined index: key Filename: staff/tools.php Line Number: 169 Line Number 169 is in the parseInput() function // feed it into the tc array $i=0; foreach ($tc AS $key=>$value) { if ( is_numeric($array["$i"]) ) { $tc["$key"]= $array["$i"]; if ($tc["$key"] < 10 && $tc["$key"] > 0 && strlen($tc['key'])==1 ) $tc["$key"]= "0".$tc["$key"]; } $i++; } return $tc; Now I should also mention that the number of times the above error is thrown depends on what I am calculating 00:00:00:00 + 00:00:00:00 returns no errors. 01:01:01:01 + 02:02:02:02 produces 8 of the above errors. For your reference, here is the code in it's entirety function add_cue_sheet_clips_process() { $sheetID = $_POST['sheet_id']; $clipName = $_POST['clip_name']; $tcIn = $_POST['tc_in']; $tcOut = $_POST['tc_out']; // string $input // returns an associative array of hours, minutes, seconds, and frames // function parseInput ($input) { // timecode should look something like hh:mm:ss;ff // allowed separators are : ; . , // values may be single or double digits // hours are least-significant -- 5.4 == 00:00:05;04 $tc= array("frames"=>"00", "seconds"=>"00", "minutes"=>"00", "hours"=>"00"); $punct= array(":", ";", ".", ","); // too big? too small? $input= trim($input); if (strlen($input)>11 || $input=="") { // invalid input, too long -- bzzt return $tc; } // normalize punctuation $input= str_replace( $punct, ":", $input); // blow it up and reverse it so frames come first $array= explode(":", $input); $array= array_reverse($array); // feed it into the tc array $i=0; foreach ($tc AS $key=>$value) { if ( is_numeric($array["$i"]) ) { $tc["$key"]= $array["$i"]; if ($tc["$key"] < 10 && $tc["$key"] > 0 && strlen($tc['key'])==1 ) $tc["$key"]= "0".$tc["$key"]; } $i++; } return $tc; } // array $tc // returns a float number of seconds // function tcToSec($tc) { $wholeseconds= ($tc['hours']*3600) + ($tc['minutes'] * 60) + ($tc['seconds']); $partseconds= ( $tc['frames'] / 25 ); $seconds= $wholeseconds + $partseconds; return $seconds; } // float $seconds // bool $subtract // returns a timecode array // function secToTc ($seconds=0, $subtract=0) { $tc= array("frames"=>"00", "seconds"=>"00", "minutes"=>"00", "hours"=>"00"); $partseconds= fmod($seconds, 1); $wholeseconds= $seconds - $partseconds; // frames if ($subtract==1) $tc['frames']= floor( $partseconds * 25 ); else $tc['frames']= floor( $partseconds * 25 ); // hours $tc['hours']= floor( $wholeseconds / 3600 ); $minsec= ($wholeseconds - ($tc['hours'] * 3600)); // minutes $tc['minutes']= floor( $minsec / 60 ); // seconds $tc['seconds']= ( $minsec - ($tc['minutes'] * 60) ); // padding foreach ( $tc AS $key=>$value ) { if ($value > 0 && $value < 10) $tc["$key"]= "0".$value; if ($value=="0") $tc["$key"]= "00"; } return $tc; } // array $tc // returns string of well-formed timecode // function tcToString (&$tc) { return $tc['hours'].":".$tc['minutes'].":".$tc['seconds'].";".$tc['frames']; } $timecodeIN = parseInput($tcIn); $timecodeOUT = parseInput($tcOut); // normalized inputs... $tc1 = tcToString($timecodeIN); $tc2 = tcToString($timecodeOUT); // get seconds $seconds1 = tcToSec($timecodeIN); $seconds2 = tcToSec($timecodeOUT); $result = $seconds1 + $seconds2; $timecode3 = secToTc($result, 0); $timecodeDUR = tcToString($timecode3); $clipArray = array('clip_name' => $clipName, 'tc_in' => $tcIn, 'tc_out' => $tcOut, 'tc_duration' => $timecodeDUR); $this->db->insert('tools_cue_sheets_clips', $clipArray); redirect('staff/tools/add_cue_sheet_clips/'.$sheetID); } I hope this is enough information for someone to help me get on top of this, I would be extremely greatful. Thanks, Tim

    Read the article

  • Creating foreach loops using Code Igniter controller and view

    - by Tim
    Hello, This is a situation I have found myself in a few times and I just want clear it up once and for all. Best just to show you what I need to do in some example code. My Controller function my_controller() { $id = $this->uri->segment(3); $this->db->from('cue_sheets'); $this->db->where('id', $id); $data['get_cue_sheets'] = $this->db->get(); $this->db->from('clips'); $this->db->where('sheet_id', ' CUE SHEET ID GOES IN HERE ??? '); $data['get_clips'] = $this->db->get(); $this->load->view('show_sheets_and_clips', $data); } My View <?php if($get_cue_sheets->result_array()) { ?> <?php foreach($get_cue_sheets->result_array() as $sheetRow): ?> <h1><?php echo $sheetRow['sheet_name']; ?></h1> <br/> <?php if($get_clips->result_array()) { ?> <ul> <?php foreach($get_clips->result_array() as $clipRow): ?> <li><?php echo $clipRow['clip_name']; ?></li> <?php endforeach; ?> </ul> <?php } else { echo 'No Clips Found'; } ?> <?php endforeach; ?> <?php } ?> The problem I am having is the concept of passing data back to the controller from the view as I am sending the Database Queries off to the view as an array, when I really need to get some more information as to which sheet ID I am looking for to show the relevant clips. I hope this makes sense to someone out there. Thanks, Tim

    Read the article

  • Code igniter authentication code in controller security question

    - by Prime Studios
    I have a main controller to handle the very front-end of my authentication system, it handles login, logout, update user info, etc. functions that I anticipate calling by POST'ing from views/forms. What about something like a "delete_user" function though? My thoughts are a button in someones admin panel would say "Delete Account" and it would post to "/auth/delete", and the function would delete the user based on their session username or id. This seems a bit open ended, you could send out a link to someone and when they opened it while in that application it would delete their account.. Whats the best way to handle this?

    Read the article

  • Code Igniter - URL Rewrite

    - by André Alçada Padez
    Hey, i'm trying to get a project to work, but i am having trouble with the rewrite module. I'm running Wamp over Windows XP. I changed httpd.conf to change the root of localhost to: DocumentRoot "C:/wamp/www/project/docroot/" I have htaccess RewriteEngine On RewriteBase / my Apache has the rewrite module Activated. my base_url() in config.php is 'http://localhost/' in routes.php i have: $route['default_controller'] = "home"; $route['our-recipes'] = "recipes"; and more pairs when i point the browser to http://localhost/ i get the homepage of my site, but when i click on any internal link like to 'our-recipes' it loads but i get the same homepage, with the new url on the location bar. if i try to access 'http://localhost/recipes' i get the same result. this is my folder structure: Can anyone please solve this for me??

    Read the article

  • output query in strict table formate in code-igniter

    - by riad
    Dear all, my code is below.it show the output in table format having no problems. But when the particular tr gets long output from database then the table break. Now how can i fixed the tr width strictly?let say i want each td cannot be more than 100px. How can i do it? Note: Here table means html table,not the database table. if ($query->num_rows() > 0) { $output = ''; foreach ($query-result() as $function_info) { if ($description) { $output .= ''.$function_info-songName.''; $output .= ''.$function_info-albumName.''; $output .= ''.$function_info-artistName.''; $output .= ''.$function_info-Code1.''; $output .= ''.$function_info-Code2.''; $output .= ''.$function_info-Code3.''; $output .= ''.$function_info-Code4.''; $output .= ''.$function_info-Code5.''; } else { $output .= ''.$function_info-songName.''; } } $output .= ''; return $output; } else { return 'Result not found.'; } thanks riad

    Read the article

  • Overriding Code Igniter 2.14's global_xss_filtering settting

    - by user2353007
    I have created the following file at: application/core/MY_Security.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* * Does not work with global xss */ class MY_Security extends CI_Security { function xss_clean($str, $is_image = FALSE) { $CI =& get_instance(); $CI->load->library('My_cleaner'); return $CI->my_cleaner->clean_html($str); } } this works great for $this-input-post('post_var', TRUE); and $this-security-xss_clean($input); It is working very well except when I go into application/config/config.php and change $config['global_xss_filtering] = FALSE; to $config['global_xss_filtering] = TRUE; in that case, I just get a white page on every controllers action/function. Does anybody know what else I have to change to get global_xss_filtering = TRUE; to work when overriding the xss_clean function in system/core/Security.php through application/core/MY_Security.php? I'm guessing it might be something with the loader but I'm not sure where to start. The next option is to just replace the function in the system/core/Security.php file which I am trying to avoid. Thanks.

    Read the article

  • how to format a date with code igniter

    - by Jeff Davidson
    I'm trying to figure out what I'm doing wrong here. I'm wanting to format the date_published field in my query and I'm getting an t_string syntax error in my IDE. $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky,' date_format('site_news_articles.date_published, 'f jS, Y')'); UPDATE: function getNewsTitles($category_id) { $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky'); $this->db->select("DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date", TRUE); $this->db->from('site_news_articles'); $this->db->where('site_news_articles.news_category_id', $category_id); $this->db->where('site_news_articles.is_approved', 'Yes'); $this->db->where('site_news_articles.status_id', 1); $this->db->order_by('site_news_articles.date_published', 'desc'); $this->db->limit(10); $query = $this->db->get(); return $query->result_array(); } Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 A' at line 2 SELECT site_news_articles.article_title, site_news_articles.is_sticky, DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 AND site_news_articles.is_approved = 'Yes' AND site_news_articles.status_id = 1 ORDER BY site_news_articles.date_published desc LIMIT 10 Filename: /home/xtremer/public_html/models/sitemodel.php Line Number: 140

    Read the article

  • mysql query not running correctly from inside the application

    - by Mala
    I am completely stumped. Here is my php (CodeIgniter) code: function mod() { $uid = $this->session->userdata('uid'); $pid = $this->input->post('pid'); if ($this->_verify($uid,$pid)) { $name = $this->input->post('name'); $price = $this->input->post('price'); $curr = $this->input->post('curr'); $url = $this->input->post('url'); $query = $this->db->query("UPDATE items SET name=".$this->db->escape($name).", price=".$this->db->escape($price).", currency=".$this->db->escape($curr),", url=".$this->db->escape($url)." WHERE pid=".$this->db->escape($pid)." LIMIT 1"); } header('location: '.$this->session->userdata('current')); } The purpose of this code is to modify the properties (name, price, currency, url) of a row in the 'items' table (priary key is pid). However, for some reason, allowing this function to run once modifies the name, price, currency and url of ALL entries in the table, regardless of their pid and of the LIMIT 1 thing I tacked on the end of the query. It's as if the last line of the query is being completely ignored. As if this wasn't strance enough, I replaced "$query = $this->db->query(" with an "echo" to see the SQL query being run, and it outputs a query much like I would expect: UPDATE items SET name='newname', price='newprice', currency='newcurrency', url='newurl' WHERE pid='10' LIMIT 1 Copy-pasting this into a MySQL window acts exactly as I want: it modifies the row with the selected pid. What is going on here???

    Read the article

  • Easier way to populate form data and validation data in Code Igniter?

    - by John
    I'm new to code igniter. I'm following the form validation tutorial found at: http://www.codeignitor.com/user_guide/libraries/validation.html I find I am typing too much in the view to get the form to re-populate. For example, here's what one of my INPUT fields look like: <input type="text" name="email" value="<?=$this->validation->email ? $this->validation->email : $array_db_values['email'] ?>" /> Basically, when the form first loads, it should show a value from the database. If the user alters the value and it fails validation, then the form should post the erroneously submitted value. Does code igniter have a "cleaner" way of rendering this kind of output? Otherwise, I'm going to do something like this in my controller: $array_db_values = getdbresults(); if($_POST['submit']) foreach($_POST as $key=>$val) $array_db_values[$key] = $val; That way, if postback data exists, it will always override database values. Then input fields in my view can simply be: <input type="text" name="email" value="<?=$array_db_values['email'] ?>" /> Is there a better/native CI way to handle this scenario?

    Read the article

  • How can I use wildcard urls with Code Igniter?

    - by tarnfeld
    I am building a system that has urls like app.com/login and app.com/dothing but it will also have app.com/xOldP. The web application is build using the latest version of Code Igniter and I was wondering if there was a way to add a check in, that if the url is a controller then do that and finish, but if not, do something else (which will check the url and if its not real 404, which I can do). I was wondering how annoying this would be :/ Some sample code or links would be great!

    Read the article

  • How to use Code Igniter to show Dynamic images via javascript(jQuery).

    - by aaroninfidel
    You can use the URL helper in Code Igniter to load CSS and Javascript with the base_url() method, but what if you have images dynamically being placed into your HTML via javascript? for example in my javascript file I've got var arrowimages={down:['downarrowclass', 'images/down.png', 23], right:['rightarrowclass', 'images/right.png']} and those images will be placed into whatever menu item I've specified has a drop down menu. but that file is a .js file so obviously the server won't load php inside of it. so, how can I set the base url for the JS? Thanks! -Aaron

    Read the article

1 2  | Next Page >