GithubHelp home page GithubHelp logo

ivantcholakov / starter-public-edition-4 Goto Github PK

View Code? Open in Web Editor NEW
163.0 26.0 91.0 113.06 MB

A PHP application starter, based on CodeIgniter 3

License: MIT License

PHP 29.79% HTML 3.40% CSS 5.28% JavaScript 48.61% TypeScript 0.01% Hack 0.01% Twig 4.94% Handlebars 0.02% Less 7.94% SCSS 0.01% Makefile 0.01% Mustache 0.01%
codeigniter php

starter-public-edition-4's Introduction

A PHP Application Starter, Version 4, Based on CodeIgniter

Project Repository

https://github.com/ivantcholakov/starter-public-edition-4

Note

This version supports multiple applications.

PHP

If you are a beginner with little or no PHP experience, you might need to read a training tutorial like this one:

PHP Tutorial for Beginners: Learn in 7 Days, https://www.guru99.com/php-tutorials.html

CodeIgniter 3 Documentation

https://www.codeigniter.com/userguide3/

Requirements

PHP 8.0.2 or higher, Apache 2.4 (mod_rewrite should be enabled). For database support seek information within CodeIgniter 3 documentation.

For UTF-8 encoded sites it is highly recommendable the following PHP extensions to be installed:

  • mbstring;
  • iconv;
  • pcre compiled with UTF-8 support (the "u" modifier should work).

Installation

Download source and place it on your web-server within its document root or within a sub-folder. Make the folder platform/writable to be writable. It is to contain CodeIgniter's cache, logs and other things that you might add. Open the site with a browser on an address like this: http://localhost/starter-public-edition-4/public/

On your web-server you may move one level up the content of the folder public, so the segment public from the address to disappear. Also you can move the folder platform to a folder outside the document root of the web server for increased security. After such a rearrangement open the file config.php (public/config.php before rearrangement), find the setting $PLATFORMPATH and change this path accordingly. The file public/config.php contains also the ENVIRONMENT setting that can be switched among development, testing, and production mode. By default ENVIRONMENT is set to 'production'.

The following directories (the locations are the original) must have writable access:

platform/upload/
platform/writable/
public/cache/
public/editor/
public/upload/

Have a look at the files .htaccess and robots.txt and adjust them for your site. Within the directory platform/applications you will by default two applications - "front" and "admin". Have a look at their configuration files. Also, the common PHP configuration files you may find at platform/common/config/ folder.

The platform auto-detects its base URL address nevertheless its public part is on the document root of the web-server or not. However, on production installation, site should be accessed only through trusted host/server/domain names, see platform/common/config/config.php , the configuration settings $config['restrictAccessToTrustedHostsOnly'] and $config['trustedHosts'] for more information.

Installation on a developer's machine

In addition to the section above, it is desirable on a developer's machine additional components to be installed globally, they are mostly to support compilation of web resources (for example: less -> css, ts -> js). The system accesses them using PHP command-shell functions.

When installing the additional components globally, the command-line console would require administrative privileges.

node -v
npm -v
  • (Optional, Linux, Ubuntu) Install the interactive node.js updater:
sudo npm install -g n
  • Later you can use the following commands for updates:

Updating Node.js:

sudo n lts

Updating npm:

sudo npm i -g npm

Updating all the globally installed packages:

sudo npm update -g

Another way for global updating is using the interactive utility npm-check. Installing:

sudo npm -g i npm-check

And then using it:

sudo npm-check -u -g
sudo npm install less -g

Then the following command should work:

lessc -v
sudo npm -g install postcss-cli

And this command should work:

postcss -v
sudo npm -g install autoprefixer
sudo npm -g install cssnano
  • Install TypeScript compiler (if it is needed):
sudo npm -g install typescript-compiler

This command should work:

tsc -v

On compilation of huge web-resources Node.js might exaust its memory, in such case try (the value may vary):

export NODE_OPTIONS=--max-old-space-size=8192

Coding Rules

For originally written code a tab is turned into four spaces. This is the only strict rule. Standard PSR rules are welcome, but it is desirable code not to be 'compressed' vertically, use more meaningful empty lines that would make code more readable and comfortable.

