Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: SIMPLE SECURITY MOD - for 1.4!  (Read 1601 times)

centered

  • Guest
SIMPLE SECURITY MOD - for 1.4!
« on: June 06, 2007, 10:50:05 pm »

From this thread:
http://www.solucija.com/forum/viewtopic.php?id=4396

For 1.4: (NOT FULLY TESTED!!!)
Following Keyrocks first post in the thread above:

0. backup!

1.  Add this underneath
Code: [Select]
$s['prefix'] = ""; // Table prefix for multiple sNews systems on one database (if you don't need it just leave it blank)Add
Code: [Select]
    // login link replacement, example - snooby21
    // use the url to access the login panel - http://www.your-domain.com/snooby21/
    $s['loginLink'] = 'snooby21';
2. in the center reaplce the login case
Code: [Select]
// case "login":
// login();
// break;
case s('loginLink'): login(); break;
3. Not sure what is going on here.. so I didn't try and change anything but....
3a.  In display menu_items , replace the loggin in part with
Code: [Select]
if (isset($_SESSION['Logged_In'])) {
echo "<li><a href='" .s('website'). "categories/'>". l('categories') ."</a></li>";
echo "<li><a href='" .s('website'). "new/'>". l('new_article') ."</a></li>";
echo "<li><a href='" .s('website'). "unpublished/'>". l('unpublished_articles') ."</a></li>";
echo "<li><a href='" .s('website'). "images/'>". l('images') ."</a></li>";
echo "<li><a href='". s('website') ."logout/'>". l('logout') ."</a></li>";
}
This adds a logout link while you are logged in without having to go back to your loginlink again
« Last Edit: September 11, 2007, 12:18:34 pm by centered effect »
Logged