forum plugin forum plugin
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

forum plugin

Started by 406man, August 11, 2023, 04:58:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

406man

The forum plugin has been around for over a decade but it was never upgraded to work with the CPG 1.6.x line. It has been a key feature of my galleries for a long time and serves a useful function. It's the reason why I stayed on the CPG 1.5.x line for so long until a PHP upgrade to 7.x.x  at my web host a few months ago forced an upgrade to 1.6.22 and I had to leave the forum behind. With development by the original and later authors having ceased years ago I decided to upgrade it myself to be CPG 1.6.x compatible. The last version released was 2.1 Beta which was used as the base for this plugin. This Version 3.0. I'm releasing it to the CPG community as there may be other galleries out there that would like to use it. The major benefits over standalone forums are that it's simple, closely linked into CPG and it looks like a part of the gallery rather than a separate feature to the side.  The administrator does not have to follow the development of a separate forum software product to arrange upgrades. Usernames and passwords are shared between gallery and forum without having to set up bridging.

The main changes which I've made involve:
1) the installation procedures
2) a new notification feature
3) Customisation – CSS and custom code (templates)

The previous installation procedures were, in my experience, troublesome. I had to do a lot of work to  get the database tables defined and working when I installed it into my 1.5.x gallery a decade ago.  With 1.6.x I've made a load of changes behind the scenes to make the database-related  installation smooth. It works great in my galleries and hope it will work well for others. Configuration of the plugin didn't follow the latest standards so I rewrote this part to make it work like all other plugins from an administrator's perspective.

The forum already has notifications for new topics and replies which have to be set up individually in advance. The feature I've added is to allow up to three email addresses to be notified when any new topic is added. Set it up once and forget. The idea is that the notification email addresses could be mailing list addresses so that a group of users can be notified. Most web hosts allow mailing lists to be set up or one of the dedicated mailing list services (Google Groups, groups.io) could be used. It could alternatively be used to notify up to three administrators or users. The existing notification functions are unchanged.

I've made a few small changes to the gallery which mainly relate to visuals including CSS. It now uses the CSS style sheet belonging to the Gallery's theme. For elements relating to the forum only there's a style sheet in \plugins\forum\forum\templates\classic\style.css
This is intended to be used with all themes. To be compatible with forum-specific CSS files created in the past it will pick up any style sheet in: \plugins\forum\forum\templates\xyxtheme\style.css   where xyxtheme is the name of the theme of your gallery. So if anyone had a customised style sheet for their 1.5.x forum and wants to re-use it – create this directory and put the style sheet there. If you want to change the CSS for the forum I suggest you put the code in your theme's CSS file for your gallery, or, if you can't override it using that file, create the <your-theme-name> directory and put style.css there.

During testing I found a fault which was present in 1.5.x that messed up the forum internals when the last message in a topic was deleted. Now fixed. Numerous other minor bugs, features and inconsistencies have been addressed.

The earliest CPG version I've tested it with is 1.6.22. It should also work with 1.6.18 which is when the time formats changed, so I don't recommend going to earlier versions – although you could try it, there's no guarantee that the time and date formats will appear correctly. I've tested it with PHP 7.4.33 and 8.0.26.  There were numerous changes needed for PHP 8 to exorcise silly little bugs that had been in there for years but it should be OK now. I hope I found and fixed them all.

If someone reading this has a CPG 1.5.x gallery with the forum and wants to upgrade to 1.6.x with this new plugin, here's what to do in summary:   
-   Upgrade the Gallery to the latest version (1.6.25 at the time of writing this note) using the standard upgrade procedure.
-   Delete the forum plugin (the 1.5.x version)
-   Copy this new forum plugin to the plugin directory.
-   Using the Plugin Manager install the forum plugin
-   Using the Plugin Manager configure the plugin to suit

There is nothing you need to do with the database when upgrading from the most recent version of the 1.5.x forum which is 2.1 Beta. If you have an older version of the forum it might work but, sorry, I haven't tested it.

Using the Forum
The administrator must first set up the basic structure of the forum. Here is an example where a forum is set up to discuss two separate areas: sport and travel.
Using the Forum Manager option in the Administrator's menu , Sport Forum and Travel Forums are the categories and  are created using the "New Category" button.
Within the Sport board the various subjects are set up: Football, Cricket and Golf. Each of these is created using the "New Board" button and the order in which they are displayed is chosen using the up and down arrows.
Similarly, the Travel Board is set up with the subjects "Europe", "USA" and "Australia" using the "New Board" button.
The users of the forum  can now create any topics that they want inside the headings just created. If the administrator has chosen to enable notifications, a notification email will be sent when (for example) a user creates the topic "France" in the Europe board in the Travel forum. If they create a topic in the wrong place – for example a discussion about Hawaii in the European Travel forum, the Administrator can move it by displaying the message and using the "Move Topic" button at the bottom left of the screen
There are settings to allow guests (someone who is not logged in to the Gallery) to read the forum and create topics. When the forum is installed the more secure option is set up so that guests don't have access. These can be changed by the Administrator using the Settings button in Forum Manager.

Feedback welcome.

screamqueen

This plugin is amazing! I tried to create a new topic, but I can't post it because of the captcha. How can I remove this captcha?






screamqueen

Quote from: screamqueen on June 13, 2024, 08:44:00 AM
This plugin is amazing! I tried to create a new topic, but I can't post it because of the captcha. How can I remove this captcha?

[edit] I was using "problem solving captcha" plugin on my site. I disabled the plugin, and now the forum is working, and I can create topics.


I have one problem: the forum menu is becoming the main menu. When I click the forum menu, I can't visit the forum. Now, the main menu and the forum menu are the same.







406man

Could you post a screen shot of the problem page or, if the gallery is available to access, post a link here

screamqueen

Quote from: 406man on June 14, 2024, 02:56:07 PM
Could you post a screen shot of the problem page or, if the gallery is available to access, post a link here

Hi, I fixed my 'Forum' menu, but the 'Contact' menu is showing up twice.

https://www.xtinadaily.com/

406man

First step is to be certain the forum plugin is affecting your Contact menu. Go into the Plugin Manager and disable the forum plugin. This is done by clicking on the green tick symbol on the right side of the section for the forum plugin so it turns to a red circle. Check the menu and then re-enable the plugin by clicking on the red circle. If the unwanted behaviour goes away after disabling and comes back on re-enabling it must be the forum plugin causing it. Take a screenshot of the page including the menu and attach it to a reply in this forum so I can see what's happening.