Additional Features

    modules/demo/controllers/page/Page.php     -> address: site_url/demo/page/[index/method]
    modules/demo/controllers/page/Other.php    -> address: site_url/demo/page/other/[index/method]

Deeper directory nesting as in CI 3 has not been implemented for now.

Instead of:

// Filename: Welcome.php
class Welcome extends Base_Controller {
    // ...
}

you can write:

// Filename: Welcome_controller.php
class Welcome_controller extends Base_Controller {
    // ...
}

Thus the class name Welcome is available to be used as a model name instead of those ugly names Welcome_model, Welcome_m, etc. The technique of this hack is available, but it is not mandatory.

How to use this feature:

Enable the configuration option 'parse_i18n':

$config['parse_i18n'] = TRUE;

Then in your views you can use the following syntax:

<i18n>translate_this</i18n>

or with parameters

<i18n replacement="John,McClane">dear</i18n>

where $lang['dear'] = 'Dear Mr. %s %s,';

Here is a way how to translate title, alt, placeholder and value attributes:

<img src="..." i18n:title="click_me" />

or with parameters

<img src="..." i18n:title="dear|John,McClane" />

You can override the global setting 'parse_i18n' within the controller by inserting the line:

$this->parse_i18n = TRUE; // or FALSE

Parsing of <i18n> tags is done on the final output buffer only when the MIME-type is 'text/html'.

Note: Enabling globally the i18n parser maybe is not the best idea. If you use HMVC, maybe it would be better i18n-parsing to be done selectively for particular html-fragments. See below on how to use the Parser class for this purpose.

Instead of:

$this->load->library('parser');

write the following:

$this->load->parser();

Quick tests:

// The default parser.
$this->load->parser();
echo $this->parser->parse_string('Hello, {name}!', array('name' => 'John'), TRUE);

There are some other parser-drivers implemented. Examples:

// Mustache parser.
$this->load->parser('mustache');
echo $this->mustache->parse_string('Hello, {{name}}!', array('name' => 'John'), TRUE);
// Parsing a Mustache type of view.
$email_content = $this->mustache->parse('email.mustache', array('name' => 'John'), TRUE);
echo $email_content;
// Textile parser
$this->load->parser('textile');
echo $this->textile->parse_string('h1. Hello!', NULL, TRUE);
echo $this->textile->parse('hello.textile', NULL, TRUE);
// Markdown parser
$this->load->parser('markdown');
echo $this->markdown->parse_string('# Hello!', NULL, TRUE);
echo $this->markdown->parse('hello.markdown', NULL, TRUE);
// Markdownify parser
$this->load->parser('markdownify');
echo $this->markdownify->parse_string('<h1>Hello!</h1>', NULL, TRUE);
echo $this->markdownify->parse('hello.html', NULL, TRUE);
// LESS parser
$this->load->parser('less');
echo $this->less->parse_string('@color: #4D926F; #header { color: @color; } h2 { color: @color; }', NULL, TRUE);
echo $this->less->parse(DEFAULTFCPATH.'assets/less/lib/bootstrap-3/bootstrap.less', NULL, TRUE);

Within the folder platform/common/libraries/Parser/drivers/ you may see all the additional parser drivers implemented. Also within the folder platform/common/config/ you may find the corresponding configuration files for the drivers, name by convention parser_driver_name.php. Better don't tweak the default configuration options, you may alter them directly on parser call where it is needed.

The simple CodeIgniter's parser driver-name is 'parser', you may use it according to CodeIgniter's manual.

Enanced syntax for using parsers (which I prefer)

Using the generic parser class directly, with specifying the desired driver:

$this->load->parser();

// The fourth parameter means Mustache parser that is loaded automatically.
echo $this->parser->parse_string($mustache_template, $data, true, 'mustache');

// The fourth parameter means Markdown and auto_link parsers parser to be applied in a chain.
echo $this->parser->parse_string($content, null, true, array('markdown', 'auto_link'));

// The same chaining example, this time a configuration option of the second parser has been altered.
echo $this->parser->parse_string($content, null, true, array('markdown', 'auto_link' => array('attributes' => 'target="_blank" rel="noopener"')));

Using parsers indirectly on rendering views:

// You don't need to load explicitly the parser library here.

// The fourth parameter means that i18n parser is to be applied.
// This is a way to handle internationalization on views selectively.
$this->load->view('main_menu_widget', $data, false, 'i18n');

