Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to call function from custom helper ?
Post: RE: How to call function from custom helper ?

Hi Just remove namespace from helper - //namespace App\Helpers; And best practice use function wrapper in helpers files Code: -- if(!function_exists('formatDateTime')) {   function formatDate...
2,329 Views
6 Replies
12-04-2023, 06:29 PM
vitnibel
    Thread: Unable to access variable
Post: RE: Unable to access variable

everything is easier. you just need to place the initialization code of the UserPublic_Controller class in the initController function and call the base class function of the same name in the first l...
3,082 Views
7 Replies
03-27-2022, 03:01 AM
vitnibel
    Thread: Unable to access variable
Post: RE: Unable to access variable

Hi it happens because constructor of UserPublic_Controller class called before initController of BaseController executed. or in other words first the constructor is called and then the function in...
3,082 Views
7 Replies
03-27-2022, 12:45 AM
vitnibel
    Thread: help for upgrade codeigniter3 to codeigniter4 in imageoptimizer project
Post: RE: help for upgrade codeigniter3 to codeigniter4 ...

Hi, For making uploading to use AJAX technology you can use OpenSource project Dropzone (https://www.dropzonejs.com/). But... You will essentially reinvent the wheel, since such projects have b...
4,692 Views
5 Replies
06-09-2021, 07:33 AM
vitnibel
    Thread: help for upgrade codeigniter3 to codeigniter4 in imageoptimizer project
Post: RE: help for upgrade codeigniter3 to codeigniter4 ...

Hi Your project is very simple and does not take a lot of time to upgrade to CI4. PS one little thing... for the program to work correctly, you must make a symbolic link in the /public direct...
4,692 Views
5 Replies
06-08-2021, 06:35 AM
vitnibel
    Thread: error on function call
Post: RE: error on function call

I don't know why the debugger goes to this place. But using values from $_POST is better through $request->getPost() is for sure
6,044 Views
9 Replies
04-19-2021, 09:40 PM
vitnibel
    Thread: error on function call
Post: RE: error on function call

Hi you just missed $this-> PHP Code: -- $this->passwordless_login_admin($email,$id);         --
6,044 Views
9 Replies
04-19-2021, 06:51 PM
vitnibel
    Thread: Dataset from database accessible on all controllers and views
Post: RE: Dataset from database accessible on all contro...

Hi As a result of the is_offline function call, just the string will be returned. PHP Code: -- class Home extends BaseController {    public function index($locale = '')    {        $this->...
6,800 Views
8 Replies
03-07-2021, 07:44 PM
vitnibel
    Thread: Hi, need definined a service to work to use from helpers functions
Post: RE: Hi, need definined a service to work to use fr...

Hi To call a function of CommonLibrary class from the \App\Libraries namespace in any place of youre code, Helper or Controller or some else Library: PHP Code: -- $cmn = new \App\Libraries\Comm...
4,957 Views
8 Replies
01-27-2021, 05:22 AM
vitnibel
    Thread: Loss of design with a parameter in the route [CI4]
Post: RE: Loss of design with a parameter in the route [...

Hi. No config files need to be changed in this case. The .env file has priority over the configs files.
4,836 Views
4 Replies
12-14-2020, 01:42 AM
vitnibel
    Thread: dropdown from database
Post: RE: dropdown from database

Hi. You forgot to call function get() after select() and you don't need to call countAll() function to check if the request was successful. PHP Code: -- public function getAllUnitsDropDown() {...
1,823 Views
2 Replies
12-12-2020, 08:59 PM
vitnibel
    Thread: Loss of design with a parameter in the route [CI4]
Post: RE: Loss of design with a parameter in the route [...

Hi. Most often this is due to incorrect $baseURL parametr in app/Config/App.php. Show what you specified in this parameter and what url you get to load the stylesheet in the page header with and wit...
4,836 Views
4 Replies
12-11-2020, 12:56 AM
vitnibel
    Thread: POSTING hidden values
Post: RE: POSTING hidden values

just need to add echo, like this PHP Code: --
2,359 Views
4 Replies
12-10-2020, 01:22 AM
vitnibel
    Thread: Class not found Error, problem with namespaces
Post: RE: Class not found Error, problem with namespaces

With the appearance of namespaces in CI4, the location of certain libraries or helpers has become rather conditionaly. Let's say you want to make a helper class and place it in the app/Helper direc...
13,837 Views
5 Replies
12-01-2020, 07:18 PM
vitnibel
    Thread: How to Routes for Function with parameter?
Post: RE: How to Routes for Function with parameter?

Just replace last '\' to '/' PHP Code: -- $routes->get('blog/page/(:num)', '\Modules\Blog\Controllers\Blog::page/$1'); --
2,387 Views
2 Replies
11-18-2020, 04:57 AM
vitnibel
    Thread: displaying an image in a template
Post: RE: displaying an image in a template

It is very strange that the first check for the value of a 'typo' succeeds and the second does not. Although it looks right, but it's hard to say something without seeing all the code.
3,798 Views
3 Replies
10-23-2020, 11:15 PM
vitnibel
    Thread: displaying an image in a template
Post: RE: displaying an image in a template

because there is a syntax error in the code, just missing closing quote in first echo. and in the second too.
3,798 Views
3 Replies
10-23-2020, 09:32 PM
vitnibel
    Thread: Using form helper? Is there a way to modify the DOM?
Post: RE: Using form helper? Is there a way to modify th...

Hi, the output of the form in the view at a specific place can be done like this: PHP Code: -- $form = form_open('views/User_Activity_Survey.php'); $form .= form_checkbox( "test1", "Question1",F...
4,970 Views
6 Replies
09-21-2020, 07:05 PM
vitnibel
    Thread: easytables FPDF
Post: RE: easytables FPDF

Working example with CI4 & easeTable extension of FPDF library: copy FPDF library into folder app/ThirdParty/fpdf182, copy easyTable files into same place. in file app/Autoload.php PHP Code: ...
2,785 Views
2 Replies
09-20-2020, 09:56 PM
vitnibel
    Thread: FPDF
Post: RE: FPDF

pws Wrote: (09-10-2020, 02:45 AM) -- hello @niklas can you send me full code example how use fpdf? i need it to my website -- Hello @pws Copy fpdf library into ThridParty folder of your app. ...
18,484 Views
7 Replies
09-11-2020, 08:10 PM
vitnibel

Theme © iAndrew 2016 - Forum software by © MyBB