I am trying to incorporate the Orkut OS PHP Client into CodeIgniter as a Library, but am having no luck.
When I test the Orkut Client out on my localhost as a standalone (not inside CodeIgniter), it works fine, but when I try it as a CodeIgniter lib, I am stuck in some kind of redirect with Google (it keeps asking the user if they grant...
How do you get CodeIgniter to load views before it loads the files in application/errors?
I have custom error pages but I want them to be displayed beneath the header and menu_bar views.
...
Hello. I'm trying to send an e-mail with Codeigniter like this:
$this->load->library('email');
$this->email->from("[email protected]");
$this->email->reply_to("[email protected]");
$this->email->to("[email protected]");
$this->email->subject("Test mail");
$this->email->message("Email body");
$this->email->set_alt_message("Email body tx...
Hello, this is taking me too long to figure out. I am using Codeigniter to query a database.
The model does this
function currentfunction($id)
{
$query = $this->db->get_where('mytable', array("id =" => $id));
if($query->num_rows() > 0){
return $query->result_array();
}else {
return false;
}
}
The con...
I use the following function in CodeIgniter, to get my latest tweet:
function tweet($id) {
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "http://twitter.com/statuses/user_timeline/".$id.".xml?count=1");
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
//Benchmark starts here
$src = curl_exec($c);
...
I am trying to use the singleton method to access a global object (in this example its "username"). My question is how can I modify this so that in the DB->connect() function I could do echo $this->username; without declaring $username or changing the last 2 lines?
class CI_Base {
private static $instance;
public function CI_B...
Is there a way to create a dynamic body id in codeigniter for different pages that converts spaces to dashes?
I have been around forums and search engines but I have no luck.
Here is my code:
<body id="{$template.title}">
Here is the output:
<body id="About us">
I want it to be:
<body id="about-us">
let me know Thank you
...
Hey,
I have an application that was in a folder named "project", I moved all the files from "project" into "project/admin", because I decided it was a better structure, to access the application via the www.example.com/project/admin URL.
The problem I am facing now is that I cannot access any of the controllers. The index page, which i...
Hi,
I want to embed a specific tweet on my page e.g http://twitter.com/myusername/status/123465678 I would also like to be able to show the latest of my tweets which have a specific tag.
I tried to do this with Twitter API CodeIgniter Library myself but I need to register my application with Oauth. This seems like overkill for embeding...
Is there an easy way to create subdomains on codeigniter like api.site.com.?
Thanks in advance.
...
Hello
I've used formigniter to generate a form for CI. http://formigniter.org/
That bit works great. However I want to set a default value for the name field.
The input code looks like this:
<label for="forename">Forename</label>
<?php echo form_error('forename'); ?>
<br /><input id="forename" type="text" name="forename" maxlength="2...
I have this situation:
hosting is located at maindomain.com
othersite.com is parked to maindomain.com
htaccess is used to redirect all requests for othersite.com to a subfolder: /site-othersite/
I want to use CodeIgniter on othersite.com but there are some directories and files in othersite.com that I don't want to have the CodeIgniter...
I know this is probably simple, but I'm not getting. I've created a library, and I want to load the parameters from a config file. So here's an example of what I have:
// libraries/Mylib.php
class Mylib {
var $ci;
var $key;
public function _construct {
$this->ci =& get_instance();
$this->ci->config->load('mylib');
...
When we receive mail from our website, through CodeIgniter first then Google Apps (mailer) - the date in the header is 7 hours behind the real time.
We've checked the server time, and it is correctly set.
Has anyone experienced this problem?
Thanks!
...
Basically I have a site that allows stores to store their open/close times.
Now, I'm trying to add the feature of giving their visitors the ability to see if the store is closed.
I understand I can run a query like:
SELECT * FROM `store_hours` WHERE TIME(NOW()) BETWEEN `opens` AND `closes`
... and the query works and retrieves the s...
Hello,
I need to get the hash # value from the current window url with javascript (can't get it with PHP), and then use that to set the value attibute of a form input with CI's set_value() function.
Any ideas how I can grab the value in javascript then put it into the PHP function? :-S
Thanks in advance!
...
I'm writing my first Codeigniter site using the MVC pattern. I'm building some controllers that load views now (haven't gotten to Models yet) but I'm noticing that my View and Controller files have the same filename (like products.php). They are in their respective folders of course. For example I have an About controller, that loads ...
I currently have a huge problem. Two days ago my site running on one server was too much, so I purchased two more and had them clustered (rsync and load balanced).
I then start noticing that a user would hit server-1 and then on the next request hit server3 but that their session was still on server1 instead of server3 and they were no ...
Hello all,
im trying to ding into codeigniter MVC but i dont know how i make my template so i have 2 files (header and footer) and then i can make my controllers and then ONLY put information in the "content" div, so i include the top and the header a good way like this
<?php
include("header.php");
?>
<div id="content">My content here<...
I need to compare a MySQL datetime with the current time, to get the dateDiff to show a messange if the MySQL datetime, is less than 30 days from today.
I'm using codeigniter, and I tried a lot of helpers, and lots of thing, I just can't get to work.
Some people says that is better to save in database a timespan, I just don't know wich...