Authors (Paid Addon)

Posted in: Modules and Extensions

The Authors extension allows users to register and manage their profiles and ads in the frontend.

By registering users create a public profile which can be viewed by other users. On the profile page, the user can show his active ads, share information about his company and display a contact form.

Installation and Activation

The first step is to get the Authors zip file. If you have not purchased the extension yet, you can do that there.

Once you have it go to wp-admin / Plugins / Add New / Upload panel and upload it and activate from there.

Configuration

The configuration panel is available in wp-admin / Classifieds / Options / Authors, you should see there a screen similar to the one below.

There are following configuration options:

Default Author Register Page – If you want your Authors to be able to register themselves, then you can select here a default page with [adverts_author_register] shortcode.

By default this page does not exist so you will need to go to wp-admin / Pages / Add New panel create a page from there and make sure to include the [adverts_author_register] shortcode in the content. Finally, you can come back to the Authors configuration and in “Default Author Register Page” select the previously created page.

Default Privacy – Allows you to set default visibility for the Author page after registration. Selecting “private” will make the advert profile hidden and he will need to make it public from the page with [adverts_authors_manage] shortcode in Privacy Settings panel.

Privacy Settings – Checking this checkbox will allow uthe ser to select on registration if his profile should be private or public. If unchecked the the value from Default Privacy will be used.

Default Author Dashboard Page – similarly as above it allows setting a  default page with [adverts_author_manage] shortcode. The [adverts_authors_manage] shortcode allows the user to manage his account (edit profile, manage ads, change the password, delete an account and manage privacy settings).

This page also does not exist by default and you need to create it as explained above and then assign to this field.

Unsigned Users – only logged in users can see the dashboard panel. In this field, you can decide what happens when non-registered user will try to access one of the dashboard panels.

  • will see a login form – the users will see a login form which will allow them to login to the user dashboard.
  • error message with a link to the wp-login page – the users will see a message informing them they need to login to see this page and a link to the default WordPress login form.

The first option might provide much better user experience, but the second one should allow integrating with some social login plugins.

Defaults Values For [adverts_authors_list] – here you can set up default values for the [adverts_authors_list] shortcode.

This shortcode looks and behaves similarly to the [adverts_list] shortcode and uses the same params, so you can find out what all of those options do in the [adverts_list] documentation.

The shortcode itself will be described in more details later in this article.

Shortcodes

The WPAdverts Authors extensions is bundled with a couple of shortcodes you can use (usually) in wp-admin / Pages.

[adverts_authors_list]

this shortcode is pretty similar to the [adverts_list] in terms of look and feel and the accepted parameters.

[adverts_authors_list] in grid mode

[adverts_authors_list] in list mode.

To find out what parameters are available you can simply refer to the [adverts_list] documentation.

This shortcode is using two template files which you can override using adverts_load_template filter:

  • wpadverts-authors/templates/authors-list.php – displays search form and includes the template with individual list items.
  • wpadverts-authors/templates/authors-list-item.php – displays individual listing.

 

[adverts_author_register]

Allows users to register a profile on site.

[adverts_author_register] shortcode.

This shortcode does not have any parameters.

This shortcode is using only the default wpadverts/templates/form.php template file.

[adverts_author_manage]

From the page with this shortcode users can manage their accounts.

[adverts_authors_manage] shortcode showing the user dashboard.

There is a number of items in the menu:

  • Dashboard (name: home) – The user dashboard with some basic information.
  • Create Ad (name: create-ad) – Show the [adverts_add] shortcode and allows to post an Ad from from user dashboard.
  • My Ads (name: my-ads) – The list of user Ads. This page uses [adverts_manage] shortcode.
  • Edit Profile (name: edit-account) – Allows editing user profile.
  • Privacy Settings (name: privacy) – Here user can hide his profile from other users and change his profile page slug.
  • Change Password (name: change-password) – Here user can change his account password
  • Delete Account (name: delete-account) – Here user can delete his account.
  • Logout (name: logout) – Logouts and redirects the user.

The shortcode has the following parameters:

  • panel – (default: home) the panel to show when no panel is selected.
  • show_menu – (default: 1) if you want to hide the menu on the left side then set show_menu to 0.
  • links – (default: null) this param allows selecting which items in the menu you want to show. The list of items should be separated by a comma.

The menu items in the left sidebar can be further extended using filter adverts_authors_dashboard_menu. Adding the items to the menu requires some PHP knowledge. If you are familiar with PHP you can learn how to add, edit and delete the menu items in the Change Author Menu snippet.

This shortcode is using template files which can be changed using adverts_load_template filter:

  • wpadverts-authors/templates/dashboard.php – this is dashboard wrapper, it is being used on all of the pages to display the menu on the left.
  • wpadverts-authors/templates/panel-default.php – this template is used when viewing the Dashboard page.

Example Usage

Dashboard with left menu and Dashboard, My Ads and Logout links only.

[adverts_author_manage show_menu="1" links="home,my-ads,logout"]

 

Widget – Author Menu

If you decide to use the [adverts_author_manage] shortcode with show_menu=0 parameter then you can display the menu in the widget using “Author Menu” widget. You can also use this widget if you would like to have the Author Menu always visible.

Using it is as simple as using any other Widget, just go to wp-admin / Appearance / Widgets panel and add the “WPAdverts Author Menu” widget to the selected sidebar.

It should look like on the image below

Integrations

WPAdverts ReCAPTCHA 

If you have this plugin enabled then from wp-admin / Classifieds / Options / reCAPTCHA panel you can enable reCAPTCHA for the Authors plugin.

You should see there two additional options:

Authors – Register & Profile – allows enabling reCAPTCHA in [adverts_author_register] and in [adverts_author_manage] / Edit Profile panel.

NOTE: If you want to show the reCAPTCHA in the registration form but not when editing a profile then in field “Authors – Register & Profile” select “Enable for Unregistered users“.

Authors – Contact Form – allows enabling reCAPTCHA in the contact form on the Author details page.

 

WPAdverts Custom Fields

If you have this plugin enabled then from wp-admin / Classifieds / Options / Custom Fields panel you can create custom form schemes for:

  • Author – Profile: create advert form visible in [adverts_author_register] and in [adverts_author_manage] / Edit Profile.
  • Author – Search: search form in the [adverts_authors_list] shortcode.
  • Author – Contact: contact form visible on the Author details page.

 

WPAdverts Maps and Locations 

If you have this plugin enabled then the Location field in [adverts_author_register] and [adverts_author_manage] / Edit Profile will behave exactly the same as the location in [adverts_add] shortcode.