Jump to content

Mahngiel

Newly Registered
  • Posts

    1,068
  • Joined

  • Last visited

Posts posted by Mahngiel

  1. I mark posts as favorites and after refreshing the page it's all gone.

    Sounds like you're not saving anything.

     

    So I want to create my own solution, but don't really know how. I have never edited the WP database, but I have plenty of PHP mySQL experience.

    It shouldn't take anybody long to figure out the schema behind a database if you have any experience with mysql

     

    What I would do is make a table called 'fav_posts' to connect user ID's with post ID, so it would have 2 rows. I suppose I could figure out adding posts. There would be a link with the current user ID and post ID somewhere in it. The link would trigger an ajax event which would create the new DB record or delete it if 'unfavorite' was clicked. Now the harder part would be getting the posts, somehow combining the new table with the WP query. I could create an empty page, and in page.php and add a condition to check if the current page is the favs page. But how do I output only the fav posts ?

     

    Sounds like you're implementing a user bookmarking system.  You need to prepare your articles with some sort of identification.  I'd suggest adding the post's id to the element that contains the post body.  This will give your javascript something to find.  Your backend script will catch that ID, ensure the user is logged in, and input an entry with the user's ID and the aforementioned post ID.  Then, when the user requests his 'bookmarks', you query the table for matches on the user ID and retrieve all posts associated with post IDs.

  2. So you have an open-source game on YOUR webserver. Where you have access to THE DATABASE. You want to create a bot that does some stuff so that you can gain... resources?!

     

    Run this in phpmyadmin:

    UPDATE players SET gold = gold + 99999999, iron = iron + 99999999, .. WHERE id = your-id

     

    Refresh the page (or logout/login) and voila 99M gold, iron, ..

     

    I am Mahn for president, and I approve this message!

  3. if this game is your own, you should have a working knowledge of the language you're using to write the game. if you don't know what you're doing in order to write this application, I suggest you start with an easier task.

  4. Is there any correlation between the events in other rooms with each other?  What is the entire scope of the project?  You haven't given us more to work with than a vague abstract.

     

    The first stage should be to plan everything out.  Think about what you want to accomplish in it's entirety, and then plan how to get there.

  5.   Something along the lines of X people agree with this post.

     

    A question we should be having is what to call such accolades? Likes? Kudos? Approvals (think "I am Mahn for president, and I approve this post!"  ;) )? Thanks?

     

    Some contextual examples:

     

    "8 people like this post."

    "3 people approve this."

    "This post has had 31 kudos."

    "14 users said Thanks".

    "2 users accept this solution / answer."

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.