DarKMaSK
Loyal Member
- Thread starter
- #1
For quite sometime, I was thinking regularly about the 'Logout' link at the bottom of the ACP. It is so inconvenient. I don't know why the developers of Xenforo didn't think about it!!! So, I found this tutorial, yes at Xenforo's site and applied in Xenforo Test forum on my localhost and it worked. So I thought, just in case this may help others. For anyone who may want to have it also at the top of the page this may help.
NOTE: This is the author did in XF v2.0.10 and I did it in XF 2.4.3, the latest. That means the core of Xenforo is almost remaining the same. So, no problem should occur.
Steps:
1. Turn Development Mode on
In the src folder edit the config.php file by adding:
at the bottom of the file
2. Go into your XF Admin Control Panel (ACP)
3. Go to Appearance and select Templates.
4. At the top of the template list you should see a Style box...click it and ensure Master Style is selected.
5. You should now see 3 tabs at the top of the template list, Public - Email - Admin...select Admin.
6. Scroll down or search for and open the template PAGE_CONTAINER to edit it.
7. Search for the below code. You may find it at line 43:
8. After that line, add this line:
Save and Exit the template.
You should now see the 'Log Out' link next to the link to your site's name:
9. The final step is to either change the word 'true' to 'false' in the line you added to your config.php file in step 1 or remove the line all together. Though it is handy to keep it in there but just turn the development mode off by changing the 'true' to 'false' as shown below:
Hope it helps.
NOTE: This is the author did in XF v2.0.10 and I did it in XF 2.4.3, the latest. That means the core of Xenforo is almost remaining the same. So, no problem should occur.
Steps:
1. Turn Development Mode on
In the src folder edit the config.php file by adding:
Code:
$config['development']['enabled'] = true;
2. Go into your XF Admin Control Panel (ACP)
3. Go to Appearance and select Templates.
4. At the top of the template list you should see a Style box...click it and ensure Master Style is selected.
5. You should now see 3 tabs at the top of the template list, Public - Email - Admin...select Admin.
6. Scroll down or search for and open the template PAGE_CONTAINER to edit it.
7. Search for the below code. You may find it at line 43:
Code:
<a href="index.php" class="p-header-button p-header-button--title" target="_blank">{$xf.options.boardTitle}</a>
Code:
<a href="{{ link('login/logout', null, {'t': csrf_token()}) }}" class="p-header-button p-header-button--title">{{ phrase('log_out') }}</a>
You should now see the 'Log Out' link next to the link to your site's name:
9. The final step is to either change the word 'true' to 'false' in the line you added to your config.php file in step 1 or remove the line all together. Though it is handy to keep it in there but just turn the development mode off by changing the 'true' to 'false' as shown below:
Code:
$config['development']['enabled'] = false;
Hope it helps.