Latest Register Log In

+ Advanced Search

Integrating With Other WSN Scripts

Integrating With Other WSN Scripts
By
09/03/07 (Edited 11/02/18)

Integrating the member systems of WSN scripts just consists of picking one script to integrate the others into. You can also integrate templates so that template customizations in one script will apply to the others.

Integrating Members, PMs, IMs, Online Users, Stylesheets and Images

First, select one script installation (where you have the most members currently) and declare that the parent installation, which the child installations will connect to.

Go to Admin Panel -> Members -> Integration in each child installation, and select to integrate with the parent script. Use the pre-supplied options for the WSN scripts in the dropdown menu. This will automatically integrate members (including avatars), PMs, IMs and online users. More details in the member integration article.

When the script you're integrating with is another WSN script, please be aware that all the scripts should be on the same series -- if you have Classifieds 7.1, use Links 7.1 too, or there could be errors in spots. You don't have to have the exact same version, just series.

Note that stylesheets and images are automatically shared when integrating. The stylesheet of the script you integrate into is automatically put into use, along with its associated images directory, so you don't have to redo your design. In most cases this is good, but sometimes you want to style them differently. To do that, first set the $nostyleintegration tweak at Admin -> Settings -> Tweaks Editor. Then add a new member field named 'secondstylesheet', and edit your integration file in the /integration/ subdirectory to add the line $newstylesheet = 'secondstylesheet'; just before the closing ?>.

Integrating Additional Tables

Sometimes, you may want to share even more database tables between the scripts. To do this, open the integration file (in the /integration/ subdirectory) and add this line:
$integratetables[] = 'chat';
efore the closing ?>. Repeat for any other tables. Can work with custom tables. Please note additional table integration only works with WSN 10.3.0 and later.

Integrating Toplist Data

You can do a toplist of items from one WSN script from the template of a different WSN script. See the cross-script toplists article for the details.

Integrating Templates

Many templates are by default the same across all the WSN scripts. It can thus be convient to have them locked in sync so you can customize it in any script and have the changes apply to all the scripts.

As of WSN 10.3.7, the integration page presents several theme integration options:
share styles - This will make the integrating script use the stylesheet/images of the host script. Always a safe selection.
share styles and many templates but not wrapper - This will integrate a bunch of templates for which there's no reason why 99% of people would want them to differ by script.
share styles many templates including wrapper - This is like the above but also integrates the wrapper template. You probably will want a few things to differ by script in your wrapper, so if you select this you'll need to handle those differences using template conditionals that check the current URL or something else distinguishing (e.g. <IF {CURRENTURLCONTAINS[/gallery/]}>gallery wrapper stuff here</IF>)
share entire theme - This will integrate every single template. Can only work correctly if integrating with another copy of the same WSN script, since for example a forum's front page has to look different from a gallery's front page.

You may change these values later by editing the $integrationoptions['integratetemplates'] in the /integration/ subdirectory file.

For pre-10.3.7 versions, or to override the exact list of templates to share in 10.3.7+, you can specify template integration in your integration file (the member integration file created in your /integration/ directory during member system integration). Add these lines:

$templatesharepath = '/blah/blah/otherscript/';
$templatesharing = 'atomfeed.tpl, badrequest.tpl, banned.tpl, buddyignore.tpl, buddylist.tpl, bulkeditposts.tpl, calendar.tpl, calendarday.tpl, calendareditevent.tpl, chatdownload.tpl, chatmain.tpl, codes.tpl, contactform.tpl, contactreply.tpl, coppa.tpl, deletedpost.tpl, downloadpms.tpl, downloadthread.tpl, emailmember.tpl, flagged.tpl, forumdetails.tpl, guestbook.tpl, helpcatcontents.tpl, helpitem.tpl, helpmain.tpl, ignored.tpl, imchat.tpl, immain.tpl, javascriptheader.js, leaders.tpl, login.tpl, macros.tpl, modlog.tpl, modnotes.tpl, navigation.tpl, noaccess.tpl, offline.tpl, pagination.tpl, paginationfull.tpl, pmdrafts.tpl, pmedit.tpl, pmlist.tpl, pmmove.tpl, pmsend.tpl, pmsentitems.tpl, printable.css, privacy.tpl, promote.tpl, prototype.js, quoteedit.tpl, quotelist.tpl, redirect.tpl, reportcomment.tpl, rss.css, rssfeed.tpl, searchcomments.tpl, searchips.tpl, shouteditfull.tpl, shoutedit.tpl, shoutframe.tpl, shoutfull.tpl, sitedead.tpl, smilies.tpl, tos.tpl, traderedit.tpl, tradermain.tpl, traderreport.tpl, tradersubmit.tpl, usernotes.tpl, viewreports.tpl, whiteboard.tpl';

Replace /blah/blah/otherscript/ with the full file path to the script you're integrating with (the base directory, thus the same as your config.php's $uploadpath with the 'attachments/' chopped off). The $templatesharing list of templates to share has been filled here with the list of non-admin templates which are the same across all the WSN scripts.

The stylesheets and images are auto-shared in pre-10.3.7 versions.

To share the entire templates directory, use
$templatesharing = 'all';
Please remember that sharing the entire directory only works if it's another install of the same WSN script -- with different WSN scripts, you'll want to share only specific templates.

You can edit the template from any of the scripts and it'll save to the host script appropriately. Note that shared templates must be chmoded since the non-host script won't be able to do FTP chmoding automatically.

It's also possible to share your wrapper template. Add wrapper.tpl to the $templatesharing list. Then use conditionals which detect {DIRURL}, {SITETITLE} or some other distinctive setting in order to serve up any desired slightly different wrapper content depending on the script its being used from. If your forum is at forum.yourdomain.com for example you could use <IF {DIRURL} contains forum.yourdomain.com>forum-only stuff here</IF>

Of course, template sharing is optional and unnecessary.





Description Integrating WSN Links, WSN Gallery, WSN Classifieds, WSN Software Directory, WSN Directory, WSN Forum and WSN Knowledge Base to work together.
Rating
Views 1531 views. Averaging 0 views per day.