Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Guide To
WP Symposium
Pro
From absolute
beginner to expert
WP Symposium Pro v14.12.2.e
Document version: 0.25
www.wpsymposiumpro.com
Simon Goodchild
1
Contents
What is WP Symposium Pro?
Getting WordPress
Getting WP Symposium Pro
WP Symposium Pro Extensions
Support and Help
9
9
10
10
11
Core Features
17
Profile Page
17
Quick Start
17
The Default Profile Page
18
[wps-activity-page]19
Shortcodes
30
[wps-display-name]31
[wps-avatar]32
[wps-avatar-link]33
[wps-activity-post]34
[wps-activity]36
Administration
45
Change Avatar Page
47
Quick Start
47
Shortcodes
48
[wps-avatar-change]48
3
97
109
111
111
112
Core Extensions
113
115
115
117
118
120
121
System Messages
123
Menu Alerts
125
Activity Extensions
127
127
129
Activity attachments
131
Images
131
YouTube videos
132
SoundCloud133
Website link previews
133
Website link previews performance
135
Likes and Dislikes
Shortcode options
Rewards for Likes/Dislikes
Administration
137
138
140
140
Members Extensions
141
Profile Extensions
141
Creating Profile Extensions
142
Showing a Profile Extension
145
[wps-extended]146
Profile Security
Areas of security
Levels of security
147
148
148
Member Directory
Quick Start
Shortcodes
[wps-directory]
[wps-directory-search]
Adding Profile Extensions to the Directory
149
149
150
150
153
155
Default Friends
157
Rewards
159
Quick Start
159
Shortcodes
162
[wps-reward]162
[wps-badge]162
[wps-rewards]163
Administration
163
Image Galleries
167
Quick Start
167
Shortcodes
168
[wps-gallery]168
[wps-gallery-list]
175
[wps-gallery-grid]
176
Administration
178
Groups Extensions
181
Groups181
Quick Start
181
Shortcodes (for Groups page)
182
[wps-group-create]182
6
[wps-groups]183
[wps-my-groups]
185
Shortcodes (for Group page)
186
[wps-group-title]
187
[wps-group-image]
187
[wps-group-description]
187
[wps-group-admin]188
[wps-group-edit]188
[wps-group-delete]190
[wps-group-join-button]190
[wps-group-post]191
[wps-group-activity]191
[wps-group-members]192
[wps-group-id]193
[wps-group-url]193
Administration
194
Default Groups
195
199
199
API Functions
Insert Activity Post
Get user's last active date/time
199
199
200
Index203
Hooks and Filters
216
Change Control
218
What is WP Symposium
Pro?
WP Symposium Pro is a WordPress plugin that will allow you to run
your own social network either as an entire site, or as part of your
site.
If you have a WordPress website, then you are good to go! If you
dont then you will require a self-hosted installation of WordPress.
Getting WordPress
WordPress can be downloaded from http://www.wordpress.org, or
installed with a hosting company.
Whilst out of scope for this book, rest assured that installing
WordPress, especially if via your own hosting company, is a
9
Youll want to get going quickly, and the Getting Started Quickly
chapter of this book will show you how to quickly get your social
network up and running with some basic pages.
However, as you read through the chapters of this book, you will see
that there are hundreds of options available that will allow you to
tailor your social network just how you like it.
For example, you can include:
Helpdesk Support
Available via http://www.wpsymposiumpro.com/helpdesk for
licensed members.
Forums
A general community which is moderated, but priority is given to the
helpdesk. http://www.wpsymposiumpro.com/forums.
12
You may want to add your new pages to your WordPress menu.
Add Forums
You can have an unlimited number of forums, each setup the
following (incredibly easy) way.
On the dashboard menu, go to WPS Pro->Setup and click on Add
Forum.
Enter a name and description, and click on the Publish button.
And, er, thats all there is to that too!
A new WordPress page is created on your site for your new Forum.
You probably want to add your new page to your WordPress site
menu.
Video Tutorials
To supplement this book, there is a growing number of videos, check
them out at http://www.wpsymposiumpro.com/getting-startedvideos.
Blog
All releases come with release notes, the latest of which is available
via your admin dashboard, WPS Pro->Release Notes.
Previous release notes, tips and articles are all added to the WP
Symposium Pro blog at http://www.wpsymposiumpro.com/blog.
Mailing List
Every article is also published via a mailing list. I recommend you
subscribe so you are automatically informed of new releases,
features and articles. Simply go to the blog page above, and down
the side of the page pop in your email address (after logging in).
Style Guide
Code within the book is shown in a fixed width font, for example:
[wps-activity-page user_avatar_size="200"]
16
Core Features
Profile Page
The profile page is the users main page, or home page if you like.
Its where the go by default to see their activity, their friends activity
and if you want, where they can go to edit the profile, change their
avatar (their user picture), accept friendship requests and so on.
Because WP Symposium Pro is so flexible, you get to choose what
appears on their profile page, so we will go through from creating a
basic page, to a more complex one.
Quick Start
The quickest way to create your profile pages is to go to WPS Pro>Setup and click on the Add Profile Pages button. This will create
4 pages:
Profile page
17
all the users activity posts, and their friends activity posts
It gets things up and running straight away, with a profile page that
looks something like this:
[wps-activity-page]
This shortcode will display the default profile page, as discussed
above. It gets you going, but can be replaced with other
shortcodes that then give you more control over all the elements of
your profile page.
19
All shortcodes have options, some more and some less. The
following options can be added to the [wps-activity-page] shortcode
as follows.
Lets take the first option, user_avatar_size, which allows you to
change the size of the users avatar on the page (the users picture,
which they can change). Edit the default profile page and replace
whats there with the following:
[wps-activity-page user_avatar_size="200"]
You will see that the avatar has increased in size (from the default of
150) to 200 x 200 pixels. Play around and try other values.
In fact, the best way with all the options shown below, and with all
shortcodes, is to play! As another example, lets change the size
of the Google map, and switch it from a static image to a more
dynamic version:
[wps-activity-page user_avatar_size="200" map_size="200,200"
map_style="dynamic"]
Notice that we can use more than one shortcode option at a time.
20
If you look at the previous screenshot, youll see that the user avatar
and map are bigger (by 50 pixels), and the style of the map is one
that you can zoom in and out of (but includes the other overlays that
perhaps you dont want).
Remember, to the right of the town/city and country, friendship
requests will appear, so be sure to send your user a friendship
request and check the layout is still ok! If you are using a wider
screen layout, then you should be okay.
Dont worry, with the other shortcodes available, you are not limited
to this layout, and can choose what goes where!
So here are the options for [wps-activity-page].
Shortcode Options
user_avatar_size
Default: 150
map_size
Default: 150,150
map_style
Default: static
map_zoom
Default: 4
town_label
Default: Town/City
country_label
Default: Country
user_id
Default: false
mimic_user_id
Default: false
For every shortcode discussed in this book, all relevant hooks and
filters and covered, with as many examples as make sense. For this
first section, there is additional help for those that have never used a
hook or filter.
wps_display_name
whenever users display name is shown.
output that will be displayed for the display name
So, first things first. We need to add some code that will receive the
display name, do something, and then return it so it can be finally
displayed.
Now, you will need to contact the company that hosts your website,
and ask for FTP details, and how you can connect to your website
using an FTP application. They should help you out, and after
being helped by them, you will be able to connect to your site and
download/upload files.
I would suggest you download the following file:
wp-content/themes/[your-theme]/functions.php
23
The actual path will differ, and your theme will have its own name,
not [your-theme]!
The functions.php file is a file that you can edit, and add code to.
This is where we are going to add code to use the filter.
So, once youve downloaded it, edit it with a suitable application.
There are many, but avoid word processors! Here are a couple of
suggestions, both of which are free:
https://www.editplus.com (Windows)
http://www.sublimetext.com (Mac)
After editing it, with either the examples, or your own code, you can
then re-upload and your website will apply your code.
Keep a copy of your changes, for when you update your theme!
So, we are going to use the wps_display_name filter, and as
mentioned it takes one parameter. So the first thing we must do,
using our editor, is add the following to the top of functions.php.
Because this is PHP code, it must be added after the <?php on the
first line, so start on the second line, adding the following:
add_filter('wps_display_name','my_function',10,1);
Here, you are saying, whenever WP Symposium Pro allows you to,
via the wps_display_name filter, you are going to do something,
using your own function, in this case one called my_function.
The two number on the end represent the priority that your function
will take, 10 being a good default. You can increase the priority by
reducing the number, so 1 would be the highest priority.
The 1 at the end, represents how many parameters is passed from
the filter to your function. Looking at the reference list, the wps_
display_name filter has 1 parameter, which is the display name about
to be displayed.
So our function, which you can put after the previous line of code
would be:
24
function my_function($a) {
// code goes here
return $a; // return $a filtered with the code above
}
The function receives the parameter (ie. the display name), doesnt
do anything (yet!) and then returns it.
If you save your new functions.php file and upload it via FTP back
from where it came, and visit your sites profile page, youll not see
anything new. So lets do something!
Lets say we want to show the display name in a blue box. Not likely,
and probably something you would do with CSS, but its a good
example to work with. Change your function to the following:
function my_function($a) {
$div = '<div style="background-color:#aaf">';
$div .= $a;
$div .= '</div>';
return $div; // return $a in a light blue box
}
Now if you visit your profile page (after uploading your functions.php
file), you will see every display name shown in a blue box - in fact
right across your site!
25
add_filter('wps_display_name','my_function',10,1);
function my_function($a) {
$div = '<div style="background-color:#aaf">';
$div .= $a;
$div .= '</div>';
return $div; // return $a in a light blue box
}
wps_activity_pre_filter
Filter
before all activity
$a
$b
$c
$d
The following example will add a message above the activity stream.
add_filter('wps_activity_pre_filter','my_function',10,4);
function my_function($a,$b,$c,$d) {
$a .= '<p>Do no post anything racist or sexist</p>';
return $a;
}
wps_activity_items_filter
Filter
after creating array of all activity to show
26
$a
$b
$c
$d
wps_activity_single_item_filter
Same as wps_activity_items_filter, but when viewing a single activity
item. Perhaps from a link sent out in an email alert.
wps_activity_item_settings_filter
Filter
after content of settings box has been set
$a
$b
$c
$d
$e
This is actually a very useful way to put some content at the top of
every activity item on the users activity page.
27
This example targets user with ID 5, reminding them that they need
to pay their bill with an annoying message until they do!
add_filter('wps_activity_item_settings_filter','my_
function',10,5);
function my_function($a,$b,$c,$d,$e) {
if ($d == 5)
$a .= 'This message will be removed when you pay your
bill!';
return $a;
}
wps_activity_item_meta_filter
Filter
after an activity items meta information
$a
$b
$c
$d
$e
wps_activity_item_filter
Filter
at the end of the activity item
$a
$b
$c
$d
$e
$f
$g
28
wps_activity_comment_meta_filter
Filter
at the start of the activity item, prior to the comment
$a
$b
$c
$d
$e
$f
wps_activity_post_comment_filter
Filter
at the end of the activity item, after the comment
$a
$b
$c
$d
$e
$f
wps_activity_new_comment_filter
Filter
after the form for a new comment
$a
$b
$c
$d
$e
29
wps_activity_init_hook
Hook
prior to any activity shortcode
Before any WP Symposium Pro shortcode is interpreted, an
initialisation function is called that sets up Javascript and CSS. The
function is called to avoid loading unnecessary Javascript and CSS
where shortcodes are not used.
What it does mean is that you can also hook into the initialisation
routine. For example, if you want to be sure you loaded another
Javascript file whenever activity shortcodes are used, you would do
the following:
add_action('wps_activity_init_hook', 'my_function');
function my_function() {
wp_enqueue_script('my-js, 'path/to/my.js',
array('jquery'));
wp_enqueue_style('my-css', 'path/to/my.css', 'css');
}
Shortcodes
Whilst the [wps-activity-page] is a great way to get started, you will
soon want to start making your own profile page. To do so, you will
replace [wps-activity-page] with a number of individual profile page
related shortcodes, which are described now.
After covering all the relevant shortcodes, we will go on to explain
methods for laying out your profile page, techniques that can be
used to layout any WP Symposium Pro page and a full example.
That discussion will also include the use of widgets, to display (just
as an example, the users avatar down the side of your site).
For now, I would suggest that you simply trying putting the following
shortcodes on a page and playing with the options so you can
understand what is possible, and then move on to laying things out.
30
[wps-display-name]
This shortcode will display the user's display name, as set on the
Edit Profile page.
In its simplest form, simply add the following to a WordPress page:
[wps-display-name]
As with all the shortcodes for WP Symposium Pro, there are options
you can use to tailor the output. The options will range in the
complexity, and for this shortcode they are faily simple.
Shortcode Options
user_id
Default: false
link
Default: true
before/after
Default: false
To use the shortcode options, include them in your shortcode as in
the following example:
[wps-display-name link="1"]
The above will show the display name, but it will also be a link to the
profile page. If being used on a profile page, you are unlikely to set
link to be "1", but there may be other situations when it is required.
The options can be combined too, for example, the following will
show the display name for user 99, and as a link to their profile page:
[wps-display-name user_id="99" link="1"]
[wps-avatar]
WordPress will tend to use avatars for your users from its
www.gravatar.com service. You can always change that via the
admin dashboard->Settings->Discussion.
However, in a social network, users will expect to be able to upload
a picture to use as their own avatar. How they do that is through the
use of the [wps-avatar-change] shortcode. This shortcode is used to
display their avatar.
Shortcode Options
size
Default: 256
change_link
Default: false
profile_link
Default: true
user_id
Default: false
before/after
Default: false
So, for example, to show the current users avatar, you would add
the following to a WordPress page:
[wps-avatar size="128"]
A more advanced example, setting the size, and using before and
after with HTML to float the avatar to the right of the screen:
[wps-avatar size="128" before="<div style='float:right'>"
after="</div>"]
32
Instead of using before and after, you can enter HTML straight into
the text editor, this is a recommended approach if you are more
familiar with coding.
Dont forget to always use the Text view of the editor.
So, to repeat the above, using HTML directly, you would enter the
following into the text editor:
<div style="float:right">[wps-avatar size="128"]</div>
As you will see later, when we create a custom profile page, the
above technique tends to be used, as it is a more familiar way for
those that already code.
With clever use, you can create an amazing profile page for your
social network that will be completely unique!
[wps-avatar-link]
This simple shortcode will display a link to your change avatar page.
You will more than likely have your change avatar page on your
menu, and/or use the link provided with [wps-avatar-link].
However, you may want to provide a link elsewhere, which can be
achieved with this shortcode.
33
Shortcode Options
text
Default: string
before/after
Default: false
So, for example, to show the link but change the text, you would use
the following:
[wps-avatar-link text="Change your avatar picture..."]
[wps-activity-post]
This shortcode will dislay an area that a member can post something
on to their activity, sometimes referred to as status, but can be
anything they want.
Their are extensions available to enhance the basic operation, refer
to the Extensions Plugin chapters for more information.
However, in its basic form, it provides a text box area that members
can type into, and add to their activity:
34
After clicking on Add Post, the page refreshes, and the activity will
appear.
All friends of this user will also see the activity post on their profile
page.
Shortcode Options
class
Default: false
label
Default: string
private_msg
Default: string
account_closed_
msg
Default: string
user_id
Default: false
before/after
Default: false
Using some of the above as an example, you could add a class and
change the button label as follows:
[wps-activity-post class="my_class" label="Add Status"]
35
The following example will add a message above the new activity
post box:
add_filter('wps_activity_post_pre_form_filter','my_
function',10,4);
function my_function($a,$b,$c,$d) {
$a .= '<strong>Nothing rude please!</strong>';
return $a;
}
[wps-activity]
This powerful shortcode displays all the activity of a member (their
activity stream), and any other activity posts of other members that
they have permission to view.
For example, you can see other friends activity.
In addition to showing the activity post, members can then also
comment on the post.
When an activity post has a comment added to it, it will move to the
top of the activity stream (as most recently active).
The user, or site administrator, can delete a post and its associated
comments by hovering over the settings icon (wrench) and choosing
Delete. A member can also hide another members post.
Users can also choose to make a post stick to the top of their
activity stream, perhaps because its particularly important. This is
36
Shortcode Options
avatar_size
Default: 64
comment_avatar_
size
Default: 40
count
Default: 100
37
get_max
Default: 100
more
Default: 50
more_label
Default: string
hide_until_loaded
Default: false
comment_size
Default: 5
comment_size_
text_singular
comment_size_
text_plural
Default: string
label
Default: string
class
Default: string
38
link
Default: true
delete_label
Default: string
sticky_label
Default: string
unsticky_label
Default: string
hide_label
Default: string
allow_replies
Default: true
date_format
Default: %s ago
include_self
Default: true
include_friends
Default: true
post_id
Default: false
user_id
Default: false
39
mimic_user_id
Default: false
private_msg
Default: string
not_found
Default: string
before/after
Default: false
The following example will display the activity stream, changing the
size of the post avatar and comment avatar.
[wps-activity avatar_size="128" comment_avatar_size="64"]
The following example will add a message above the new activity
post box:
add_filter('wps_activity_pre_filter','my_function',10,4);
function my_function($a,$b,$c,$d) {
$a .= '<strong>This is your activity stream</strong>'t;
return $a;
}
40
wps_activity_items_filter
Filter
after creating array of activity posts, can be used to
add further items to the array
$a
$b
$c
$d
wps_activity_single_item_filter
Filter
after creating an array, of one row, when viewing a
single activity post.
$a
$b
$c
$d
41
return $a;
wps_activity_item_setting_filter
Filter
before end of settings DIV on activity
$a
$b
$c
$d
$e
This filter would allow you to add additional items to the settings box
that appears when the settings icon (wrench) is hovered over.
add_filter('wps_activity_item_setting_filter','my_
function',10,5);
function my_function($a,$b,$c,$d,$e) {
$a .= ' HERE';
return $a;
}
wps_activity_item_settings_filter
Filter
after end of settings DIV on activity
$a
$b
$c
$d
$e
settings HTML
array of the shortcode options
an object of the activity item
ID of the user whose page it is
ID of the user who is logged in
This filter will add content after the settings DIV and will appear
outside of the DIV. By default content will therefore appear above the
name of the activity post author.
add_filter('wps_activity_item_settings_filter','my_
function',10,5);
function my_function($a,$b,$c,$d,$e) {
$a .= 'HERE';
return $a;
}
wps_activity_item_meta_filter
Filter
after an activity items meta information
42
$a
$b
$c
$d
$e
wps_activity_item_filter
Filter
at the end of the activity item
$a
$b
$c
$d
$e
$f
$g
wps_activity_comment_meta_filter
Filter
at the start of the activity item, prior to the comment
$a
$b
$c
$d
$e
$f
wps_activity_post_comment_filter
Filter
at the end of the activity item, after the comment
$a
$b
$c
$d
$e
$f
wps_activity_new_comment_filter
Filter
after the form for a new comment
$a
$b
$c
$d
$e
wps_activity_init_hook
Hook
prior to any activity shortcode
Before any WP Symposium Pro shortcode is interpreted, an
initialisation function is called that sets up Javascript and CSS. The
function is called to avoid loading unnecessary Javascript and CSS
where shortcodes are not used.
What it does mean is that you can also hook into the initialisation
routine. For example, if you want to be sure you loaded another
Javascript file whenever activity shortcodes are used, you would do
44
the following:
add_action('wps_activity_init_hook', 'my_function');
function my_function() {
wp_enqueue_script('my-js', 'path/to/my.js',
array('jquery'));
wp_enqueue_style('my-css', 'path/to/my.css', 'css');
}
Administration
Once the WP Symposium Pro plugin is activated, a new menu item
is available in the WordPress admin dashboard, called WPS Pro. As
features are added, with the WP Symposium Pro Extensions plugin,
further sub menu items will appear.
In addition, global settings can be found on the WPS Pro->Setup
page.
So, for the profile page global settings, go to WPS Pro->Setup and
scroll down the page to where the black bars are shown. One of
them will have Profile Page as its title.
To display the options available, click on the black bar and it will
extend downwards. This is the same for all the various settings.
The set of drop down lists is where you would tell WP Symposium
Pro which WordPress pages you are using for the profile page, edit
profile page and change avatar page.
The first drop-down, Profile Page, is relevant to the profile page and
the shortcodes covered in this chapter. The Edit Profile Page dropdown list refers to those shortcodes in the Edit Profile chapter, and
the same for the Change Avatar Page.
If you used the quick start Add Profile Pages button (at the top of
the same screen) then these will be automatically set for you.
If you manually created the WordPress pages, you should set the
pages as applicable.
45
46
Quick Start
If you followed the quick start for the Profile Page, this page will
automatically be created for you, with the default shortcode added
to it, and the page set up in WPS Pro->Settings->Profile Page.
However, as with all WP Symposium Pro shortcodes, there are
options that allow you to tailor how the shortcode works, to help
match your site.
Note that, covered in the Profile Page chapter, the [wps-avatar-link]
shortcode will show a link to the members change avatar page.
47
Shortcodes
[wps-avatar-change]
Via WPS Pro->Setup->Profile Page you should, and hopefully have,
set the page that you are using to allow users to upload, and crop,
an avatar.
This shortcode should be used on that page, which prompts the
user to upload an image, and then allows them to (optionally) crop
the image.
Shortcode Options
choose
Default: string
try_again_msg
Default: string
file_types_msg
Default: string
not_permitted
Default: string
label
Default: string
48
crop
Default: true
49
50
Quick Start
If you followed the quick start for the Profile Page, this page will
automatically be created for you, with the default shortcode added
to it, and the page set up in WPS Pro->Settings->Profile Page.
Like all WP Symposium Pro shortcodes, there are options that allow
you to modify how the shortcode works.
51
Shortcodes
[wps-usermeta-change]
Via WPS Pro->Setup->Profile Page you should, and hopefully have,
set the page that you are using to allow users to edit their profile.
This shortcode should be used on that page, which allows the user
to edit information on their profile.
Shortcode Options
class
Default: ''
label
Default: string
town
Default: string
country
Default: string
display_name
Default: string
password
Default: string
password2
Default: string
52
password_msg
Default: string
email
Default: string
user_id
Default: false
meta_class
Default: string
The following example will add an additional form field that the user
can fill in on the Edit Profile page.
add_filter('wps_usermeta_change_filter','my_function',10,3);
function my_function($a,$b,$c) {
$value = get_user_meta( $c, 'my_field', true );
$a .= '<div class="wps_usermeta_change_item">';
$a .= '<div class="wps_usermeta_change_label">My Field</
div>';
$a .= '<input type="text" name="my_field"
value="'.$value.'" />';
$a .= '</div>';
return $a;
}
53
wps_usermeta_change_hook
Hook
used to save the edit profile form
$a
$b
$c
$c
[wps-usermeta]
With this shortcode, you can display any "user meta" field that has
been entered. You will need to use it with the shortcode options.
user_id
Default: false
label
Default: ''
Shortcode Options
54
before/after
Default: false
meta
Default: wpspro_
home
wpspro_home
Displays the town/city of the user.
wpspro_country
Displays the country of the user.
wpspro_map
Displays a google map, based on the town/city and country
values entered. The map is only shown if both fields have
been entered by the user. There are then further map
specific shortcode options:
size
map_style
zoom
This shortcode also supports the custom profile fields that you add
with the Profile Extensions plugin, part of the WP Symposium Pro
Extensions plugin.
It can also be used with the wps_usermeta_change_filter and wps_
usermeta_change_hook, if you have custom coded an additional
profile field.
The use of Profile Extensions is covered in a later chapter, but using
55
[wps-usermeta-change-link]
Displays a link to the edit profile page. If added to the profile page
will only be shown if the user logged in, is viewing their own profile
page.
Shortcode Options
text
Default: string
user_id
Default: false
before/after
Default: false
[wps-usermeta-button]
If you want to display buttons on your profile page that go to a URL,
passing the user's ID as part of the querystring, then this is the
shortcode to use.
Shortcode Options
user_id
Default: false
url
Default: ''
56
value
Default: string
class
Default: ''
before/after
Default: false
For example, let's say you want to have a button that linked to a
page on your site that displayed that user's photo galleries (using the
Gallery extension from the WP Symposium Pro Extensions plugin).
On www.wpsymposium.pro, the URL your would want is:
http://www.wpsymposiumpro.com/gallery/?user_id=3
[wps-close-account]
It's important to say that deleting users from your site is not a good
idea when so much data on a social network is related to users. It
can cause broken links, etc.
This shortcode will allow users to close an account - it anonymises
their account, removes their avatar, display name, email address
(etc) and de-activates all email alerts, but will ensure that links from
data that they've created (forum posts, etc) are not broken.
Once a user has closed an account, they cannot reopen it. However
site administrators can do as discussed in the administration section
below.
57
Shortcode Options
are_you_sure_text
Default: string
logout_text
Default: string
label
Default: string
class
Default: ''
url
Default: '/'
before/after
Default: false
58
Administration
Note that after closing, the account is anonymised, any user meta
information (such as profile extensions) and their avatar is removed.
This cannot be undone.
A closed account can be re-opened, but it does not restore the
associated information for the user, as closing account must remove
this to adhere to applicable Data Protection Acts.
Site administrators can close a user's account by editing the user via
the admin dashboard (Users->Edit User).
Towards the edit of the user profile is a checkbox that, if ticked, will
close the user's account.
Also via the same Edit User screen, as a site administrator, you can
update the town/city and country fields.
You can also replace their avatar (perhaps their chosen one wasn't
suitable!).
59
60
Friends Page
A social network is all about making friends!
Quick Start
If you set up your site following the quick start process for the Profile
page, you will already have one.
If not, create a new WordPress page, add the shortcode [wpsfriends] and add it to your menu.
There are a number of shortcodes available to display friends, and
allow your users to make friends.
It's important to make your site as easy as possible for user's to
make friends, and so you should read through all the available
shortcodes and their options. Generally, clicking on a user's link will
go to their profile page where they should be able to make friends.
61
Shortcodes
[wps-friends]
This is the basic shortcode that displays a user's set of friends on
the site. From the list, the can choose to "unfriend" or visit that
user's own profile page.
Shortcode Options
user_id
Default: false
count
Default: 10
size
Default: 64
link
Default: true
show_last_active
Default: true
last_active_text
Default: string
last_active_format
none
Default: string
layout
Default: 'list'
before/after
Default: false
To display the list of friends for a user, you would put the following
shortcode on a WordPress page, setting the maximum number to
100:
[wps-friends count="100"]
[wps-friends-pending]
Displays the pending friendship requests, from which the user can
choose to Accept or Reject. Putting this shortcode above [wpsfriends] is a good place.
Shortcode Options
user_id
Default: false
count
Default: 10
size
Default: 64
63
link
Default: true
class
Default: ''
accept_request_
label
Default: string
reject_request_label Text for the "Reject" button.
Default: string
none
Default: ''
before/after
Default: false
To display up to 25 pending friendship requests:
[wps-friends-pending count="25"]
[wps-friends-status]
Displays the friendship status between the currently logged in user,
and the user who is being viewed. Good idea to add this to the
profile page.
Shortcode Options
user_id
Default: false
friends_yes
Default: string
64
friends_pending
Default: string
friend_request
Default: string
friends_no
Default: string
before/after
Default: false
So, to display the status of the "friendship" between the currently
logged in user, and the user whose profile page is being viewed, you
simply add the following to the profile page:
[wps-friends-status]
[wps-friends-add-button]
For the currently logged in user, and the user who is being viewed
(their profile page), this shortcode will display a button making it
quick and easy to request to be friends, cancel, etc.
Shortcode Options
user_id
Default: false
label
Default: string
cancel_label
Default: string
65
cancel_request_
label
Default: string
class
Default: ''
before/after
Default: false
To display a friendship button, which will change according to the
two user's friendship status, add the following to a profile page:
[wps-friends-add-button]
Administration
Via WPS Pro->Setup->Friendships you can set it that all members of
the site are automatically friends with every other member.
If set, they can't remove friendships. It is an option that is ideal for
a social network where you know that all members are likely to be
friends in real life and avoids the "making friends" process.
66
Alerts
Through WP Symposium Pro alerts, users can be notified of all sorts
of things, whether friendship requests or new posts on their activity.
As you add more features with the WP Symposium Pro Extensions
plugin, they will receive alerts for all sorts of things, from forum
subscriptions to Private Message alerts.
Most of the work of the alerts is behind the scene, however there is
one shortcode that can also be used to good affect in themes, all of
which is covered below.
Users can choose whether or not to receive email alerts regarding
activity posts via their Edit Profile page.
Quick Start
To make a page showing all a user's alerts, create a WordPress page
and put the [wps-alerts-activity style="list"] shortcode on it. Then
67
Shortcodes
[wps-alerts-activity]
Displays all the alerts that have been sent to the user, whether or not
they have chosen to receive alerts via email.
By default this is shown as a drop down list. Remember, all WP
Symposium Pro shortcodes can be used in a Text/HTML widget,
which is ideal in this case.
Shortcode Options
style
Default: dropdown
Default: 24
flag_unread_size
Default: 10
flag_unread_top
Default: 6
flag_unread_left
Default: 8
68
flag_unread_radius
Default: 8
flag_url
Default: ''
Mandatory
flag_src
Default: ''
recent_alerts_text
Default: string
no_activity_text
Default: string
select_activity_text
Default: string
make_all_read_text
Default: string
delete_all_text
Default: string
date_format
Default: false
69
To show the alerts as a list, you would use the style option:
[wps-alerts-activity style="list"]
You can also use your own icon by setting the flag_src option, eg:
[wps-alerts-activity style="flag"
flag_src="/path/to/icon.png"]
70
Note that the function name uses underscores and not hypens. So
the shortcode is [wps-alerts-activity] and the PHP function is wps_
alerts_activity.
You pass shortcode options as an array via PHP, the above, laid out
to see, is as follows:
echo wps_alerts_activity(array(
'style'=>'flag',
'flag_url'=>'/alerts'
));
If not passing any parameters, you should still pass an empty string:
echo wps_alerts_activity('');
You can also show an icon alert for pending friendship requests as
follows:
echo wps_alerts_friends(array('flag_url'=>'/friends'));
and if you are using the Private Messaging extension, you can
display an icon alert for unread messages too:
echo wps_alerts_mail(array('flag_url'=>'/mail'));
Administration
You can review all the alerts that are due to be sent out via WPS Pro>Alerts. Against each alerts will be the status of the alerts, whether
it is "pending" (waiting to be sent), when it was sent, or if not sent
successfully, the reason why.
You can clear out your alerts using the links above them.
Alerts are sent out at a schedule and quantity that you set. This
schedule is set via WPS Pro->Setup->Alerts.
Disable Alerts
Switch off alerts completely.
71
72
Forums
WP Symposium Pro supports unlimited forums, and setting them up
couldn't be easier. The WP Symposium Pro Extensions plugin adds
a wealth of additional features that you can refer to in later chapters
of this book.
Quick Start
To add a forum, go to WPS Pro->Setup and click on the "Add
Forum" button. You will see two fields that you can fill in, and then
click the Publish button. For example:
73
This will create the forum, and add a new WordPress page. You will
be prompted to add this to your WordPress menu, which is probably
a good idea so your users can find the forum!
Shortcodes
[wps-forum-page]
If you did the quick start, your new WordPress page will have the
shortcode above. This shortcode will do everything that is needed
to get you up and running. It has some options that you can use to
tailor the output, but the real power is with the following shortcodes.
Shortcode Options
slug
Default: none
show
Default: false
header_title
Default: string
header_count
Default: string
header_last_activity
Default: string
74
base_date
Default: post_date_
gmt
For example, will change the heading strings, changing from Topics
and Replies:
[wps-forum-page header_title="Questions" header_
count="Answers"]
[wps-forum-post]
This shortcode will show the "add new post" form, allowing user's to
add a topic to your forum.
Shortcode Options
slug
Default: none
show
Default: false
class
Default: ''
title_label
Default: string
75
content_label
Default: string
label
Default: string
moderate
Default: false
moderate_msg
Default: string
locked_msg
Default: string
private_msg
Default: ''
before/after
Default: false
So, for example, you could use the shortcode as follows in it's basic
form, replacing ??? with your forum slug:
[wps-forum-post slug="???"]
[wps-forum]
This is the main shortcode for display a forum, and has a lot of
options!
You would probably put this shortcode straight after [wps-forumpost] on your WordPress page.
76
closed_switch
Default: ''
closed_switch_msg
Default: string
show_header
Default: true
show_closed
Default: true
show_count
Default: true
show_freshness
Default: true
show_last_activity
Default: true
show_comments_
count
Default: true
77
private_msg
Default: string
login_url
Default: ''
secure_msg
Default: string
empty_msg
Default: string
pending
Default: string
comment_pending
Default: string
closed_prefix
Default: string
header_title
Default: string
header_count
Defaults to "Replies".
Default: string
header_last_activity
Default: string
moved_to
Default: string
78
date_format
Default: string
count
Default: -1
reply_icon
Default: true
title_length
Default: 50
base_date
Default: post_date_
gmt
before/after
Default: false
So in its simplest form, you would use the shortcode thus,
substituting ??? with the slug of your forum:
[wps-forum slug="???"]
79
pagination_top
Default: true
pagination_bottom
Default: true
page_size
Default: 10
page_x_of_y
Default: string
post_deleted
Default: string
secure_post_msg
Default: string
timeout
Default: 120
show_comments
Default: true
show_comment_
form
Default: true
allow_comments
Default: true
comment_class
Default: ''
comments_avatar_
size
Default: 48
private_reply_msg
Default: string
As the options for viewing a single post are shared within the same
shortcode as viewing a forum, you can combine options:
[wps-forum slug="???" page_size="20"]
$_POST as submitted
$_FILES as submitted
ID of the post that was deleted
Allows you to act upon the deletion of a forum post, for example,
the following will email the site administrator. Deleted posts go into
Trash, in case they need to be recovered.
add_action('wps_forum_post_delete_hook','my_function',10,3);
function my_function($a,$b,$c) {
$the_post = get_post($c);
wp_mail(
get_bloginfo('admin_email'),
'Deleted Post',
$the_post->post_title.' ('.$c.') deleted'
);
}
wps_forum_post_name_filter
Filter
filter for the forum name
81
$a
$b
As a simple example, this will append the word "FORUM" to the end
of all forum names.
add_filter('wps_forum_post_name_filter','my_function',10,2);
function my_function($a,$b) {
$a .= " FORUM";
return $a;
}
wps_forum_post_item
Filter
filter for the forum row
$a
For example, the following will simplify to the title of the topic:
add_filter('wps_forum_post_post_title_filter','my_
function',10,4);
function my_function($a,$b,$c,$d) {
$a = '<p style="font-size:4em;">'.$b->post_title.'</p>';
return $a;
}
82
wps_forum_item_content_filter
Filter
after every post content for the topic (post, replies
and comments).
$a
$b
HTML generated
an array of the shortcode options
HTML generated
an array of the shortcode options
the comment object
the comment content
83
Again, this would normally be done with CSS, but it illustrates how
the filter can be used.
wps_forum_post_comment_filter
Filter
after every reply, including the comments.
$a
$b
$c
$d
HTML generated
the comment object
an array of the shortcode options
the ID of the current logged in WordPress user
To style all reply areas with a light red background, you could:
add_filter('wps_forum_post_comment_filter','my_
function',10,4);
function my_function($a,$b,$c,$d) {
$a = '<div style="margin-top: 6px; backgroundcolor:#ef9f9f; padding: 0 8px 0 8px;">'.$a.'</div>';
return $a;
}
wps_forum_post_comment_filter
Filter
as above, for pending replies.
[wps-forum-comment]
This shortcode displays the fields to reply to a forum post, and
is normally added to a WordPress page below the [wps-forum]
shortcode.
84
content_label
Default: string
label
Default: string
moderate_msg
Default: string
locked_msg
Default: string
private_msg
Default: ''
moderate
Default: false
moderate_msg
Default: string
close_msg
Default: string
comments_closed_
msg
Default: true
reopen_label
Default: string
85
allow_private
Default: true
private_msg
Default: string
class
Default: ''
show
Default: true
before/after
Default: false
For example:
[wps-forum-comment slug="???" allow_private="0"]
86
wps_forum_comment_pre_form_filter
Filter
after the text area.
$a
$b
$c
[wps-forums]
If you have multiple forums set up, this shortcode will provide you
with an overview of all the forums, with a variety of options to tailor
the output. For example, visit www.wpsymposiumpro.com/forums to
see how it is used on the WP Symposium Pro website.
Shortcode Options
slug
Default: none
show_header
Default: true
show_count
Default: true
show_freshness
Default: true
show_last_activity
Default: true
forum_title
Default: string
forum_count
Defaults to "Count".
Default: string
forum_freshness
Defaults to "Freshness".
Default: string
forum_last_activity
Default: string
base_date
Default: post_date_
gmt
no_indent
Default: true
level_0_links
Default: true
before/after
Default: false
show_posts
Default: 0
show_summary
Default: 0
count_include_
replies
Default: true
title_length
Default: 50
header_title
Defaults to "Topic".
Default: string
header_count
Defaults to "Replies".
Default: string
header_last_activity
Default: string
A simple way to mimic the WP Symposium Pro website forums page
is to use this shortcode with the following options. You would create
a new WordPress page, use add the following shortcode, and add
the page to your WordPress menu:
[wps-forums show_header="0" show_posts="3" show_summary="0"]
[wps-forum-backto]
A simple shortcode that provides a link back to the main forum
page.
Shortcode Options
slug
Default: none
90
label
Default: string
before/after
Default: false
So to use, you would add the following to your forum page. You can
add it more than once if you like, and the top and/or bottom of the
page. ??? would be replaced by your own forum slug.
[wps-forum-backto slug="???"]
[wps-forum-show-posts]
To counter the previous simple shortcode, this final forum shortcode
has lots of options. However, it is powerful and will allow you to
display forum activity elsewhere on your site, whether as part of a
WordPress page, or in a Text/HTML widget.
Although you can tailor it to display other output, it is primarily
designed to show recent forum activity, whether in columns (which
are optionally shown) or as a summary.
Shortcode Options
slug
Default: none
91
order
Default: date
orderby
Default: DESC
max
Default: 10
status
Default: ''
include_posts
Default: true
include_replies
Default: true
include_comments
Default: false
include_closed
Default: true
closed_prefix
Default: string
show_author
Default: true
author_format
Default: string
92
author_link
Default: true
show_date
Default: true
date_format
Default: string
show_snippet
Default: true
title_length
Default: 50
snippet_length
Default: 30
base_date
Default: post_date_
gmt
before/after
Default: false
summary
Default: false
summary_format
Default: string
summary_started
Default: string
Defaults to "started".
93
summary_replied
Default: string
summary_
commented
Default: string
summary_title_
length
Default: 150
summary_
snippet_length
Default: 50
summary_avatar_
size
Default: 32
summary_show_
unread
Default: true
A popular use of this shortcode is in it's summary format, eg:
[wps-forum-show-posts summary="1"]
which would display the following (in this case in a Text widget):
94
This filter can be used to alter the HTML of each forum post
generated. A simple example will add a <hr> tag after each.
add_action('wps_forum_get_post_item','my_function',10,1);
function my_function($a) {
$a .= '<hr />';
return $a;
}
Administration
There are two areas on the WordPress admin dashboard related to
forum administration.
The best is WPS Pro->All Forums, on which you can see all your
forums and high level permissions. If you are using the Forum
95
96
97
98
Did I hear you say Yikes (or worse)! If so, it probably looks like a
jumbled mess, don't panic! If not, you may well be familiar with
HTML and styling. Either way, good for you, at least you're following
things so far!
For those new to the above, let's take a step back and explain
(others who recognise the above can skip on a few paragraphs).
With web pages <something> tells the browser to do something,
99
Couple of points. First, trust me on the overflow and move on. And
second, note that the spelling is American English, so color must be
spelt like that, and not, as I would tend to do, spell it colour. Yes, I'm
English...
For each of the above we are adding a value, as follows:
margin-bottom
padding
border-radius
background-color
overflow
15 pixels (px)
top and right 6px, bottom 0px, left 12px
3 pixel (px) radius
#CCCCFF
auto
frame, and the four values represent top, right, bottom and left in
that order. Picture a clock hand going round - in that direction.
border-radius will make the corners round, in this case with a radius
of 3 pixels, and subtle corner. Try making it a bigger number and see
what happens!
background-color is set to #CCCCFF. What the??? This is a
hexadecimal code that represents a colour. Not much clearer eh?!
It will be quicker if you take a look at http://www.w3schools.com/
tags/ref_colorpicker.asp and pick colours at random. See how the
"hexadecimal" value changes? If you find one you like, you can
replace #CCCCFF with your own colour.
If there is one thing I want to get across is this ... play!! Mess
around, you can't damage anything and you can always start again.
Seriously, play!
Right, so on your WordPress page you should have the following:
<div id="my_profile_header" style="margin-bottom:15px;
padding: 6px 6px 0 12px; border-radius: 3px; backgroundcolor:#ccf; overflow: auto;">
</div>
101
It might not seem much, but that thin blue "box" is what you've
added, and now we can add in the rest of the information.
Let's do the avatar next, popping it over to the right of the blue box.
Put the following in between the first long line (that starts with <div
....) and the second line (the </div>).
<div style="float:right">[wps-avatar size="128"]</div>
Another div!! Yes, again think of it as a box, and you'll notice two
things.
First, it has a parameter style="float:right" - what that's doing is
saying align (float) this div (this box) to the right.
And then inside the <div></div> you've got a shortcode, it's the
[wps-avatar] shortcode, so remove the other one - you don't need
both. But note that we're setting it to be 128 x 128 pixels.
Save your page, your blue box should now look like this:
102
Hey! Pretty awesome! We're on a roll now, so let get rid of the
existing [wps-display-name] and add the following straight after the
avatar line from above (just before the </div>).
<div id="my_profile_header" style="margin-bottom:15px;
padding: 6px 6px 0 12px; border-radius: 3px; backgroundcolor:#ccf; overflow: auto;">
<div style="float:right">[wps-avatar size="128"]</div>
<div style="font-size:3em; letter-spacing:-2px;">[wpsdisplay-name]</div>
</div>
Another div (you can see that these are used alot - alot - in laying
out a web page). This time we are using the style parameter to set
the font size. 3em means "3 times bigger that what would normally
be shown here", you could equally say 24px for 24 pixels in size, but
the "em" way is a good way for responsiveness, accessibility and so
on.
We are also moving all the letters together slightly by 2 pixels, just to
make it look a bit cool.
Inside this <div></div> is the [wps-display-name] shortcode,
simple as that. Take a look and then also move the [wps-usermeta]
shortcodes so that you now have:
<div id="my_profile_header" style="margin-bottom:15px;
padding: 6px 6px 0 12px; border-radius: 3px; backgroundcolor:#CCCCFF; overflow: auto;">
<div style="float:right">[wps-avatar size="128"]</div>
<div style="font-size:3em; letter-spacing:-2px;">[wpsdisplay-name]</div>
[wps-usermeta meta="wpspro_home" label="<strong>Where am I?</
strong>"][wps-usermeta meta="wpspro_country" label=", "]
</div>
So all we have to do is adjust the map as we want it, using the [wpsusermeta] shortcode with the right shortcode options:
<div id="my_profile_header" style="margin-bottom:15px;
padding: 6px 6px 0 12px; border-radius: 3px; backgroundcolor:#ccf; overflow: auto;">
<div style="float:right">[wps-avatar size="128"]</div>
<div style="font-size:3em; letter-spacing:-2px;">[wpsdisplay-name]</div>
[wps-usermeta meta="wpspro_home" label="<strong>Where am I?</
strong>"][wps-usermeta label=", " meta="wpspro_country"]
</div>
[wps-usermeta meta="wpspro_map" size="1000,150" map_
style="static"]
[wps-activity-post]
[wps-activity]
Well done!
Grab yourself a cup of tea, and play around with all the settings
above, seeing if you can come up with something. If you're new to
HTML and styles (CSS) start with the simple stuff, like changing the
colour or the font size and then progress.
We will now add two more shortcodes to display pending friendship
requests, and a button to request to become a friend (or cancel the
friendship).
The shortcodes that we need to use are:
[wps-friends-pending][wps-friends-add-button]
What we're going to do is put them between the blue box and the
map, so go ahead and add them as follows, on the same line:
<div id="my_profile_header" style="margin-bottom:15px;
padding: 6px 6px 0 12px; border-radius: 3px; backgroundcolor:#ccf; overflow: auto;">
<div style="float:right">[wps-avatar size="128"]</div>
<div style="font-size:3em; letter-spacing:-2px;">[wpsdisplay-name]</div>
[wps-usermeta meta="wpspro_home" label="<strong>Where am I?</
strong>"][wps-usermeta label=", " meta="wpspro_country"]
</div>
[wps-friends-add-button][wps-friends-pending]
[wps-usermeta meta="wpspro_map" size="1000,150" map_
style="static"]
[wps-activity-post]
[wps-activity]
The first shortcode, when viewing another members profile page, will
display a "Make friends" button, and won't show on your own profile
page.
The second will show all pending friendship requests (if on your
profile page), and won't show if viewing another member's profile
page.
105
If I log in as a second user (Joe) and visit my first user's profile page
(Joanne), I only see the following because as I'm not friends I'm
limited to what I can see.
So I click on the "Make friends" button, the page refreshes and the
button now says "Cancel friendship request". Which I won't do....
But when I go back as Joanne, I can now see the pending friendship
request from Joe, which I can choose to Accept or Reject:
The pending friendship request will also appear on the Friends page,
if you've set one up on the site.
Finally, if I log back in as Joe, and go to Joanne's profile page, I see
the profile page as we designed with a "Cancel friendship" button.
106
Pretty awesome!
And that's it, congratulations, a custom profile page all of your own
making!
107
108
WP Symposium Pro
Extensions Plugin
109
110
WP Symposium Pro
Extensions Plugin
Whilst the core WP Symposium Pro plugin will always remain free,
and will create a basic social network on your WordPress website,
there is an additional plugin, the WP Symposium Pro Extensions
plugin, that adds a wealth of extra features and functions.
112
Core Extensions
Administration
After activating, you can go the WPS Pro->Setup->Alerts and you
will see two additional fields that allow you to enter HTML to change
the way the alert looks.
As this HTML is added before (the header) and after (the footer) you
can affectively wrap the content with you own content and styles.
Because the alert is sent as an email, and styling must be contained
within the HTML itself. The following is an example as currently
used on the WP Symposium Pro website. It makes the background
purple, and puts the content into a box with rounded corners.
113
The result of the above is to make the email alert look as follows:
114
[wps_login_form]
By default, with no options, if the user is not logged in, this
shortcode will show a login form and button for registration, and
forgotten password. If logged in, a log out button will be shown.
Along with a lot of options for this shortcode, these can be disabled
so that you can have a seperate login and registration page.
As with other shortcodes, WP Symposium Pro will use the theme
styles so it matches your site, for example, this is what the form
looks like with the TwentyTwelve theme:
115
The registration form can also tie into WP Symposium Pro, asking
new users to complete additional profile fields (covered in the Profile
Extensions chapter), but by default, the registration form will look
like this:
The fields shown can be changed,
and even removed.
They can also be set as mandatory
(required) or otherwise.
For example, you could change
Town/City and Country, remove
them or make them mandatory.
It is recommended, if you are using
the Google map feature on the
profile page, that you include the
Town/City and Country, renaming if
necessary, so that the information
for the map is always available.
This will give your site's profile
pages a consistent look and feel.
The "CAPTCHA" image is used
to avoid false registrations, which
WordPress sites can suffer from,
but you can remove it if you want
to.
116
Login Form
The following options relate to the login form.
url
Default: string
label_login
Default: string
label_username
Default: string
label_register
Default: string
label_lostpassword
Default: string
register
Default: 1
lost_password
Default: 1
captcha
Default: 1
text_password_
closed
Default: string
117
before/after
Default: false
To add a login form to a WordPress page, setting the URL that the
user goes to after logging in to /profile, you would add the following:
[wps-login-form url="/profile"]
Or, to disable the registration button (you might have this on your
menu or elsewhere) and the CAPTCHA code:
[wps-login-form register="0" captcha="0"]
Registration Form
The following options relate to the registration form.
mode
Default: login
registration_url
Default: ''
label_username
Default: string
label_email
Default: string
label_password
Default: string
label_password_
confirm
Default: string
118
town
Default: Town/City
country
Default: Country
password
Default: false
label_name
Default: false
name
Default: true
display_name
Default: false
nickname
Default: false
mandatory
Default: string
text_register_
prompt
Default: string
label_back_to_login
Default: false
text_register_
prompt
Default: string
119
before/after
Default: false
As an example, the following will display the registration form by
default, the Town/City and Country fields mandatory, and change the
mandatory text to a blue "required":
[wps-login-form mode="register" town="*Town/City"
country="*Country" mandatory="<span style='color:blue;'>
required</span>"]
120
text_lostpassword_
prompt
Default: string
Default: string
text_register_
prompt
Default: string
text_new_password
Default: string
You can combine these shortcode options, with the login and
registration options, for example:
[wps-login-form register="0" captcha="0" label_lostpassword_
send="Send me a new password"]
Once you have ticked, and saved your choice, any users not in those
ticked roles will be redirected to your site's home page if they try to
access the WordPress admin dashboard.
122
System Messages
After activating this extension, you have the ability to automatically
add an activity post to every new member's activity stream.
Go to WPS Pro->Set up->System messages, select the user you
want to send the activity post from and enter your message. After
saving a preview is displayed.
123
124
Menu Alerts
If you are using the Private Messages extension, you can display the
number of unread messages in your WordPress menu.
You can also add an icon alert for unread messages to your site,
which is covered in the Alerts chapter earlier on.
The number of unread messages is shown in brackets on your menu
by going to Appearance->Menus, and expanding the menu item to
which you want to add the unread messages count:
125
You then simply put %m into the Navigation Label field, and save
your menu. %m will then be replaced with (2) where would be
replaced with the number of unread messages. If there are no
unread messages, it is not shown.
126
Activity Extensions
Choosing Activity
Recipient(s)
User's will want to target certain individuals sometimes, perhaps
when an activity post is only relevant to family members, friends or
work colleagues, and so on.
This extension adds a drop-down list above the activity post that
gives the user the choice of selecting who to share their activity post
with:
127
When the post appears on the activity, it will also show who the
activity post is shared with:
In this example, only Joe and Joanne will see this activity post.
128
Any lists that they create, will then also appear on the drop-down list
for use. Activity posts that are shared wth a list will appear as such
on the activity stream.
129
When selecting "Manage lists...", the user can create a new list, or
edit/delete and existing list.
When creating a list, it's simply a matter of giving the list a name and
selecting the friends to put into that list.
Whilst the link "My best friends" doesn't actually link anywhere, you
can hover over the link and the members of that list will appear on
screen.
130
Activity attachments
A key part of sharing posts with other users includes sharing photos,
video and audio. WP Symposium Pro supports the attachment of
images, the inclusion of YouTube URLs and SoundCloud audio. You
can select which you want to permit via WPS Pro->Setup:
Images
If you permit image attachments, after activation, above the initial
post area and below any comment areas, there is a new item of
text "Attach an image". A user simply clicks on this to select one, or
more, images to attach to their post. If their browser is old, they may
131
YouTube videos
To show a YouTube video below your post simply copy and paste
the YouTube URL when viewing the video on YouTube into your post
and it will be detected, and the video displayed below the post.
The video is responsive, that is, will re-size when viewed on mobile
devices, tablets, etc.
132
SoundCloud
In the same was as with YouTube videos, simply visit the
SoundCloud page and copy the URL.
When included in your activity post it will be detected and displayed
using what SoundCloud refers to as the web widget.
Active via WPS Pro->Setup underneath "Activity".
Shortcode options
You add the following options to the [wps-activity] shortcode.
133
url_preview_image
Default: 100
url_preview_fail
Default: true
fail_text
Default: string
fail_image
Default: string
ignore_images
Default: ''
ignore_links
Default: ''
max_previews
Default: 1
134
min_width
Default: 200
max_width
Default: 1000
135
136
137
Shortcode options
There are several options you can use to customise how likes
and dislikes appear, perhaps changing "Like" to "Awesome" and
"Dislike" to "Yuk"?!
Remember, choosing if likes/dislikes are used, and what can be
liked/disliked is set via WPS Pro->Setup->Likes and Dislikes.
These options are added to the [wps-activity] shortcode.
allow_unlikes
Default: true
allow_undislikes
Default: true
like_text
Default: string
unlike_text
Defaults to "Unlike".
Default: string
like_count_text_
singular
Default: string
like_count_text_
plural
Default: string
dislike_text
Default: string
138
Defaults to "Dislike".
undislike_text
Defaults to "Undislike".
Default: string
dislike_count_text_
singular
Default: string
dislike_count_text_
plural
Default: string
more_text_singular
Default: string
more_text_plural
Default: string
done_text
Default: string
by_text
Default: string
or_text
Default: string
you_text
Defaults to "you".
Default: string
max_names_to_
show
Default: 3
139
Administration
After activating there is a new "Likes and Dislikes" section available
via WPS Pro->Setup.
From here you can de-activate likes or dislikes, and set who can like/
dislike posts from other members (friends or all members).
140
Members Extensions
Profile Extensions
Also referred to as custom profile extensions, or user meta
fields, profile extensions is a powerful way to allow users to add
information about themselves that is pertinent to your site.
For example, on a dating site, you might add:
Gender
Marital Status
What am I looking for?
About me
and so on.
textarea
list
URL
date
image
YouTube
Divider
4. Order
Set the order in which the Profile Extension appears on the user's
144
Edit Profile page and if used, the registration page (so long as
using the WP Symposium Pro Login & Register extension for user
registrations).
5. Admin Only
If checked, only site administrators see this field on the user's Edit
Profile page. Perhaps useful for recoding hidden information.
6. Always Show?
If checked, whether or not a visitor to a profile page has permission
to see their extended details, this field will be shown.
7. Include in Directory Search?
This is only displayed if you have the member directory extension
activated. If you check this option, this profile extension will be
available under "Advanced Search". See the member directory
chapter for more information.
8. Include on [wps-login-form]?
If checked, and using the [wps-login-form] shortcode of the Login &
Register WP Symposium Pro extension, this profile extension will be
included in the registration form.
9. Mandatory on [wps-login-form]?
Linked with [8] above, this makes the field on the registration form
mandatory (must be filled in).
Finally, publish (save) or update if editing, and your profile extension
will be created.
It will appear on the user's Edit Profile page, and depending on how
you set it up, on the registration page and the advanced search of
the member directory.
You can now also add your profile extension to a user's profile page.
[wps-extended]
Displays a profile extension.
Shortcode Options
slug
Default: none
user_id
Default: false
show_if_empty
Default: true
empty_text
Default: ''
label_prefix
Default: false
before/after
Default: false
So let's assume you have a gender profile extension with a slug of
"gender", as a list, with the values "Not telling,Male,Female" from
which the user can select via their Edit Profile page. To display this
on their profile page with the title as a label you would use:
[wps-extended slug="gender" label_prefix="1"]
146
Profile Security
Members of a social network take security very seriously. This
extension allows user's to set different levels of security for their
account.
Once activated, on their Edit Profile page is an additional set of
choices:
147
Areas of security
Profile Information
This refers to the information about the user, their name, profile
extensions, location and so on.
Activity
Who can see the activity stream and posts of the user.
Friendships
Who are the friends of this user.
Directory
The level of visibility in the member directory if used.
Levels of security
Just me
Can only be seen by the user themselves, and site administrators.
Friends
Only friends made via WP Symposium Pro, and site administrators.
All Members
All registered members of the site.
Public
Everybody, including visitors to the site who have not logged in.
148
Member Directory
The directory is a very easy way for members to find other members
on the site. In its basic form it's a list of members, with a search
form, but through the shortcodes there are additional features
available.
Quick Start
The easiest way to add your directory is to use the "Add Directory
Page" button on WPS Pro->Setup which adds a new WordPress
page, with the following shortcodes, that you can then add to your
site's menu:
[wps-directory-search]
[wps-directory]
149
Shortcodes
[wps-directory]
Displays a directory of the site members.
Shortcode Options
order
Default: last_active
order_by
Default: DESC
no_results_msg
Default: string
number
Default: 50
limit
Default: false
avatar_size
Default: 64
link
Default: true
show_location
Default: true
150
show_date
Default: true
date_label
Default: string
last_active_format
Default: string
show_by_default
Default: true
show_friendship_
status
Default: true
friends_yes
Default: string
friends_pending
Default: string
friend_request
Default: string
friends_no
Default: string
show_registered
Default: true
registered_label
Default: string
151
layout
Default: list
include_friendship_
action
Default: true
friendship_class
Default: ''
friend_add_label
Default: string
friend_cancel_label
Default: string
accept_request_
label
Default: string
reject_request_label Defaults to "Reject".
Default: string
include_self
Default: false
before/after
Default: false
So with the above options, you can tailor how the directory looks
and works on your site. For example, to display the directory,
including the currently logged in user and doubling the default avatar
size, you would use the folllowing options:
[wps-directory avatar_size="128" include_self="1"]
152
[wps-directory-search]
Displays the directory search box, with a number of options dictating
how it is presented and operates. Search is performed on the user's
login name and their display name.
Shortcode Options
class
Default: ''
url
Default: ''
mode
Default: text
show_user_login
Default: false
placeholder
Default: string
quick_select
Default: false
search_label
Default: string
153
label
Default: string
show_with_results
Default: true
private
Default: false
private_msg
Default: string
include_meta_show
Default: false
before/after
Default: false
To show the basic search field and results, see the quick start
section earlier. To show as a drop-down list that filters as your type,
you would use the mode parameter. Not that placeholder is probably
worth changing from the default value.
[wps-directory-search mode="list" placeholder="Click and
start typing..."]
You can split the two shortcodes, so for example, you can have
[wps-directory-search] in a Text/HTML widget, with the url option
set to a WordPress page, on which, you have the [wps-directory]
shortcode, which will pick up any search term entered.
$b
$c
For example, assuming you have two profile extensions with slugs
of gender and date-of-birth, you can show them on the directory as
follows:
[wps-directory profile_extensions="gender,date-of-birth"]
Or if you wanted to show the label for date-of-birth but hide the label
for gender (perhaps as it's obvious):
[wps-directory profile_extensions="gender,date-of-birth"
profile_extensions_labels="0,1"]
156
Default Friends
You may want new members to your site to automatically become
friends with one or more other members. It helps so that their
"friends" list is not empty after joining them, and maybe, you want a
particular member to say hello to them?
To add one or more users that are automatically added as friends to
new users, go to WPS Pro->Setup->Default Friends and add user
logins, as found via Users->All users. If you want to add more than
one, seperate them with commas.
A checkbox is available to also add existing members as friends to
that user, or users, retrospecively.
157
158
Rewards
A website or social network can really be enhanced by rewarding
users with points for doing certain things, and even displaying
badges (or any image) on their profile page. That's what rewards can
do.
Quick Start
As an example, we will create a reward when a user posts on their
activity stream. Go to WPS Pro->Rewards and click on Add New.
For the title, type in "Activity post", and in the editor "Reward for
adding an activity post".
Then, in the Reward Details box select "New activity post to all
159
friends" and enter 10 as the default value. We'll use a badge too, so
enter 32 as the size of the badge in pixels.
The badge (image) that is shown is the Featured Image, so click on
"Set featured image", and choose/upload an image - cool, if it looks
like a badge or reward!
Click on Publish to create your reward. It's now listed under WPS
Pro->Rewards. Take a note of the value in the slug column:
Edit your user Profile Page (via WPS Pro->All Pages, Edit) and
switch to "Text" view (important!). Put the following line in at the top
of the editor, and save:
Activity points: [wps-reward]
Now, go to your website, and go to your Profile page. You'll see this
in place of the above:
I'm using the custom profile page built in the "Building Your Own
Profile Page" chapter previously in the book. Note it now says
"Activity points: 0", because you've not earned any points.
Add an activity post - the page will refresh and it will now say
"Activity points: 10". You've just earned 10 points!
You can, of course, put the shortcode anywhere you want on your
profile page, or in a Text/HTML widget.
To add the "badge" (the uploaded image) put the following line of
code above the one you added above, noting the slug value:
160
I'm using some HTML to "float" (align) the badge over to the right
hand side of the page. Your profile page should look like this:
If you now go to another user's page, who hasn't posted any activity,
you'll see that the badge is semi-transparent (they haven't "earned"
the badge yet), for example:
This is fine for now as a quick start, but bear in mind that [wpsreward] shows the total points for the user, not individual rewards.
So more accurately you would put "Total points:" instead of "Activity
points:". Badges are reward specific.
You can also choose a type of "Badge for post count", and then
choose "Type of reward to count" which will reward user's with
points.
But the badge image, instead of being on/off, will slowly appear as
they reach the target number of times they need to repeat the action
you've set. You set the target number of times in "Post count" which
appears when you choose a type of "Badge for post count".
If using type of "Badge of post count", you should set a featured
image to be used.
161
Shortcodes
[wps-reward]
Displays the total number of points a user has earned so far, or the
number of points earned for a specific reward.
Shortcode Options
slug
Default: false
before/after
Default: false
[wps-badge]
Displays a badge for the reward. If a normal reward (ie. not a "Badge
for post count" type), the badge is shown if any points have been
awarded, or semi-transparent if no points have yet been earned.
If the reward is a "Badge for post count" type, then the badge will
slowly appear as the user gets closer to the "Post count" value set
when editing/creating the reward.
Shortcode Options
slug
Default: false
opacity
Default: 20
size
Default: false
162
before/after
Default: false
[wps-rewards]
Shows the "top users" ranked by the number of points they've
earned.
Shortcode Options
count
Default: 10
days
Default: 365
avatar_size
Default: 32
link
Default: true
before/after
Default: false
Administration
Rewards: Creating/Editing
Create and edit rewards via WPS Pro->Rewards. When doing so, the
following parts of the screen are used:
Title:
What the post is called (eg. "Activity Posts")
Permalink: Where the slug is set, as seen on WPS Pro->Rewards
Editor:
A description of the reward
163
Type
Default Value
164
Type of reward to
count
Post count
Badge size
165
166
Image Galleries
Let your members share photos! Also supports documents. The
valid file types by default are:
Images:
jpg, png, gif, jpeg, svg
Documents: txt, rtf, pdf
Quick Start
Go to WPS Pro->Setup (after activating the extension) and click on
"Add Gallery Page". This will create a WordPress page, which you
can add to your menu, that displays all the user's galleries.
From this page the member can view their galleries, and create new
galleries. Clicking on a gallery, the user can set the featured image,
edit the description and delete the gallery. As images are added a
post is created on their activity stream, informing their friends.
167
Shortcodes
[wps-gallery]
Displays the member's galleries and allows them to create new
galleries (where they can upload new images).
Shortcode Options
user_id
Default: false
no_permission_text
Default: string
edit_prompt_text
Default: string
before/after
Default: false
168
user_id
Default: false
edit_and_cancel_
class
Default: ''
empty_gallery
Default: string
create_placeholder
Default: string
create_label
Default: string
create_button_label
Defaults to "Create".
Default: string
cancel_button_label Defaults to "Cancel".
Default: string
edit_prompt_text
Default: string
featured_image_
size
Default: 150
show_owner
Default: string
show_description
Default: true
169
show_count
Default: true
count
Default: 100
orderby
Default: updated
For example, to change the size of the featured image to 64 x 64
pixels, you would use:
[wps-gallery featured_image_size="64"]
170
class
Default: false
edit_and_cancel_
class
Default: false
show_slideshow
Default: false
slideshow_link
Default: string
slideshow_hide_link Defaults to "Close slideshow".
Default: string
no_permission_text
Default: ''
edit_text
Default: string
delete_text
Defaults to "Delete".
Default: string
item_size
Default: 150
show_owner
Default: string
back_to
Default: string
171
add_text
Default: string
button_label
Defaults to "Upload".
Default: string
cancel_button_label Defaults to "Cancel".
Default: string
update_button_
label
Defaults to "Update".
Default: string
edit_prompt_
content
Default: string
show_allowed_
types
Default: string
allowed_image_
types
Default: string
comment_label
Default: string
link
Default: true
date_format
Default: string
Instead of using the allowed_image_types, you can add via this filter,
possibly based on certain criteria. The following assumes svg has
been removed from the allowed_image_types option, and then only
adds it if the user is a site administrator:
add_action('wps_gallery_attachments_valid_image_extensions_
filter','my_function',10,2);
function my_function($a,$b) {
global $current_user;
if (current_user_can('manage_options')):
array_push($a, 'svg');
endif;
return $a;
}
wps_gallery_attachments_valid_document_extensions_filter
Filter
allows additional document extensions
173
to be added.
$a
$b
This operates in the same way as the previous filter for images.
wps_gallery_comment_meta_filter
Filter
allows information to be shown for the comment.
$a
$b
$c
$d
$e
$f
The following will add something like "Last active: 5 mins ago"
alongside the user who made the comment.
Note that this uses part of the API set of functions, and so "/path/
to/" must be changed with your local path to the wp-symposium-pro
plugin folder.
add_action('wps_gallery_comment_meta_filter','my_
function',10,6);
function my_function($a,$b,$c,$d,$e,$g) {
require_once('/path/to/wp-symposium-pro/core_api.php');
$a .= wps_api_user_last_active($e, $format='Last active:
%s ago');
return $a;
}
174
[wps-gallery-list]
Displays the member's galleries (or optionally all member's galleries
as a list), tends to be used in a Text/HTML widget.
Shortcode Options
user_id
Default: all
featured_image_
size
Default: 75
show_description
Default: true
no_permission_text
Default: ''
no_albums
Default: string
edit_prompt_text
Default: string
show_count
Default: false
count
Default: 30
more
Default: string
175
more_top_
adjustment
Default: 0
more_left_
adjustment
Default: 0
orderby
Default: updated
before/after
Default: false
The following is a Text/HTML widget with the following shortcode:
[wps-gallery-list count="3"]
[wps-gallery-grid]
This shortcode is similar to [wps-gallery-list] but is probably more
widely used as part of a custom profile page.
176
Shortcode Options
user_id
Default: all
featured_image_
size
Default: 75
no_permission_text
Default: ''
no_albums
Default: string
count
Maximum to show.
Default: 30
more
Default: string
more_top_
adjustment
Default: 10
more_left_
adjustment
Default: 0
orderby
Default: updated
scrolling
Default: true
177
padding
Default: 3
Administration
Via WPS Pro->Setup->Galleries it is very important to set the
WordPress page that you use to display the galleries (the page with
[wps-gallery] on it.
178
179
180
Groups Extensions
Groups
Groups are a way that your site members can organise themselves
to discuss and share attachments. They can be private (group
administrator has to approval requests to join the group) or public
(anyone can join).
Quick Start
You can quickly setup groups by going to WPS Pro->Setup and
clicking on the "Add Group Pages". This will create two WordPress
pages, one for the Groups page (where user's can create groups
and see those already created), and a second page that displays the
group itself.
After creating the two pages, you should add the Groups page to
your WordPress site menu, but not the Group page which is only
accessed and used by WP Symposium Pro.
181
Shortcode Options
class
Default: ''
show
Default: false
label
Default: string
title_label
Default: string
182
content_label
Default: string
before/after
Default: false
[wps-groups]
This shortcode displays all the groups currently created.
Shortcode Options
header_text
Defaults to "<h2>Groups</h2>".
Default: string
no_results_msg
Default: string
link
Default: true
show_date
Default: true
date_label
Default: string
width
Default: 64
order_by
Default: active
order
Default: DESC
183
before/after
Default: false
''
array of shortcode options
If any groups exist, this filter allows you to prepend HTML before
the list of groups, for example, adding some content based on the
shortcode parameters passed:
add_action('wps_groups_pre_filter','my_function',10,2);
function my_function($a,$b) {
extract( shortcode_atts( array(
'number' => 50,
), $b, 'wps_groups' ) );
return '<p>Showing a maximum of '.$number.' groups</
p>'.$a;
}
wps_group_item_filter
Filter
after the group HTML has been created.
$a
$b
$c
184
For example, the above code will move the group's name and
arrange the groups in a grid fashion:
wps_groups_post_filter
Filter
after all of the groups on the list.
$a
$b
HTML generate
array of shortcode options
If any groups exist, this filter allows you to append HTML after the
list of groups, for example:
add_action('wps_groups_post_filter','my_function',10,2);
function my_function($a,$b) {
return $a."<p>That's all folks!</p>";
}
[wps-my-groups]
This shortcode displays all the groups that the current member
belongs to.
Shortcode Options
These are the same as [wps-groups].
If you use the above code (copy and paste if viewing an electronic
version of the book) then your group page will look something like
this:
186
If you are unsure of the HTML used to layout the page in the code
above, read the "Building Your Own Profile Page" chapter earlier in
the book.
The main thing to point out in the code above, is that it is based on
an assumption that the group avatar (image) is set to display at 200
pixels wide, hence the use of that value in various styling parameters
(which is included in-line here for the sake of brevity). If you change
the width of the avatar, you should adjust the margin and padding
sizes accordingly in the code.
[wps-group-title]
Shows the name (title) of the group without any formatting.
Shortcode Options
before/after
Default: false
[wps-group-image]
Shows the image as set by the group administrator.
Shortcode Options
width
Default: 200
before/after
Default: false
[wps-group-description]
Shows the group description as set by the group administrator, via
the [wps-group-edit] shortcode.
187
Shortcode Options
before/after
Default: false
[wps-group-admin]
Displays the group administrator, either as a link to their profile page,
or not, depending on the following shortcode option.
Shortcode Options
link
Default: true
before/after
Default: false
[wps-group-edit]
For the group administrator, or site administrator, gives access to
edit the group title (name), description and upload a group avatar
(image).
Through the setting shown, the privacy of the group can be set - if
private, when a user joins the group, their request must first be
approved by the group administrator.
If the group title is shown, for example, before the edit shortcode on
the page, the page changes may not reflect immediately. Hence the
prompt to refresh the page after changes are made.
Shortcode Options
label
Default: string
188
updated
Default: string
updated_ok
Default: string
before/after
Default: false
The following are used when editing a group.
class
Default: ''
title_label
Default: string
content_label
Defaults to "Description".
Default: string
cancel_label
Defaults to "Cancel".
Default: string
update_label
Default: string
private_label
Default: string
image_label
Default: string
image_remove_
label
Default: string
[wps-group-delete]
For the group administrator, or site administrator, gives the ability to
delete a group. Once deleted, a group cannot be retored.
Shortcode Options
label
Default: string
before/after
Default: false
[wps-group-join-button]
Shows a button to join the group, or if a member, to leave the group.
If a private group and the join request has not yet been approved,
the button will allow the user to cancel the request.
Shortcode Options
class
Default: ''
label_join
Default: string
label_leave
Default: string
190
label_cancel
Default: string
text_pending
Default: string
text_private
Default: string
before/after
Default: false
[wps-group-post]
Presents the user with a text area to add a group post to the group
activity. If activity attachments extension is activated, can also add
attachments. Same with YouTube and SoundCloud extensions.
Shortcode Options
private_msg
Default: string
before
Default: string
after
Default: string
[wps-group-activity]
Displays the activity stream of the group.
Shortcode Options
private_msg
Default: string
back_to
Default: string
before/after
Default: false
Whenever the page with this shortcode on it is viewed, the group
"last active" date/time is updated, as affectively, the group is active
in some where, even if being viewed.
The following shortcodes are not used in the example custom layout
shown at the start of this chapter. [wps-group-members] would
normally be on a separate page and linked to with the [wps-groupid] shortcode (see example below).
[wps-group-members]
Displays the group members, including any pending members
(displayed first) that the group administrator can approve or reject, if
the group is set up as a private group.
Shortcode Options
class
Default: ''
status
Default: all
private_msg
Default: string
avatar_size
Default: 64
192
show_date
Default: true
date_label
Default: string
date_format
Default: string
user_link
Default: true
before/after
Default: false
[wps-group-id]
Generates the ID of the current group, with no formatting. Most
commonly used to generate a link to a WordPress page that shows
the group members, on which the [wps-group-members] shortcode
has been added. For example, putting:
<a href="/members?group_id=[wps-group-id]">Group members</a>
would generate a hyperlink to the page that has the [wps-groupmembers] shortcode on it ("/members" in the above code) and [wpsgroup-id] would be replaced with the ID of the group, so that the
group members page can display the members of the group.
[wps-group-url]
Generates the URL of the current group page. Like [wps-group-id],
it has no shortcode options.
193
Administration
Via WPS Pro->Setup->Groups it is very important to set the
WordPress page that you use to display the group, the one that you
don't put on your site menu!
194
Default Groups
This simple extension allows you to automatically add news users
into one or more groups.
Via WPS Pro->Setup->Default Groups, enter the ID of the group,
that you want new users to automatically become a member of.
If you want to add them to more than one group, enter several
separated by commas.
You can find the Group IDs via WPS Pro->Groups (or click on
the link provided). On the screen you then see, there is a column
showing the ID of each group, for example:
195
196
197
198
API Functions
Insert Activity Post
To get the last active date/time for user 99, formated as "Last active:
1 hour ago" (for example):
wps_api_user_last_active(99, "Last active: %s ago");
200
201
202
Index
Shortcodes
[wps-activity] 36, 133, 138
[wps-activity-page] 18, 19
[wps-activity-post] 34
[wps-alerts-activity] 68
[wps-avatar] 30
[wps-avatar-change] 48, 52, 62, 63, 64, 65, 68
[wps-avatar-link] 33, 34
[wps-badge] 162
[wps-close-account] 57
[wps-directory] 150
[wps-directory-search] 153
[wps-forum] 76, 84, 87
[wps-forum-comment] 84, 87
[wps-forum-page] 74
[wps-friends] 62, 63, 64, 65, 68
[wps-friends-add-button] 65
[wps-friends-pending] 63, 64, 65
[wps-friends-status] 64, 65
[wps-gallery] 178
[wps-group-activity] 191
[wps-group-admin] 188
[wps-group-create] 182, 187
[wps-group-delete] 190
[wps-group-description] 187
[wps-group-edit] 188
[wps-group-id] 193
[wps-group-image] 187
[wps-group-join-button] 190
[wps-group-members] 192
[wps-group-post] 191
[wps-groups] 183, 185
[wps-group-title] 187
[wps-group-url] 193
[wps-my-groups] 185
[wps-reward] 162, 168, 175, 176
203
[wps-rewards] 163
[wps-usermeta-button] 56, 57
[wps-usermeta-change-link] 56
A
accept_request_label 64, 152
Accessing the API 199
account_closed_msg 35
Activating the Individual Extensions 112
Activity attachments 131
Activity share lists 129, 131
activity stream 36
Add Forum 14
Add Forums 14
Adding alerts to your theme 70
Adding Profile Extensions to the Directory 155
Add Profile Page 13
Add Profile pages 13
add_text 172
Admin Only 145
Alerts 67
All Forums 95
allow_comments 80
allowed_document_types 172
allowed_image_types 172, 173
allow_replies 39
allow_undislikes 138
allow_unlikes 138
Always Show? 145
are_you_sure_text 58
author_format 92
author_link 93
Autosubscribe 96
avatar 18, 33
avatar_size 37, 150, 163, 192
B
back_to 171, 192
Badge for post count 164
Badge size 165
base_date 75, 79, 88, 93
204
Blog 15
Building Your Own Profile Page 97, 178
button_label 172
by_text 139
C
cancel_button_label 169, 172
cancel_label 65, 189
cancel_request_label 66
captcha 117
CAPTCHA 116
Change Avatar Page 45, 47
change_link 32
choose 48
Choosing Activity Recipient(s) 127, 129
class 35, 38, 52, 57, 58, 64, 66, 75, 153, 171, 182, 189, 190, 192
clear out your alerts 71
close an account 57
closed_prefix 78, 92
closed_switch 77
closed_switch_msg 77
comment_add_label 80
comment_avatar_size 37, 172
comment_class 81
comment_label 173
comment_pending 78
comments_avatar_size 81
comment_size 38
comment_size_text_plural 38
comment_size_text_singular 38
content_label 76, 183, 189
Core Functions 199
count 37, 62, 63, 79, 163, 170, 175, 177
count_include_replies 89
country 21, 52, 119
country_label 22
create_button_label 169
create_label 169
create_placeholder 169
Creating Profile Extensions 142
crop 48, 49
205
F
Facebook 15
Facebook and Twitter 15
Facebook page URL 143
fail_text 134
Featured image 164
featured_image_size 169, 175, 177
file_types_msg 48
flag_size 68
flag_src 69
flag_unread_left 68, 70
flag_unread_radius 69, 70
flag_unread_size 68
flag_unread_top 68, 70
flag_url 69
Forgotten Password? Form 120, 121
forum_count 88
forum_freshness 88
forum_last_activity 88
Forums 73
Forum Setup 96
forum_title 88
Frequency of Email alert notifications 72
friend_add_label 152
friend_cancel_label 152
friend_request 65, 151
Friends and Activity 13
friendship_class 152
friendship requests 21
friends_no 65, 151
Friends Page 61, 67, 73
friends_pending 65, 151
friends with every other member 66
friends_yes 64, 151
From email 72
From name 72
FTP 23, 25
functions.php 23, 24
G
gaming site 141
207
get_max 38
Getting Started Quickly 13
Getting the Extensions Plugin 111
Getting WordPress 9
Getting WP Symposium Pro 10
Google map 20
gravatar 32
Groups 167, 181, 195, 199
H
header_count 74, 78, 89
header_last_activity 74, 78, 89
header_text 183
header_title 74, 78, 89
Helpdesk Support 11
hide_label 39
hide_until_loaded 38
Hooks and Filters 22, 36
How this book is arranged 16
HTML 99, 100, 105
I
icon alert for pending friendship requests 71
icon alert for unread activity alerts 70
icon alert for unread messages 71, 125
ignore_images 134
ignore_links 134
image 144
Image Galleries 167
image_label 189
image_remove_label 189
include_closed 92
include_comments 92
include_friends 39
include_friendship_action 152
Include in Directory Search? 145
include_meta_show 154
include_posts 92
include_replies 92
include_self 39, 152
Insert Activity Post 199
208
Mailing List 15
make_all_read_text 69
Manage lists 130
mandatory 119
mandatory text 120
map_size 21
map_style 21, 55
map_zoom 21
max 92
max_names_to_show 139
max_previews 134
Member Directory 149
Menu Alerts 125
meta 55
meta_class 53
mimic_user_id 22, 40
mode 118, 153
moderate 76
moderate_msg 76
more 38, 175, 177
more_label 38
more_left_adjustment 176, 177
more_text_plural 139
more_text_singular 139
more_top_adjustment 176, 177
moved_to 78
N
name 119
nickname 119
no_activity_text 69
no_albums 175, 177
no_indent 88
none 63, 64
no_permission_text 168, 171, 175, 177
no_results_msg 150, 183
not_found 40
not_permitted 48
number 150
O
210
opacity 162
order 92, 150, 183
Order 96, 144
order_by 150, 183
orderby 92, 170, 176, 177
or_text 139
P
padding 178
page_size 80
page_x_of_y 80
pagination 79
pagination_bottom 80
pagination_top 80
password 52, 119
password2 52
password_msg 53
pending 78
pending friendship requests 63, 64
Permalink 163
PHP 24, 71
placeholder 153
Post count 165
post_deleted 80
post_id 39
Privacy 96
private 62, 154
private_label 189
Private Messages 125
private_msg 35, 40, 76, 78, 154, 191, 192
private_reply_msg 81
profile_extensions 155
Profile Extensions 55, 141, 147
profile_extensions_labels 155
profile_extensions_layout 155
profile_link 32
Profile Page 17, 45, 47
Profile Parameter 46
Profile Security 147
Q
211
quick_select 153
R
recent_alerts_text 69
Redirecting users from the admin dashboard 121
register 117
registered_label 151
registration form 115, 145
Registration Form 118
Registration Form Shortcode Options 118
registration_url 118
reject_request_label 64, 152
reply_icon 79
Reward Details (box) 164
Rewards 137, 159
Rewards: Creating/Editing 163, 165
Rewards for Likes/Dislikes 140
Rewards: User rewards 165
S
scrolling 177
search_label 153
secure_msg 78
secure_post_msg 80
security 147
select_activity_text 69
shortcode parameters 184
Shortcodes (for Group page) 186
show 74, 75, 182
show_allowed_types 172
show_author 92
show_by_default 151
show_closed 77
show_comment_form 80
show_comments 80
show_comments_count 77
show_count 77, 87, 170, 175
show_date 93, 151, 183, 193
show_description 169, 175
show_freshness 77, 87
show_friendship_status 151
212
show_header 77, 87
show_if_empty 146
Showing a Profile Extension 145
show_last_active 62
show_last_activity 77, 88
show_location 150
show_owner 169, 171
show_posts 89
show_posts_header 88
show_registered 151
show_slideshow 171
show_snippet 93
show_summary 89
show_user_login 153
show_with_results 154
size 32, 55, 62, 63, 79, 162
slideshow_hide_link 171
slideshow_link 171
slug 74, 75, 77, 84, 87, 90, 91, 96, 146
snippet_length 93
SoundCloud 133
status 92, 192
Status 96
stick 36
sticky_label 39
style 68
summary 93
summary_avatar_size 94
summary_commented 94
Summary email 72
summary_format 93
summary_replied 94
summary_show_unread 94
summary_snippet_length 94
summary_started 93
summary_title_length 94
Support and Help 11
System Messages 123
T
Test WordPress email 72
213
value 57
Video Tutorials 15
Visibility 96
W
Website link previews 133
What is WP Symposium Pro? 9
width 183, 187
WordPress filter 23
WordPress hook 23
wps_activity_post_add_hook 200
wps_api_insert_activity_post 199
wpspro_country 55
wpspro_home 55
wpspro_map 55
wps_usermeta_change_filter 55
wps_usermeta_change_hook 55
WP Symposium Pro Extensions 10
WP Symposium Pro Extensions Plugin 111
Y
you_text 139
YouTube 132, 144
Z
zoom 55
215
Note that some hooks/filters appear more than once, as they are
covered in more than one section of the book.
29
43
30
44
28
43
28
42
27
42
26
41
29
44
29
44
36
26
40
27
41
154
26
86
87
95
83
83
89
84
wps_forum_post_comment_filter
wps_forum_post_delete_hook
wps_forum_post_post_title_filter
wps_friends_init
wps_gallery_attachments_valid_document_extensions_filter
wps_gallery_attachments_valid_image_extensions_filter
wps_gallery_comment_meta_filter
wps_group_item_filter
wps_groups_post_filter
wps_groups_pre_filter
wps_my_group_item_filter
wps_my_groups_post_filter
wps_my_groups_pre_filter
wps_usermeta_change_filter
wps_usermeta_change_hook
wps_usermeta_init
84
81
82
66
173
173
174
184
185
184
185
185
185
53
54
58
217
Change Control
0.25
0.24
0.23
0.22
0.21
0.20
0.19
Added Rewards
Added Default Friends
Added Groups
0.18
0.17
0.16 - 0.1
Unpublished
218