Using a parser indirectly with Phil Sturgeon's Template library:

// You don't need to load explicitly the parser library here.

$this->template
    ->set(compact('success', 'messages', 'subject', 'body'))
    ->enable_parser_body('i18n')  // Not elegant enough, sorry.
    ->build('email_test');

Gulp/Webpack and etc. package managers from the Javascript world might be annoying burden for a PHP-developer. In order to make this matter easier, a web-asset compilator has been implemented, it uses internally the corresponding parsers. First, the compiler's tasks must be specified by names, see the configuration file platform/common/config/assets_compile.php.

Have a look at platform/common/config/assets_compile.php file. It contains a list of files (sources, destinations) to be used for LESS to CSS compilation. You may edit this list according to your needs. Before compilation, make sure that destination files (if exist) are writable and their containing folders are writable too. A simple example:

    ...
    [
        'name' => 'my_task',
        'type' => 'less',
        'source' => DEFAULTFCPATH.'themes/front_default/src/my.less',
        'destination' => DEFAULTFCPATH.'themes/front_default/src/my.min.css',
        'less' => [],
        'autoprefixer' => ['browsers' => ['> 1%', 'last 2 versions', 'Firefox ESR', 'Safari >= 7', 'iOS >= 7', 'ie >= 10', 'Edge >= 12', 'Android >= 4']],
        'cssmin' => [],
    ],
    ...

As you can see, there are source and destinations files, and a chain of parsers with their specific options. The type of the task here is the name of the first parser to be applied. Practically, more complex tasks might be needed when CSS and Javascripts are merged into a single result file. For this purpose there are two special task-types: 'merge_css' and 'merge_js', see an example:

    [
        'name' => 'front_default_css',
        'type' => 'merge_css',
        'destination' => DEFAULTFCPATH.'themes/front_default/css/front.min.css',
        'sources' => [
            [
                'source' => DEFAULTFCPATH.'themes/front_default/src/front.less',
                'type' => 'less',
                'less' => [],
                'autoprefixer' => ['browsers' => ['> 1%', 'last 2 versions', 'Firefox ESR', 'Safari >= 7', 'iOS >= 7', 'ie >= 10', 'Edge >= 12', 'Android >= 4']],
                'cssmin' => [],
            ],
            [
                'source' => DEFAULTFCPATH.'assets/scss/lib/sweetalert/sweetalert.scss',
                'type' => 'scss',
                'autoprefixer' => ['browsers' => ['> 1%', 'last 2 versions', 'Firefox ESR', 'Safari >= 7', 'iOS >= 7', 'ie >= 10', 'Edge >= 12', 'Android >= 4']],
                'cssmin' => [],
            ],
        ],
        'before' => '_prepare_semantic_source',
        'after' => [
            '_create_sha384',
            '_create_sha384_base64',
        ],
    ],

Within the example 'before' and 'after' elements are callbacks that do additional user-defined actions before and after the correspinding task is executed.

There is a defined special task-type 'copy' that allows merging already minified CSS or JavaScript without any processing.

Compilation is to be done from command-line. Open a terminal at the folder platform/public/ and write the following command:

php cli.php assets compile

Or, you may choose which tasks to execute by pointing at their names:

php cli.php assets compile task_name_1 task_name_2 task_name_3 ...

The Playground

It is hard everything about this platform to be documented in a formal way. This is why a special site section "The Playground" has been created, aimed at demonstration of platform's features/concepts. You may look at the examples and review their code.

A contact form has been created that with minimal adaptation you may use directly in your projects.

If you have no previous experience with CodeIgniter, get familiar with its User Guide first: https://www.codeigniter.com/user_guide/

Installed Composer Packages (Not a Full List)

