my custom Hook define $hook['display_override '] = array( 'class' => 'MySiteName', 'function' => 'Mysitetitle', 'filename' => 'Mysite.php', 'filepath' => 'hooks' ); here hook code class MySiteName { function Mysitetitle() { // load the instance $this->CI =& get_instance(); // get the actual output $mysitename = $this->CI->output->get_output(); // replace the tokens $mysitename = str_replace("CodeIgniter", "My Epploo", $mysitename); // set the output echo $mysitename; return; } } but not workin plz help me sir ASAP
Great knowledge
Great example
Good sir👍👍👍👍
Thanks and welcome
thank you so much, for this share great videos.😄
Very useful video sir
Very helpful
Thanks
thank you.
thank you bro
Very useful knowledge 🔥🔥🔥
Very helpful... Thanks
Awesome sir
super bro good explanation ......
Thank for your this effort. Valuable information.
thanks
bro can i include database connection in hooks precontroller? @faruintereviewquestion
bhai aapne 1 class and uske under 1 function and 1 filename likha h ..
$hook['display_override']=array(
'class' => 'ReplaceToken',
'function' => 'replaceplaceholdercode',
'filename' => 'ReplaceToken.php',
'filepath' => 'hooks',
);
ab mujhe 92 pages me karna h toh kya 92 function, 92 class, 92 filename bhi likhna hoga??
thanks for sharing good video please share with example of all hook function
Great effort, but if your title, description and writing in the video is in english, why not use english as the language that you speak in the video?
I am starting tutorial in angular 9 so i will make videos in english
thanks sir
super bro good explanation but one small doute what is the use of display_override function plz... explain briefly
difference between HOOKS and HELPERS??
hooks working but, I am getting below error
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant - assumed ''
Filename: hooks/Replacetoken.php
Line Number: 3
Backtrace:
File: C:\wamp64\www\hooks\application\hooks\Replacetoken.php
Line: 3
Function: _error_handler
File: C:\wamp64\www\hooks\index.php
Line: 315
Function: require_once
Hello Sir, Hooks not working, I have enable hooks in config.php, create hooks in hooks.php, and create file in hooks directory.
how to use hooks for particular controller
my custom Hook define
$hook['display_override '] = array(
'class' => 'MySiteName',
'function' => 'Mysitetitle',
'filename' => 'Mysite.php',
'filepath' => 'hooks'
);
here hook code
class MySiteName {
function Mysitetitle()
{
// load the instance
$this->CI =& get_instance();
// get the actual output
$mysitename = $this->CI->output->get_output();
// replace the tokens
$mysitename = str_replace("CodeIgniter", "My Epploo", $mysitename);
// set the output
echo $mysitename;
return;
}
}
but not workin plz help me sir ASAP
Hey Praveen, This is correct code , please run it.
Step : 1
C:\xampp\htdocs\HOOKS\application\config\config.php
$config['enable_hooks'] = TRUE;
Step : 2
C:\xampp\htdocs\HOOKS\application\config\hooks.php
$hook['display_override'] = array(
'class' => 'MySiteName',
'function' => 'Mysitetitle',
'filename' => 'Mysite.php',
'filepath' => 'hooks'
);
Step : 3
C:\xampp\htdocs\HOOKS\application\hooks\Mysite.php
give me reply , your code is run are not.......!!
Hi Sir till not working and one more thing my project in on live server
Tell me , Praveen please give me your Email Id , I will share HOOKS FOLDER you can download and , run it.
pk46066@gmail.com