Webmastersite.net
Register Log In

Combining wrappers for integration

Comments on Combining wrappers for integration

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 09, 2006 - 11:14 PM:

Here's a simple little trick for using one wrapper template in multiple places. For example, you might want to use the same wrapper in WSN Links, WSN Forum, WSN Gallery and WSN KB on a site that has them all installed, in order to simplify their visual integration.

From the shell of any unix-like operating system (Linux, BSD, Solaris, OS X):
ln /home/username/public_html/wsnforum/templates/default/wrapper.tpl /home/username/public_html/wsnlinks/templates/default/wrapper.tpl


You'll have to delete the links wrapper first, then run the command, and links will use the forum wrapper. Here's more detail on ln syntax: http://www.xmission.com/~comphope/unix/uln.htm

You can 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).

I'm using a variation on this to make the scripts all use the same admin panel and most of the same files without any need for me to copy stuff around.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.