Package Description Usage
codeigniter/framework CodeIgniter 3 Everywhere
ivantcholakov/codeigniter-phpmailer The wrapper library for PHPMailer. Sending emails
fg/multiplayer Builds customizable video embed codes from any URL Multiplayer library
scssphp/scssphp A compiler for SCSS written in PHP Parser 'scss' driver
guzzlehttp/guzzle A HTTP client library Playground, REST service test
whichbrowser/parser Useragent sniffing library for PHP Which_browser library
erusev/parsedown Parser for Markdown Parser 'markdown' driver
erusev/parsedown-extra An extension of Parsedown that adds support for Markdown Extra Parser 'markdown' driver
pixel418/markdownify A HTML to Markdown converter Parser 'markdownify' driver
mustache/mustache A Mustache template engine implementation in PHP Parser 'mustache' driver
netcarver/textile Textile markup language parser Parser 'textile' driver
twig/twig Twig template language for PHP Parser 'twig' driver
ezyang/htmlpurifier Standards compliant HTML filter written in PHP admin and user HTML filters for the online editor
t1st3/php-json-minify A JSON minifier Parser 'jsonmin' driver
matthiasmullie/minify CSS & JS minifier Parser 'cssmin' and 'jsmin' drivers
phpmailer/phpmailer An email creation and transfer component for PHP The custom Email library
yohang88/letter-avatar Generates user avatars based on name initials userphotos application
intervention/image Image handling and manipulation library yohang88/letter-avatar
athlon1600/php-proxy A web proxy script written in PHP. Demo feature for previewing the error logs

Real Life Usage

Reported by Zashev Design - Web Design Studio

Reported by Krishna Guragai, @krishnaguragain

Credits

License Information

For original code in this project:
Copyright (c) 2012 - 2022:
Ivan Tcholakov (the initial author) [email protected],
Gwenaël Gallon.
License: The MIT License (MIT), http://opensource.org/licenses/MIT

