Private blog
Hey,
Can some1 help me and give some tips how to get sessions work in bluddit ?(without database)
Have been trying and nothing seems to work.
I need simple login ja make full blog private(only logged in people can see)(login details can also be in same file).
I can't get sessions to work.
phpinfo session settings
Can some1 help me and give some tips how to get sessions work in bluddit ?(without database)
Have been trying and nothing seems to work.
I need simple login ja make full blog private(only logged in people can see)(login details can also be in same file).
I can't get sessions to work.
phpinfo session settings
Hi,
Use the defaut session Bludit dashboard.
In your theme (php/head.php) replace this code:
by
Work like charm
Only editors and admins can access on all site.
Use the defaut session Bludit dashboard.
In your theme (php/head.php) replace this code:
Code: Select all
<?php
Theme::charset('utf-8');
Code: Select all
<?php
// Private Bludit
if($Login->role()!=='admin' && $Login->role()!=='editor') {
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
Redirect::page('admin', 'dashboard');
}
Theme::charset('utf-8');
Only editors and admins can access on all site.
Last edited by Fred on Sun Mar 06, 2016 9:25 am, edited 1 time in total.
╰☆╮Bludit╰☆╮ is a open source and community contributions are essential to project success!
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
Thanks, that works well but only problem is that now, these users aren't admins or editors. They should not get access to admin panel.
It should redirect to site not to admin panel.
Any change to change editors to normal users and redirect them to blog and if admin login then redirect to admin panel(will also be able to access site) ?
It should redirect to site not to admin panel.
Any change to change editors to normal users and redirect them to blog and if admin login then redirect to admin panel(will also be able to access site) ?
well actualy i think easyest way to do that is to add new usergroup ? or will it be hard ? they dont need any special access, only to access blog and redirect to blog site after logging in.
something like that ?
something like that ?
Code: Select all
<?php
// Private Bludit
if($Login->role()!=='admin' && $Login->role()!=='editor' && $Login->role()!=='user') {
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
if($Login->role()=='user'){
Redirect::page('admin', 'dashboard');//change to redirect to blog index.php
}else{
Redirect::page('admin', 'dashboard');
}
}
Theme::charset('utf-8');
Wait Diego if feature new usergroup...
Or make a plugin for this.
Or make a plugin for this.
╰☆╮Bludit╰☆╮ is a open source and community contributions are essential to project success!
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
well i dont need user registration i just need private blog where 20-30 people login with same username and password.
And dont have edit rights
But i guess it will be hard to add that in bludit system i so just try to tell them not to use edit option and just redirect editor status to blog and admin to admin panel instead
is there any better way to redirect blog site like that
Redirect::page('admin', 'dashboard');
or should just use address redirect ?
And dont have edit rights
But i guess it will be hard to add that in bludit system i so just try to tell them not to use edit option and just redirect editor status to blog and admin to admin panel instead
is there any better way to redirect blog site like that
Redirect::page('admin', 'dashboard');
or should just use address redirect ?
Simple and unsecure way untill someone comes up with better idea or plugin
it check if login user isn't admin and editor, it will redirect back to login page and displays error message
in public_html\themes\pure\php\head.php (big thanks to fred for that code)
This code checks on admin dashboard page where editor and admins are redirected after login. It checks if editor has logged in and redirects to spesific address.(Note that editors dosent have any options on blog site, they can also edit in admin dashboard only, since no1 will know that admin dashboard, it seems to work like normal user)
in public_html\kernel\admin\controllers\dashboard.php
Now only have to add logout to blog theme.
I guess it will be redirect to YourBlogURL/admin/logout
simple html link
Not perfect solutsion but it seems to be working temporarily.
Use on your own risk
it check if login user isn't admin and editor, it will redirect back to login page and displays error message
in public_html\themes\pure\php\head.php (big thanks to fred for that code)
Code: Select all
// Private Bludit
if($Login->role()!=='admin' && $Login->role()!=='editor') {
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
Redirect::page('admin', 'dashboard');
}
in public_html\kernel\admin\controllers\dashboard.php
Code: Select all
if($Login->role()=='editor'){
echo'
<script type="text/javascript">
window.location.href = "UrlToRedirect";
</script>
';
}
I guess it will be redirect to YourBlogURL/admin/logout
simple html link
Code: Select all
<a href="YourBlogUrl/admin/logout">Logout</a>
Use on your own risk