codeigniter_vender 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/MIT-LICENSE +20 -0
- data/README +40 -0
- data/Rakefile +18 -0
- data/VERSION +1 -0
- data/codeigniter_vender.gemspec +389 -0
- data/generators/ci_app/USAGE +8 -0
- data/generators/ci_app/ci_app_generator.rb +12 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/license.txt +52 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/autoload.php +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/config.php +329 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/constants.php +41 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/database.php +55 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/doctypes.php +15 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/hooks.php +16 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/mimes.php +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/routes.php +48 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/smileys.php +66 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/user_agents.php +175 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_404.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_db.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_general.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_php.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/welcome_message.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/cache/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +69 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +56 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +280 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +93 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB.php +146 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_active_rec.php +1820 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_cache.php +195 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_driver.php +1366 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_forge.php +375 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_result.php +342 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_utility.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_driver.php +667 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_driver.php +670 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_utility.php +245 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_driver.php +671 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_driver.php +780 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_result.php +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_utility.php +122 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_driver.php +639 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_forge.php +266 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_result.php +228 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_utility.php +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_driver.php +684 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_utility.php +124 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php +657 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_forge.php +265 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_result.php +179 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_utility.php +141 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/texb.ttf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/array_helper.php +78 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/compatibility_helper.php +498 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/cookie_helper.php +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/date_helper.php +611 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/directory_helper.php +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/download_helper.php +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/email_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/file_helper.php +464 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/form_helper.php +1025 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/html_helper.php +416 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/inflector_helper.php +171 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/language_helper.php +58 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/number_helper.php +75 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/path_helper.php +72 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/security_helper.php +126 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/smiley_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/string_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/text_helper.php +462 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/typography_helper.php +71 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/url_helper.php +593 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/xml_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +51 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/date_lang.php +60 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/db_lang.php +28 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/email_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/form_validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/ftp_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/imglib_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/number_lang.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/profiler_lang.php +19 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/unit_test_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/upload_lang.php +22 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Benchmark.php +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Calendar.php +477 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Cart.php +550 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Config.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Email.php +2041 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Encrypt.php +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Exceptions.php +174 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Form_validation.php +1278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Ftp.php +618 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Hooks.php +226 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Image_lib.php +1544 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +1067 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Loader.php +1085 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Log.php +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Output.php +409 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Pagination.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Parser.php +173 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +392 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Router.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Session.php +758 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Sha1.php +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Table.php +440 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Trackback.php +547 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Typography.php +406 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/URI.php +586 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Unit_test.php +347 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Upload.php +970 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/User_agent.php +502 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +875 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpc.php +1421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpcs.php +536 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Zip.php +359 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/logs/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +356 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +629 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +291 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/background.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +32 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +33 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +29 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +8 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +27 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/changelog.html +1080 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/active_record.html +757 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/caching.html +220 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/call_function.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/configuration.html +157 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/connecting.html +186 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/examples.html +217 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/fields.html +163 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/forge.html +234 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/helpers.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/queries.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/results.html +238 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/table_data.html +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/transactions.html +200 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/utilities.html +295 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/index.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/template.html +128 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/alternative_php.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/ancillary_classes.html +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/autoloader.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/caching.html +115 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/common_functions.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/controllers.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/core_classes.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/creating_libraries.html +298 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/credits.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/errors.html +138 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/helpers.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/hooks.html +167 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/libraries.html +94 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/managing_apps.html +133 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/models.html +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html +104 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/quick_reference.html +77 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/requirements.html +82 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/reserved_names.html +156 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/routing.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/security.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/styleguide.html +687 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/urls.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/views.html +274 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/array_helper.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/date_helper.html +408 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/directory_helper.html +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/download_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/email_helper.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/file_helper.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/form_helper.html +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/html_helper.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/inflector_helper.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/language_helper.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/number_helper.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/path_helper.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/security_helper.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/smiley_helper.html +215 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/string_helper.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/text_helper.html +192 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/typography_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/url_helper.html +289 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/xml_helper.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/appflowchart.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/arrow.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo_flame.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_quick_ref.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/file.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/folder.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_bg_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_separator_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_toggle_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/smile.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/transparent.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/downloads.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/index.html +97 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/troubleshooting.html +90 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_120.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_130.html +203 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_131.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_132.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_133.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_140.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_141.html +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_150.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_152.html +111 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_153.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_154.html +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_160.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_161.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_162.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_163.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_170.html +121 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_171.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_172.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_b11.html +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrading.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/benchmark.html +198 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/calendar.html +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/cart.html +346 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/config.html +181 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/email.html +307 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/encryption.html +182 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/file_uploading.html +451 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/form_validation.html +1221 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/ftp.html +303 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/image_lib.html +666 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/input.html +231 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/language.html +137 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/loader.html +214 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/output.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/pagination.html +218 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/parser.html +208 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/sessions.html +311 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/table.html +292 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/trackback.html +246 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/typography.html +160 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/unit_testing.html +205 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/uri.html +252 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/user_agent.html +201 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +740 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/xmlrpc.html +517 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/zip.html +278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/license.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/hacks.txt +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.js +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +241 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/nav.js +139 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/prototype.lite.js +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/user_guide_menu.js +4 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/appflow.html +95 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/at_a_glance.html +172 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/cheatsheets.html +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/features.html +120 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/getting_started.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/goals.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/index.html +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/mvc.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/toc.html +209 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/userguide.css +406 -0
- data/generators/ci_app/templates/README +1 -0
- data/generators/ci_controller/USAGE +2 -0
- data/generators/ci_controller/ci_controller_generator.rb +11 -0
- data/generators/ci_controller/templates/ci_controller.php.erb +15 -0
- data/generators/ci_controller/templates/ci_view.php.erb +8 -0
- data/generators/ci_layout/USAGE +2 -0
- data/generators/ci_layout/ci_layout_generator.rb +24 -0
- data/generators/ci_layout/templates/application_layout.php.erb +19 -0
- data/generators/ci_model/USAGE +2 -0
- data/generators/ci_model/ci_model_generator.rb +42 -0
- data/generators/ci_model/templates/ci_model.php.erb +15 -0
- data/generators/ci_model/templates/model.rb +5 -0
- data/generators/ci_model/templates/model_migration.rb.erb +16 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/codeigniter_vender.rb +1 -0
- data/lib/tasks/app.rake +8 -0
- data/test/codeigniter_vender_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +1 -0
- metadata +411 -0
@@ -0,0 +1,246 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Trackback Class : CodeIgniter User Guide</title>
|
7
|
+
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
10
|
+
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
15
|
+
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
18
|
+
<meta name='robots' content='all' />
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
21
|
+
|
22
|
+
</head>
|
23
|
+
<body>
|
24
|
+
|
25
|
+
<!-- START NAVIGATION -->
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
28
|
+
<div id="masthead">
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
30
|
+
<tr>
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
33
|
+
</tr>
|
34
|
+
</table>
|
35
|
+
</div>
|
36
|
+
<!-- END NAVIGATION -->
|
37
|
+
|
38
|
+
|
39
|
+
<!-- START BREADCRUMB -->
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
41
|
+
<tr>
|
42
|
+
<td id="breadcrumb">
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
45
|
+
Trackback Class
|
46
|
+
</td>
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
48
|
+
</tr>
|
49
|
+
</table>
|
50
|
+
<!-- END BREADCRUMB -->
|
51
|
+
|
52
|
+
<br clear="all" />
|
53
|
+
|
54
|
+
|
55
|
+
<!-- START CONTENT -->
|
56
|
+
<div id="content">
|
57
|
+
|
58
|
+
|
59
|
+
<h1>Trackback Class</h1>
|
60
|
+
|
61
|
+
<p>The Trackback Class provides functions that enable you to send and receive Trackback data.</p>
|
62
|
+
|
63
|
+
|
64
|
+
<p>If you are not familiar with Trackbacks you'll find more information <a href="http://en.wikipedia.org/wiki/Trackback">here</a>.</p>
|
65
|
+
|
66
|
+
<h2>Initializing the Class</h2>
|
67
|
+
|
68
|
+
<p>Like most other classes in CodeIgniter, the Trackback class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p>
|
69
|
+
|
70
|
+
<code>$this->load->library('trackback');</code>
|
71
|
+
<p>Once loaded, the Trackback library object will be available using: <dfn>$this->trackback</dfn></p>
|
72
|
+
|
73
|
+
|
74
|
+
<h2>Sending Trackbacks</h2>
|
75
|
+
|
76
|
+
<p>A Trackback can be sent from any of your controller functions using code similar to this example:</p>
|
77
|
+
|
78
|
+
<code>$this->load->library('trackback');<br />
|
79
|
+
<br />
|
80
|
+
$tb_data = array(<br />
|
81
|
+
'ping_url' => 'http://example.com/trackback/456',<br />
|
82
|
+
'url' => 'http://www.my-example.com/blog/entry/123',<br />
|
83
|
+
'title' => 'The Title of My Entry',<br />
|
84
|
+
'excerpt' => 'The entry content.',<br />
|
85
|
+
'blog_name' => 'My Blog Name',<br />
|
86
|
+
'charset' => 'utf-8'<br />
|
87
|
+
);<br />
|
88
|
+
<br />
|
89
|
+
if ( ! $this->trackback->send($tb_data))<br />
|
90
|
+
{<br />
|
91
|
+
echo $this->trackback->display_errors();<br />
|
92
|
+
}<br />
|
93
|
+
else<br />
|
94
|
+
{<br />
|
95
|
+
echo 'Trackback was sent!';<br />
|
96
|
+
}</code>
|
97
|
+
|
98
|
+
<p>Description of array data:</p>
|
99
|
+
|
100
|
+
<ul>
|
101
|
+
<li><strong>ping_url</strong> - The URL of the site you are sending the Trackback to. You can send Trackbacks to multiple URLs by separating each URL with a comma.</li>
|
102
|
+
<li><strong>url</strong> - The URL to YOUR site where the weblog entry can be seen.</li>
|
103
|
+
<li><strong>title</strong> - The title of your weblog entry.</li>
|
104
|
+
<li><strong>excerpt</strong> - The content of your weblog entry. Note: the Trackback class will automatically send only the first 500 characters of your entry. It will also strip all HTML.</li>
|
105
|
+
<li><strong>blog_name</strong> - The name of your weblog.</li>
|
106
|
+
<li><strong>charset</strong> - The character encoding your weblog is written in. If omitted, UTF-8 will be used.</li>
|
107
|
+
</ul>
|
108
|
+
|
109
|
+
<p>The Trackback sending function returns TRUE/FALSE (boolean) on success or failure. If it fails, you can retrieve the error message using:</p>
|
110
|
+
|
111
|
+
<code>$this->trackback->display_errors();</code>
|
112
|
+
|
113
|
+
|
114
|
+
<h2>Receiving Trackbacks</h2>
|
115
|
+
|
116
|
+
<p>Before you can receive Trackbacks you must create a weblog. If you don't have a blog yet there's no point in continuing.</p>
|
117
|
+
|
118
|
+
<p>Receiving Trackbacks is a little more complex than sending them, only because you will need a database table in which to store them,
|
119
|
+
and you will need to validate the incoming trackback data. You are encouraged to implement a thorough validation process to
|
120
|
+
guard against spam and duplicate data. You may also want to limit the number of Trackbacks you allow from a particular IP within
|
121
|
+
a given span of time to further curtail spam. The process of receiving a Trackback is quite simple;
|
122
|
+
the validation is what takes most of the effort.</p>
|
123
|
+
|
124
|
+
<h2>Your Ping URL</h2>
|
125
|
+
|
126
|
+
<p>In order to accept Trackbacks you must display a Trackback URL next to each one of your weblog entries. This will be the URL
|
127
|
+
that people will use to send you Trackbacks (we will refer to this as your "Ping URL").</p>
|
128
|
+
|
129
|
+
<p>Your Ping URL must point to a controller function where your Trackback receiving code is located, and the URL
|
130
|
+
must contain the ID number for each particular entry, so that when the Trackback is received you'll be
|
131
|
+
able to associate it with a particular entry.</p>
|
132
|
+
|
133
|
+
<p>For example, if your controller class is called <dfn>Trackback</dfn>, and the receiving function is called <dfn>receive</dfn>, your
|
134
|
+
Ping URLs will look something like this:</p>
|
135
|
+
|
136
|
+
<code>http://example.com/index.php/trackback/receive/<samp>entry_id</samp></code>
|
137
|
+
|
138
|
+
<p>Where <samp>entry_id</samp> represents the individual ID number for each of your entries.</p>
|
139
|
+
|
140
|
+
|
141
|
+
<h2>Creating a Trackback Table</h2>
|
142
|
+
|
143
|
+
<p>Before you can receive Trackbacks you must create a table in which to store them. Here is a basic prototype for such a table:</p>
|
144
|
+
|
145
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="13">
|
146
|
+
CREATE TABLE trackbacks (
|
147
|
+
tb_id int(10) unsigned NOT NULL auto_increment,
|
148
|
+
entry_id int(10) unsigned NOT NULL default 0,
|
149
|
+
url varchar(200) NOT NULL,
|
150
|
+
title varchar(100) NOT NULL,
|
151
|
+
excerpt text NOT NULL,
|
152
|
+
blog_name varchar(100) NOT NULL,
|
153
|
+
tb_date int(10) NOT NULL,
|
154
|
+
ip_address varchar(16) NOT NULL,
|
155
|
+
PRIMARY KEY `tb_id` (`tb_id`),
|
156
|
+
KEY `entry_id` (`entry_id`)
|
157
|
+
);</textarea>
|
158
|
+
|
159
|
+
|
160
|
+
<p>The Trackback specification only requires four pieces of information to be sent in a Trackback (url, title, excerpt, blog_name),
|
161
|
+
but to make the data more useful we've added a few more fields in the above table schema (date, IP address, etc.).</p>
|
162
|
+
|
163
|
+
<h2>Processing a Trackback</h2>
|
164
|
+
|
165
|
+
<p>Here is an example showing how you will receive and process a Trackback. The following
|
166
|
+
code is intended for use within the controller function where you expect to receive Trackbacks.</p>
|
167
|
+
|
168
|
+
<code>$this->load->library('trackback');<br />
|
169
|
+
$this->load->database();<br />
|
170
|
+
<br />
|
171
|
+
if ($this->uri->segment(3) == FALSE)<br />
|
172
|
+
{<br />
|
173
|
+
$this->trackback->send_error("Unable to determine the entry ID");<br />
|
174
|
+
}<br />
|
175
|
+
<br />
|
176
|
+
if ( ! $this->trackback->receive())<br />
|
177
|
+
{<br />
|
178
|
+
$this->trackback->send_error("The Trackback did not contain valid data");<br />
|
179
|
+
}<br />
|
180
|
+
<br />
|
181
|
+
$data = array(<br />
|
182
|
+
'tb_id' => '',<br />
|
183
|
+
'entry_id' => $this->uri->segment(3),<br />
|
184
|
+
'url' => $this->trackback->data('url'),<br />
|
185
|
+
'title' => $this->trackback->data('title'),<br />
|
186
|
+
'excerpt' => $this->trackback->data('excerpt'),<br />
|
187
|
+
'blog_name' => $this->trackback->data('blog_name'),<br />
|
188
|
+
'tb_date' => time(),<br />
|
189
|
+
'ip_address' => $this->input->ip_address()<br />
|
190
|
+
);<br />
|
191
|
+
<br />
|
192
|
+
$sql = $this->db->insert_string('trackbacks', $data);<br />
|
193
|
+
$this->db->query($sql);<br />
|
194
|
+
<br />
|
195
|
+
$this->trackback->send_success();</code>
|
196
|
+
|
197
|
+
<h4>Notes:</h4>
|
198
|
+
|
199
|
+
<p>The entry ID number is expected in the third segment of your URL. This is based on the URI example we gave earlier:</p>
|
200
|
+
|
201
|
+
<code>http://example.com/index.php/trackback/receive/<samp>entry_id</samp></code>
|
202
|
+
|
203
|
+
<p>Notice the entry_id is in the third URI segment, which you can retrieve using:</p>
|
204
|
+
|
205
|
+
<code>$this->uri->segment(3);</code>
|
206
|
+
|
207
|
+
<p>In our Trackback receiving code above, if the third segment is missing, we will issue an error. Without a valid entry ID, there's no
|
208
|
+
reason to continue.</p>
|
209
|
+
|
210
|
+
<p>The <dfn>$this->trackback->receive()</dfn> function is simply a validation function that looks at the incoming data
|
211
|
+
and makes sure it contains the four pieces of data that are required (url, title, excerpt, blog_name).
|
212
|
+
It returns TRUE on success and FALSE on failure. If it fails you will issue an error message.</p>
|
213
|
+
|
214
|
+
<p>The incoming Trackback data can be retrieved using this function:</p>
|
215
|
+
|
216
|
+
<code>$this->trackback->data('<var>item</var>')</code>
|
217
|
+
|
218
|
+
<p>Where <var>item</var> represents one of these four pieces of info: url, title, excerpt, or blog_name</p>
|
219
|
+
|
220
|
+
<p>If the Trackback data is successfully received, you will issue a success message using:</p>
|
221
|
+
|
222
|
+
<code>$this->trackback->send_success();</code>
|
223
|
+
|
224
|
+
<p class="important"><strong>Note:</strong> The above code contains no data validation, which you are encouraged to add.</p>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
</div>
|
231
|
+
<!-- END CONTENT -->
|
232
|
+
|
233
|
+
|
234
|
+
<div id="footer">
|
235
|
+
<p>
|
236
|
+
Previous Topic: <a href="sessions.html">Session Class</a>
|
237
|
+
·
|
238
|
+
<a href="#top">Top of Page</a> ·
|
239
|
+
<a href="../index.html">User Guide Home</a> ·
|
240
|
+
Next Topic: <a href="parser.html">Template Parser Class</a>
|
241
|
+
</p>
|
242
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
</body>
|
246
|
+
</html>
|
@@ -0,0 +1,160 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Typography Class : CodeIgniter User Guide</title>
|
7
|
+
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
10
|
+
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
15
|
+
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
18
|
+
<meta name='robots' content='all' />
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
21
|
+
|
22
|
+
</head>
|
23
|
+
<body>
|
24
|
+
|
25
|
+
<!-- START NAVIGATION -->
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
28
|
+
<div id="masthead">
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
30
|
+
<tr>
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
33
|
+
</tr>
|
34
|
+
</table>
|
35
|
+
</div>
|
36
|
+
<!-- END NAVIGATION -->
|
37
|
+
|
38
|
+
|
39
|
+
<!-- START BREADCRUMB -->
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
41
|
+
<tr>
|
42
|
+
<td id="breadcrumb">
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
45
|
+
Typography Class
|
46
|
+
</td>
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
48
|
+
</tr>
|
49
|
+
</table>
|
50
|
+
<!-- END BREADCRUMB -->
|
51
|
+
|
52
|
+
<br clear="all" />
|
53
|
+
|
54
|
+
|
55
|
+
<!-- START CONTENT -->
|
56
|
+
<div id="content">
|
57
|
+
|
58
|
+
|
59
|
+
<h1>Typography Class</h1>
|
60
|
+
|
61
|
+
<p>The Typography Class provides functions that help you format text.</p>
|
62
|
+
|
63
|
+
|
64
|
+
<h2>Initializing the Class</h2>
|
65
|
+
|
66
|
+
<p>Like most other classes in CodeIgniter, the Typography class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p>
|
67
|
+
|
68
|
+
<code>$this->load->library('typography');</code>
|
69
|
+
<p>Once loaded, the Typography library object will be available using: <dfn>$this->typography</dfn></p>
|
70
|
+
|
71
|
+
|
72
|
+
<h2>auto_typography()</h2>
|
73
|
+
|
74
|
+
<p>Formats text so that it is semantically and typographically correct HTML. Takes a string as input and returns it with
|
75
|
+
the following formatting:</p>
|
76
|
+
|
77
|
+
<ul>
|
78
|
+
<li>Surrounds paragraphs within <p></p> (looks for double line breaks to identify paragraphs).</li>
|
79
|
+
<li>Single line breaks are converted to <br />, except those that appear within <pre> tags.</li>
|
80
|
+
<li>Block level elements, like <div> tags, are not wrapped within paragraphs, but their contained text is if it contains paragraphs.</li>
|
81
|
+
<li>Quotes are converted to correctly facing curly quote entities, except those that appear within tags.</li>
|
82
|
+
<li>Apostrophes are converted to curly apostrophe entities.</li>
|
83
|
+
<li>Double dashes (either like -- this or like--this) are converted to em—dashes.</li>
|
84
|
+
<li>Three consecutive periods either preceding or following a word are converted to ellipsis…</li>
|
85
|
+
<li>Double spaces following sentences are converted to non-breaking spaces to mimic double spacing.</li>
|
86
|
+
</ul>
|
87
|
+
|
88
|
+
<p>Usage example:</p>
|
89
|
+
|
90
|
+
<code>$string = $this->typography->auto_typography($string);</code>
|
91
|
+
|
92
|
+
<h3>Parameters</h3>
|
93
|
+
|
94
|
+
<p>There is one optional parameters that determines whether the parser should reduce more then two consecutive line breaks down to two. Use boolean <kbd>TRUE</kbd> or <kbd>FALSE</kbd>.
|
95
|
+
|
96
|
+
<p>By default the parser does not reduce line breaks. In other words, if no parameters are submitted, it is the same as doing this:</p>
|
97
|
+
|
98
|
+
<code>$string = $this->typography->auto_typography($string, <kbd>FALSE</kbd>);</code>
|
99
|
+
|
100
|
+
|
101
|
+
<p class="important"><strong>Note:</strong> Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted.
|
102
|
+
If you choose to use this function you may want to consider
|
103
|
+
<a href="../general/caching.html">caching</a> your pages.</p>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<h2>format_characters()</h2>
|
108
|
+
|
109
|
+
<p>This function is similar to the <dfn>auto_typography</dfn> function above, except that it only does character conversion:</p>
|
110
|
+
|
111
|
+
<ul>
|
112
|
+
<li>Quotes are converted to correctly facing curly quote entities, except those that appear within tags.</li>
|
113
|
+
<li>Apostrophes are converted to curly apostrophe entities.</li>
|
114
|
+
<li>Double dashes (either like -- this or like--this) are converted to em—dashes.</li>
|
115
|
+
<li>Three consecutive periods either preceding or following a word are converted to ellipsis…</li>
|
116
|
+
<li>Double spaces following sentences are converted to non-breaking spaces to mimic double spacing.</li>
|
117
|
+
</ul>
|
118
|
+
|
119
|
+
<p>Usage example:</p>
|
120
|
+
|
121
|
+
<code>$string = $this->typography->format_characters($string);</code>
|
122
|
+
|
123
|
+
|
124
|
+
<h2>nl2br_except_pre()</h2>
|
125
|
+
|
126
|
+
<p>Converts newlines to <br /> tags unless they appear within <pre> tags.
|
127
|
+
This function is identical to the native PHP <dfn>nl2br()</dfn> function, except that it ignores <pre> tags.</p>
|
128
|
+
|
129
|
+
<p>Usage example:</p>
|
130
|
+
|
131
|
+
<code>$string = $this->typography->nl2br_except_pre($string);</code>
|
132
|
+
|
133
|
+
<h2>protect_braced_quotes</h2>
|
134
|
+
|
135
|
+
<p>When using the Typography library in conjunction with the Template Parser library it can often be desirable to protect single
|
136
|
+
and double quotes within curly braces. To enable this, set the <kbd>protect_braced_quotes</kbd> class property to <samp>TRUE</samp>.
|
137
|
+
|
138
|
+
<p>Usage example:</p>
|
139
|
+
|
140
|
+
<code>$this->load->library('typography');<br />
|
141
|
+
$this->typography->protect_braced_quotes = TRUE;
|
142
|
+
</code>
|
143
|
+
|
144
|
+
</div>
|
145
|
+
<!-- END CONTENT -->
|
146
|
+
|
147
|
+
|
148
|
+
<div id="footer">
|
149
|
+
<p>
|
150
|
+
Previous Topic: <a href="parser.html">Template Parser</a>
|
151
|
+
·
|
152
|
+
<a href="#top">Top of Page</a> ·
|
153
|
+
<a href="../index.html">User Guide Home</a> ·
|
154
|
+
Next Topic: <a href="unit_testing.html">Unit Testing Class</a>
|
155
|
+
</p>
|
156
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</body>
|
160
|
+
</html>
|
@@ -0,0 +1,205 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Unit Testing Class : CodeIgniter User Guide</title>
|
7
|
+
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
10
|
+
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
15
|
+
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
18
|
+
<meta name='robots' content='all' />
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
21
|
+
|
22
|
+
</head>
|
23
|
+
<body>
|
24
|
+
|
25
|
+
<!-- START NAVIGATION -->
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
28
|
+
<div id="masthead">
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
30
|
+
<tr>
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
33
|
+
</tr>
|
34
|
+
</table>
|
35
|
+
</div>
|
36
|
+
<!-- END NAVIGATION -->
|
37
|
+
|
38
|
+
|
39
|
+
<!-- START BREADCRUMB -->
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
41
|
+
<tr>
|
42
|
+
<td id="breadcrumb">
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
45
|
+
Unit Testing Class
|
46
|
+
</td>
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
48
|
+
</tr>
|
49
|
+
</table>
|
50
|
+
<!-- END BREADCRUMB -->
|
51
|
+
|
52
|
+
<br clear="all" />
|
53
|
+
|
54
|
+
|
55
|
+
<!-- START CONTENT -->
|
56
|
+
<div id="content">
|
57
|
+
|
58
|
+
|
59
|
+
<h1>Unit Testing Class</h1>
|
60
|
+
|
61
|
+
<p>Unit testing is an approach to software development in which tests are written for each function in your application.
|
62
|
+
If you are not familiar with the concept you might do a little googling on the subject.</p>
|
63
|
+
|
64
|
+
<p>CodeIgniter's Unit Test class is quite simple, consisting of an evaluation function and two result functions.
|
65
|
+
It's not intended to be a full-blown test suite but rather a simple mechanism to evaluate your code
|
66
|
+
to determine if it is producing the correct data type and result.
|
67
|
+
</p>
|
68
|
+
|
69
|
+
|
70
|
+
<h2>Initializing the Class</h2>
|
71
|
+
|
72
|
+
<p>Like most other classes in CodeIgniter, the Unit Test class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p>
|
73
|
+
|
74
|
+
<code>$this->load->library('unit_test');</code>
|
75
|
+
<p>Once loaded, the Unit Test object will be available using: <dfn>$this->unit</dfn></p>
|
76
|
+
|
77
|
+
|
78
|
+
<h2>Running Tests</h2>
|
79
|
+
|
80
|
+
<p>Running a test involves supplying a test and an expected result to the following function:</p>
|
81
|
+
|
82
|
+
<h2>$this->unit->run( <var>test</var>, <var>expected result</var>, '<var>test name</var>' );</h2>
|
83
|
+
|
84
|
+
<p>Where <var>test</var> is the result of the code you wish to test,
|
85
|
+
<var>expected result</var> is the data type you expect, and <var>test name</var> is an optional name you can give your test. Example:</p>
|
86
|
+
|
87
|
+
<code>$test = 1 + 1;<br />
|
88
|
+
<br />
|
89
|
+
$expected_result = 2;<br />
|
90
|
+
<br />
|
91
|
+
$test_name = 'Adds one plus one';<br />
|
92
|
+
<br />
|
93
|
+
$this->unit->run($test, $expected_result, $test_name);</code>
|
94
|
+
|
95
|
+
<p>The expected result you supply can either be a literal match, or a data type match. Here's an example of a literal:</p>
|
96
|
+
|
97
|
+
<code>$this->unit->run('Foo', 'Foo');</code>
|
98
|
+
|
99
|
+
<p>Here is an example of a data type match:</p>
|
100
|
+
|
101
|
+
<code>$this->unit->run('Foo', 'is_string');</code>
|
102
|
+
|
103
|
+
<p>Notice the use of "is_string" in the second parameter? This tells the function to evaluate whether your test is producing a string
|
104
|
+
as the result. Here is a list of allowed comparison types:</p>
|
105
|
+
|
106
|
+
<ul>
|
107
|
+
<li>is_string</li>
|
108
|
+
<li>is_bool</li>
|
109
|
+
<li>is_true</li>
|
110
|
+
<li>is_false</li>
|
111
|
+
<li>is_int</li>
|
112
|
+
<li>is_numeric</li>
|
113
|
+
<li>is_float</li>
|
114
|
+
<li>is_double</li>
|
115
|
+
<li>is_array</li>
|
116
|
+
<li>is_null</li>
|
117
|
+
</ul>
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Generating Reports</h2>
|
121
|
+
|
122
|
+
<p>You can either display results after each test, or your can run several tests and generate a report at the end.
|
123
|
+
To show a report directly simply echo or return the <var>run</var> function:</p>
|
124
|
+
|
125
|
+
<code>echo $this->unit->run($test, $expected_result);</code>
|
126
|
+
|
127
|
+
<p>To run a full report of all tests, use this:</p>
|
128
|
+
|
129
|
+
<code>echo $this->unit->report();</code>
|
130
|
+
|
131
|
+
<p>The report will be formatted in an HTML table for viewing. If you prefer the raw data you can retrieve an array using:</p>
|
132
|
+
|
133
|
+
<code>echo $this->unit->result();</code>
|
134
|
+
|
135
|
+
|
136
|
+
<h2>Strict Mode</h2>
|
137
|
+
|
138
|
+
<p>By default the unit test class evaluates literal matches loosely. Consider this example:</p>
|
139
|
+
|
140
|
+
<code>$this->unit->run(1, TRUE);</code>
|
141
|
+
|
142
|
+
<p>The test is evaluating an integer, but the expected result is a boolean. PHP, however, due to it's loose data-typing
|
143
|
+
will evaluate the above code as TRUE using a normal equality test:</p>
|
144
|
+
|
145
|
+
<code>if (1 == TRUE) echo 'This evaluates as true';</code>
|
146
|
+
|
147
|
+
<p>If you prefer, you can put the unit test class in to strict mode, which will compare the data type as well as the value:</p>
|
148
|
+
|
149
|
+
<code>if (1 === TRUE) echo 'This evaluates as FALSE';</code>
|
150
|
+
|
151
|
+
<p>To enable strict mode use this:</p>
|
152
|
+
|
153
|
+
<code>$this->unit->use_strict(TRUE);</code>
|
154
|
+
|
155
|
+
<h2>Enabling/Disabling Unit Testing</h2>
|
156
|
+
|
157
|
+
<p>If you would like to leave some testing in place in your scripts, but not have it run unless you need it, you can disable
|
158
|
+
unit testing using:</p>
|
159
|
+
|
160
|
+
<code>$this->unit->active(FALSE)</code>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<h2>Creating a Template</h2>
|
165
|
+
|
166
|
+
<p>If you would like your test results formatted differently then the default you can set your own template. Here is an
|
167
|
+
example of a simple template. Note the required pseudo-variables:</p>
|
168
|
+
|
169
|
+
<code>
|
170
|
+
$str = '<br />
|
171
|
+
<table border="0" cellpadding="4" cellspacing="1"><br />
|
172
|
+
<kbd>{rows}</kbd><br />
|
173
|
+
<tr><br />
|
174
|
+
<td><kbd>{item}</kbd></td><br />
|
175
|
+
<td><kbd>{result}</kbd></td><br />
|
176
|
+
</tr><br />
|
177
|
+
<kbd>{/rows}</kbd><br />
|
178
|
+
</table>';<br />
|
179
|
+
<br />
|
180
|
+
$this->unit->set_template($str);
|
181
|
+
</code>
|
182
|
+
|
183
|
+
<p class="important"><strong>Note:</strong> Your template must be declared <strong>before</strong> running the unit test process.</p>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
</div>
|
190
|
+
<!-- END CONTENT -->
|
191
|
+
|
192
|
+
|
193
|
+
<div id="footer">
|
194
|
+
<p>
|
195
|
+
Previous Topic: <a href="typography.html">Typography Class</a>
|
196
|
+
·
|
197
|
+
<a href="#top">Top of Page</a> ·
|
198
|
+
<a href="../index.html">User Guide Home</a> ·
|
199
|
+
Next Topic: <a href="uri.html">URI Class</a>
|
200
|
+
</p>
|
201
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
</body>
|
205
|
+
</html>
|