Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: [1] 2

Author Topic: [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)  (Read 10830 times)

George Antoniadis

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 479
[MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
« on: April 13, 2006, 08:40:49 pm »

    mySQL Multi User Mod for sNews 1.4 (mod version 0.2b)
    *Updated on 15/4/2006 - 13:17 GMT

    Announcements:
    List:
    ·This is the first public version for sNews 1.4
    ·This is a beta version and might have bugs.
    ·Please report them here so they can get fixed.
    ·Please DO NOT post code in this thread.
    ·BACKUP BOTH YOUR FILES AND MYSQL TABLES BEFORE ATTEMPTING TO INSTALL THIS MOD.

    What it can do:
    List:
    ·There is one admin user that can add/edit/delete users.
    ·You can have as many users as you want.
    ·Users cannot add/edit/delete users.
    ·Users and admins can change their password.

    What has to be added:
    List:
    ·Users to be able to retrieve their password via email.
    ·The admin to be able to assign users to be able to post only to specific categories.

    The option for the admin to create other admins via the admin panel (currently s/he can add other admins only via phpMyAdmin)[/li][/list]
    ·Suggestions are welcome

    How to install:
    Insert this to your mysql:
    Code: [Select]
    --
    -- Table structure for table `users`
    --

    CREATE TABLE `users` (
      `id` int(3) unsigned NOT NULL auto_increment,
      `username` varchar(150) NOT NULL default '',
      `password` varchar(150) NOT NULL default '',
      `email` varchar(250) NOT NULL default '',
      `mode` enum('admin','poster') NOT NULL default 'poster',
      PRIMARY KEY  (`id`),
      UNIQUE KEY `username` (`username`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2 ;

    --
    -- Dumping data for table `users`
    --

    INSERT INTO `users` (`id`, `username`, `password`, `email`, `mode`) VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin@domain.com', 'admin');
    *Please remember to add the table prefix in "CREATE TABLE" and in "INSERT INTO" if you are using one.
    ex.
    Code: [Select]
    CREATE TABLE `prefix_users` (and
    Code: [Select]
    INSERT INTO `prefix_users` (Download this: (Edit - URL removed Sept.22.07, no longer active)

    The default username/password is admin/admin

    Rename your snews.php to something else, take the config values of your snews.php and replace them on the new one.
    * The reason for releasing this as a file is so to keep an archive of the versions, make sure that ppl don't leave out stuff in copy/paste actions, and make this post smaller if you are not interested in the actuall file.
    * Everything that has been changed can be found between:
    //USERDB START
    //USERDB END


    If you want to be notified about updates of bugfixes for this MOD you can enable notify on this thread.
    « Last Edit: September 22, 2007, 04:19:42 pm by Keyrocks »
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    Shaun Aneiros

    • Jr. Member
    • **
    • Karma: 2
    • Posts: 98
      • http://www.poorpeoplesparty.org
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #1 on: April 13, 2006, 09:00:03 pm »

    Ok!!!

    Now, can we get an email when someone other then the main admin posts?

    Oh sooo needy...
    Logged
    Why does my daughter like me to pose for pictures with my angry face?

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #2 on: April 13, 2006, 09:27:19 pm »

    I don't think so! o_O
    Lukas any ideas on that?

    Saneiros if you try it out please let me know how it's comming. ^_^
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    bramsyuur

    • Hero Member
    • *****
    • Karma: 23
    • Posts: 873
      • http://snews.vietbee.net
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #3 on: April 13, 2006, 11:08:09 pm »

    @all:
    Only one apreciation;

    - In order to work, you need to add these two rules into your .htaccess file:

    Code: [Select]
    RewriteRule ^new_user/$ index.php?category=new_user [L,QSA]
    RewriteRule ^user_changepass/$ index.php?category=user_changepass [L,QSA]

    Good work, guys!
    bramsyuur.
    Logged
    La comunidad sNews en tu idioma!
    Comunidad sNews en Español

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #4 on: April 13, 2006, 11:35:33 pm »

    it should work without these but you could do that too~! ^_^
    thnx! :D
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    bryn

    • Hero Member
    • *****
    • Karma: 2
    • Posts: 934
      • http://www.cssugly.com
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #5 on: April 15, 2006, 11:35:16 am »

    WOW!!!

    I sure hope this works with all my other mods included..if so what a great addition to sNews..you've excelled yourself here 'a'..fantastic mate ;)
    Logged
    Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

    Patric Ahlqvist

    • Nobodys perfect, but Im pretty effing close
    • ULTIMATE member
    • ******
    • Karma: 65
    • Posts: 4867
    • “I'm a self-made man and worships my creator.”
      • p-ahlqvist.com
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #6 on: April 15, 2006, 11:38:07 am »

    WWHHUUUUUUUUUUUUHAAAAAAAAAAAAAA Analyzerx, my man, buddy, pal, friend, your a greek GODESS, hehe... You're my Athena, mo'n. LOL... Oh if this works and the other features is comeing along you're definitivly 25 euro's richer. (Half of the price money for multi user and an inplemented image gallery).

    I will download and masturbate with this today...Whne I've woken up a bit. Now I can barely see the screen. Do you have a test site??

    PS 1 - I might be a dumba$$ or just too tired from just waking up...but I need help on IRC or MSN to set up those tables... I get error messages the whole time....

    I'm on both right now, and for some time onwards... If I do not answer, I'm just at the crapper ;)

    Patric.

    PS 2 - deleting all posts that have no baring on the MOD, in order to keep this thread as clean as possible. (will delete this aswell later.)
    Logged
    "It's only dead fish that goes with the flow... "
    Updated

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #7 on: April 15, 2006, 02:13:20 pm »

    BUGFIX: 'Change password' was visible always.
    * new version posted on first post. (02b)
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    bramsyuur

    • Hero Member
    • *****
    • Karma: 23
    • Posts: 873
      • http://snews.vietbee.net
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #8 on: April 15, 2006, 10:37:14 pm »

    @Analyzer:
    I've been playing with this version... and I don't have find any bugs in it... only 2 comments/suggestions about this
    great addition:

    The 1st:
    - I think that only the admin need to be able to erase articles, comments and every thing... not users!!!  With this mod,
    actually, any user are able to erase every thing that she/he wants... is a serious risk, I think that only the user are able to
    erase/delete their own articles post, and their comments relative to your articles. I think...

    The 2on:
    - A possibility to create a new entry into 'New Articles' that mean 'Write your name in a bottom of article?... bla bla".  I think this is a good adition for a multi-users snews.

    Edited: Another suggestion, multi-login capabilities to log into snews whitout loss the other user side (actually, I loss the connection when another user take login into the snews).

    Thanks for this great effort in this Mod!!!
    bram.
    Logged
    La comunidad sNews en tu idioma!
    Comunidad sNews en Español

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #9 on: April 16, 2006, 02:05:36 am »

    @brams:
    Thanx for all your help mate! ^_^

    1. About the admin only being able to erase articles I'll try adding some more options to users, add/edit/del articles/comments/cats so each user can have diff stuff...
    2. About the name I wanted to do this but totally forgot hehe! :P - tnx
    3. About the login thing I haven't tried it but most likely a session thing. I'll make a diff set of sessions for each user. ;)
    4. Patric suggested a instant message thing that I'm trying now...
    5. New stuff are new email password retrieval thingie and want to see if it's possible to make a user add/edit/del stuff on one category without changing all snews code! :P

    My oncy concern is that once all these mods are in place I'll have a really hard time implementing it into the next snews versions and little time! o_O So I'm trying to figure a way to do this without me killing myself! :P hehe

    Thanks everyone! ;) esp brasm and patric
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    Patric Ahlqvist

    • Nobodys perfect, but Im pretty effing close
    • ULTIMATE member
    • ******
    • Karma: 65
    • Posts: 4867
    • “I'm a self-made man and worships my creator.”
      • p-ahlqvist.com
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #10 on: April 16, 2006, 09:46:23 am »

    Analyzerx - would this be anything to take in consideration ? http://solucija.com/forum/index.php?topic=790.0
    Made sense to me...
    Logged
    "It's only dead fish that goes with the flow... "
    Updated

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #11 on: April 16, 2006, 11:57:15 pm »

    yeah patric it does... but I think this should be also included in the next version... o_O
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    Patric Ahlqvist

    • Nobodys perfect, but Im pretty effing close
    • ULTIMATE member
    • ******
    • Karma: 65
    • Posts: 4867
    • “I'm a self-made man and worships my creator.”
      • p-ahlqvist.com
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #12 on: April 25, 2006, 04:07:23 pm »

    Oh... just realized something ;)... Haven't bugged you bout the expected release date :) Anything new on this front, George ? Have you had any time to explore the wonders of multi user log in anymore ?
    Logged
    "It's only dead fish that goes with the flow... "
    Updated

    George Antoniadis

    • Sr. Member
    • ****
    • Karma: 0
    • Posts: 479
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #13 on: April 26, 2006, 09:52:13 pm »

    Sorry internet here is fucked up and I was pretty busy... o_O

    really sorry... I'll have the version final until saturday... many new stuff promice! :>
    Logged
    How I feel like I'm starless, I'm ready to fade now.
    And how I feel like I'm starless, I'm hopeless and greyed out.

    Patric Ahlqvist

    • Nobodys perfect, but Im pretty effing close
    • ULTIMATE member
    • ******
    • Karma: 65
    • Posts: 4867
    • “I'm a self-made man and worships my creator.”
      • p-ahlqvist.com
    [MOD] mySQL Multi User Mod v0.2b (sNews 1.4)
    « Reply #14 on: April 27, 2006, 11:59:04 am »

    No need to feel sorry... You're doing all the work and I'm just craving ;).... I'll wait patiently for it...
    Logged
    "It's only dead fish that goes with the flow... "
    Updated
    Pages: [1] 2