Shortcode: phpBB notifications into WordPress

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:

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.

phpBB WordPress template integration (iframe v5)

V5 version (for cool people)

PLUGIN VERSION 2.7.4>

PAGE HELP – JS code – updated on 7 Dec 2023
(related addons/page-forum.phpupdated on 7 Dec 2023)

wp-w3all-phpbb-integration/trunk/addons/page-forum.php

wp_w3all responsive iframe procedure

WordPress phpBB iframe template integration

UPDATE PROCEDURE: rebuild page-forum.php (or whatever named) via plugin admin, OR manually substitute it into your active WP template folder, with the new one that you find/copy into /wp-content/plugins/wp-w3all-phpbb-integration/addons. You’ll may also update the iframeResizer.contentWindow.min.js and iframeResizer.contentWindow.map files added into phpBB root, with news updated files you’ll find into /wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer folder (this step is not always required, but only when iframe resizer library updates, which is notified on plugin changelog when plugin released). Done this, substitute the phpBB overall_header.html and overall_footer.html code (re-adding required values) with the new v5 code here below. Do not forget to rebuild phpBB template to make phpBB template modifications take effect, and may cleanup phpBB cache.

To do an awesome Template integration by Shortcode, that’s compatible with any WP theme, you have to add the same code as more below int this page explained, into the overall_header and overall_footer phpBB files, and then read here:

NOTE – relevant files: page-forum(or whatever you named it).php into your active WP template folder, while if using the awesome phpBB iframe shortcode the  file is /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_iframe_short.php)

WP_w3all template integration steps

Build/create the WP forum template page via option
WP_w3all phpBB embedded on WordPress Template
on WP_w3all admin config page, and the blank page on WordPress Admin -> Pages -> Add New, titled the same, so forum or board  etc (then you’ll have into your active WordPress template folder a file named page-forum.php or page-board.php etc), then to complete the procedure and get the responsive iframe height for the embedded/iframed phpBB into WordPress template page you need:

overall_footer.html code

Open with a text editor your phpBB template file overall_footer.html

and just before the closing </body> tag, add this code (do not select rows numbers on copied code):

after you pasted this code into phpBB overall_footer.html
edit following lines:

change the w3allAllowDomain var value to fit your WP URL.
Now check the other line to change:

change value on this line that need to point to the URL of the WordPress created/named forum page (do not add final slash and change http or https as needed)
MANDATORY!

Change the w3 value of the line

to fit the value that (if) you may changed it into the plugin admin, where option: Fancy URL query string for the WordPress page forum that embed phpBB

Finally, check this line

in the code you added (last line): this should correctly point to the iframeResizer.contentWindow.min.js file that you’ll go to add into phpBB root folder (together with the file iframeResizer.contentWindow.map). You need to use the absolute URL (use http or https as needed, and adjust the url to fit your needs)
(MANDATORY!) or resizer won’t work

AFTER EDITED, save and load the modified overall_footer.html into your phpBB style folder, overwriting the default one, and so

load via ftp into the phpBB root folder (or copy/paste), both files
iframeResizer.contentWindow.min.js AND iframeResizer.contentWindow.map
that you find inside the folder
wp/wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer

After this, phpBB require to recompile the template, or template files modifications do not affect. Open phpBB ACP, and so under:

Server Configuration -> Load settings -> Recompile stale style components set to YES and save. Load one time a phpBB full forum page. Leave as is at moment, especially if you follow adding also the code on overall_header.html (more below) to redirect any phpBB direct URL to the iframed phpBB into the WP page: then after tested that all work fine, return to ACP, and reset to NO and save. This step is needed to load/rebuild template modifications in phpBB if there are, but this option should be ever set to NO into an online/production site to save server resources. It is normally set to yes only for testing/devel purpose or to apply modifications on phpBB templates files.

overall_header.html code

If you want phpBB email notification links or any phpBB direct url to be redirected to the wp iframed forum page follow this step:

Open with a text editor your phpBB template file overall_header.html and immediately after the closing </title> tag add the following code:

On added code, change URL on the line where:

to fit/point to the WordPress iframed forum page: DO NOT ADD final slash and setup as http or https as needed.

Change the default w3 value of the line:

to fit the value you may changed into the plugin admin, where there is the option: Fancy URL query string for the WordPress page forum that embed phpBB

Reset to No the Recompile phpBB template option after some test. So before to follow READ NEXT IMPORTANT NOTE

NOTE: if you need to disable/remove the overall_header.html javascript code, that do not allow (until javascript enabled on browser) to access front end real phpBB urls, forcing the redirect to the WP forum page, you can  disable javascript on browser, if you do not want to remove/disable the added js snippet into the phpBB overall_header.html file. It is also !important to remember this if in trouble with login, and recompile Stale Template option in phpBB is set to Off at this time.

if the iframe do not display and you get mixed insecure content on console, you have to fix it doing this: open your WP header.php template file, and may just before others header meta tags add the follow:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

For testing or for any other reason, you could also comment out the line where:

change into this:

so phpBB direct URL’s will not be redirected to the WP page forum URL. But you can open the page-forum to see the iframed result in the while. Remember that to apply template modifications, phpBB require to recompile templates files.

NOTE: if the iframe still do not display correctly:

Iframe height do not resize to match my theme! (how to change heightCalculationMethod)

If using the Awesome iframe template integration via shortcode, relevant file to look into is:

/wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_iframe_short.php

Check related shortcode page to know more about customization.

Enjoy your awesome template integration!

Appreciations: https://www.paypal.com/paypalme/alessionanni/

© 2023 axew3.com

Iframe resize library by: https://github.com/davidjbradshaw/iframe-resizer

phpBB WordPress template integration (iframe v4)

v4 version (for cool people)

FROM 2.1.1 USE V5 code: https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/

OLD CODE: cool people moved to V5

FROM 2.1.1 USE V5 code: https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/

SINCE 2.1.1 the following code, even if still working with his related page-forum (linked below) into any plugin version, is now obsolete.

PAGE HELP – JS code – UPDATED on 15 Gen 2020
(related addons/page-forum.phpupdated on 14 Gen 2020)

wp-w3all-phpbb-integration/tags/2.1.0/addons/page-forum.php

wp_w3all plugin 1.9.9 until 2.1.0

phpBB SEO mods compatible – (READ ALL this page)

wp_w3all responsive iframe procedure

WordPress phpBB iframe template integration

MEMO: to update to latest v4 code, you’ll need to rebuild page-forum.php (or whatever you named it) via plugin admin, OR manually substitute it into your active WP template folder, with the new one that you find/copy into /wp-content/plugins/wp-w3all-phpbb-integration/addons. You’ll need to update also the iframeResizer.contentWindow.min.js file you added into phpBB root, with the new one you find into /wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer folder. Done this, substitute the phpBB overall_header.html and overall_footer.html code (re-adding needed values) with the new v4 code here below. Do not forget to rebuild phpBB template to make phpBB template modifications take effect.

 Domain/subdomains installations it’s REQUIRED to read this: How to Domain/subdomain iframe template integration

WP_w3all template integration steps

After you built/create the WP forum template page via option
WP_w3all phpBB embedded on WordPress Template
on WP_w3all admin config page, and the blank page on WordPress Admin -> Pages -> Add New, titled the same of created wp_w3all template page, so forum or board  etc (then you’ll have into your active WordPress template folder a file named page-forum.php or page-board.php etc), to complete the procedure and get the responsive iframe height for the embedded/iframed phpBB into WordPress template page you need:

overall_footer.html code

Open with a text editor your phpBB template file overall_footer.html

and just before the closing </body> tag, add this code (do not select rows numbers on copied code):

after you pasted this code into phpBB overall_footer.html
edit following lines:

change localhost to fit your domain name (example axew3.com)
do NOT add http(s):// OR the point in front nor anything else, just add
yourdomain.com or set it as localhost if on localhost test. If phpBB is at subdomain.domain.com, add domain.com as value
(MANDATORY!) or resizer won’t work
now check the other line to change:

change value
https://localhost/wp53/forum
on this line, to point to the URL of the WordPress created/named forum page (do not add final slash and change http or https as needed)
MANDATORY!

Finally, check this line

in the code you added (last line): this should correctly point to the iframeResizer.contentWindow.min.js file that you’ll go to add into phpBB root folder. You need to use the absolute URL (use http or https as needed, and adjust the url to fit your needs)
(MANDATORY!) or resizer won’t work

