1. Hey, Guest! Do you want to chat with us? Then come to the chat thread Here!
    Dismiss Notice
Dismiss Notice
Welcome to Sugoi Desu, Respected Guest! Please take a moment to register today.

Comfy Café #2

Discussion in 'Chatroom Corner' started by Kame, Feb 22, 2016.

Thread Status:
Not open for further replies.
  1. moe -

    Messages
    84
    131
    Trophy Points
    640
    Keno
    11,867ლ
    :ng46:bean
     
    Guest 0001 and Gobb like this.
  2. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    :ng10

    How's your forum going?
     
    Guest 0001 likes this.
  3. moe -

    Messages
    84
    131
    Trophy Points
    640
    Keno
    11,867ლ
    I broke its login trying to do something I dnt remember:wtf1. I had expected me and filoo and coup will play risk and other DN skype group ppl would be able to host DN there. They lost interest so I did not bother to fix it. :kongou
    did you make that random gets happen?
     
    Gobb likes this.
  4. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    That sucks. :/ That also blows. I haven't tried since. :/ Been doing streaming and some other shit. This is why I didn't want to put much time into it: http://www.sugoidesu.net/posts/59756/ I think I'd have to make another database for it to store the values and post id and have the bbcode read the post id value from there or something, idk.
     
  5. moe -

    Messages
    84
    131
    Trophy Points
    640
    Keno
    11,867ლ
    I had solved it writing simple trigger that embeds a random value into the post. if you are familiar with MySQL triggers that is easy. No need to make another table or attribute store it as it gets stored with post itself. Making a DB would take lot of efforts but you could give other features with it I guess linking all the random rolls user gotten with the userid.
     
    Gobb likes this.
  6. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    Never used or looking into MySQL triggers, guess I should? I just hope it's easily compatible with Xenforo, XF gives me a headache. O_O Yeah, it would and I'd much rather not to.
     
  7. moe -

    Messages
    84
    131
    Trophy Points
    640
    Keno
    11,867ლ
    They may never play risk considering much people were not interested so it gets all waste or just **** up badly for nothing. :geg I am not sure if it would be wise to safe thing to tweak with DB schema of site big like this.
    If you want to it is database thing , it is independent of forum software. I Just had to find which table in the db stores user's post and add before insert to append random roll.
    Show Spoiler

    PHP:

             
    -- mysql trigger to add random number for esotalk
             
    -- `et_postis table where post is stored on esotalk
             
    -- the content attribute has the users posts
             
    -- the random number get concatanated with that content at the end
             
    -- since it will be always at the end at the server side the user cant cheat by adding his own
             DELIMITER  
    $$
             
    CREATE  TRIGGER addroll
             BEFORE INSERT ON et_post
             
    FOR EACH ROW
            BEGIN
                    
    DECLARE randNum INT;
                    
    SET randNum FLOOR(111111+RAND()*(111111-999999));
                    
    SET NEW.content=CONCAT(NEW.content' yourrollis:'randNum);
                    -- 
    there needs to be newline added after content
            END
    ; $$
            
    DELIMITER ;

     
    Gobb and Rohan like this.
  8. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    I think I'll leave it, thanks tho! I think if I tried, I'd **** it sideways. Plus, I'm not certain where the whole posting php is even. I mean, I know the databases, but the php which does the query to store the post data. That's what you need to edit, right?
     
  9. moe -

    Messages
    84
    131
    Trophy Points
    640
    Keno
    11,867ლ
    No PHP. You can make the DB itself do the stuff. But nvm if you dont know about triggers. It's syntax is weird and changes from one version of SQL to other. :psydie
     
    Gobb likes this.
  10. Natsu Shazneel Advanced Member

    Messages
    412
    166
    Trophy Points
    760
    Keno
    1,087ლ
    So where's Dannie?
     
  11. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    Oh, that's neat. Yeah, I only know the basics of sql really.
     
  12. Gobb

    Gobb finds a way

    Messages
    53,185
    28,879
    Trophy Points
    6,440
    Keno
    57,475ლ
    He doesn't come much.
     
  13. Rohan Guest

    @Dannie will come when he gets tired of NB. :happyurr/
     
  14. Dante The Sinister Crow

    Messages
    943
    620
    Trophy Points
    760
    Yes I came just because so
     
  15. Rohan Guest

    Have you checked out the Arcade here ?
     
Thread Status:
Not open for further replies.

Share This Page