### Install Sphinx and Dependencies Source: https://github.com/bcit-ci/codeigniter/blob/develop/user_guide_src/README.rst Installs the necessary Sphinx version and the sphinxcontrib-phpdomain extension for documenting PHP projects. It also mentions the CI Lexer for syntax highlighting. ```bash easy_install "sphinx==1.6.3" easy_install "sphinxcontrib-phpdomain==0.1.3.post1" ``` -------------------------------- ### Apache Virtual Host Entry Example Source: https://github.com/bcit-ci/codeigniter/wiki/Help/Sample-Apache-Setup-for-Windows This snippet provides an example of a virtual host configuration block for Apache. It specifies the ServerName, DocumentRoot, and ErrorLog for a new development site, 'mynew.site'. This configuration is typically added to the httpd-vhosts.conf file. ```apache ServerName mynew.site DocumentRoot d:/www/php/mynew.site ErrorLog logs/mynew-error_log ``` -------------------------------- ### Build HTML Documentation Source: https://github.com/bcit-ci/codeigniter/blob/develop/user_guide_src/README.rst Command to generate the HTML version of the CodeIgniter user guide from the ReStructured Text source files. ```bash make html ``` -------------------------------- ### Configure Database Settings Source: https://github.com/bcit-ci/codeigniter/wiki/Installation Provides example database connection settings for CodeIgniter. These values should be replaced with your actual database credentials. ```php 'hostname' => 'localhost', 'username' => 'exampleuser', 'password' => '6SPLwbEuQTK9v36H', 'database' => 'exampledb', 'dbdriver' => 'mysqli', ``` -------------------------------- ### Apache Virtual Host Configuration Source: https://github.com/bcit-ci/codeigniter/wiki/Help/Sample-Apache-Setup-for-Windows This snippet demonstrates how to configure Apache's virtual hosts to map custom domain names to specific project directories. It includes examples for setting up a default host and individual project hosts, along with error log configurations. ```apache NameVirtualHost *:80 nServerName stardust DocumentRoot d:/www/php ErrorLog logs/stardust-error_log ServerName blog.stardust DocumentRoot d:/www/php/blog ErrorLog logs/blog.stardust-error_log ``` -------------------------------- ### Download CodeIgniter Source: https://github.com/bcit-ci/codeigniter/wiki/Installation Downloads the CodeIgniter 2.2-stable archive from GitHub using wget. Assumes you are in the desired download directory. ```bash cd ~ wget https://github.com/bcit-ci/CodeIgniter/archive/2.2-stable.zip ``` -------------------------------- ### Install wget Source: https://github.com/bcit-ci/codeigniter/wiki/Installation Installs the wget utility, used for downloading files from the command line. This is a prerequisite for downloading the CodeIgniter archive. ```bash sudo apt-get install wget ``` ```bash sudo yum install wget ``` -------------------------------- ### Apache httpd.conf Configuration Source: https://github.com/bcit-ci/codeigniter/wiki/Help/Sample-Apache-Setup-for-Windows This snippet shows a comprehensive Apache httpd.conf file configuration. It covers base setup, module loading (including PHP), directory permissions, logging, and module-specific configurations. It's designed for a local development environment. ```apache #----- Base Setup ----------------------------------------------------------- ServerRoot "d:/dev/apache" Listen *:80 ThreadsPerChild 50 MaxRequestsPerChild 0 ServerAdmin admin@stardust ServerName stardust DocumentRoot "D:/www/php" EnableSendfile Off EnableMMAP Off Win32DisableAcceptEx #----- Module Loading ------------------------------------------------------- LoadModule authn_default_module modules/mod_authn_default.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule dir_module modules/mod_dir.so LoadModule mime_module modules/mod_mime.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule php5_module d:/dev/php/php5apache2.dll #----- Root Directory ------------------------------------------------------- Options Indexes FollowSymLinks AllowOverride ALL Order allow,deny Allow from all DirectoryIndex index.php dispatch.fcgi index.html Order allow,deny Deny from all #----- Logging Configuration ------------------------------------------------ ErrorLog logs/error.log LogLevel warn LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio CustomLog logs/access.log common #----- Module Configurations ------------------------------------------------ DefaultType text/plain TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-phps .phps PHPIniDir "d:/dev/php" AddHandler fastcgi-script .fcgi ScriptAlias /cgi-bin/ "D:/dev/Apache/cgi-bin/" #----- Extra Configurations ------------------------------------------------- Include conf/extra/httpd-vhosts.conf ``` -------------------------------- ### Codeigniter and BackendPro Setup Source: https://github.com/bcit-ci/codeigniter/wiki/Contributions/Ajax-Todo-List-system-with-Codeigniter Instructions for setting up a Codeigniter project with BackendPro, including downloading, installation, database configuration, and user account creation. ```APIDOC Project Setup: 1. Download Codeigniter: http://codeigniter.com/downloads/ 2. Download BackendPro: http://www.kaydoo.co.uk/projects/backendpro 3. Create project folder: C:\xampp\htdocs\ci_bep 4. Unzip Codeigniter into the project folder. 5. Move all BackendPro folders into the project folder. Database Configuration: 1. Create a database (e.g., 'ci_bep'). 2. Access installation URL: http://127.0.0.1/ci_bep/install/ or http://localhost/ci_bep/install/ 3. Enter database details, user account, and reCAPTCHA keys (optional). 4. Click 'INSTALL BACKENDPRO'. Login: - Use the email and password created during installation to log in. ``` -------------------------------- ### Example Site Requirements Source: https://github.com/bcit-ci/codeigniter/wiki/Multiple-Applications-via-Symlinks Outlines the diverse requirements for four different websites that will share a common CodeIgniter codebase. ```php site #1: one application site #2: has both frontend and backend applications (will also operate on wildcard sub-domains) site #3: uses ssl with one application site #4: one application (internal access) ``` -------------------------------- ### phpdoc Docblock Example Source: https://github.com/bcit-ci/codeigniter/wiki/Approaches/I-have-the-welcome-page---but-now-what---jedd An example of a phpdoc comment block used for documenting PHP code. It includes information such as the class/function description, links to related components, package, version, author, and project URL. ```php /** * Forum * * Handles public message forums * * @link Message (Model) - which handles all message-related tables * @package pdb * @version v0.9 * @author jedd * @link http://my.web.site/trac/pdb **/ ``` -------------------------------- ### Lightwindow Usage Examples Source: https://github.com/bcit-ci/codeigniter/wiki/Lightwindow-with-CI Illustrates how to integrate the Lightwindow library into a CodeIgniter application. It shows controller setup, view integration with CSS/JS includes, and how to call the library's methods to display pop-ups. ```php /* ---------------------------------------- in your controller. e.g: 'my_lightwindow.php' ---------------------------------------- function index(){ $this->load->library('Lightwindow'); $this->load->view('my_lightwindow'); } -------------------------------------- in your view ('my_lightwindow.php') --------------------------------------