Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign

    (@xnau)

    It’s possible, but it will take a some coding and a little understanding of WordPress functions to get it done.

    First, your members have to be WordPress users. You can set up a special user role for them or they can just be subscribers. I suggest using a plugin like “Front End Users” which gives them a profile page on the frontend. There are other membership plugins that do similar things.

    Now, on a page that your users have to be logged in on, put your “signup” form. In this case, the purpose of the form is to let them add a title to their collection. You need to set up a hidden field that collects their username and stores it with the record. How to do that is explained in the “other notes” section here.

    Now, it’s just a matter of setting up the user’s collection page so that it only shows the titles for a particular user and gives them a way to edit each one. This page also needs to be restricted to logged-in users only. Use a special WP template and include the list using the do_shortcode function, adding their username to the “filter” attribute so it only shows their titles. Add the “edit” link to the list using the instructions given in this blog post: adding an edit record link to the frontend list

    These instructions are only a sketch, many details are missing.

    Thread Starter Boba Lou Lou

    (@boba-lou-lou)

    Ok thanks.

    Thread Starter Boba Lou Lou

    (@boba-lou-lou)

    Xnau, can you expand on the 4th paragraph of your post?

    I created a custom wordpress page template and put it in my templates folder of my theme. My problem is using the do_shortcode function you mentioned. I can’t get it to work. Could you post the code of what it should be?

    I had: <?php echo do_shortcode(“[pdb_list]”);

    add_filter(‘username’, ‘do_shortcode’, 11); // ?>

    But nothing happens. Help! I’m so close!

    Plugin Author xnau webdesign

    (@xnau)

    The shortcode filter has to have the user ID in it so that it will show that user’s entries only. It sounds like you need to take a look at how to set up custom templates in WordPress, they don’t go into a folder usually, just in the main directory of your theme. WordPress templates are different from plugin templates.

    The “filter” we’re talking about is in the plugin shortcode, it’s not a WordPress filter.

    Read this page about getting the user info: http://codex.wordpress.org/Function_Reference/get_currentuserinfo

    You’ll use that in your WP template to get the user ID. Now, that gets placed into the shortcode filter so that only the records matching that ID will be shown. You haven’t explained how you’re storing the user ID in the plugin records, so I’ll just assume it’s the user ID, which is a number. You’d call your shortcode like this:

    <?php echo do_shortcode('[pdb_list filter="userid=' . $user_ID . '"]'); ?>

    That is assuming you’re storing your user ID in a field named “userid” so you’ll have to adapt what I gave you here to your own situation.

    Thread Starter Boba Lou Lou

    (@boba-lou-lou)

    Xnau, when you say custom templates in WordPress, you’re referring to page templates, correct?

    Plugin Author xnau webdesign

    (@xnau)

    Yes, WordPress page templates.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Allowing members to create a listing of their video game collection?’ is closed to new replies.