WP_w3all phpBB WordPress 2.6.6 >
WP_w3all phpBB notifications into WordPress shortcode version 1.0
check all others shortcodes listed under the “common how” to section
The w3all_phpbb_unotifications
shortcode display *phpBB notifications like phpBB do. The file that can be styled as more like and that display results is:
/wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_unotifications_short.php
Add the attribute class for ul
and li
elements, using shortcode attributes ul_phpbb_unotifications_class="myclass"
and li_phpbb_unotifications_class="myotherclass"
*Note that to get resultsthe phpBB user have to setup/activate into his User Control Panel, under Board preferences Tab -> Edit notification options option, the notifications types he want to see.
Note also that once a phpBB user visit the
Board index -> User Control Panel -> Overview -> Manage notifications
page, the $phpbb_user_session[0]->user_new_privmsg
var become 0. So PMs notifications are not retrieved anymore for the user (until there is not a new PM).
The file /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_unotifications_short.php
can be copied into the folder /wp-content/plugins/wp-w3all-custom/ and activating the option Use custom files to display Last Topics Widgets, Login Widget and Shortcodes so that custom modifications done into the file aren’t overwritten when the plugin will be updated.
All default phpBB (3.3>) notifications types that can be expected will be retrieved:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
type.post_in_queue type.approve_post type.pm type.topic type.group_request type.approve_topic type.quote type.bookmark type.post type.admin_activate_user type.group_request_approved type.report_pm type.report_post_closed type.disapprove_post type.disapprove_topic type.forum |
Since 2.6.9 > added option:
Only get the total notifications count, of any type, default phpBB and customs types created by extensions
If selected, then just use echo $w3all_phpbb_unotifications;
in this case, to display the number of unread notifications, declaring it as global, into any Php template or (maybe) some other plugin.