AFTER EDITED, save and load the modified overall_footer.html into your phpBB style folder, overwriting the default one, and so

load through ftp on the phpBB root folder (or copy/paste), the file
iframeResizer.contentWindow.min.js
that is contained inside folder
wp/wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer

After this, phpBB require to recompile the template, or modifications to template files not affect (to overall_footer.html in this case). Open phpBB ACP, and so under:

Server Configuration -> Load settings -> Recompile stale style components set to YES and save. Load one time a phpBB full forum page. Leave as is at moment, especially if you follow adding also the code on overall_header.html (more below) to redirect any phpBB direct URL to the iframed WP page: then after tested that all work fine, return to ACP, and reset to NO and save. This step is needed to load the template modifications on phpBB (and any time you edit a phpBB template file to for modifications take effect), but this option should be ever set to NO into an online/production site to save server resources. It is normally set to yes only for testing/devel purpose or to apply modifications on phpBB templates files.

overall_header.html code

The new V4 w3all iframe code do not use anymore htaccess to force redirects, but use pure Javascript (reload) code, that as you may imagine, lead to some different result: you’ll not have to edit phpBB notification links on phpBB notification files as on V1 or V2 code, to force users redirect to iframe when they click (for example) on notification email link or some other forum’s link. But in this case, any user except bots, will be redirected (as code is, but it can be easily changed to assume different behaviors, may excluding admins or moderators etc) to the WP iframed page, if the forum accessed via real phpBB url.

If you want phpBB email notification links or any phpBB direct url to be redirected to the wp iframed forum page follow this step:

Open with a text editor your phpBB template file overall_header.html

and just immediately after this code (or by the way, just before the closing tag </head>)

add the following code:

On added code, change URL on the line where (line 3):

to fit/point to the WordPress iframed forum page: DO NOT ADD final slash and setup as http or https as needed.

All working!?

Reset to No the Recompile phpBB template option, here we go!

NOTE: if you added the code above into phpBB overall_header.html then you’ll never activate (it is not active by default) this part of the code you added into the overall_footer.html:

P.s – whenever you want: to get the iframe responsive for ACP phpBB admin panel, read this post. My (personal) suggestion is to stop here and try to use the integration leaving ACP out of iframe joke. If by the way you want to follow, before to apply then you’ll have to little change the above code for overall_footer.html and overall_header.html in this way:

on code for overall_footer.html remove this part:

on code for overall_header.html remove this part:

change into:

* For domain/subdomain installations
READ THIS HOW TO:
How to Domain/subdomain iframe template integration

Refer to v2 or v1 code for htaccess old solution editing phpBB notifications files.

WP_w3all WordPress Ajax Chat

phpBB mChat wordpress integration is here:

https://www.axew3.com/w3/2019/01/wordpress-phpbb-mchat-integration/

WP_w3all Ajax Chat integration

Please, READ ALL this carefully, before to switch more below, and install WP_w3all Ajax Chat.

This install procedure, will bring you an integrated fully featured Ajax Chat into your WordPress. That do not go to overload your WordPress database.

BEFORE you install this plugin, READ almost ONE TIME ALL THIS PROCEDURE STEP BY STEP.

See an online example here: WP_w3all WordPress Ajax Chat example

It is easy and light: you can change features, permissions, default Chat template css/html, Channels, and more, really numerous, options.  It is necessary to install the WP_w3all Ajax Chat Standalone (w3all modified version) into your WordPress root, and setup the WP_w3all Ajax Chat plugin config page on WP admin.

Follow READ ALL and you’ll be up and running in few minutes.

It is required to know how to use an ftp and a text editor to install the Ajax Chat Standalone into your server. It is also STRONGLY recommended that you dedicate a separate database for this install. Read more below important note ‘why’ about this.

Why? To uninstall, and cleanup all, once you decide to do so, will be only necessary to Deactivate and Uninstall the WP_w3all Ajax Chat plugin in WP admin, delete the Chat folder from WP root (where you’ll install the Standalone Ajax Chat), and delete or empty the Database you had dedicate to it. Do not fill your WordPress database of not useful Chat datas, like many other plugin about like to do. Maintain it fresh and light!

