WSN Gallery
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Integrating With Other WSN Scripts
Integrating With Other WSN Scripts
By Paul

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

More details in the member integration article.

When the script you're integrating with is another WSN script, there are a couple things to consider. The albumid field of the members table, which is used for tracking the location of the member's personal link list, personal album or saved articles, needs to be made unique for each script to keep the saved items working in them all. Add a new field, for example kbalbumid to handle WSN KB's if you're integrating WSN KB with WSN Links, and then modify your integration file to reference it:
$newalbumid = 'kbalbumid';
The exceptions to this are WSN Forum and WSN Guest, which don't use the albumid field.

Also, integrating WSN scripts gives you the opportunity to integrate the online user lists, private messaging and instant messaging systems. This is done automatically in the current standard integration files, or you can add it in yourself with a
$wsnintegration = true;
line. Be sure you're using reasonably up to date versions of all the WSN scripts so that the database fields are the same.

When integrated with another WSN script, it will use the other WSN Script's template set name and language name. Thus you should either make sure your template and language names are the same in both scripts or make a new field to handle those settings for your integration (and add $newtemplate = 'fieldijustcreated'; to the integration file).

If you set $registrationurl = 'http://hostscript/register.php'; then people will be automatically directed to the registration page of the host script, and avatars will be automatically shared.

Integrating Templates

Many templates are by default the same across all the WSN scripts. If you want to be able to customize in just one place and have it apply to all, 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, homesubwrapper.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.

To share the entire templates directory, use $templatesharing = 'all';

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.

With some work it's also possible to integrate 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 slightly different wrapper content depending on the script its being used from (for example you'll need {FORUMHEADERINFO} in forum and {CATHEADERINFO} in the others). If your forum is at forum.yourdomain.com for example you could use <IF {DIRURL} contains forum.yourdomain.com> forum-only stuff </IF>

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.

Rating:


0/5 based on 0 votes. The median rating is 0.

Submitted: 09/03/07 (Edited 10/30/08)

Description: Integrating WSN Links, WSN Gallery, WSN Forum and WSN Knowledge Base to work togeather.

Views: 266 views. Averaging 1 per day.
In the most recent 30 day period, there've been 1 views.

Previous Article | Next Article

Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support