CodeIgniter:
Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
Copyright (c) 2014 - 2019, British Columbia Institute of Technology (http://bcit.ca/)
Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
License: The MIT License (MIT), http://opensource.org/licenses/MIT

Third parties:
License information is to be found directly within code and/or within additional files at corresponding folders.

Donations

Ivan Tcholakov, November 11-th, 2015: No donations are accepted here. If you wish to help, you need the time and the skills of being a direct contributor, by providing code/documentation and reporting issues. Period.

starter-public-edition-4's People

Contributors

dependabot[bot] avatar exelord avatar ggallon avatar ivantcholakov avatar maqnouch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starter-public-edition-4's Issues

Got a new Error

I got this error after the footer in latest release.
(below: - I have use database for session.)
error1

code question

in Registry class the function has

public function has($key)
  {
    $key = (string)$key;

    if ($key != '' && array_key_exists($key, self::$data))
    {
      return TRUE;
    }

    return FALSE;
  }

could be rewritten as

  public function has($key)
  {
    $key = (string)$key;

    return $key !== '' && array_key_exists($key, self::$data);
  }

?

db question

hi

i need to save some config options to the database (with caching)
what is the earliest place (file position etc) i could use the database to load those options (in case the cache file doesn't exist)

thanks in advance for your help

unrelated (Plans for 4.1)
any chance to import some nice things from sprintphp ( https://github.com/ci-bonfire/Sprint )
in the order of importance (for me)
Email Queue system allows for very flexible email generations and sending.
Simple, GUI-less cron controller that can be used through standard crontab or scheduled tasks.
Database Seeding with CLI tool
The Forge - a code builder with simple generators in place, but fully customizable and easy to add your own.

Cannot access protected property...

Message: Cannot access protected property CI_Loader::$_ci_cached_vars

Filename: libraries/Template.php

Line Number: 981

I'm using CI3 and just the template library, I copied it into CI's normal library application/library directory and the template_helper into the application/helper directory and autoload both the library and the helper - (created and autoload a helper for the ci() alias to get around that). I already have an existing project that's using Foundation instead of Bootstrap, I'd like to simply add the template library to it if at all possible.

Modules and rURI

I think that this function:

$this->uri->ruri_string()

should return something like:

/modules/controller/function

but it return only:

/controllers/function

This is intended effect or just a bug? In my opinion ruri should return all path without any routing, so here is something wrong.

If I am wrong please explain me.

environment and errors reporting

Hi,
Where can I find file like a in original CI index.php? There were settings which were able to set environment. Is that option still exist?

"Assets directory is not writeable"

Hi,
I have a problem with non-mvc page. When I got to /www/non-mvc/demo.php/ Ive got an error: Assets directory is not writeable. I checked permissions and I even set it to 777. Also I tested it on 2 different servers.

Sub-dropdown

The sub drop-down menu appears like this. Do you know how to fix this.
menu_issue

bug in fix_unchecked ?

hi

i think i found a bug in fix_unchecked

create a form with 2 checkboxes and nothing else

post the form nothing is posted
it should post value 0 if nothing is checked or i'm wrong ?

the problem is on if (empty($_POST) || !is_array($_POST))
because nothing is checked post is empty

Template

Can We have Different Template in Different Module. If So, How can we do it ??

PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/msql.so

Running Apache 2, php 5.5.9 on Linux Mint 17

I get the following error on the home page (http://localhost/ci_test/www/)

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/msql.so' - /usr/lib/php5/20121212/msql.so: cannot open shared object file: No such file or directory

Filename: Unknown

Line Number: 0

Backtrace:

File: /var/www/html/ci_test/platform/common/core/Core_Exceptions.php
Line: 164
Function: include

File: /var/www/html/ci_test/platform/common/core/Common.php
Line: 263
Function: show_php_error

Mysql does work OK with other frameworks I have installed on this box (Nette and Composer)

segment_2 results in white page

I am trying to create an app and it seems that non existing module methods result in a white page.

e.g.
/www/playground/ gives module playground, playground_controller
/www/playground/foobar gives white page (not 404)

common hooks ?

is possible to have common hooks ?

like define in applications\site\config\hooks.php
and place the hook file in core\common\hooks

i tried and no luck

site url from admin

hi

i'm sure i'm missing obvious but i'm so tiered

how can i build a url to the public site from the admin

something like site_url('my/path') i tried http_build_url(BASE_URL, '../api/get_shared_images') without any luck

sorry for disturbing you

routes per module ?

hi

how would you go for adding routes / module ?

in my situation every module can have multiple controllers and not always the controller name can be the route

thanks in advance for your response

question about modules

hi

is there a way to get all available modules or i have to parse the directory structure
i ask because i don't want to redo a parsing if the framework is already doing that

any if you are kind enough to offer a suggestion how would you implement a acl for a unknown number of modules

load model from module

hi

i have upgraded to the latest version and now i get a fatal error 'there is no such property'
when i load a model from inside a module
if i place the same model inside the module folder of the application it works
any idea what i done wrong ?

different language for applications

hi

how would you go enabling 2 languages for site and only one language (is one of the 2 from site) for admin ?

example : site in english and italian and admin only english

route question

if you create a 'test' module with a 'test' controller with no index and no route you get a blank page instead of a 404

is this a bug or... ?

[Enhancement] Extending DB Drivers

Liking your extended CI... pretty much everything we use in CI is there and mainly because of multisite support.

I'm looking for option to extend db drivers, which is even missing in main CI framework. So we structure it in same way as in system folder to extend in APP folder.

application/site/database/drivers/{driver_name}/

There are few functionality i want to add to my mysql driver, among them insert_duplicate_update() is one of them. And there is also this count_totals_from_last_query() + some more.

See if it can be done.

multiple applications

Hello Ivan, congrat your great work! It helps me a lot to learn CI3...

Untill I can find my own answers, would you tell me how multiple applications can be used?
What I mean: are they totally separated, or for instance: if I have one login module in one of the apps and someone is logged in using that module, is it possible for the other app to check the logged in state or I need another login module for the second app, so the two login mechanism is totally different from eachother?
Thank you for your answer and for your brilliant work!
Joey (codexmonk)

Email templates and global XSS filtering

@uxchandra

"Hi,
I am trying to store email templates in database.
I have enabled global Xss filtering : $config['global_xss_filtering'] = TRUE;

Now the problem is while saving the form data , inline style sheets are being removed

is being converted to

Is there any work around keeping the global xss filter enabled can I store the same data. I am encoding the total template html data before storing (to ensure security).

Thanks."


  • Global XSS filtering is a mistake that is acknowledged by CodeIgniter creators. There are also articles in the Internet that don't recommend enabling this option. Disable it and apply XSS filtering where you think it should be applied place by place.
  • CodeIgniter creators now recommend XSS not to be applied on data input, but on data is output.
  • For your specific case (template), since CodeIgniter's filtering removes useful pieces of data, you can try to use HTMLPurifier with precise settings which tags and HTML attributes are to be allowed in your email templates.

common and per app events

hi

i want to define some common events and per appname events without creating a module for this
so i was thinking on creating a class in platform\common\libraries,platform\applications\appname\libraries

how would you do it ?

Cache Issue

Hello @ivantcholakov ,
Currently i am doing one project on it. When I have added data from back-end(administrative) panel , data is successfully submitted to database but mean while reading from the database due to cache in platform/writable (WRITABLEPATH) it is not showing over browser, Please help me here how to turn off all those cache.
CI_VERSION = 3.0.6
PLATFORM_VERSION = 4.0.128

Database Session

Hi,
I noticed that Databese Session driver isn't working correctly. When its enabled, every time when i refresh a main page I've got an error something like "Repeated ID blah blah blah". So looked to the code and i think there is a problem with validation varible _row_exists. Could you look at this? I really need help with database session.

Btw.
I love your project :) every time when I build some app i use your masterpiece. Thank you and keep going.

routing help

hi

sorry to bother you i have a question

in what file/function are you comparing the uri to the routes from the routes.php

because i tried to follow the code and i can't find that portion

thanks in advance

Form_validation - is_unique[]

Hi,
I noticed a problem with form_validation helper. When I set rule is_unique[users.email] I always get back FALSE as respond. Whatever I will type there always is FALSE. In config folder there also missing form_validation.php for settings some default options. Its not so much important but it can do nicely work :)

Install using composer

Hello mr @ivantcholakov , i think this is best codeigniter's customs so far. And i plan to use this for my next projects. This projects is updated frequently, so i think this project (starter public edition 4) is good if we can install from composer, so if there are an update, we just use composer update. So, can i ask you to make it available on composer?

Regards

NB : sorry for my bad english

$this->uri->segments() should not return the language segment.

This is a change that I am going to implement for releases 3.0.112 and 4.0.112.

The language segment should not be returned by:

$this->uri->segment()
$this->uri->segment_array()
$this->uri->total_segments()

Rationale:

There is an option about hiding the URI-segment of the default language. But when this option is changed in an already built system, the indexes of the targeted other segments will change, and code will not work correctly.

Till this moment I avoided this problem by using $this->uri->rsegment(), but this was not the conceptual solution.

The URI language segment is needed only for language detection, for other aspects it should be "invisible".

Modules Helper problem

Hi Ivan,
I found a problem with helpers in module folder.

I create structure like that:
-mymodule
--controllers
--helpers
---MY_new_helper.php

and when i try to load Ive got:
$this->load->helper('my_new_helper');

Unable to load the requested file: helpers/my_new_helper.php

I tested it with many combination of name of the helper and adding module name to the name like:
$this->load->helper('mymodule/my_new_helper');

when I load helper in module from APP folder everything works OK
-appfolder
--helpers
---MY_new_helper.php

$this->load->helper('new_helper');

Could you look at this?

advanced examples suggestion

hi

first thanks for mentioning me in credits but that was not necessary

second can you please add some example on how to use third party libs

i tried to use https://github.com/thephpleague/omnipay
i installed via composer, modified composer_autoload to true and i tried to use the code sample from the git page and got a Fatal error: Class 'Omnipay' not found
am i missing something ?

another package i tried to use is https://code.google.com/p/php5-image/
this one without composer
i copied the content of the src folder from the download archive to common\third_party
so i have common\third_party\Image\Image.php
i tried to add the lib to autoload_classes config and just lost myself trying to fix require_once includes

if you have the time and patience i think a demo/tutorial would be appreciated by many people

thanks again for your work and close this request if it has no value

CSRF problem

Hi,
I noticed problem with CSRF protection. I set all settings correctly. I even use form_open() for adding CSRF hidden element. And... Key is added to the element, CSRF is writing to cookie but what is weird .. I can still refresh a sent form. I tested it also in your clean project and i noticed the same problem.

hmm... Could you look at this?

keep multilanguage but disable language segement in uri or method for translated uri's

hi

is there a way to keep multilanguage but disable language segement in uri ?
or any suggestions on how to implement translated uri's

so would be possible to implement a config option to activate deactivate the automatic insertion of the language segment ?

i need to create something like this
site.com/en|es|it etc for any other language but default

the rest of urls i need to translate

site.com/contact (en)
site.com/contatto (it)
site.com/contacto (es)

this is for a cms

impact of core_model on loading time

hi

i load 3 models (that extend core_model) on base_controller in admin and every one of those models add 1s on loading time

is something wrong on my end or that's the impact of core model ?

email config

hi

can you please add support for

$mail->SMTPOptions = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
    )
);

