]]>
Loading Session Class Cause Blank Screentag:codeigniter.com,2011:forums/viewthread/.1936302011-07-08T11:08:17ZAllie Syadiqin
Hi all. I have a working CI 1.7.2 and it works perfectly using the Hybrid Session alternative library. Today, I moved the entire site to an Amazon server and now I have a blank screen. There are no errors shown on screen or the logs (display_error is ON, CI logging set to 4, etc..). I tried setting the CI back to the default settings, ie. Welcome.php, welcome_message.php, and it still won’t display anything. I then tried removing the autoload config and the only time the page load is when I removed the session library. So basically, the session library/class is the cause of the problem.
I have also tried to use the native CI Session library but still getting blank page. Is there anything that might cause this to happen or did I forget to configure anything in the server’s PHP settings? Any help is appreciated. Thanks.
]]>
Re-populating formstag:codeigniter.com,2011:forums/viewthread/.1936382011-07-08T12:28:10ZPerkin5
I have set up a form using the form-helper syntax and the input looks like this:
echo form_input('username','','id="username"');
and I want to repopulate it with POST array data. I’m assuming you have to use set_value(). The user guide shows you how to do it when you’re not using the form helper but I can’t find how to do it with the form helper.
My sessions that are database backed sometimes randomly expire and I lose the data in the session. I am using Code Igniter 1.7.3
]]>
Is it possible to use $this->load->view(‘abc’) from within a custom class??tag:codeigniter.com,2011:forums/viewthread/.1936222011-07-08T10:00:07ZCodeigniter
Hey all my first post on here and have used Codeigniter a bit in the past so hope I am not being a dumb-ass but here is my query.
I would like to make my controllers cleaner in terms of code by creating custom classes for common methods/functions that I call within them. For instance having an if statement within every controller that checks if a user is logged in could be done on a single line as a method call to a custom class.
So instead of this as a controller…
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Members_only extends CI_Controller {
public function index() { if($this->some_class->is_logged_in()) { $this->load->view('welcome_message'); } else { redirect('authentication/admin'); } } }
I would rather do this as a controller…
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
You can see I would like to pass the page names as parameters to my custom classes method, it is within this method that I would then like to load the view but it would seem that Codeigniter does not like the idea of me trying to load a view from within my own class - do I need to extend my class as part of a core Codeigniter object in order to inherit this ability (bearing in mind I have already tried extending my class as part of the CI_Controller and it did not work) or is there something else I need to do??
My custom class looks like so…
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Some_class{
public function __construct($allowed = NULL, $disallowed = NULL) { $this->allowed = $allowed; $this->disallowed = $disallowed; }
public function is_logged_in() { // PUT get_instance() IN THE FUNCTION/METHOD IF USING PHP 4 // ELSE USE WITHIN THE CONTRUCTOR
So essentially is it possible to use $this->load->view(‘abc’) from within a custom class??
]]>
Wordpress installation within Codeignitertag:codeigniter.com,2011:forums/viewthread/.1936342011-07-08T11:48:21ZMykMallett
Hi, I built a site that uses a lot of procedural PHP for the main body of the site, then has a wordpress multisite installation under a subdirectory that has a number of client blogs
I want to rewrite the non-wordpress parts of the site (so everything outside of /blog/) in codeigniter and am just getting to grips with that, but I need to know whether it is possible to just re-install and run the wordpress network, or at least how I could do that?
]]>
jquery and CItag:codeigniter.com,2011:forums/viewthread/.1936062011-07-08T06:18:27Zmehwish
hi, Can anyone tell me where a .js file is placed and how to load a .js file or how to call it from controller and how to return values from any function of jquery to controller like we do with controller and model (as we call a model’s function and when that model’s function returns a value we place it in a variable)
]]>
dropsauce.com - My first CodeIgniter powered sitetag:codeigniter.com,2011:forums/viewthread/.1934032011-07-06T06:23:07Z2011-07-06T06:23:58Zgautaml
Hi All,
It’s been a few days since I let it loose but I thought I would show off my first CodeIgniter powered site: https://dropsauce.com
Key features:
- Multiple file selection
- Uploads with progress and preview once complete (it’s Flash powered for now)
- Ability to password protect drops/files
- Ability to auto-delete drops and files after a certain period
- No need to sign up. Just upload anonymously!
- If you sign up you get larger quotas and extensions to how long you can keep your files
- etc.
Give it a try and let me know what you think!
Thanks!
]]>
wordpress shortcode for CItag:codeigniter.com,2011:forums/viewthread/.1936162011-07-08T08:32:31Zumefarooq
i really like wordpress because of shortcode, really easy to power up theme with short code like creating jquery ui tabs, accordion or image like with lightbox, or formatting your content according to your theme. i was looking for such a library for CI but really difficult to find it. i am working on a project where we want to add jquery ui tabs from backend really difficult for a normal user to add that. i googled and fond shortcode library work with CI in pastbin, here is link to that library
i added some extra features in this library to load defaults from config file, calling helper functions and use with CI template parser library. really thanks to unknown person for posting such a good library on pastebin all credit goes to him. feel free to add more features and your comments
]]>
How to proceed an array post inputtag:codeigniter.com,2011:forums/viewthread/.1935952011-07-08T03:49:06ZEdy S
Hi everybody, i just new in codeIgniter, can every body help me proceed my array post input ?
Here the part of my code
in my controller, i want to use data parse that contain like this ( just part ) :
foreach($this->input->post('obat') as $key => $val){ $resep .=$val.'||'.$this->input->post('jumlah['.$key.']').'||'.$this->input->post('dosis['.$key.']').'{}'; }
My problem now, i cant access to input->post(‘jumlah’) and input->post(‘dosis’) and when i echo $resep , It just display the value of input->post(‘obat’). I have try to directly write input->post(‘jumlah[1]’) and it cant still display the value when i submit it.