WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Combining wrappers for integration

Version:
printPrint


Combining wrappers for integration
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6175
Posted 10/09/06 - 08:14 PM:
quote post
#1
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 http://www.webmastersite.net/forums, WSN Support 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.

Edited by Paul on 10/09/06 - 08:17 PM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.