Documente Academic
Documente Profesional
Documente Cultură
The Complete
Guide To
WP Symposium
Pro
From absolute
beginner to expert
WP Symposium Pro v15.1.1
Document version: 0.45
www.wpsymposiumpro.com
Simon Goodchild
1
DON'T PANIC!
The index on page 275 (at the end) of the book is a
good place to go, and if you're viewing online, click on
the page number to jump quickly to the page.
Contents
1. Introduction
11
11
11
12
12
13
2. Core Features
19
Profile Page
19
Quick Start
19
The Default Profile Page
20
[wps-activity-page]21
Shortcodes32
[wps-display-name]33
[wps-avatar]34
[wps-avatar-link]35
[wps-activity-post]36
[wps-activity]38
Administration47
Change Avatar Page
49
3
Quick Start
49
Shortcodes50
[wps-avatar-change]50
Edit Profile Page
53
Quick Start
53
Shortcodes54
[wps-usermeta-change]54
[wps-usermeta]56
[wps-usermeta-change-link]58
[wps-usermeta-button]59
[wps-close-account]60
Administration61
Friends Page
63
Quick Start
63
Shortcodes64
[wps-friends]64
[wps-friends-pending]65
[wps-friends-status]66
[wps-friends-add-button]67
Administration68
Alerts69
Quick Start
69
Shortcodes70
[wps-alerts-activity]70
Adding alerts to your theme
72
Administration73
Forums75
Quick Start
75
Shortcodes76
[wps-forum-page]76
[wps-forum-post]77
[wps-forum]78
[wps-forum-comment]88
[wps-forums]91
[wps-forum-backto]94
[wps-forum-show-posts]95
[wps-forum-sharethis]99
Administration101
Building Your Own Profile Page
103
115
117
117
118
3. Core Extensions
119
129
Menu Alerts
131
4. Activity Extensions
133
133
135
Activity attachments
137
Images137
YouTube videos
138
SoundCloud139
Website link previews
139
How website link previews work
141
Removing the image/preview
142
5
Dynamic Previews?
142
149
5. Members Extensions
153
Profile Extensions
153
Creating Profile Extensions
154
[wps-extended]158
Showing a Profile Extension
158
Profile Security
Areas of security
Levels of security
161
162
162
Member Directory
163
Quick Start
163
Shortcodes164
[wps-directory]164
[wps-directory-search]167
Adding Profile Extensions to the Directory
169
Default Friends
171
Rewards173
Quick Start
173
Shortcodes176
[wps-reward]176
[wps-badge]176
[wps-rewards]177
Administration177
Image Galleries
6
181
Quick Start
181
Shortcodes182
[wps-gallery]182
[wps-gallery-list]189
[wps-gallery-grid]190
Administration192
6. Forums Extensions
193
193
195
195
196
197
Forum Search
199
Quick Start
199
Shortcodes200
[wps-forum-search]200
[wps-forum-search-results]201
Forum Permissions
203
205
Forum Subscriptions
207
Shortcodes207
[wps-subscribe-forum]207
[wps-subscribe-post]209
[wps-manage-subscriptions]210
Send forum posts/replies to activity stream
213
Forum Toolbars
BB Codes Toolbar
WYSIWYG Toolbar
215
216
216
217
217
7. Groups Extensions
219
Groups219
Quick Start
219
Shortcodes (for Groups page)
220
[wps-group-create]220
[wps-groups]221
[wps-my-groups]223
Shortcodes (for Group page)
224
[wps-group-title]225
[wps-group-image]225
[wps-group-description]225
[wps-group-admin]226
[wps-group-edit]226
[wps-group-delete]228
[wps-group-join-button]228
[wps-group-post]229
[wps-group-activity]229
[wps-group-members]230
[wps-group-id]231
[wps-group-url]231
Administration232
Default Groups
233
235
Private Messages
235
Quick Start
235
Shortcodes236
[wps-mail]236
[wps-mail-post]240
[wps-mail-comment]243
[wps-mail-recipients]244
[wps-mail-backto]245
[wps-mail-search]246
[wps-mail-to-user]246
[wps-alerts-mail]248
8
Message Attachments
Images and Documents
YouTube videos
251
251
252
Email alerts
253
265
Functions available
265
Activity266
Directory266
Members266
Rewards266
Forums267
Groups267
Private Messages
267
Calendar268
Core/Miscellaneous268
Passing options
268
Examples268
Unread mail messages icon
269
New friend request icon
269
New alerts icon
269
Dropdown list of alerts
270
Quick member select dropdown
270
273
273
API Functions
Insert Activity Post
Get user's last active date/time
273
273
274
Index277
Hooks and Filters
295
Change Control
297
10
1. Introduction
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
11
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.
14
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"]
18
2. 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
19
[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.
21
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.
22
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
25
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:
26
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!
27
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
28
$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.
29
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
30
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
31
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.
32
[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
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>"]
34
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.
35
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:
36
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"]
37
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.
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.
38
Users can also choose to make a post stick to the top of their
activity stream, perhaps because its particularly important. This is
also available by hovering over the wrench settings icon.
A typical activity stream will look like this:
Shortcode Options
avatar_size
Default: 64
comment_avatar_
size
Default: 40
count
Default: 100
39
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
40
link
Default: true
delete_label
Default: string
sticky_label
Default: string
unsticky_label
Default: string
sticky_others
Default: false
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
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:
42
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;
}
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
43
$the_post = get_post(2);
$a['ID'] = $the_post->ID;
$a['date'] = $the_post->post_date;
$a['sticky'] = 0;
endif;
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) {
return $a . 'HERE';
}
44
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
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.
46
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');
}
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.
47
If you manually created the WordPress pages, you should set the
pages as applicable.
Profile Parameter is used to hide usernames from profile page links
on your site, possibly due to security considerations on your site.
Finally, there are some instructions on how to manually create
the pages, which will change depending on how far you have
progressed.
These instructions are an overview of the content within this book.
You can make changes in all of the settings sections, and save them
all. But dont forget to save them! Click on the Save Changes
button at the bottom of the screen to update with your changes.
48
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.
49
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. Cropping is always skipped on mobile devices.
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
50
crop
Default: true
51
52
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.
53
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
54
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;
}
wps_usermeta_change_hook
Hook
used to save the edit profile form
$a
$b
$c
$c
[wps-usermeta]
56
With this shortcode, you can display any "user meta" field that has
been entered. You will need to use it with the shortcode options.
Shortcode Options
user_id
Default: false
label
Default: ''
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
57
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
the filter/hook example shown previously, you could show your
saved value with the following shortcode:
[wps-usermeta meta="my_field"]
[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
58
[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: ''
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
59
[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.
Shortcode Options
are_you_sure_text
Default: string
logout_text
Default: string
label
Default: string
class
Default: ''
url
Default: '/'
before/after
Default: false
60
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.
61
You can also replace their avatar (perhaps their chosen one wasn't
suitable!).
62
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.
63
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
Default: "%s ago"
private
Default: string
64
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
65
link
Default: true
class
Default: ''
accept_request_
label
Default: string
before/after
Default: false
[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
Text if friends.
66
friends_pending
Default: string
friend_request
Default: string
friends_no
Default: string
before/after
Default: false
[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
67
cancel_request_
label
Default: string
class
Default: ''
before/after
Default: false
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.
68
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
69
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
70
flag_size
Default: 24
flag_unread_size
Default: 10
flag_unread_top
Default: 6
flag_unread_left
Default: 8
flag_unread_radius
Default: 8
flag_url
Default: ''
Mandatory
flag_src
Default: ''
Optional URL of an
image to replace the
default icon.
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: "%s ago"
before/after
Default: false
71
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"]
72
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.
73
74
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:
75
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
Mandatory
show
Default: false
header_title
Default: string
header_count
Default: string
header_last_activity
Default: string
76
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
77
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.
78
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
79
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
Defaults to "Topic".
header_count
Default: string
Defaults to "Replies".
header_last_activity
Default: string
moved_to
Default: string
80
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
81
For example:
[wps-forum slug="xxx" style="table"]
You then have some specific additional options you can use to tailor
the forum.
started
Default: string
replied
Default: string
commented
Default: string
82
size_posts
Default: 96
size_replies
Default: 48
post_preview
Default: 250
reply_preview
Default: 120
view_count_label
Default: 'VIEW'
views_count_label
Default: 'VIEWS'
reply_count_label
Default: 'REPLY'
replies_count_label
Default: 'REPLIES'
Note that views starting counting from installation, and exclude post
owner views of the post.
pagination
Default: true
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
84
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
85
$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;
}
86
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
87
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.
88
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
89
allow_private
Default: true
private_reply_
check_msg
Default: string
class
Default: ''
show
Default: true
before/after
Default: false
For example:
[wps-forum-comment slug="???" allow_private="0"]
90
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
Defaults to "Forum".
forum_count
Default: string
Defaults to "Count".
forum_freshness
Default: string
Defaults to "Freshness".
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_summary
Default: 0
count_include_
replies
Default: true
title_length
Default: 50
header_title
Default: string
Defaults to "Topic".
header_count
Default: string
Defaults to "Replies".
header_last_activity
Default: string
featured_image_
width
Default: 0
[wps-forum-backto]
A simple shortcode that provides a link back to the main forum
page.
Shortcode Options
slug
Default: none
94
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
95
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
96
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".
97
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
which would display the following (in this case in a Text widget):
98
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;
}
[wps-forum-sharethis]
You can insert "ShareThis" icons, to allow user's to share forum
topics via social media, email, and so on. You will need an account
at http://www.sharethis.com, which is free.
Once you've signed up with ShareThis, click on their "Get Sharing"
99
Then select one of the buttons styles (only button styles are
supported):
And if you're happy, click on the "Get the Code!" button. Assuming
you've registered, you will see two boxes of code (Span tags and
Script tags). Copy these into the two boxes available via WPS Pro>Forum Setup, hove over a forum and click on Edit.
Scroll down, and copy each of the two blocks of code into the
"ShareThis" section:
100
Note that this is the same code for every forum, you only need to
add this once, to one forum.
You can then add the ShareThis icons to individual forum pages with
the following shortcode.
Shortcode Options
slug
Default: none
Note that the icons will only display on single forum topics.
Administration
There are two areas on the WordPress admin dashboard related to
forum administration.
101
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
Security extension (part of WP Symposium Pro Extensions plugin)
then you can also fine tune security here too.
For each forum you can do/see the following:
name
slug
Edit | Page | View
Order
Privacy
Status
Visibility
Autosubscribe
102
103
104
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,
105
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
15 pixels (px)
padding
top and right 6px, bottom 0px, left 12px
border-radius
3 pixel (px) radius
background-color
#CCCCFF
overflow auto
So, forget overflow. There are some more immediate things to
explain. Pixels represent all the little dots on your screen. So marginbottom basically says, move everything after this <div> down by 15
pixels.
padding is the internal space around the inside of the box, like a
106
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>
107
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:
108
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.
111
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.
112
Pretty awesome!
And that's it, congratulations, a custom profile page all of your own
making!
113
114
WP Symposium Pro
Extensions Plugin
115
116
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.
118
3. 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.
HTML added to top of alert
119
<style>
body { padding: 0; margin: 0; }
</style>
<div style="padding:20px; background-color:#510051">
<div style="border:1px solid #000; background-color:#efefef;
border-radius:5px;padding:20px;">
The result of the above is to make the email alert look as follows:
120
[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:
121
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.
122
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
123
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
124
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
125
before/after
Default: false
126
text_lostpassword_
prompt
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.
128
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.
129
130
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:
131
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.
132
4. 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:
133
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.
134
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.
135
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.
136
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
137
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.
138
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".
Title and description are based on the <title> tag and the <meta>
"description" field. If no description field exists, the URL of the page
is shown instead.
Activate via WPS Pro->Setup underneath "Activity", then use the
shortcode options.
Shortcode options
You add the following options to the [wps-activity] shortcode.
139
dynamic_previews
Default: false
max_previews
Default: 10
ignore_images
Default:
adserver,ads,affiliate
ignore_links
Default: ''
140
url_preview_image
Default: 100
url_preview_fail
Default: true
fail_text
Default: string
fail_image
Default: string
min_width
Default: 200
max_width
Default: 1000
If multiple links are included in the activity post, only the last link is
converted into a preview if caching is on (ie. dynamic_previews set
to false).
Dynamic Previews?
If you set dynamic_previews to 1 (true) this extension does add a
load on to your server, and the more images you show, or conditions
you add, page load time will be increased.
The chances of the image and meta information changing during
the time the activity post remains relevant is slim, and so it is not
recommended to set dynamic_previews to 1 (true).
If you choose to have dynamic previews, you can improve
performance in two ways. The first is to improve your server's
power and internet connection speed! The second is by setting the
shortcode paramters as follows:
max_previews
min_width
ignore_images
142
143
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
Defaults to "Like".
unlike_text
Default: string
Defaults to "Unlike".
like_count_text_
singular
Default: string
like_count_text_
plural
Default: string
dislike_text
Default: string
Defaults to "Dislike".
144
undislike_text
Default: string
Defaults to "Undislike".
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
Default: string
Defaults to "you".
max_names_to_
show
Default: 3
145
Like/dislike alerts
An alert is generated when a user likes or dislikes a post from
another member, so they are informed via email.
To avoid cluttering up the activity stream, a like/dislike activity post
is not added as on busy sites this can overload the activity stream.
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).
146
Favorite Activity
If user's have a lot of activity posts on their activity stream, a useful
feature is to be able to bookmark them as favorites.
By activating this extension, a star image will appear beside each
post, initially not filled in.
147
Shortcodes
There is only one shortcode as follows.
[wps-favourites]
Displays any activity posts that have been bookmarked as a
favourite.
go_to
Default: string
Defaults to "View...".
no_favorites_text
Default: string
link
Default: true
avatar_size
Default: 32
date_format
Default: string
before/after
Default: false
Activity to Facebook
It can really enhance your social network if you let users share
their activity posts to their Facebook accounts. Not only does this
give the user's something extra, it also publicizes your website on
Facebook with a link (where the post was shared from).
To set up Facebook connectivity, you need to first create an
application on Facebook. Login to Facebook as normal, and then go
to https://developers.facebook.com/apps. Once there...
You can always go back to see your application details via https://
developers.facebook.com/apps.
149
When everything is all set up, and running well, you may want to
return to "Status and Review" and click on "Start a Submission" to
get Facebook approval for your application.
150
Once you've completed all the above, on the activity page, below
the area where new activity posts are added, your users will see a
"Connect to Facebook" link.
They will see their Facebook account name, and the option to
disconnect.
If they were logged into the wrong Facebook account when they
connected, they can disconnect, logout of Facebook and re-connect
with the proper account.
However, you are now done. Your users can choose to share activity
posts with Facebook (by default), or un-check the checkbox to avoid
sharing.
Shared activity posts on Facebook will include the name of your
Facebook Application, hence it's worth choosing an appropriate
name, probably to match your website, as it's also a link to your
website.
In the example below, the name of the application "My Site" is
highlighted in the red box.
5. 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.
154
textarea
list
URL
date
image
YouTube
156
Divider
4. Order
Set the order in which the Profile Extension appears on the user's
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).
157
[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
158
age
Default: false
before/after
Default: false
159
160
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:
161
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.
162
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]
163
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
164
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
Defaults to "Joined".
165
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
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"]
166
[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
167
label
Default: string
show_with_results
Default: true
private
Default: false
private_msg
Default: string
include_meta_show
Default: false
roles
Default: false (all)
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.
168
169
profile_extensions_
layout
Default: ''
profile_extensions_
labels
Default: ''
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"]
170
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.
171
172
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
173
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:
174
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.
175
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
176
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
177
Type
Default Value
178
Type of reward to
count
Post count
Badge size
179
180
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.
181
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
182
user_id
Default: false
edit_and_cancel_
class
Default: ''
empty_gallery
Default: string
create_placeholder
Default: string
create_label
Default: string
create_button_label
Default: string
Defaults to "Create".
featured_image_
size
Default: 150
show_owner
Default: string
show_description
Default: true
show_count
Default: true
count
Default: 100
orderby
Default: updated
184
class
Default: false
edit_and_cancel_
class
Default: false
show_slideshow
Default: false
slideshow_link
Default: string
edit_text
Default: string
delete_text
Default: string
Defaults to "Delete".
item_size
Default: 150
show_owner
Default: string
back_to
Default: string
185
add_text
Default: string
button_label
Default: string
Defaults to "Upload".
Defaults to "Update".
edit_prompt_
content
Default: string
show_allowed_
types
Default: string
allowed_image_
types
Default: string
comment_label
Default: string
link
Default: true
date_format
tDefault: 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
187
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, 'Last active: %s
ago');
return $a;
}
188
[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
Maximum to show.
more
Default: string
189
more_top_
adjustment
Default: 0
more_left_
adjustment
Default: 0
orderby
Default: updated
before/after
Default: false
[wps-gallery-grid]
This shortcode is similar to [wps-gallery-list] but is probably more
widely used as part of a custom profile page.
190
Shortcode Options
user_id
Default: all
featured_image_
size
Default: 75
no_permission_text
Default: ''
no_albums
Default: string
count
Default: 30
Maximum to show.
more
Default: string
more_top_
adjustment
Default: 10
more_left_
adjustment
Default: 0
orderby
Default: updated
scrolling
Default: true
191
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.
192
6. Forums
Extensions
193
Shortcode Options
Added to [wps-forum-post].
attachment_label
Default: string
Added to [wps-forum-comment].
attachment_label
Default: string
Instead of using the allowed_image_types, you can add via this filter,
possibly based on certain criteria. The following adds 'tiff' if the user
is a site administrator:
add_action('wps_forum_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, 'tiff');
endif;
return $a;
}
wps_forum_attachments_valid_document_extensions_filter
Filter
allows additional document extensions to be added.
This operates in the same way as the previous filter for images.
194
The title is for the extension, and then a brief description for the
user in the editor. For example, you might create one to work on a
helpdesk for a software application, and enter the title as "Version"
and in the editor enter "What version are you currently using?".
Then, to the right, is a box entitled "Forum Extension Details". In this
box you can choose what type of field this forum extension is (text,
text area, list or URL) and depending on what your extension type is,
a set of questions.
Required (text, textarea or URL)?
Sets whether the forum extension is mandatory (required) or
optional.
Repeat as editable under replies?
This is useful if the value of the field may change frequently. For
example, you might have a forum extension called "Next action
with..." and the values "User" or "Support Department", which will
change depending on who has last replied.
Values (for list type only)
Enter the values for the list, seperated by a comma. The above
example would be entered as "User,Support Department".
Order
The order in which the forum extension fields should appear on the
screen for the user.
Note that all the forum extensions appear, you simply choose those
you want for this particular forum.
Those forum extensions will now show when you create a new post
on the forum (here, with mandatory * beside them):
Shortcode Options
An additional option is added to the [wps-forum] shortcode:
extensions
Default: ''
Which would appear as follows (note that I've renamed next-actionwith to "Owner" at this point as it fits better!):
198
Forum Search
As your forum grows it is necessary to add search functionality. This
extension provide two shortcodes which you probably would add to
a WordPress page. One for the search forum (to enter what you are
searching for) and the second to display the results. Typically they
are on the same page, but can, if preferred be seperated (or you
can have additional forum search forums elsewhere on your site,
perhaps in a Text/HTML widget).
Quick Start
In the majority of cases, the following would typically be added to a
WordPress page:
[wps-forum-search]
[wps-forum-search-results]
199
Shortcodes
[wps-forum-search]
Display the forum search form, which is one text field in to which
users can type a word or multiple words, that are then treated as a
phase. If hello world is entered, it is treated as "hello world".
Shortcode Options
class
Default: false
style
Default: false
url
Default: false
label
Default: string
Defaults to "Search".
show_with_results
Default: true
private
Default: false
private_msg
Default: string
200
placeholder
Default: ''
before/after
Default: false
[wps-forum-search-results]
This shortcode will recognise any search terms entered via the [wpsforum-search] shortcode and display the results, with the search
term (word or phrase) highlighted, for example:
Shortcode Options
private
Default: false
private_msg
Default: string
label_results
Default: string
no_results
Default: string
show_forum
Default: string
show_snippet
Default: true
snippet_length
Default: 200
show_date
Default: true
status
Default: all
date_format
Default: string
max
Default: 100
before/after
Default: false
202
Forum Permissions
This extension allows you to fine tune permissions for your forums
by WordPress roles.
The easiest way, once this extension is enabled (via WPS Pro>Setup->Extensions) is to go to WPS Pro->All Forums. For each
forum is a link "Show Security" that, when clicked, will display a
range of actions, against which are all the WordPress roles that you
have set up.
Simply tick the roles you want to allow to use that feature (for
example, "Viewing" or "Creating" to restrict functionality by
WordPress role.
Read the italicised comment below each set of check boxes to
understand how it is implemented.
This can work very well with other plugins that generate additional
WordPress user roles.
203
204
The user can also remove a previously uploaded image and change
their signature.
205
206
Forum Subscriptions
Getting email alerts to relevant forum activity is a great way to keep
your users engaged. This extension and these shortcodes add that
functionality.
Shortcodes
[wps-subscribe-forum]
Allows users to subscribe to a forum and receive an email when new
posts are added to that forum.
Will also display an email icon beside forum titles shown with [wpsforum] if the user has subscribed.
207
Shortcode Options
slug
Default: ''
Mandatory
style
Default: link
class
Default: ''
subscribe
Default: string
unsubscribe
Default: string
subscribed_msg
Default: string
unsubscribed_msg
Default: string
before/after
Default: false
208
[wps-subscribe-post]
Allows users to subscribe to a forum post and receive an email when
new replies are added to that post.
Will also display an email icon beside forum post title shown with
[wps-forum] if the user has subscribed.
The following shows that the user has subscribed to the General
Forum (through the use of [wps-subscribe-forum] and to one of the
posts with [wps-subscribe-post]:
Shortcode Options
style
Default: link
class
Default: ''
subscribe
Default: string
unsubscribe
Default: string
subscribed_msg
Default: string
unsubscribed_msg
Default: string
before/after
Default: false
[wps-manage-subscriptions]
This shortcode can be placed on a WordPress page to allow users to
manage their forum subscriptions in one place.
210
forums_label
Default: string
Defaults to "Forums".
posts_label
Default: string
Defaults to "Posts".
unsubscribe
Default: string
Defaults to "unsubscribe".
subs_unsubscribe
Default: string
subs_unsubscribe_
msg
Default: string
status
Default: open
closed_prefix
Default: string
Defaults to "closed".
private_msg
Default: ''
before/after
Default: false
211
212
213
214
Forum Toolbars
By default, the text area used by members to add forum posts and
replies is a plain text box.
With this extension, you can add icons above this text area to give
formatting options.
The most likely is the WYSIWYG ("What You See Is What You Get")
version, but if you prefer you can use a BB Codes toolbar. This
probably depends on the type of user of your website.
After activating, a new section is available via WPS Pro->Setup
called "Forum Toolbar" which allows you to choose the style of your
toolbar and, if you are using the WYSIWYG version, which icons will
appear on your toolbar.
To set the WYSWIYG toolbar icons, simply copy from the list
provided underneath, creating your unique version. You can set
215
them in any order that you want, ommitting those that you would
prefer to not make available.
The BB Codes Toolbar tends to be used on forums with users that
are developers, for example.
WYSIWYG Toolbar
BB Codes Toolbar
216
217
218
7. 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.
219
Shortcode Options
class
Default: ''
show
Default: false
label
Default: string
title_label
Default: string
220
content_label
Default: string
before/after
Default: false
[wps-groups]
This shortcode displays all the groups currently created.
Shortcode Options
header_text
Default: string
Defaults to "<h2>Groups</h2>".
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
221
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
222
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:
224
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.
225
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
226
updated
Default: string
updated_ok
Default: string
before/after
Default: false
title_label
Default: string
content_label
Default: string
Defaults to "Description".
cancel_label
Default: string
Defaults to "Cancel".
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
228
label_cancel
Default: string
text_pending
Default: string
text_private
Default: string
[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
[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
230
show_date
Default: true
date_label
Default: string
date_format
Default: string
user_link
Default: true
[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.
231
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!
232
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:
233
234
8. Private
Messaging
Extensions
Private Messages
Allowing user's to send each other messages within your website is
a terrific way to keep them engaged and returning back to the site.
But, private messaging with WP Symposium Pro is much more than
that - messages are more akin to conversations, with multiple friends
as recipients, allowing your members to have true conversations.
Other friends can be added to a conversation, or removed,
depending on how the conversation goes.
Quick Start
After activating private messages via WPS Pro->Setup, click on the
"Add Messages Page" button and a page will be created for you,
which you probably then want to add to your site menu.
This will create a page with a varierty of private messaging
235
Shortcodes
There are quite a number of private messaging shortcodes, giving
you flexibility in how you use them.
Please note: private messaging used to be called "mail", but was
changed to avoid confusion with emails. However, the shortcodes
that follow, and are used, still refer to "mail" to ensure compatibility
with early adopters of WP Symposium Pro.
[wps-mail]
Displays a list of message conversations for the currently logged in
user, and allows user's to view each conversation.
236
Shortcode Options
count
Default: 100
mark_all_read_text
Default: string
private_msg
Default: string
show_hidden_text
Default: string
hide_hidden_text
Default: string
login_url
Default: ''
label_nomail
Default: string
date_format
Default: string
comment_avatar_
size
Default: 64
before/after
Default: false
237
For example, to show a login hyperlink if the user is not logged in,
where the login form is on "/login" you would use:
[wps-mail login_url="/login"]
238
wps_mail_message_post_title_filter
Filter
after the message title (subject)
$a
$b
$c
For example, to add change the surrounding <h2> tags to <h1> you
could do the following (in a basic way):
add_filter( 'wps_mail_message_post_title_filter', 'my_
function', 10, 3 );
function my_function( $a,$b,$c ) {
$a = str_replace('<h2 ', '<h1 ', $a);
$a = str_replace('/h2>', '/h1>', $a);
return $a;
}
239
wps_mail_item_filter
Filter
after the initial post content
$a
$b
$c
$d
wps_mail_item_filter
Filter
after each reply (inside of the surrounding DIV)
$a
$b
$c
$d
wps_mail_post_comment_filter
Filter
after each reply (outside of the surrounding DIV)
$a
$b
$c
$d
wps_mail_post_comment_filter
Filter
after the post and all the replies have been displayed
$a
$b
$c
[wps-mail-post]
Creates the area to start a new message.
240
Shortcode Options
class
Default: ''
show
Default: false
recipients_label
Default: string
Defaults to "Recipient(s)".
to_label
Default: string
Defaults to "To:".
title_label
Default: string
Defaults to "Subject".
content_label
Default: string
label
Default: string
cancel_label
Default: string
Defaults to "Cancel".
no_friends
Default: string
select_recipient
Default: string
before/after
Default: false
241
So in order to add content at the top of the form, you could use the
following:
add_filter( 'wps_mail_post_pre_form_filter', 'my_function',
10, 3 );
function my_function( $a,$b,$c ) {
$a .= '<p>Nothing nasty!</p>';
return $a;
}
wps_mail_textarea_pre_form_filter
Filter
above the form textarea
$a
$b
$c
So in order to add content above the textarea box, you could use
the following:
add_filter( 'wps_mail_textarea_pre_form_filter', 'my_
function', 10, 3 );
function my_function( $a,$b,$c ) {
$a .= '<p>Keep it clean!</p>';
return $a;
}
wps_mail_post_post_form_filter
Filter
at the end of the form
$a
$b
$c
242
wps_mail_post_add_hook
Hook
after a new message has been created
$a
$b
$c
[wps-mail-comment]
Creates the area to reply to a message. Note that these are often
referred to as comments here as WordPress stores the replies as
comments against the original post (original message).
Shortcode Options
class
Default: ''
show
Default: true
content_label
Default: ''
label
Default: string
before/after
Default: false
243
wps_mail_comment_add_hook
Hook
after a new reply has been created
$a
$b
$c
$d
[wps-mail-recipients]
Displays those user's involved in this conversation (the recipients)
and the ability to add/remove users from the conversation.
The author of the original message, any recipient and site
administrators can add more recipients.
The author of the original message, and site administrators can
remove recipients. A recipient can also remove themself.
Here, there are only two recipients (the author of the original
message and the user it was sent to), but this will extend if there are
more recipients.
244
Shortcode Options
size
Default: 96
add_recipients
Default: string
cancel_label
Default: string
add_image_url
Default: WPS image
before/after
Default: false
For example, to change the "+" image, and use an avatar size of
48x48 pixels, you would use the following:
[wps-mail-recipients size="48" add_image_url="/image.png"]
[wps-mail-backto]
Displays a link back to the WordPress page (as set via WPS Pro>Setup->Private Messages) to shows the user's private message
conversations.
Shortcode Options
label
Default: string
245
[wps-mail-search]
Displays a search box, into which a word or phrase can be entered,
and the user's conversations search. When the page is reloaded,
results are displayed with the word/phrase highlighted if displayed.
Shortcode Options
placeholder
Default: string
reset
Default: string
[wps-mail-to-user]
Displays a button on the page that when clicked, opens a "div"
(popup area) into which a message can be entered, and sent to the
user on which the button is being displayed. Generally only used on
profile pages, unless the user_id option is set. Could also be used in
a Text/HTML widget as only displays when applicable (i.e. a user ID
can be worked out, or user_id is set).
246
class
Default: ''
user_id
Default: false
friends_only
Default: true
label
Default: string
popup_label
Default: string
popup_cancel_label
Default: string
popup
Default: true
247
[wps-alerts-mail]
On many social networks, the user's can be helped by
showing an icon, with a number over the top showing the
number of new messages.
Shortcode Options
flag_size
Default: 24
flag_unread_size
Default: 10
flag_unread_top
Default: 6
flag_unread_left
Default: 8
flag_unread_radius
Default: 8
flag_url
Default: false
Mandatory
single_redirect
Default: true
flag_src
Default: false
248
249
250
Message Attachments
You can choose to allow user's to attach images/documents to
messages, and recognise YouTube URLs to show the video below
the message.
251
YouTube videos
If activated, any recognised YouTube URL will cause the video to be
automatically inserted below the message.
252
Email alerts
Private messaging works great, and it's a fabulous way to keep your
users returning to your site. But if users don't return to your site they
would not know about new messages or replies.
Activate this option to send out an alert for new messages and
replies to existing messages, to get your users to return to your site.
253
254
Quick Start
After activating, click on the "Add Lounge Page" quick start button
to create a WordPress page which you can optionally add to your
WordPress menu.
Shortcodes
There is only one shortcode with a small number of options
available.
255
[wps-lounge]
Displays the chat room in which logged in users can participate.
Shortcode Options
chats
Default: 30
refresh
Default: 5
please_wait
Default: string
date_format
Default: string
256
Calendar
The calendar is a convenient way to publicise events to all members
of your site. You can have multiple calendars, and set which
members can view and add events by WordPress roles.
Quick Start
After activating, click on the "Add Calendar Page" quick start button
to create a WordPress page which you can optionally add to your
WordPress menu.
Shortcodes
Three shortcodes are available to display your calendar, add events
and show a link back to the calendar when viewing a single event.
257
[wps-calendar]
Displays the calendar to those who can see it, as defined via WPS
Pro->Calendars->Edit.
days
Default: string
months
Default: string
suffix
Default: string
private_msg
Default: string
left
Default: «
258
right
Default: »
today
Default: string
Defaults to "Today"
thumbnails
Default: true
titles
Default: true
date_format
Default: string
label_noevents
Default: string
comment_label
Default: string
comment_avatar_
size
Default: 64
attachment_label
Default: string
delete_label
Default: string
Defaults to "Delete".
[wps-calendar-post]
Allows those permitted to add a new event to this calendar.
260
Shortcode Options
slug
Default: ''
Mandatory
class
Default: ''
show
Default: false
label
Default: string
update_label
Default: string
title_label
Default: string
content_label
Default: string
start_date_label
Default: string
start_time_label
Default: string
end_date_label
Default: string
261
end_time_label
Default: string
image_label
Default: string
comments_label
Default: string
comments_
allowed_label
Default: string
before/after
Default: false
[wps-calendar-backto]
Shows a link back to the calendar, only appears when viewing a
single event.
262
label
Default: string
before/after
Default: false
263
264
9. Using
shortcodes in
theme page
templates
Functions available
All shortcodes can be used as a PHP function, allowing those who
would like to edit page templates, create plugins or otherwise use
code directly, to include WP Symposium Pro functionality.
A typical use of this is the inclusion of "flags" showing unread
messages, friend requests and new alerts relevant to the user.
The following list shows every shortcode in WP Symposium Pro and
the related function that you would call.
To the left is the shortcode, and beside it the equivalent function.
Following the list, how you se examples of these functions and how
to pass options.
265
Profile
[wps-avatar] wps_avatar()
[wps-avatar-change] wps_avatar_change()
[wps-avatar-change-link]
wps_avatar_change_link()
[wps-display-name] wps_display_name()
Activity
[wps-activity] wps_activity()
[wps-activity-page] wps_activity_page()
[wps-activity-post] wps_activity_post()
[wps-alerts-activity] wps_alerts_activity()
Directory
[wps-directory] wps_directory()
[wps-directory-search] wps_directory_search()
Members
[wps-close-account]
wps_close_account()
[wps-friends] wps_friends()
[wps-friends-add-button]
wps_friends_add_button()
[wps-friends-pending] wps_friends_pending()
[wps-friends-status] wps_friends_status()
[wps-gallery] wps_gallery()
[wps-gallery-grid] wps_gallery_grid()
[wps-gallery-list] wps_gallery_list()
[wps-usermeta] wps_usermeta()
[wps-usermeta-button] wps_usermeta_button()
[wps-usermeta-change]
wps_usermeta_change()
[wps-usermeta-change-link] wps_usermeta_change_link()
266
Rewards
[wps-badge] wps_badge()
[wps-reward] wps_reward()
[wps-rewards] wps_rewards()
Forums
[wps-forum] wps_forum()
[wps-forum-comment] wps_forum_comment()
[wps-forum-page] wps_forum_page()
[wps-forum-post] wps_forum_post()
[wps-forums] wps_forums()
[wps-forum-backto] wps_forum_backto()
[wps-forum-show-posts]
wps_forum_show_posts()
[wps-forum-sharethis] wps_forum_sharethis_insert()
Groups
[wps-group-activity] wps_group_activity()
[wps-group-admin] wps_group_admin()
[wps-group-create] wps_group_create()
[wps-group-delete] wps_group_delete()
[wps-group-description]
wps_group_description()
[wps-group-edit] wps_group_edit()
[wps-group-id] wps_group_id()
[wps-group-image] wps_group_image()
[wps-group-join-button]
wps_group_join_button()
[wps-group-members] wps_group_members()
[wps-group-post] wps_group_post()
[wps-groups] wps_groups()
[wps-group-title] wps_group_title()
[wps-group-url] wps_group_url()
[wps-my-groups] wps_my_groups()
267
Private Messages
[wps-alerts-mail] wps_alerts_mail()
[wps-mail] wps_mail()
[wps-mail-backto] wps_mail_backto()
[wps-mail-comment] wps_mail_comment()
[wps-mail-post] wps_mail_post()
[wps-mail-recipients] wps_mail_recipients()
[wps-mail-search] wps_mail_search()
[wps-mail-to-user] wps_mail_to_user_post()
Calendar
[wps-calendar] wps_calendar()
[wps-calendar-backto] wps_calendar_post()
[wps-calendar-post] wps_calendar_post()
Core/Miscellaneous
[wps-login-form] wps_login_form()
[wps-lounge] wps_lounge()
Passing options
Shortcode options, when used with functions, are passed an array
of these options. The options and values are the same as per the
shortcodes which you can get from the relevant chapter in this book.
The best way to see how they work is with the following examples,
see how the array parameters in the following code represent the
shortcode options.
268
Examples
The following are some examples of how these functions can be
used.
269
echo wps_directory_search(array(
'quick_select' => '1',
'mode' => 'list',
'placeholder' => 'Member search...'
));
270
271
272
10. Core
Functions
(API)
10
To be able to use the core functions, you need to include the API file,
for example, changing the path to match your installation:
require_once('your/path/to/plugins/wp-symposium-pro/core_api.php');
API Functions
For a more technical representation of parameters and return values,
please view the core_api.php file directly. For every function is a list
of parameters, return value, and other relevant technical information.
$a
$b
$c
$d
$e
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");
274
275
276
Index
Shortcodes
[wps-activity] 38, 139, 144
[wps-activity-page] 20, 21
[wps-activity-post] 36
[wps-alerts-activity] 70
[wps-alerts-mail] 248
[wps-avatar] 32
[wps-avatar-change] 50, 54, 64, 65, 66, 67, 70
[wps-avatar-link] 35, 36
[wps-badge] 176
[wps-calendar] 258
[wps-calendar-backto] 262
[wps-calendar-post] 260
[wps-close-account] 60
[wps-directory] 164
[wps-directory-search] 167
[wps-forum] 78, 88, 91, 207, 209
[wps-forum-backto] 94
[wps-forum-comment] 88, 91, 194
[wps-forum-page] 76
[wps-forum-post] 194
[wps-forums] 91
[wps-forum-sharethis] 99
[wps-forum-show-posts] 95
[wps-friends] 64, 65, 66, 67, 70
[wps-friends-add-button] 67
[wps-friends-pending] 65, 66, 67
[wps-friends-status] 66, 67
[wps-gallery] 182, 192
[wps-gallery-grid] 190
[wps-gallery-list] 189
[wps-group-activity] 229
[wps-group-admin] 226
[wps-group-create] 220, 225
[wps-group-delete] 228
[wps-group-description] 225
277
[wps-group-edit] 226
[wps-group-id] 231
[wps-group-image] 225
[wps-group-join-button] 228
[wps-group-members] 230, 236, 240
[wps-group-post] 229
[wps-groups] 221, 223
[wps-group-title] 225
[wps-group-url] 231
[wps_login_form] 121
[wps-lounge] 256, 258, 260, 262
[wps-mail] 236
[wps-mail-backto] 245
[wps-mail-comment] 243
[wps-mail-post] 240
[wps-mail-recipients] 244
[wps-mail-search] 246
[wps-mail-to-user] 246
[wps-my-groups] 223
[wps-reward] 176, 182, 189, 190, 200, 207, 209, 210
[wps-rewards] 177
[wps-usermeta] 56
[wps-usermeta-button] 59
[wps-usermeta-change] 54
[wps-usermeta-change-link] 58
A
accept_request_label 66, 166
Accessing the API 265, 273
account_closed_msg 37
Activating the Individual Extensions 118
Activity attachments 137
Activity share lists 135, 137
activity stream 38
Activity to Facebook 149
Add Calendar Page 257
Add Forum 16
Add Forums 16
add_image_url 245
Adding alerts to your theme 72
Adding an Extension to a Forum 196
278
Calendar 257
cancel_button_label 183, 186
cancel_label 67, 227, 241, 245
cancel_request_label 68
captcha 123
CAPTCHA 122
Change Avatar Page 47, 49
change_link 34
chats 256
choose 50
Choosing Activity Recipient(s) 133, 135
class 37, 40, 54, 59, 60, 66, 68, 77, 167, 185, 200, 208, 209, 220,
227, 228, 230, 247, 261
clear out your alerts 73
close an account 60
closed_prefix 80, 96, 211
closed_switch 79
closed_switch_msg 79
close_msg 89
comment_add_label 84
comment_avatar_size 39, 186, 237, 259
comment_class 85
commented 82
comment_label 187, 259
comment_pending 80
comments_allowed_label 262
comments_avatar_size 85
comments_closed_msg 89
comment_size 40
comment_size_text_plural 40
comment_size_text_singular 40
comments_label 262
Connect to Facebook 151
content_label 78, 89, 221, 227, 241, 243, 261
Core Functions 265, 273
count 39, 64, 65, 81, 177, 184, 189, 191, 237
count_include_replies 93
country 23, 54, 125
country_label 24
create_button_label 183
280
create_label 183
create_placeholder 183
Creating a Forum Extension 195
Creating Profile Extensions 154
crop 50, 51
CSS 105, 111
Custom Email Alerts 119, 121, 129, 133, 135, 147, 149, 153, 161
Custom Forum Fields (Forum Extensions) 195, 199, 203, 205, 207,
213
Custom Forum Page 217
D
Data Protection Act 61
date 156
date_format 41, 71, 81, 97, 148, 187, 202, 231, 237, 256, 259
date_label 165, 221, 231
dating site 153
days 177, 258
Default Friends 171
Default Groups 233, 273
Default Profile Page 20
Default Value 178
delete_all_text 71
delete_label 41, 260
delete_text 185
deleting users 60
Disable Alerts 73
dislike_count_text_plural 145
dislike_count_text_singular 145
dislike_text 144
display_name 54, 125
Divider 157
done_text 145
Dropdown list of alerts 270
dynamic_previews 140
Dynamic Previews 142
E
edit_and_cancel_class 183, 185
Edit Profile 21, 154
Edit Profile Page 47, 53
281
edit_prompt_content 186
edit_prompt_text 182, 183, 189
edit_text 185
email 55
Email alerts 253
Emails to send 74
empty_gallery 183
empty_msg 80
empty_text 158
end_date_label 261
end_time_label 262
Extension Details box 155
extensions 198
Extensions plugin 12
F
Facebook 17, 149
Facebook and Twitter 17
Facebook Application 151
Facebook page URL 155
fail_image 141
fail_text 141
Favorite Activity 147
Featured image 178
featured_image_size 183, 189, 191
featured_image_width 93
file_types_msg 50
flag_size 70, 248
flag_src 71, 248
flag_unread_left 70, 72, 248
flag_unread_radius 71, 72, 248
flag_unread_size 70, 248
flag_unread_top 70, 72, 248
flag_url 71, 248
Forgotten Password? Form 126, 127
forum_count 92
forum_freshness 92
forum_last_activity 92
Forum Permissions 203, 205, 207, 213
Forums 75
Forum Search 199, 203, 205, 207, 213
282
label_leave 228
label_login 123
label_lostpassword 123
label_lostpassword_send 126
label_name 125
label_noevents 259
label_nomail 237
label_password 124
label_password_confirm 124
label_prefix 158
label_register 123
label_results 201
label_username 123, 124
last_active_format 64, 165
last_active_text 64
layout 65, 166
layouts, Alternative forum 81
left 258
level_0_links 92
licence 12, 117
like_count_text_plural 144
like_count_text_singular 144
like_text 144
limit 164
link 41, 64, 66, 148, 164, 177, 187, 221, 226
list 155
Live chat support 13
locked_msg 78, 89
Login and Redirect 121
login form 121
Login Form 123
Login Form Shortcode Options 123, 124
Login to Facebook 149
login_url 80, 237
logout_text 60
lost_password 123
M
Mailing List 17
make_all_read_text 71
Manage lists 136
285
mandatory 125
mandatory text 126
map_size 23
map_style 23, 57
map_zoom 23
mark_all_read_text 237
max 96, 202
max_names_to_show 145
max_previews 140
max_width 141
Member Directory 163
Menu Alerts 131
Message Attachments 251
meta 57
meta_class 55
mimic_user_id 24, 42
min_width 141
mode 124, 167
moderate 78, 89
moderate_msg 78, 89
months 258
more 40, 189, 191
more_label 40
more_left_adjustment 190, 191
more_text_plural 145
more_text_singular 145
more_top_adjustment 190, 191
moved_to 80
N
name 125
New alerts icon 269
New friend request icon 269
nickname 125
no_activity_text 71
no_albums 189, 191
no_favorites_text 148
no_friends 241
no_indent 92
none 65, 66
no_permission_text 182, 185, 189, 191
286
no_results 201
no_results_msg 164, 221
not_found 42
not_permitted 50
number 164
O
opacity 176
order 96, 164, 221
Order 102, 157, 196
order_by 164, 221
orderby 96, 184, 190, 191
or_text 145
P
padding 192
page_size 84
page_x_of_y 84
pagination 83
pagination_bottom 84
pagination_top 84
password 54, 125
password2 54
password_msg 55
pending 80
pending friendship requests 65, 66
Permalink 177
PHP 26, 73, 269
placeholder 167, 201, 246
please_wait 256
popup 247
popup_cancel_label 247
popup_label 247
Post count 179
post_deleted 84
post_id 41
post_preview 83
posts_label 211
Privacy 102
private 64, 168, 200, 201
private_label 227
287
show_last_activity 79, 92
show_location 164
show_owner 183, 185
show_posts 92
show_posts_header 92
show_registered 165
show_slideshow 185
show_snippet 97, 202
show_summary 93
show_user_login 167
show_with_results 168, 200
single_redirect 248
Site-wide chat room 255, 257
size 34, 57, 64, 65, 83, 176, 245
size_posts 83
size_replies 83
slideshow_hide_link 185
slideshow_link 185
slug 76, 77, 79, 88, 91, 94, 95, 101, 102, 158, 208, 258, 261
snippet_length 97, 202
SoundCloud 139
start_date_label 261
started 82
start_time_label 261
status 96, 202, 211, 230
Status 102
stick 39
sticky_label 41
sticky_others 41
style 70, 200, 208, 209
subscribe 208, 209
subscribed_msg 208, 209
subs_unsubscribe 211
subs_unsubscribe_ 211
suffix 258
summary 97
summary_avatar_size 98
summary_commented 98
Summary email 74
summary_format 97
290
summary_replied 98
summary_show_unread 98
summary_snippet_length 98
summary_started 97
summary_title_length 98
Support and Help 13
System Messages 129
T
Test WordPress email 74
Test WP Symposium Pro alert 74
text 36, 58, 155
textarea 155
textarea or URL)? 196
text_lostpassword_prompt 127
text_new_password 127
text_password_reset 127
text_pending 229
text_private 229
text_register_prompt 125, 127
text_username_not_found 127
theme 72
thumbnails 259
timeout 84
title_label 77, 220, 227, 241, 261
title_length 81, 93, 97
titles 259
today 259
to_label 241
town 54, 125
Town and Country shortcode options 55
town/city 23
Town/City and Country fields mandatory 126
town_label 24
translate 260
try_again_msg 50
Twitter 17
Type 155, 178
Type of reward to count 179
U
291
undislike_text 145
unlike_text 144
Unread mail messages icon 269
unsticky_label 41
unsubscribe 208, 209, 211
unsubscribed_msg 208, 209
update_button_label 186
updated 227
updated_ok 227
update_label 227, 261
upload images and documents to forum posts 193
Upload Plugin 12, 118
url 59, 60, 123, 167, 200
URL 155
url_preview_fail 141
url_preview_image 141
user_avatar_size 23
user_id 158, 182, 183, 189, 191, 247
user_link 231
Using shortcodes in theme page templates 265
V
value 59
Values (for list type only) 196
Video Tutorials 17
view_count_label 83
views_count_label 83
Visibility 102
W
Website link previews 139
What is WP Symposium Pro? 11
width 221, 225
WordPress filter 25
WordPress hook 25
wps_activity_post_add_hook 274
wps_api_insert_activity_post 273
wpspro_country 57
wpspro_home 57
wpspro_map 57
wps_usermeta_change_filter 58
292
wps_usermeta_change_hook 58
WP Symposium Pro Extensions 12
WP Symposium Pro Extensions Plugin 117
WYSIWYG 215
WYSIWYG Toolbar 216
Y
you_text 145
YouTube 138, 156, 252
Z
zoom 57
293
294
Note that some hooks/filters appear more than once, as they are
covered in more than one section of the book.
wps_forum_comment_pre_form_filter90
wps_forum_comment_pre_form_filter91
wps_forum_get_post_item99
wps_forum_item_content_filter87
wps_forum_item_sub_comment_filter87
wps_forum_name_filter93
wps_forum_post_comment_filter88
wps_forum_post_comment_filter88
wps_forum_post_delete_hook85
wps_forum_post_post_title_filter86
wps_friends_init68
wps_gallery_attachments_valid_document_extensions_filter187
wps_gallery_attachments_valid_image_extensions_filter187
wps_gallery_comment_meta_filter188
wps_group_item_filter222
wps_groups_post_filter223
wps_groups_pre_filter222
wps_mail_comment_add_hook244
wps_mail_comment_post_form_filter244
wps_mail_item_filter
240
wps_mail_item_filter
240
wps_mail_message_post_title_filter
239
wps_mail_message_pre_filter
239
wps_mail_post_add_hook243
wps_mail_post_comment_filter
240
wps_mail_post_comment_filter
240
wps_mail_post_item238
wps_mail_post_pre_form_filter
242
wps_mail_textarea_pre_form_filter242
wps_my_group_item_filter223
wps_my_groups_post_filter223
wps_my_groups_pre_filter223
wps_usermeta_change_filter55
wps_usermeta_change_hook56
wps_usermeta_init61
296
Change Control
Most recent changes are listed here, to keep you up to date. As
changes are frequent, a complete list since the document was
started is not included.
0.45
0.44
0.43
0.42
0.41
0.40
Added Calendars
Added shortcode function reference list
297
298