Through out my application, i wanted to display the value htmlentities(str), since there is not restriction for single or double or any special char.
Instead of using or converting by htmlentities(str),like
<input id="text" name="text" value="<?php if(isset($_POST['text'])) { echo htmlentities($_POST['text']); } ?>
Is there any way ...
Hello all,
I am making use of Codeigniter and I currently have this URL format setup:
http://example.com/view/
I would like to put in the logged in users username in the URL and remove the view part of the URL. The view is my controller. So I can have something that looks like this in the address bar:
http://example.com/johnny
How...
Is this even possible? By using a custom route like:
$route['ajax/:any'] = "ajax/route";
And then declaring the method private in the controller:
class Ajax extends Controller {
function _route()
{
some code here...
}
}
I know this example does not work in practice, but you get the idea.
...
I'm having problems trying to connect my website to Facebook. What I would like it to do is allow users to augment their accounts by connecting them to Facebook (I do not need people to be able to login with Facebook, I am using OpenID instead). My website runs in the CodeIgniter framework.
What I will do is remove everything that I've ...
I'm just getting into learning about sessions, and for my purposes, I want to create something that upon every request from the client, the server authenticates that user, and only then performs data-handling for that user.
However, I have seen a lot of examples with CodeIgniter where the session is set up as thus:
$this->load->library...
I am attempting to write some jQuery code that will expand a paragraph when a link is clicked and once expanded present another link that will allow the paragraph to be collapsed. These paragraphs are all generated within a foreach loop and I am having trouble selecting the correct paragraph because I am not sure of the best way to crea...
I'm sure this is probably really simple, but my knowledge really isn't good in this area, and I don't seem to be able to get it right.
I have the following file structure:
/cms (renamed from system)
cms.php (renamed from index.php, added to DirectoryIndex in .htaccess)
.htaccess
index.html
page1.html
/css
/js
I also have the .htacce...
What makes a good MVC model in CodeIgniter. What my 'user' model does now is basically using the same active record functions from the database library. The only difference is that you don't need to specify the database table and just do:
$this->usermodel->where('username','test'),
$user = $this->usermodel->get();
This feels kinda awk...
Im using the HMVC extension with CodeIgniter and i got 2 modules
modules/frontpage
-- controllers
frontpage.php ( <- this controller needs to load the person model)
-- models
-- views
modules/person
-- controllers
-- models
person_model.php ( defines Person_Model extends Model )
-- views
using $this->load->model('p...
Hi,
Im trying to create a query filter system in codeigniter. Basically, within a particular query, Id like to be able to send a list of values returned by the main query (working with items for sale on different sites, so for instance, price, and website), output them to my sidebar, and then be able to drill down the results via the va...
Hi,
I know it is not a good exepireince.But just I want to know it is possible to access a function from model or controller class from a helper file in codeignitor.
Thanks
...
CodeIgniter's got a slew of modules (http://codeigniter.com/wiki/Special:Titles/), but all I can find for Kohana (CI's fork) is http://dev.kohanaframework.org/projects/. Is the assumption that CI modules work in Kohana (or at least can be massaged to without too much effort), or is it just that Kohana's got fewer modules?
...
I am having trouble simply making multiple pages with CodeIgniter. For example, I am trying to make a simple About page with codeigniter. So I create an about.php controller and an about_view.php view file. However if I were to try and make a link from the home page to "http://miketrottman.com/about" it will go nowhere. I am sure I am fu...
Hi folks!
So I've put together this CodeIgniter library to encrypt stuff into Base62 and decrypt it back again.
Just before anyone asks, the file is application/libraries/Basecrypt.php
Here's the contents of Basecrypt.php:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Basecrypt
{
funct...
I am working on a script that creates a thumbnail and then will watermark the original image, but the script only creates the thumbnail and skips over the watermarking.
$image = $data['json']->{'file_name'};
$data['account'] = $account;
$this->_insertintodb($account, $image);
//Settings to create thumbnail
$config['source...
Something easy like CI (this means mandatory good, easy, up to date documentation). But also with some more features than CI.
Yii has lots of features, but it is also more complex (and it kind of forces you to have to use lots of it features). That means adding some functionality to your web-app takes three times as long because you hav...
I am trying to create a thumbnail of a watermarked image, but can't get it to work. The script always seems to resize the original watermarked image without making the thumbnail.. anyway to accomplish both?
...
Hi, I'm pretty new to code igniter.
Is there best practice for serving different view for different context.
For example, I'd like to serve specific pages for mobile user agents with the same controllers.
...
Almost in all function in most of my controller i have to see to same things. i.e
1.Check if logged in.
2.Check the privilege.
I know how to do it. But what is the best way, so that i don't have to re-write the same
code everywhere? Is it to make a helper or something? I'm a bit new to codeigniter, all i know is basic php!
...
I created a controller which handles file posts, moves uploaded files to a folder beside the index.php file (not in the application folder, because I want to reach the files directly through http).
The upload works perfectly on Windows based servers but not on Linux. PHP version is still the same on every server, and my local machine.
...