Thread: Display forum post count in game

Results 1 to 6 of 6
  1. #1 Display forum post count in game [SQL] 
    Registered Member bazinger's Avatar
    Join Date
    Nov 2008
    Age
    31
    Posts
    106
    Thanks given
    6
    Thanks received
    2
    Rep Power
    44
    This is for servers that are integrated with a forum.

    Difficulty: 0/10 easier than cooking popcorn

    Server Base: Tested on CaliScape 3.0 will work with any though...

    Assumed knowledge: Declaring, copying, pasting, leeching...

    ------------------------------------------------
    Step 1: Declare this stuff.
    Code:
    public int posts = 0;
    You should know what that does.

    Now, go into your loadgame() void. If you are integrated with a forum, there will be a section in the loadgame that loads variables from your MySQL database.

    Search for:
    Code:
    absY = results.getInt("posy");
    This is the section of the loadgame i was talking about. It may be different depending on how you coded your integration, but overall it should look the same.

    Under it, add this:
    Code:
    posts = results.getInt("posts");
    The part in quotes should be then name of the column in your MySQL database that stores the users post count.
    What this will do, is define the int 'posts' as the users post on the website.

    Step 2: Displaying their posts upon login
    Search for your initialize() void. Under there, you should have your login display message. To show their posts, simply add this:
    Code:
    if (posts >= 1){
    sendMessage("You have "+posts+" posts on yourwebsite.com. Thanks for being active!");
    } else {
    sendMessage("You havn't made a post yet on yourwebsite.com. Make your first today!");
    }
    Wrap up
    This basic structure can be used for lots of other stuff to. You can restrict shops for high posters, allow use of certain items to posters, etc, etc.

    If you have nothing good to say, id suggest not posting.

    Credits: 100% Me

    Enjoy!
    Quote Originally Posted by pro k0er View Post
    100mb connection is ****
    Lol'd
    Reply With Quote  
     

  2. #2  
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Nice job. Pretty cool idea. I'm sure someone will use this creatively.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jun 2008
    Age
    24
    Posts
    2,313
    Thanks given
    485
    Thanks received
    231
    Rep Power
    0
    Nice and auro ur internets fkin fast!
    Reply With Quote  
     

  4. #4  
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Quote Originally Posted by jinrake View Post
    Nice and auro ur internets fkin fast!
    rofl (mts)
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    May 2008
    Posts
    2,327
    Thanks given
    55
    Thanks received
    67
    Rep Power
    0
    wuldn't u ahve to cofigure this into mysql so it will actualy read the posts from forum besides, wats point in this?

    why not just make them go on forums...
    Reply With Quote  
     

  6. #6  
    .supersyn

    myK-'s Avatar
    Join Date
    Aug 2008
    Posts
    1,778
    Thanks given
    18
    Thanks received
    39
    Rep Power
    399
    Quote Originally Posted by silabgarza View Post
    wuldn't u ahve to cofigure this into mysql so it will actualy read the posts from forum besides, wats point in this?

    why not just make them go on forums...
    I think he made this thread, IF you have a Integrated forum software in ur server
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •