Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 18,587
» Latest member: GeorgeRenna
» Forum threads: 71,790
» Forum posts: 368,328

Full Statistics

Latest Threads
how to retrive data from ...
Forum: CodeIgniter 4 Support
5 minutes ago
» Replies: 1   » Views: 19
Transaction in controller...
Forum: CodeIgniter 4 Support
10 minutes ago
» Replies: 1   » Views: 11
Undefined index: expires_...
Forum: CodeIgniter 3.x
1 hour ago
» Replies: 0   » Views: 8
Calender in Codeigniter 4
Forum: CodeIgniter 4 Support
3 hours ago
» Replies: 4   » Views: 52
How to continue a Code Ig...
Forum: General Help
3 hours ago
» Replies: 1   » Views: 31
CSRF with fetch API
Forum: CodeIgniter 4 Support
8 hours ago
» Replies: 3   » Views: 117
Simple chat facility - if...
Forum: General Help
9 hours ago
» Replies: 16   » Views: 398
setTranslateURIDashes Not...
Forum: CodeIgniter 4 Support
Yesterday, 11:32 AM
» Replies: 0   » Views: 20
What is the better soluti...
Forum: CodeIgniter 4 Support
Yesterday, 10:21 AM
» Replies: 1   » Views: 110
How to create index using...
Forum: CodeIgniter 4 Support
Yesterday, 10:19 AM
» Replies: 1   » Views: 80

  Ckeditor and Ckfinder with file manager
Posted by: Rainwod - 07-06-2020, 09:31 PM - Forum: General Help - Replies (2)

hello to the whole community, I need help with the integration of ckfinder and CI 3.X, I have been shipwrecked on the internet between old posts and some more current ones even within the forums of this community and I still have not been able to find advice to make the ckfinder file manager, I have already managed to do the CRUD with the editor and I can even upload images and display them in the editor and in the controller view, but I can't get the filemanager to work, it always keeps loading and showing the message "please wait. "
In console it marks error 400. Someone has an idea
Thank you very much in advance Huh Confused Exclamation

  Outside the recent fun from our Terminator
Posted by: ducminh - 07-06-2020, 08:20 PM - Forum: Lounge - Replies (1)

Hello Smile
Outside the recent fun from our Terminator, I would like to ask what would be the fate CI 3.2 branch. Wouldn't it be better if some new features there to backported to CI 3.1? I think that nobody would be interested about CI 3 with a BC break.

Also, maybe for CI 3 minimal required version of PHP might be bumped up - 5.5 or 5.6. There is no point about maintainig compatibility-layer code and wasting time and strength for too old and insecure servers.

  Problem with cookie in CI4
Posted by: seunex - 07-06-2020, 01:11 PM - Forum: CodeIgniter 4 Support - Replies (3)

I still could not understand why i find it add to set cookie in codeigniter 4

