Webmastersite.net

Search    Register    Log In   

Details

WSN Integration
By
Nov 18, 2018 am30 2:34 AM

In WSN 10.2, I spent a lot of time on WordPress integration. Perfected the theme integration, and made a WordPress plugin for each WSN script that installs and integrates and manages it and provides access to the WSN admin from WordPress. While starting work on 10.3, I realized WSN was actually integrating more fully with WordPress than with other WSNs. Time to fix that.

The first step was to take the previously hacky template integration and turn it into something standard and reliable. Instead of editing the integration file for template integration, you're now asked how much you'd like to integrate at the time of integration in the admin. Most templates including wrapper will be the best option for most, but I've retained the option to not integrate the wrapper for those who find conditionals confusing, and to not integrate anything but the style or not even the style for those with special needs.

This brought me to the issue of making sure people don't get confused when editing integrated templates. I added warning text which explains that changes will be applied to multiple scripts and describes how to use conditionals to distinguish the scripts. To achieve that, it was necessary to make host scripts aware of scripts integrating with them (which they previously were not). This seemed a good time to also make client scripts aware of their siblings and make a convenient admin menu for switching between all the tied-togeather scripts.

Once that was done, I added a script installer menu option. The installer makes it easy to add another script without having to enter any database info, it just puts it in the same database as the current script with an automatically-calculated table prefix. It then integrates members and themes for you. It always installs the free version so if you have licenses of other scripts you'll need to enter those logins after the install. I'm pondering the next steps for the installer, which may include copying tweaks or a subset of settings/switches automatically.

I've also made it possible to integrate arbitrary tables between WSN scripts, which might be useful for custom tables people have that make sense to integrate. The standard tables integrated between WSN scripts are members, private messages, instant messages, online users, quotes, the chatroom and the shoutbox. Recently had someone wanting to integrate categories, but alas there are fields in the categories table that need to stay install-specific -- like the count of the number of listings in the category, which can't be assumed to be the same in every script. It is easy to do a one time copy of categories if that interests anyone, but it can't stay synced.

One problem I came across was that theme integration would break if the themes on the two scripts had different names. As an imperfect solution, it now automatically renames themes to match at integration time. In the long run, I still need to think about what makes sense here. Especially for sites with multiple themes.




Views 190 views. Averaging 190 views per day.
Similar Listings
WSN 10
WSN 10.0.5 changes
WSN AdUnblocker
WSN 10.4 released
WSN Development Blog

Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Please login or register.