PrivateContent - Wordpress Plugin - Documentation by LCweb v2.2


“PrivateContent - Wordpress Plugin”

Created: 31/01/2012
Updated: 16/03/2012
By: LCweb
Email: l.montanari@lcweb.it

Thank you for purchasing my plugin. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!


Table of Contents

  1. Installation
  2. Manage users
  3. Users private page
  4. The shortcodes
  5. Categories limitations
  6. Login methods
  7. Registration form
  8. Hide areas with redirects
  9. Manage menĂ¹ item
  10. Customize messages
  11. New user options (v2.2)
  12. Styling the Login
  13. Advanced Uses
  14. Localizations

A) Installation - top




B) Manage Users - top




C) Users private page - top




D) The Shortcodes - top



Shortcodes summary:

E) Categories limitations - top




F) Login methods - top

PRIOR NOTE: The plugin is designed to let wordpress users overrun the [pc-pvt-content] shortcode limitations. To test it remember to logout first!



Login API for developers:

Function to get the login form (is displayed only if user is not logged):

            echo pg_login_form();
            

Function to get the logout box (is displayed only if user is logged):

            echo pg_logout_btn;
            


G) Registration form - top



NOTE: it's possible to customize the message for succesfully registered users. Just go to the plugin settings -> messages, and fill the relative option.



H) Hide areas with redirects - top




I) Manage menĂ¹ item - top




J) Customize messages - top




K) New user options (v2.2) - top

Redirect after login (1)

With this option you can choose if redirect an user after the login. Simply choose the target page and each time an user will log in, will be redirected there.

Redirect after registration (4)

With this option you can choose if redirect an user after the registration. Simply choose the target page and each time a new user will register to your website, will be redirected there.

Default content for new user's private page (2)

Set the default content for the private pages. New users private page will have automatically this content.

Enable/disable private page for registered users (3)

Having the possibility of set a default content for the private page of the new registered users, you can choose if auto enable their private pages or disable them.




L) Styling the Login - top

The plugin has an own basic style for the login form, the messages and the logout box. However to make them fit to your theme you may customize it by creating a new one.
Before testing your style remember to switch off the default, by selecting the relative option in the plugin settings.