PHP Code:
      $identifier = [
      'name' => 'identifier',
      'value' => $uid,
      'expire' => time()+ (10 365 24 60 60),
      'httpOnly' => true

    $token = [
    'name' => 'token',
    'value' => $rememberMeToken,
    'expire' => time()+ (10 365 24 60 60),
    'httpOnly' => true


Now i try get the cookie by use get_cookie('token') i always get nothing in return.

  Applying multiple filters on a single route definition
Posted by: korgoth - 07-06-2020, 01:05 PM - Forum: CodeIgniter 4 Support - No Replies

I have tried ti find a solution but failed so far - is it possible to apply multiple filters on a single route? 

I have tried the following with no luck

PHP Code:
$routes->get('/''Dashboard::index', ['filter' => 'auth|second_filter']);
$routes->get('/''Dashboard::index', ['filter' => ['auth''second_filter']]); 

It seems that the parameter only accepts strings and not arrays and having to define each set of possible filters as an alias is not very convenient

  emails with Debug View???
Posted by: Leo - 07-06-2020, 11:45 AM - Forum: CodeIgniter 4 Support - Replies (1)

Hi all.
So I'm trying to send an email, using sendmail. The email and subject get sent all right - but the body is like:
<!-- DEBUG-VIEW START 1 APPPATH/Config/../Views/emails/for_customer.php -->
<html lang="ru">
<div style="margin: 10px 0;padding: 0;background-color: #52a620">
    <h1 style="text-align: center;">
        <a style="text-decoration: none; color: #FFF; font-weight: lighter;"

and everything is just in text! No html, no styling and  <!-- DEBUG-VIEW START 1 APPPATH/Config/../Views/emails/for_customer.php --> in the beginning!
How to make it normal?

This is my controller:

PHP Code:
protected function sendNotice(array $details)
    $cms $this->cms();
    $this->data['order'] = (object)$details;
    $this->data['products'] = json_decode($details['details']);
    $this->data['time'] = get_russian_time(date('Y-m-d')) .' 'date('H:i');

    $emailBody view('emails/for_customer'$this->data);

    $email = \Config\Services::email();

    $email->setFrom('[email protected]'.$cms->site_name$cms->organization);
    $email->setSubject('Заказ '.$details['id'].', '.$cms->site_name);

Lightbulb Convert my sql query to codeigniter syntax
Posted by: andreaccident - 07-06-2020, 08:15 AM - Forum: General Help - Replies (4)

I have a query which is:

SELECT COALESCE(sum(`lead_att`.`cost`), 0) as sale
FROM `lead_att`
JOIN `leads` ON `lead_att`.`lead_id` = `leads`.`lead_id`
    `leads`.`test_mode` = FALSE
    AND `lead_att`.`status` NOT IN (8, 9)
    AND str_to_date(date_format(`lead_att`.`created_at`, '%Y-%m-%d %H:%i'), '%Y-%m-%d %H:%i') BETWEEN str_to_date(date_format(convert_tz( DATE_FORMAT(subdate(CURDATE(), 1), '%Y-%m-%dT04:00:00'), '+00:00', '-04:00'), '%Y-%m-%d %H:%i'), '%Y-%m-%d %H:%i') AND str_to_date(date_format(convert_tz( DATE_FORMAT(CURDATE(), '%Y-%m-%dT03:59:00'), '+00:00', '-04:00'), '%Y-%m-%d %H:%i'), '%Y-%m-%d %H:%i')
    AND `leads`.`source` = 4
LIMIT 2000

Where I need to translate to codeigniter format.

Also, if possible, I have to make the CURDATE() be a dynamic date variable which I include - meaning I could include any date range and it would change the query accordingly. Anyone have any ideas on how I can do this? Thanks

  JSON in-depth validation
Posted by: Nimnod - 07-06-2020, 07:51 AM - Forum: CodeIgniter 4 Support - Replies (1)


I am looking for an elegant way to validate some json-encoded values coming form a post. I consider valid_json helper function merely a first stage validation, to let me throw away syntactically incorrect input. What I would like to do is validate all the values in a resulting array after json_decode just as if they were posted without json. For this I am trying to implement a custom helper function to further validate the input, but i can't seem to pass an array as an argument to it.  The array would need to hold further validation rules concordant with CI4 validation rule syntax, dot matrix syntax included. Has anyone got an idea other than adding secondary validation in the relevent controller's method?

Secondly, even if I pass an json-encoded argument only to decode into an array, how do you request a validator run from inside of a helper function not having access to class pointer?

For now I managed to come up with this:

PHP Code:
public $rule = [
'values' => [
  'rules' => 'trim|required|valid_json|json_contain_fields[id,name,owner_id]'

json_contain_fields being my helper function. It is now limited only to checking if certain keys exist in the array after json_decode.

  A PHP Application Starter, Version 5, Based on CodeIgniter 4
Posted by: ivantcholakov - 07-06-2020, 12:11 AM - Forum: Addins - No Replies

Yet another application starter of mine.  Smile

Today I released its first alpha.0.


* CodeIgniter 4.0.3.
* Multiple applications support.
* Base URL autodetection, valid/accepted domain names might be set.
* Integrated (I mean it) renderers and parsers: Twig 3.x, Mustache, Handlebars, Markdown, Markdownify, Textile, Less, Scss, Autoprefixer, Cssmin, Jsmin, Jsonmin.
* Web-assets compiler/tasker.
* Fomantic-UI 2.8.6 CSS framework.

It is not ready for production purposes yet, and it will be not ready soon. Preview it just to satisfy your curiosity.

  Multi language web
Posted by: Ahmad Ali - 07-05-2020, 11:55 PM - Forum: Libraries & Helpers - Replies (1)

Hi, I'm using localization to make my website  Multi-language website so what I did is in the Language folder I added the following, en folder, and ar folder. So the structure is 

and in the routes.php I added the {locale} like below

PHP Code:

// Post routes

$routes->group('post' , function($routes){

// User
$routes->group('user' , function($routes){
$routes->get('login' 'User\Users::login');
$routes->add('{locale}/logout' 'User\Users::logout');
// Admin
$routes->group('admin' ,['filter' => 'AdminFliter'], function($routes){
$routes->add('{locale}/dashboard' 'User\Admin::dashboard');
$routes->get('{locale}/profile' 'User\Admin::profile');
$routes->add('{locale}/edit_profile' 'User\Admin::edit_profile');
$routes->add('{locale}/posts' 'User\Admin::posts');
$routes->add('{locale}/addPost' 'User\Admin::addPost');
$routes->add('{locale}/post_delete/(:any)' 'User\Admin::post_delete/$1');
it is working only with the home page which is the route and the others it gives me
404 - File Not Found

Controller or its method is not found: {0}::{1}

so what I am missing?

Question Toolbar and performence information
Posted by: Michal_PB1 - 07-05-2020, 12:11 PM - Forum: CodeIgniter 4 Support - Replies (1)


Maybe someone knows if there is a way to more accurately check the performance of individual elements/methods? As you can see in the photo below 'Controller' takes about 3.5s, but without more information, it is difficult to check which function is so slow.

[Image: attachment.php?aid=1815]

Attached Files Thumbnail(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.