I have a global menu and local menu for the products. I would like to highlight 'our products' link when I am showing the products and also highlight the name of the product and its subpages in the local menu so the highlighted links will work as the breadcrumbs. How can I do this with jquery and codeigniter or just jquery.
Here is the c...
I am unfortunately getting a blank page when trying to run a site locally. There are other people running it locally just fine, so I am wondering if it could be something to do with my LAMP environment.
When I attempt to load the site, it's nothing but a blank page. I've ran php index.php in console and the error I get is the following ...
I'm building a site using CodeIgniter that largely consists of static content (although there will be a relatively small CMS backend, and there's code to handle localization/internationalization based on the domain used to access it). Typically, in a situation like this, I'd use a Pages controller that is in charge of rendering static c...
What are the best resource to study the following: JavaScript, AJAX, CodeIgniter
Smarty?
...
My code is as follows:
$image_array = array(
"src" => base_url() . "img/ajax-bar_loader.gif"
);
echo img( $image_array );
But when I debug in FireFox, the tag is:
<img original="http://www.mysite.com/img/ajax-bar_loader.gif" style="">
I'm not really sure where that "original" tag came from, but it doesn't render my image...
I was looking at PageSpeed on my test website and noticed that Lighttpd wasn't compressing my HTML (but was compressing my javascript and css files). I'm assuming this is because I'm using CodeIgniter and it's clean url system and since the requests don't have file extensions, Lighttpd doesn't have the rule to compress it. That being the...
Hi guys,
I want to override the validation_errors() method of the form helper in CodeIgniter for one controller only, so that it will display a single error message (as a sentence in plain english) instead of the detailed line item summary. I've tried defining a validation_errors() function in my controller, which is what I usually do w...
Ideally something I can plug and play pretty readily an quickly that supports GeoCoding
...
Hello, I am implementing jQuery tabs on mysite, one of the tabs holds a form and this is my problem, the form is loaded in via ajax as it is used multiple time throughout the site. My issue is that when the form is submitted the page leaves the tabbed area, whereas I need to stay within the tabbed system.
Below is the code I am using
...
So i'm trying to figure out the smartest way to do this. I have a list of businesses that can have photos and videos. i've created tables for: business, photos, videos. I also created a table for specials. I want to have featured businesses on the front page. Should I create a table called featured and have the businesses id stored in th...
I've noticed many sites are able to use a username or page title as an action. How is this done?
For example instead of www.example.com/users/my_username (where the users action is generic and responsible for fetching user data) how could I make this www.example.com/my_username?
Thanks very much.
...
Ok, this may be confusing so I hope I explain it correctly.
I have 4 tables:
business
photos
video
category
I want to display "featured" businesses on the home page (or elsewhere) and I want to show a Yes or No in the table row based upon whether or not there are photos or videos for that business.
Example: Joes Crab Shack has no vid...
hi, i'm trying to learn codeigniter (following a book) but don't understand why the web page comes out empty.
my controller is
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index()
{
$data['title'] = "Welcome to Claudia's Kids";
$data['navlist'] ...
Hi, i'm using 2 dropdowns where the second gets populated from the first choice.
My problem is that i'm not getting the value from the first dropdown.
What i get is [object Object].
Here's the javascript and php code:
Thanks.
Javascript:
function getState(){
$("#selectestate").bind("change",function(){
$("#selectcity").load("resul...
I have a validation function I'm using inside of codeigniter.
function valid_image() {
if ( ($_FILES["file"]["type"] != "image/jpeg") || ($_FILES["file"]["type"] != "image/gif") ) {
$this->form_validation->set_message('valid_image', 'Wrong file type..');
return false;
} else {
return true;
}
With just the "image/jpeg...
I'm using a customly created MySQL input sanitization library in one of my controllers, which makes a mess, using it in the model would be much easier, but I don't wan't to defy any best-practice principles out there either. So is it a good idea?
...
Hi All,
Im still fairly new to codeigniter and am wondering if someone can help me with this please?
Im just trying to do a very basic search query in Codeigniter, but for some reason, the results are ignoring my "status = published" request...
The code is:
$this->db->like('title', $term);
$this->db->or_like('tags', $term);
$data['r...
If i’ve got 2(or more) model methods which do (for example, in billing system) enrolling/withdrawing, and one controller’s method that calls 2(or more) of these model methods.
Is it a good way(maybe, any suggestions how to do it better) to write/use 2model methods like these:
public function start_transaction(){
$this->db->trans_s...
This is my code to trigger the ajax..
<td>[url=”#”]load->library(‘ajax’);
$this->ajax->link_to_remote($row->project_name, array(‘url’ => ‘index.php/admin_cont/ajaxtake’, ‘update’ => ‘data_div’));
?>”
style=“text-decoration:none”><?php echo substr($row->project_name,0,11).”..”; ?> [/url]</td>
here “admin_con” is my controller page a...
How can I load model to helper? I need to load it outside of functions, but use them in functions.
...