This is the basic code: please use its base to make your own:

        /****************************
            MANDATORY ELEMENTS
         *****************************/
          
        /* cursor for the triggers */
        .pg_trigger, .pg_logout_btn {
            cursor: pointer;   
        }
        .pg_login_trig {
            font-weight: bold;
        }
         
        /* loader style */
        .pg_loading {
            display: inline-block;
            background: url(../img/loader.gif) no-repeat top left transparent;
            width: 20px;
            height: 20px;  
        }
         
        /* loader container */
        .pg_loginform_loader,
        .pg_custom_form_loader {
            display: inline-block;	
        }
        .pg_loginform_loader span,
        .pg_custom_form_loader span
        .pg_logout_box .pg_loading {
            display: inline-block;
            margin-bottom:-3px;
        }
         
         
        /****************************
            WIDGET FORM ELEMENTS
         *****************************/
          
        /* form label */
        .PrivateContentLogin label {
            display: inline-block;
            min-width: 100px;  
            margin-top: 7px;
        }
         
        /* form input */
        .PrivateContentLogin input[type="text"],
        .PrivateContentLogin input[type="password"] {
            width: 166px;
            padding: 3px;  
        }
         
        /* logout button */
        .widget .pg_logout_btn {
            display: inline-block;
            padding: 2px 4px;
            margin-top: 5px;
        }
         
          
        /*********************************
           STANDARD LOGIN FORM ELEMENTS
         ********************************/
          
         /* container */
         .pg_login_block {
            margin: 20px 0;
        }
         
        /* container message */
        .pg_login_block p {
            padding: 5px 10px;
            border-radius: 4px;
            background-color: #FDFFDD;
            border: 1px solid #ddd;
            margin: 0;
            border: 1px solid #EEE78A;
        }
          
         /* form tag */
        .pg_pvtpage_login_form,
        .pg_inline_login_form {
            width: 290px;
            padding: 17px;
            border: 1px solid #D3D3D3;
            background-color: #F4F4F4;
            box-shadow:0px 0px 7px rgb(190,190,190);
            border-radius: 4px;
        }
        .pg_pvtpage_login_form {
            margin: 20px auto 20px;
        }
        .pg_inline_login_form {
            margin: 0 auto 30px;   
        }
         
        /* label*/
        .pg_pvtpage_login_form label,
        .pg_inline_login_form label {
            display: inline-block;
            width: 90px;
            padding-right: 10px;   
            margin-bottom: 15px;
        }
         
        /* text inputs */
        .pg_pvtpage_login_form input[type="text"],
        .pg_pvtpage_login_form inputinput[type=password],
        .pg_inline_login_form input[type="text"],
        .pg_inline_login_form input[type="password"] {
            padding: 3px;
            width: 166px;	
        }
         
         
         
        /*********************************
                  LOGOUT BOX
         ********************************/
        .pg_logout_box {
            display: inline-block;
            padding: 2px 5px;	
            border: 1px solid #D3D3D3;
            background-color: #F4F4F4;
            border-radius: 3px;
        } 
         
        
        
        /************************************************
           COMMON REGISTRATION AND CUSTOM FORM ELEMENTS
         ***********************************************/
        
        /* form wrapper style */
        .pg_registration_form,
        .pg_custom_form {
            margin: 0 auto 30px;
            width: 335px;
            padding: 17px;
            border: 1px solid #D3D3D3;
            background-color: #F4F4F4;
            box-shadow:0px 0px 7px rgb(190,190,190);
            border-radius: 4px;
        }
        
        /* required */
        .pg_req_field {
            color: #F30;	
        }
        
        /* form field list */
        .pg_form_flist {
            list-style: none;
            margin: 0;
            padding: 0;	
            clear: both;
        }
        .pg_form_flist li {
            padding: 0;
            margin: 0 15px 15px 0;
            max-width: 320px;
        }
        
        /* label */
        .pg_form_flist li > label {
            display: inline-block;
            padding: 3px 10px 0 0;
            max-width: 130px;	
        }
        .pg_textarea_label {
            padding-right: 10px;
            width: auto;	
        }
        label.pg_textarea_label {
            display: block;
            margin: 0;
            padding: 0;
            width: auto;
        }
        
        /* checkbox wrapper */
        .pg_check_wrap {
            float: right;
            width: 176px;
        }
        
        /* checkbox label */
        .pg_check_wrap .pg_check_label {
            display: inline-block;
            width: 152px;	
            margin: 0;
            padding: 0;
        }
        
        /* single checkbox */
        .pg_check_wrap input {
            vertical-align: top;
            margin: 5px 4px 0 3px;	
        }
        
        /* input, select and textarea format */
        .pg_form_flist input[type=text],
        .pg_form_flist input[type=password],
        .pg_form_flist select {
            width: 166px;
            padding: 3px;
            box-sizing: content-box;
            -ms-box-sizing:content-box;
        
            -moz-box-sizing:content-box;
            -webkit-box-sizing:content-box; 	
            border: 1px solid #ddd;
            float: right;
        }
        .pg_form_flist textarea {
            width: 314px;
            min-height: 65px;
            border: 1px solid #ddd;
            padding: 3px;	
        }
        
        
        /****************************
           SUCCESS AND ERROR MESSAGES
         *****************************/
          
        /* standard form messages */
        .pg_error_mess,
        .pg_success_mess {
            display: block;
            color: #444;
            padding: 3px 5px;
            border-radius: 3px;
            margin-bottom: 7px;
            font-size: 85%;
        }
         
        /* widget form messages */
        .widget .pg_error_mess,
        .widget .pg_success_mess {
            display: block;
            color: #444;
            padding: 2px 3px;
            border-radius: 2px;
            margin-bottom: 7px;
            margin-top: 7px;
            font-size: 95%;
            max-width: 168px;
        }
         
        /* messages color */
        .pg_error_mess {
            border: 1px solid #FFA6A6;
            background-color: #FFCACA;
        }
        .pg_success_mess {
            background-color: #EAF5DC;
            border: 1px solid #BFE098;
        }
        

M) Advanced Uses - top

The plugin comes with some API functions that allow wordpress webmasters to extend to each part of your wordpress theme the user-level authorisation system. Here the list:


N) Localizations - top

The 2.2 version of PrivateContent is translation ready. If a translation of your language has been created, Wordpress will automatically switch between languages.

Create a translation

In the plugin package that you have downloaded from Codecanyon there is a folder called "translation template" with the the default.pot file. It contains all the english elements that have to be translated. If you want to create one in your language follow this steps:

If everything goes right, you will be able to use your translation.

If you create new translations, please, contact me at l.montanari@lcweb.it sending the .PO and .MO files.
I will put it in the new releases and mention you in the changelog. Thanks


Once again, thank you so much for purchasing my plugin. As I said at the beginning, I'd be glad to help you if you have any questions relating to this theme. No guarantees, but I'll do my best to assist. If you have a more general question relating to the PHP scripts on Codecanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

LCweb

Go To Table of Contents