![]() |
![]() |
Version: 2.0
PostWrap is a PostNuke module that enables virtually any web content such as html, scripts (home pages, galleries, shopping carts, php, perl, asp, etc.) to be easily incorporated into your PostNuke site. Just call the PostWrap module with any URL and it will display it in your PostNuke main area/window. I call it a content wrapper (takes any existing content anywhere and wraps your PostNuke site around it. Uses an <iframe> which must be supported by the browser and JavaScript to resize the <iframe>.
Unzip to your modules/ directory to create the PostWrap subdirectory
Go to Administration, Modules, and Regenerate
Go to PostWrap, Initialize and then Activate
Delete existing PostWrap directory form modules/
Unzip into the modules/ directory
Go to Administration, Modules, and Regenerate
Go to PostWrap, Update
The following options can be set from the PostWrap Administration menu.
The General settings page defines overall settings for the PostWrap module.
Display off-site pages, controls whether pages not on your local domain or server can be displayed.
Use buffering of output before sending, buffers the page output.
Use compressed output, uses compressed output from the server.
Allow input from browser address bar, determines whether the user can enter the url in the browser address bar.
Compare URL against URL Security, activates URL checking from the URL Security page. Otherwise, any page can be displayed if it is not restricted by the other settings.
Only for registered users, determines whether a user must be registered and logged in to see the PostWrap page.
Add link for Open in new window, adds a link to open a new window above and below the page. If one of these links is clicked, the content is opened in a new browser window.
Use fixed title, displays a fixed title above and below the page.
Auto resize window, uses JavaScript to resize the content window.
Length of viewing window in pixels, is the length of the window that will contain the page. This value will only be used if Auto resize window = No.
If Compare URL against URL Security = Yes in the General settings, then any URL must be entered here in order to be displayed.
Add, adds a new URL and alias (either can be used to display the page)
Edit, edits an existing URL entry
Delete, deletes an existing URL entry
The following are the same as the General section but override the General setting for the specific URL.
Only for registered users
Add link for Open in new window
Use fixed title
Auto resize window
Length of viewing window in pixels
The following messages can be easily customized. Just modify the text in your global.php language file in the modules/PostWrap/lang/ directory.
_NOPAGEMSG No page was defined to display.
_TITLEMSG The following content is from another site.
_TITLEMSGEND The END of content from another site.
_NOTSERMSG Sorry, you are not authorized to use this feature. Please login.
_NOTAUTHHOSTMSG Sorry, this host is not authorized to display pages here.
_NOUSERENTRYMSG Sorry, you are not allowed to do that.
_NOTLOCALMSG Sorry, only local pages may be displayed.
_OPENDIRECTMSG Open in new window
_SORRYBROWSER Sorry, your browser does not understand iframes. Here is the
_LINKYOU link
_SORRYBROWSER1 to the page.
Just call PostWrap in module fashion with the page variable set to the URL or location that you want to display in PostNuke. If Compare URL against URL Security = Yes, then you may use either the URL or the alias that you defined. For example, an anchor would look like:
URL: <a href="modules.php?op=modload&name=PostWrap&file=index&page=index.php">My Site</a>
Alias: <a href="modules.php?op=modload&name=PostWrap&file=index&page=mysite">My Site</a>
Or in a Generic Menu Block:
URL: modules.php?op=modload&name=PostWrap&file=index&page=index.php
Alias: modules.php?op=modload&name=PostWrap&file=index&page=mysite
Cool! For a remote site you would use:
URL: <a href="modules.php?op=modload&name=PostWrap&file=index&page=http://www.postnuke.org/">PostNuke Site</a>
Alias: <a href="modules.php?op=modload&name=PostWrap&file=index&page=postnuke">PostNuke Site</a>
Or in a Generic Menu Block:
URL: modules.php?op=modload&name=PostWrap&file=index&page=http://www.postnuke.org/
Alias: modules.php?op=modload&name=PostWrap&file=index&page=postnuke
And you'll show the PostNuke home page in your main window. You can show the center and right blocks if you want by including &index=1 in the trailing fragment.
Example:
<a href="modules.php?op=modload&name=PostWrap&file=index&page=http://www.postnuke.org/&index=1">PostNuke Site</a>
You can place references in your user home page, linked to the main menu or to sub menus, on user pages and just about anywhere. You can use hrefs <img srcs, Javascript dynamic page generation, html redirection, and even php scripts by sending Location: headers. The real magic is that other applications written in php or perl or Javascript or whatever run as if they were a part of PostNuke, seamlessly and with little effort. If you do this, be sure to give proper credit though. phpBBS, gallery, andromedia, whatever. As long as it is pleasant looking running standalone, it will look great running in PostNuke via PostWrap.
Please send bug reports or feedback to abracadaver@mckenzies.net or visit http://spidean.mckenzies.net
Based on: ShowInMain for phpWebSite by Jim Flowers (jflowers@ezo.net) PostNuke port: Shawn McKenzie (abracadaver@mckenzies.net) All administration, database functionality and Bulgarian translations: Yassen Yotov (CyberOto)
PostWrap is Free Software released under the GNU/GPL license.