BEWARE that when you’ll uninstall the Wp_w3all plugin, it will remove ONLY his unique (1 single) record into WP database.

So if you install the Ajax Chat using as database, the same database where WordPress is installed, you’ll need to remove manually (maybe via phpMyAdmin) the four (4) tables that the Ajax Chat Standalone installation will create, which are:
ajax_chat_bans,
ajax_chat_invitations,
ajax_chat_messages,
ajax_chat_online

NOTE IMPORTANT: if the Ajax Chat will be used intensively by many users, the server will be may overloaded with the traffic of both WordPress and Ajax Chat if DB tables of both resides on same database. Consider this important aspect, and choose to install into a separated database. If your site is a thousand users site with very high traffic, you’ll have to choose this option, and also maybe a dedicated/separated Database Server for the Ajax Chat Standalone database install.

HOW TO INSTALL

Install the WP_w3all Ajax Chat plugin, from WordPress admin searching for it on WordPress plugins repository, or downloading it from WordPress repository.

After the plugin installation, inside the plugin folder

wp-content/plugins/wp-w3all-ajax-chat

you’ll find a folder named chat:  move/paste it (the entire folder chat) into your WordPress root folder, so you’ll have:

http://yourwordpress/chat

Install Ajax Chat Standalone step:

With text editor open: wp-root/chat/lib/config.php
Search very near the top of file, for line about Database connection

// Database connection values:

setup Database connection values as needed, and if possible, as more above explained, it is recommended, that you choose to install it into a separated Database at minimum (different Server also is maybe needed if your site is very big, with thousand of users).
The install will create 4 tables into the database.

RENAME the file wp-root/chat/install.php.off into install.php.

Install the chat now. Point your browser to:
http://wp-root/chat/install.php
After the Ajax Chat install step has been executed, rename the install.php file into something else like install.php.off, to disable any possible further call to this file, or remove it. Beware this is a very important security point.

Ajax Chat Standalone modified version has been installed.

Now open file:

http://yoursite.com/chat/lib/class/AJAXChat.php

at very top start, you find this code, where is necessary to insert correct values to connect to the WordPress database:

Setup values as on your WorPress root wp-config.php and save file.

Open WP admin -> Settings -> WP w3all Ajax Chat

Activate Ajax Chat in WordPress, select which Groups are allowed to use it and Chat Popup dimension.

Done.

Guest Access Deny/Allow

To enable or disable Guest access to the Chat, activate the related option, to display the button. After this, you need to adjust a setting by opening yourWP/chat/lib/config.php file.

change into:

As default the setting is setup to true (allow Guest access to the chat).

So, if you want to completely Deny Guest access to Chat, you do not only need to deactivate the Button option for Guests on WP w3all Chat Ajax Settings, but also setup the above value into yourWP/chat/lib/config.php file to false, or Guests will have the ability by the way to access the Ajax Chat, by pointing to his absolute URL (where you can see the full chat) http://yourWP/chat/
see example here: https://www.originalgangster.eu/www/chat/

For any change done into the yourWP/chat/lib/config.php file, except the option above about Guests Chat login and the Database connection configuration values, you should know what you’re doing changing these settings. There are very simple and easy settings, but also more advanced. There are really many options that leads to different behaviors, so you’ll have different results if you enable/disable or change values into the yourWP/chat/lib/config.php file.

Advanced options are also available into the file yourWP/chat/js/config.js to adjust template interface, chat buttons, server settings, and more advanced settings.

For any question use the axew3.com WP_W3all Chat forum or the WordPress plugin forum.

Alessio Nanni (alias axew3) … that’s my real name

Alessio Nanni alias axew3 – Italy.
This was the first post, created by the install that i’ve modified to little push my name to spiders … because you know there are many Alessio Nanni in this world, but of course, i care little more about this Alessio! So you know now why i do this (i’m sorry … this is the unique ego post for me … never will be repeated!)

contact alessio -> alias axew3 here:

Contact me

 

Import articles to Joomla!
(Postnuke-Nuke raw example)

This is a very raw (working) test/script that use Php and MySQL to extract Postnuke/Nuke articles content from a database (look queries schema to fit yours) and import these data on another Joomla! db, installed on same server. Continue reading “Import articles to Joomla!
(Postnuke-Nuke raw example)”