I'm not sure if this belongs here, but I'm looking for an alternative to the PostWrap module. It's a great module, but there are still a lot of people who use NN4 that can't use iframes.
I have some content that should be on its own page and I can't seem to find anything in PostNuke that allows me to do this.
Any help is appreciated.
Legolas
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Alternative to PostWrap?? <Non iframes>
-
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 99
Actually this would be a good suggestion topic. I do not know of anything off the top of my head that would help.
One of the things I would like to see is a remote API that could be called for pages on the site that need to be either wrapped or have the blocks around it. This is common the the forum world.
Basically what the remote API would be is a middle man between the main API and app.
For example yout postnuke installation is http://yoursite.com/html and you have a script that is http://yoursite.com/app
You want to have the blocks, cookies, header, and footer on this page as well
In the top of the main script you would include the remote API and then call the functions like header, blocks, footer, etc. The remote API would basically give the full path info based on location and convert links in the menu for the ability ob this remote page.
Actually not too hard of an addon for someone who know the PN API well enough. It would basically be one linking script.
Just my 2 cents. I did it fo a past project and it worked very well.
But this really does not help your cause so sorry.- -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
You could always wrap all the pages that need to be included (assuming they're on your server) in the blank.php file. That's what I did for a couple of quickie scripts I wrote for one of my sites. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jan 17, 2003
- Posts: 11
I'm going to explore this option over the next few days. I think the PostWrap module is great, but it does have a few shortcomings. I think a remote API would be a great idea.
mhalbrook could you elaborate on your method a little more. This may be something I can get away with for awhile.
Thanks
Legolas -
**unknown user**
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 577
If you can move the pages then a page wrapper might work. Its sort of like blank.php in a module form. With it you dump all the pages in a subdirectory of the wrapper module and make a link to access the pages. The page wrapper adds the the header and footer and loads the page in the middle. It works for simple PHP and HTML pages. With HTML pages it works better if you just include the part of the page between the tags. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Aug 02, 2003
- Posts: 7
I have already solved this on my site: www.intrax-it.com
:)
The existing HTML pages I integrated are from an earlier version of my website. I wrote a small PHP module to handle the integration and hacked index.php a little to cal my module if the user requests a menuoption for one of the existing HTML pages. Works great and is easy to write yourself.
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Nov 11, 2004
- Posts: 7
After upgrading to 7.2.3 from 7.2.2 I can't initialize Postwrap after coping it to the modules folder. Is there an upgrade for postwrap or is there something else i need to do? I would appreciate any help I can get thanx -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 52
Creating a blank.php is a great idea. But what if I have a javascript which is need to be placed at tag and needs :
?
I found Postwrap is the only solution but like Legolas, a non-frame page would be better. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 27
gmhafiz
Creating a blank.php is a great idea. But what if I have a javascript which is need to be placed at tag and needs :
?
I found Postwrap is the only solution but like Legolas, a non-frame page would be better.
This should be pretty simple. If you look at the code for the blank.php page, it's simply calling your header and footer .php files. Make a copy of your header file and just label it header2.php and edit it to include the javascript in there. It should be pretty easy... just scroll down til you see the META tags.
Now just edit your blank.php file to pull the header2.php file and you can use the page that requires javascript.
Any other pages can use the regular header.php file.
8) -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Jul 04, 2005
- Posts: 72
How exactly do I edit the header2.php file to include the javascript below?
I tried just pasting it in as is below the metatags but I'm sure I'm missing something because I get the following error when trying to get to the new page:
Parse error: parse error, unexpected '<' in /home/mysite/public_html/html/header2.php on line 159
Fatal error: Call to undefined function: opentable() in /home/mysite/public_html/html/newpage.php on line 15 -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
I made a script a while back to integrate any HTML, PHP or TXT file into Postnuke, because I didn't like the Iframe solution. Iframe doesn't integrate the file, it can't use the stylesheets etc of the theme, and tend to look out-of-place, unless you only use one theme and make your HTML/PHP file to suit. It's good for linking external webpages, in this case less so in a themeable system, especially as the two available scripts I've seen, Framebrowser and Postwrap, can't get the frameheight, and internal scrollbars suck. It seems Postwrap is supposed to, but it failed to in both IE and Netscape. I definitely didn't want internal scrollbars. Finally, whereas Iframe is supported in NS6+, it is a proprietary IE tag that won't be supported by the W3C standards.
So I used include.
It has a few security checks built-in so no-one can use it to hack the system by using a path of ../../../systemfile or something. And if you link a PHP file, it requires a separate dir for security. But the path in the URL doesn't necessarily betray that dir, as it assumes the PHP files to be there. There's a switch in the script as to whether to allow PHP files or not.
It allows a choice between using the theme tables (Opentable functions) or clear background.
For showing code/HTML listings, it will process txt files escaping special HTML characters and adding hard spaces and imitating tabs as needed for formatting of the code, so you can still style the text and get your indents too without the boring Courier font.
If it doesn't find the file or is the wrong type, it has a neat input form with the entered value inserted and checkbox for using the themetables or not.
I though about whether to allow external webpages, so not knowing Javascript, I did some research and finally found a small simple script to get the frame height without requiring the contained page to have some javascript of its own. The only caveat is I've found a but in Mozilla/Netscape regarding tall Iframes. It gets the height right, but the rendered page is cut off on long pages so as you scroll you suddenly have white space. And on refresh, the cutoff point changes slightly every time. Should havea look at the Mozilla bugtracker to see if it's a known issue. Don't know how common it is to have full webpages in iframes.
But I haven't come around to incorporating that yet, as it's not imperative and it was just to see if I could.
Martin -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
wrap.zip
For PHP versions prior to 4.10, try
wrap2.zip
Version without security check (not advisable):
wrap3(no-security-check).zip
To debug, set
$WrapDebug="1";
Itll spew out a lot of server and Postnuke info, including what it thinks is your PN site root, if you have problems with the anti-hacker mechanism.
Usage: http://your.site.com/wrap.php?file=filename.html&opt=X
or http://your.site.com/wrap.php?filename.php&opt=X
http://your.site.com/wrap.php?HTMLcodeExample.txt
where file path is relative to Postnuke root (where wrap.php is located), and X is 0 or 1. The last part of the Query, '&opt=X', is optional,
and if unspecified, $opt is assumed to be 0.
opt=1 uses theme-based tables, opt=0 uses no background.
Martin -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Mar 21, 2004
- Posts: 123
Isn't there also that htmlpages module??? I've only read of it, but havent used it so Im not exactly sure if its the same thing your talking about. -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
I haven't tried it either, but you can get it from the Sourceforge project page:
http://sourceforge.net/project/showfiles.php?group_id=47139
Martin
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