PHP 5.6 certificate verification failure

In a change from earlier versions, PHP 5.6 verifies certificates on SSL connections. If the SSL config of the server you are connecting to is not correct, you will get an error like this:

Warning: stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

The correct fix for this is to replace the invalid, misconfigured or self-signed certificate with a good one. Failing that, you can allow insecure connections via the SMTPOptions property introduced in PHPMailer 5.2.10 (it's possible to do this by subclassing the SMTP class in earlier versions), though this is not recommended:

Plans for 4.4

2015-11-13

  • Preparation, 4.2.x: Introduce in this project CHANGELOG.md file.
  • Preparation, 4.2.x: Check against PHP7 (final) compatibility.
  • [x ] The minimal required PHP version for the next major release would be 5.4 5.5.0.
  • The next major release 4.4 will be based on CodeIgniter 3.2. Deprecated code/features in CodeIgniter 3.2 are to be preserved here as much as it is possible.
  • The transitional code that supports the old CI2 class/file naming convention is to be removed. 4.4 will support CI3 "ucfirst" class/file convention only.
  • Upgrade HMVC (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc) to version 5.5.
  • When it is applicable, the previously manually installed third party PHP components should be installed via Composer.
  • #31
  • #56
  • The directories www will be renamed into public_html public.
  • Bring automation in this project, adopt RoboTask PHP task runner, https://github.com/Codegyre/Robo See this article: http://www.sitepoint.com/look-ma-no-nodejs-a-php-front-end-workflow-without-node/
  • The helper functions for web assets are to be reworked slightly for supporting automatically installed web assets.
  • Purge all Bootstrap 3 oriented web assets. Purge all web assets and PHP code oriented on support of old browsers.
  • Adopt Bootstrap 4 (https://github.com/twbs/bootstrap) stable release. Update or rework third-party web assets so they could be compatible with Bootstrap 4.
  • Adopt AdminLTE 3, https://github.com/almasaeed2010/AdminLTE
  • Make a MySQL database for this project. Whether it would be a direct MySQL dump or a CodeIgniter's migration is a subject of a later decision.
  • Develop a simple administration panel that supports user management.
  • Develop a Semantic UI based simple front-end.

2015-11-14

  • Satelite projects (codeigniter-phpmailer, MY_Model): Drop support for CodeIgniter 2.
  • CodeIgniter, the system files: Move the customizations within outside, separate files.
  • CodeIgniter: Consider automatic upgrades via Composer (done).
  • Proposed by @buoncri: Integrate Grocery CRUD (https://github.com/scoumbourdis/grocery-crud). Ivan: Throw away the current old-looking visual theme, develop A Bootstrap 4 based and MIT-licensed visual theme for Grocery CRUD.

2015-11-18

  • Replace or convert all the styling sources from less to scss.

2015-12-03

2016-01-05

Implement more complex parsers / template engines:

  • Lex (that is used by PyroCMS, but implementation would not be the same, compatibility would be partial);
  • Twig;
  • Blade, if it is possible.

2016-02-08

2016-02-10

2016-02-26

2016-06-08

  • Cron Task Scheduler

The list is not final, it could be extended or changed over the time. There is no a deadline for all these goodies. Suggestions and objections about this plan are welcome.

Template, default layout no found

Hello, if I do not set the template "layout" in my controller: $this-> template-> set_layout ('layout_name'). I have an error message "Unable to load The requested file: default.php". The Template library does not check the folder "core/common/view" ? Do you have any idea? thank

route question

hi

i have a route declared like this
$route['a/(.+?)'] = 'b/$1'; won't work

if i declare it like this
$route['a'] = 'b'; it works

am i missing something ?

another thing i see in your htaccess you offer two options
1 remove www
2 force www

if i chose option 2 and use site_url('controller/method')
the url generated is without www

Read the language settings from the database

Currently the language settings (the leading language and the supported languages) are set through configuration files only. The purpose of this task is adding a database structure, and model for these settings, so they can be controlled within your administration panel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.