Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Controller ajax request
Post: RE: Controller ajax request

There is bugs in your JavaScript. code. You send tokenName and tokenVal but the variables doesn't exists. They are in comments. Look in the browser console, you will have an error message.
148 Views
1 Replies
07-26-2022, 06:24 AM
includebeer
    Thread: how to reset/clear form fields after Modal closed
Post: RE: how to reset/clear form fields after Modal clo...

This has nothing to do with CodeIgniter. It's a jQuery / javascript question.
320 Views
3 Replies
07-15-2022, 06:57 AM
includebeer
    Thread: Quick question about regex_match
Post: RE: Quick question about regex_match

Escape the - character with a backslash:   PHP Code: -- $rules = [     'date' => 'required|min_length[2]|max_length[50]|regex_match[/^+[a-zA-Z0-9.\- ]+$/]', ]; --
273 Views
3 Replies
07-15-2022, 06:47 AM
includebeer
    Thread: upgrade codeigniter version
Post: RE: upgrade codeigniter version

ClaudeSjDevinHenry Wrote: (07-11-2022, 09:51 PM) -- My current project has version 1.6.3 of codeigniter framework. Now there is new release of 2.1.0 version of codeigniter. There are many new librari...
1,695 Views
5 Replies
07-13-2022, 03:23 PM
includebeer
    Thread: array $ _POST always empty
Post: RE: array $ _POST always empty

enrico.carli Wrote: (07-11-2022, 12:33 PM) -- i think there is an htaccess rule that adds a trailing slash, -- There's no such rule in the .htaccess provided with the framework. Did you add rules t...
240 Views
3 Replies
07-13-2022, 02:43 PM
includebeer
    Thread: Why do you use CI? What is your job?
Post: RE: Why do you use CI? What is your job?

demyr Wrote: (07-06-2022, 08:10 AM) -- Even though I have my own CMS made with CI I regret having built it with a framework. Because they are updated often and your system falls behind. If you want t...
807 Views
12 Replies
07-13-2022, 02:05 PM
includebeer
    Thread: Using AJAX on a file
Post: RE: Using AJAX on a file

You can't access a file from the Libraries directory like that. Every requests needs to go through a controller. If you're not familiar with CI, take a look at the tutorial in the user guide (https://...
218 Views
1 Replies
07-12-2022, 01:52 PM
includebeer
    Thread: Model for a multilingual site
Post: RE: Model for a multilingual site

I developed a simple multilingual blog with CI4. The way I got around the "translation problem" is that every article is really a stand alone article in english or in french. They're not a translation...
262 Views
2 Replies
07-12-2022, 01:46 PM
includebeer
    Thread: Add a new function to add to request methods (POST, GET etc)
Post: RE: Add a new function to add to request methods (...

It's not super clear in the doc, but what you're looking for is setGlobal (https://codeigniter.com/user_guide/incoming/request.html#setGlobal): PHP Code: -- $this->request->setGlobal('post', [   ...
302 Views
3 Replies
07-06-2022, 01:40 PM
includebeer
    Thread: Creation of a multi-language blog [SOLVED]
Post: RE: Creation of a multi-language blog

There's already example available of super simple blog, but what you describe is developing a complete CMS with an admin area, templates, etc. This requires a lot of work. The dev team is already unde...
2,365 Views
4 Replies
07-06-2022, 01:24 PM
includebeer
    Thread: Cache : Best Pratice
Post: RE: Cache : Best Pratice

How can you say the Goole bot is slower? I don't see how it would be any different for a bot vs a human visitor. The cache-control header affect only the browser. Not the rendering speed. It just ...
231 Views
1 Replies
07-06-2022, 01:13 PM
includebeer
    Thread: CSRF Protection with multiple js scripts
Post: RE: CSRF Protection with multiple js scripts

I think the problem is each script has it's own local variables csrfName and csrfHash. When you update the variables after the ajax request has returned, you only update the local variables. It doesn'...
227 Views
1 Replies
07-06-2022, 01:08 PM
includebeer
    Thread: Filter Cors now working
Post: RE: Filter Cors now working

You just defined an alias, you're not calling you filter anywhere. That's why it's not working. You need to add the filter to the 'before' or 'after' array of the $globals property. See https://codeig...
270 Views
2 Replies
07-02-2022, 03:37 PM
includebeer
    Thread: How To Optimise Controller Execution Time
Post: RE: How To Optimise Controller Execution Time

Don't waste time on micro optimization. Find where the most time is spent and improve this part. Most of the time, the bottleneck will be the database queries.  After you have optimized your databa...
474 Views
3 Replies
06-23-2022, 11:23 AM
includebeer
    Thread: problem with custom controller constructor
Post: RE: problem with custom controller constructor

groovebird Wrote: (06-22-2022, 12:54 PM) -- includebeer Wrote: (05-29-2021, 12:25 PM) -- Don't use a constructor. Override initController(), don't forget to call parent::initController(), and then d...
2,358 Views
12 Replies
06-22-2022, 02:12 PM
includebeer
    Thread: Can't write a log message.
Post: RE: Can't write a log message.

Make sure the writable folder is really writable and your log threshold is set to 4 or higher. See https://codeigniter.com/user_guide/general/logging.html and https://github.com/codeigniter4/CodeIgn...
390 Views
4 Replies
06-18-2022, 06:51 AM
includebeer
    Thread: {locale} placeholder in routes
Post: RE: {locale} placeholder in routes

kenjis Wrote: (06-10-2022, 06:05 PM) -- See this PR: https://github.com/codeigniter4/CodeIgniter4/pull/6073 -- I like the idea of a $useSupportedLocalesOnly option. No need to hack the default beha...
815 Views
8 Replies
06-10-2022, 06:34 PM
includebeer
    Thread: {locale} placeholder in routes
Post: RE: {locale} placeholder in routes

InsiteFX Wrote: (06-09-2022, 11:57 PM) -- It's probaliy best to use the language+region code for translations en-US etc. -- I guess it depends on the use case. For me it was the easiest way to redi...
815 Views
8 Replies
06-10-2022, 12:36 PM
includebeer
    Thread: Finally - a new Twitter account!
Post: RE: Finally - a new Twitter account!

demyr Wrote: (06-10-2022, 12:53 AM) -- By the way, I believe we should all post something on Twitter in our local language (if not, then of course in English) to promote our Twitter account. What do ...
1,568 Views
14 Replies
06-10-2022, 12:12 PM
includebeer
    Thread: {locale} placeholder in routes
Post: RE: {locale} placeholder in routes

webdeveloper Wrote: (06-09-2022, 01:56 AM) -- One important difference is that your locale have to be placed always on the first place of URL.  This wont work for you: PHP Code: -- $routes->gr...
815 Views
8 Replies
06-09-2022, 02:44 PM
includebeer

Theme © iAndrew 2016 - Forum software by © MyBB