Title: w3all_phpbb_unotifications doesn&#8217;t work
Last modified: January 2, 2023

---

# w3all_phpbb_unotifications doesn’t work

 *  Resolved [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/)
 * Hi, it’s me again. 🙂
 * After the 2.6.8 update, the code to show the notification count still doesn’t
   work.
 * I tried many php combinations. It didn’t work. plainly
 *     ```wp-block-code
       <?php global $w3all_phpbb_unotifications;
         echo count($w3all_phpbb_unotifications);
       ?>
       ```
   
 * When it is used, it shows 0, but there is actually a notification.
 * You know, I usually use it in two ways. First:
 *     ```wp-block-code
       function add_notification_count_to_menu($item_output, $item, $depth, $args)
           {
               if ($args->theme_location == 'primary' && $item->title == '<i class="fas fa-comment"></i> Forumlar') {
       global $w3all_phpbb_unotifications;
       			if (!empty($w3all_phpbb_unotifications) && count($w3all_phpbb_unotifications) > 0){
                   $item_output .= '<span class="bildirimvarbaksana">'. count($w3all_phpbb_unotifications) .'</span>';
   
               }
       		}
   
               return $item_output;
           }
       add_filter('walker_nav_menu_start_el', 'add_notification_count_to_menu', 10, 4);
       ```
   
 * latter:
 *     ```wp-block-code
       <?php global $w3all_phpbb_unotifications; if (!empty($w3all_phpbb_unotifications) && count($w3all_phpbb_unotifications) > 0){ echo'<span class="bildirimvarnokta"></span>'; } ?>
       ```
   
 * Not working. Of course, these don’t show anything because they have an if. Because
   as I just said, notifications show 0.
 * I cleared the cache. I tried from incognito tab.
 * What do you think is the problem?
 * Thanks.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/page/2/?output_format=md)

 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16334759)
 * Hello dear. It should work fine ever. But there is a problem with PM i see.
 * The query to get PMs if option active, won’t work fine…. looking for the solution
   🙁 in short
 * Thinking to separate the two queries and merge results in case of PMs… mhhh s*
   it 🙂
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16334799)
 * No, it is working fine. I had disabled on last test yesterday, all notifications
   options on the user control panel, with the user i was testing.
 * The problem you may found is about IF the user have OR not set notifications 
   into **Edit notification options**
 * Access to **Edit notification options** on the User Control Panel and Activate
   all options on the **NOTIFICATIONS** column then test it.
 * Should all work fine
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16335303)
 * I can’t understand either. No problem with UCP. I wonder if it’s related to php,
   I upgraded to 8.1.x, it didn’t work, I rolled it back. I reviewed the settings.
   It didn’t work. Could something else be triggering it or a missing php module
   or something?
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16336372)
 * No it can’t be, the whole plugin code is suitable on php from 7 to 8> (and could
   be for 5.6 with really few line changes)
 * Note that once an 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.
 * To force and get by the way, you could change this line
 * `if( $phpbb_user_session[0]->user_new_privmsg > 0 && $w3all_phpbb_unotifications_yn
   == 1 )`
 * into file _class.wp.w3all-phpbb.php_
 * changing into:
 * `if( $w3all_phpbb_unotifications_yn == 1 )`
 * so that even after visited the Manage Notification page in phpBB, unread PMs 
   will be by the way retrieved. I do not encourage this, but you can test that 
   it work as mentioned. The above do not affect the Topics and Posts notifications
   that will be retrieved until not read.
 * The file /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_unotifications_short.
   php
 * has been just updated to add code into the condition
 *     ```wp-block-code
       elseif (  $nn == 'notification_type_name' && strpos($n,'type.forum') )
       ```
   
 * when the notification is of type.forum.
 * [https://plugins.trac.wordpress.org/export/HEAD/wp-w3all-phpbb-integration/trunk/views/wp_w3all_phpbb_upm_short.php](https://plugins.trac.wordpress.org/export/HEAD/wp-w3all-phpbb-integration/trunk/views/wp_w3all_phpbb_upm_short.php)
 * It still lack:
 * **notification.type.disapprove_post**
 * **notification.type.disapprove_topic**
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16336440)
 * Frankly all I want to do right now is to show the notification count. I don’t
   care about PMs, because if PM has already arrived, a notification comes. Then
   there is no need to get numbers for PM as an extra. I’m thinking of reporting
   later as in phpBB but not now.
 * All notification options are active in UCP to be displayed on the board.
 * 🙁
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339660)
 * Do not remember if already asked: which phpBB version are you on? This should
   be the unique reason of why it is not working.
 * the file [/views/wp_w3all_phpbb_upm_short](https://plugins.trac.wordpress.org/export/HEAD/wp-w3all-phpbb-integration/trunk/views/wp_w3all_phpbb_upm_short.php)
   has been definitively and completely fixed under any aspect at date of this post
 * [https://plugins.trac.wordpress.org/export/HEAD/wp-w3all-phpbb-integration/trunk/views/wp_w3all_phpbb_upm_short.php](https://plugins.trac.wordpress.org/export/HEAD/wp-w3all-phpbb-integration/trunk/views/wp_w3all_phpbb_upm_short.php)
 * have you try to use the shortcode and see if it work?
 * Since you are sure that the user that should see notifications, activated notifications
   into his UCP, at moment i cannot imagine where the problem come out for your 
   install..
 * could you screenshot the phpBB **phpbb_notification_types **db table?
 * Curious to see
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339727)
 * phpBB version is 3.3.9. WordPress is 6.1.1.
 * When I used the code in the file you gave, a link appeared that opened the page
   it was on when clicked: “You have unread forum PM”. I changed the setting to “
   Yes, also Private Messages” in case it works (Usually set to “Yes, but exclude
   Private Messages”.). Again the link was not working.
 * ![](https://i0.wp.com/obelde.com/wp-content/uploads/baksanaheysenburayabakbunlarianlamiyondeeemihahahah.
   jpg?ssl=1)
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339745)
 * Only notification names that start with
 * **notification.type** are default phpBB 33>
 * and considered by the plugin query (others can be easily added), so you cannot
   expect that those coming from installed extensions are retrieved.
 * Anyway, very strange because the query almost for defaults should surely work
   fine.
 * Is it possible that those by extensions overwrite defaults? The screenshot list
   all existent types? If a pm or post notification data is stored, it is stored
   for the notification you want, into/as a default phpBB type?
 * Have you try to disable extensions?… anyway, strange, extensions should not affect
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339759)
 * We were able to do this before updating to 2.6.6, the first time I asked for 
   help; I have the same things; I assume it counted all the notification types 
   of this. However, in the last update, the default notification types mentioned
   are not counted either.
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339769)
 * where you are using the code that should count?
 * i start to assume that you are calling
 * `echo count($w3all_phpbb_unotifications);//exit;`
 * somewhere when it is still not populated
    -  This reply was modified 3 years, 5 months ago by [axew3](https://wordpress.org/support/users/axewww/).
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16339778)
 * The first code that I said I used in the first message is in the functions.php
   file, and the other one in the header.php.
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16365499)
 * Will I lose a lot if I go back to 2.6.5?
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16401330)
 * 2.6.9 has been released and add 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.`
 * Read inline hints!
 * Cheers! alessio
 *  Thread Starter [Halil](https://wordpress.org/support/users/halilesen/)
 * (@halilesen)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16401561)
 * But
 * ![](https://i0.wp.com/obelde.com/wp-content/uploads/bakhalayaofofof.jpg?ssl=1)
 *  Plugin Author [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/#post-16401641)
 * You do not have to count nothing, just use echo

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/page/2/?output_format=md)

The topic ‘w3all_phpbb_unotifications doesn’t work’ is closed to new replies.

 * ![](https://ps.w.org/wp-w3all-phpbb-integration/assets/icon-128x128.png?rev=3375511)
 * [WP w3all phpBB](https://wordpress.org/plugins/wp-w3all-phpbb-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-w3all-phpbb-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-w3all-phpbb-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-w3all-phpbb-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-w3all-phpbb-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-w3all-phpbb-integration/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Halil](https://wordpress.org/support/users/halilesen/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/w3all_phpbb_unotifications-doesnt-work/page/2/#post-16401686)
 * Status: resolved