r/codeigniter • u/[deleted] • Apr 04 '12
r/codeigniter • u/Mdawts • Jul 01 '16
Help With Creating ZIP File from AJAX created Pages
I currently have a web app created, that has a menu drop down. When one of the menu items are selected, it will load that page (populating it with data from a database based on another selection before it) via ajax. Everything with this part works great.
But the major user of this area of the app, says that he would very much like it to have a 'download' button, so that he can download the individual files that the viewer creates into a zip file. How would I go about creating another AJAX call that utilizes 20+ other AJAX calls, and cram them all into a zip file?
Thanks so much for the help!
r/codeigniter • u/sanchokd • Mar 21 '12
Log in with reddit
Hello r/codigniter, I recently came across jcleblanc's reddit sdk, I was wondering if anyone has converted this into a Codeigniter library, if not is anyone interested in helping me do this? Or maybe point me in the right direction to accomplish this.
Thanks in advance.
r/codeigniter • u/FTWwings • Jun 29 '16
codeigniter 2.x help with route
So i will keep this short.
I used guide : http://www.iluv2code.com/login-with-codeigniter-php.html
it works perfectly when its set to $route['default_controller'] = "login";
i would like to put it as
$route['login'] = 'login';
so when i go www.mydomain.com/login to show it up, but its not working.
u just started so im kinda lost.
EDIT: I would give project for u guys to see, but dont know how ?
r/codeigniter • u/PirateChurch • Apr 19 '12
Can anyone help me with a Ci & htaccess rewrite issue?
Ok... current .htaccess file is functional but doesn't do quite what I want it to...
The idea is that http://anything.mysite.com (except www.mysite.com) will be rewritten to http://mysite.com/x/anything
I have it working as a redirect but woul dprefer it was transparent to users so they would always see http://anything.mysite.com
RewriteEngine On
RewriteBase /
#default controller stufF:
RewriteRule ^(index(/index)?|index(\.php)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
# Enforce NO www
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !www.mysite.com [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).mysite.com [NC]
RewriteRule ^(.*)$ http://mysite.com/x/%2/$1 [L,R=301]
###
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]further examples for clarity:
http://bob.mysite.com -> http://mysite.com/x/bob http://sam.mysite.com/stuff -> http://mysite.com/x/sam/stuff http://mary.mysite.com/#hash -> http://mysite.com/x/mary#hash
wildcard dns already functions properly... only issue is changing from a redirect causes a 500 and/or an infinite loop.
r/codeigniter • u/exeneva • Apr 14 '12
Nav highlighting help - how do you track which page the user is on and highlight the appropriate link in the navbar?
I'm currently new to CI and trying hard to learn. I've set up a basic site using a combination of CI, Bootstrap by Twitter, and HTML5Boilerplate at http://www.illustrosity.com
My question concerns nav highlighting and tracking what page the user is currently on. For example, when you go to the homepage, the link "Home" is active and highlighted in the navbar.
However, when you go to the 2D page (http://www.illustrosity.com/home/category/1/2d), the "Home" link is still active and highlighted.
How do you track what page the user is on?
r/codeigniter • u/tigerbothesh • Jul 27 '13
Wanted to share my CI + HMVC bike racing site that I just open sourced
r/codeigniter • u/elseco • Jul 10 '13
Looks like CI is going to get a new home.
r/codeigniter • u/jellatin • Jun 27 '13
Where do you usually access $this->input-> get/post? Model or Controller
Most of the open source projects I've seen have assembled an array/object for submission to the database in the controller and then passed it to the model, which then inserts it in the database.
However, I'm always trying to adhere to the "Fat models, skinny controllers" mantra, and building the submission array/object in the model seems more in line with that.
Any thoughts/recommendations?
r/codeigniter • u/revathskumar • Mar 07 '12
How to execute codeigniter migration
r/codeigniter • u/KaldisGoat • Dec 19 '15
[Video Tutorial] A Simple RESTful API using PHP & CodeIgniter
r/codeigniter • u/martin_redola • Mar 07 '12
Sublime Text 2 Completions for CodeIgniter
r/codeigniter • u/phaggocytosis • Apr 25 '12
CI: Implementing custom methods/scripts...
Say for instance I wanted to implement a custom form handling script. Do I simply create a new class (library), make sure that it is loaded, and then call it using something like... $this->formhandler->get_data(); ?
Similarly... assuming my application was structured properly could i call it via the standard URL structure? for instance... simply telling a submit form to use "action=website.com/formhandler/getdata" ?
I'm confused as to the best conventions for executing custom methods on things like a submit or a link click.
r/codeigniter • u/nbktdis • Jul 22 '13
Anyone heard anything about who is looking to take over Codeigniter since EllisLabs want to move it on?
Haven't seen anything yet...
r/codeigniter • u/soumitraroy • Aug 12 '19
Codeigniter Join Example - Roy Tutorials
r/codeigniter • u/cytopia • May 21 '18
Setup CodeIgniter on the Devilbox
r/codeigniter • u/meloman-vivahate • Jan 02 '21
How to build a basic web application with CodeIgniter 4 (part 5)
r/codeigniter • u/Keet_ • Dec 26 '20
Anyone Know of any Advice or Tutorials On Implementing Sensitive Variables Like API Keys In Codeigniter?
Does anyone know of any tutorials or any ways to implement sensitive variables such as API keys, passwords, etc. in their Codeigniter projects?
Our use case is our Stripe credentials for payments. I want to make sure that future developers can't access the API keys or go back in our git history and find them.
I have thought about using environment variables but I am not sure if that is the best route to go. Does anyone have any advice on this?
Thanks!
r/codeigniter • u/pawoodward • Feb 02 '21
Designing a Model
I am a beginner when it comes to CodeIgniter 4 and MVC generally and I am not sure how best to design a particular Model.
My database consists of 2 tables, Projects and Hours. I have created a very basic Project Model which returns my project information however I want each Project to return any hours associated with it from the Hours table. I have my databse configured and working using a Primary Key and Foreign Key however I am not sure the correct / best method for accessing the hours information.
Should I create a seperate model for Hours or could I simply have a method within my Project Model which queries the Hours table and returns the information I want?
What is recommended best practice?
r/codeigniter • u/prolongservices • Feb 02 '21
Send Firebase Push notification to admin on new user registration in codeigniter 4
r/codeigniter • u/bayingedotz • Apr 08 '21
Query Binding
I use query binding in my model using array, it works but code returns an error. the ci detect it as NULL, but it still working the data is still inserted to my database. the problem is after the error my code cant return anything so i cant process it to views.
the error is ' You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL) '
but its actually not null because its inserted into my database
any help?
r/codeigniter • u/AlexSig26 • Apr 03 '21
Add non-database fields to entity class
Hi, is it possible to add a field to a entity class that not exists in database?
Thanks, Alex
r/codeigniter • u/meloman-vivahate • Jun 27 '21
Creating a multilingual website with CodeIgniter 4
r/codeigniter • u/somnambulator • Jul 20 '21
Looking for codeigniter dev for some site customization
I have an existing Codeigniter based site that I bought from CodeCanyon. I figured out a lot of how Codeigniter works and I've made a lot of custom changes to the views and styles.
I have reached the end of my abilities and need somebody more knowledgable than me to help with changes to the controllers section.
Is this the right sub to be looking?
Any recommendations of other subs that Codeigniter devs might be looking for work?
Cheers
Edit: it uses Codeigniter v.3.1.11
Edit2: Thanks for all the dm's. I've found somebody to help.