PDA

View Full Version : Wrapper


Jason407
November 18th, 2003, 09:05
Ha! OK, so it isn't soo amazing, but I figured the title would make you look! :wink:

Many people have been asking about including Other pages and scripts into Mambo that are difficult to port.
The easiest option is using an IFRAME. This is of course NOT PERFECT at all, but does provide a workaround for some items. So...I created a Mambo Component that makes it VERY easy to include an IFRAMED page into your Mambo Site!

It has a few cool options that you would not have by just adding the Iframe code into a content page, so CHECK IT OUT!!!!

--------->GET IT HERE!!! (http://www.stupidscifi.com/com_wrapper.zip)

Let me know if you have any problems with it...I whipped it up pretty fast, but I did test it on a few different Mambo installs.
*NOTE: It does require Mambo 4.5 Beta 1.0.3 or HIGHER!
(So don't go emailing me with problems on earlier versions!) :wink:

Slixter
November 18th, 2003, 09:13
Thanks, can't wait to try it out.

Slixter

Salsabil
November 18th, 2003, 09:34
Hiya,

Thanks Jason sounds like the kind of thing I'd need alot :) :)

Just something that happened with my download program (download accelerator) is that it asks for a password/username.. Any ideas?

Salsabil

Jason407
November 18th, 2003, 09:37
You shouldn't need any Password...try just saving as...

I did just realize that I hadn't tried this with SEF enabled. :cry: It doesn't work, so I will have to figure out why...stay tuned.

Salsabil
November 18th, 2003, 09:44
Hiya,

My save target as goes to DAP automatically unfortunately. Will have to somehow shut it off :)

Okies shut it off and it downloads normally. Not too sure why it needs a password in DAP

Well its working now!! Thanks again

Salsabil

Michelle Bisson
November 18th, 2003, 11:50
Jason407,
Thanks for whipping it up fast for us. :D :D :D

I whipped it up pretty fast

It should prove very pratical for many.

Jason407
November 18th, 2003, 11:55
Welcome...I was actually pretty proud of it, but the fact that it doesn't work with SEF Enabled really bums me out...I am going to have to go back in and redo some things. :(

Jason407
November 18th, 2003, 13:28
YIPPEE!!!!!

OK, It now works with SEF ON!!!!

For those who already downloaded it...download it again!!!!
The only file that changed was components/wrapper.php
So, you can simply replace that file...no need to install again. :lol:

Ahhh...Jason feels much better now. :wink:

zx9r
November 18th, 2003, 16:06
Well, I'll give it a try then!!

Thanks, Jason!

ralf

Cheese
November 18th, 2003, 16:21
:D Thanks for this, Its made adding area's that are not made in mambo a lot lot easier, Before I'd been using a small component that I made up just to display the iframe, However I had to manually edit and install it everytime I wanted to add a new link, this made an awful mess of my components menu.

:D Thanks again

brynieman
November 18th, 2003, 18:54
great work Jason..I would find this really handy as a component..i was doing something similar but coding the long way..

just a quickie question..

I notice my status bar shows 'Error on page' when using this with IE6..any clues as to why this might be? Tested it using your site as an include. Might this be a problem with the script or the webpage thats pulled in?

appreciate your help on this :-)

Jason407
November 18th, 2003, 19:24
brynieman,
You mean that it works...but it just displays that little error message in the lower statusbar right?
Or are you saying that it doesn't work at all?
:?

brynieman
November 18th, 2003, 19:28
no it works just fine Jason..been playing with it and i like it!!

yes the error message is in the status bar..do you get this as well? I am only testing this on a local machine for now..not had a chance to test it on a live site yet?

any clues?
:-)

Jason407
November 18th, 2003, 19:41
The error should be fixed if you want to download again. :D

Again, you only need to replace the file components/com_wrapper/wrapper.php to apply the tiny fix. :D
Sorry. :lol:

Guess I whipped this up too fast! :wink:

brynieman
November 18th, 2003, 20:19
hey..thanks very much Jason :D :D :D

the fact that you whipped this up at all mate is a benefit to us all.

btw..for anyone reading this..this could be a good tool for search engine placement..not only can you include standard html pages in your mambo site now..but if you also set up an html directory for the search engines to find..

simply add a link to the top and bottom of your pages that points to your html directory, and pop your html pages into it [optimising them first though..ok]..a litle time spent on this could really boost your rankings..

all these things help..even if only a little.

Jason..well Jason helps us a lot! and I'd like to personally thank him for all his great efforts and continued support on these forums

thanks mate
:-)

Xirtam
November 18th, 2003, 21:59
Hm...not bad at all ;-)
Jason, remeber the good old times with discussion how to do this and then you came up with an IFram solution.
Wel...this is amazing ! :idea: :idea: :idea:

I use it on www.royalrelation.nl [muziek]

And many thanks... :x This is a reason to start with upgrading www.wittebal.nl so busy now.

Good work man !
Rob

Zorro
November 18th, 2003, 22:08
Jason,

I've been dearly waiting for something like this so I can get rid of them ole Iframes.

Any chance you could adapt this to work under the older version 4.0.x as well? I'm still some time away from updating my site, and use Iframes heavily ...

Anyway, thanks - this is good stuff!

Zorro

konlong
November 18th, 2003, 22:45
Jason, in your mad dash to get this out you seem to have forgotten to include an uninstall function.

And as I run my systems with short_open_tags OFF the install failed at the last step after spewing out a string of unprocessed php code. Which saved Phil Taylor from getting yet one more notice that his "ComboLite" component was being installed.

John Long

spignataro
November 19th, 2003, 00:50
very nice jason

jasmon
November 19th, 2003, 04:49
I downloaded and installed it using the install functions,

added a new men uitem, wrapper and published it with default setting,

I get error, page not found,
Why this error?

thanks,
Jasmon

http://www.fraxnet.nl/mambo


PHP built On: Linux dutch5.digitalus.nl 2.4.18-27.7.x #1 Fri Mar 14 06:44:53 EST 2003 i686
Database Version: 3.23.58
PHP Version: 4.3.3
Web Server: Apache
WebServer to PHP interface: cgi
Mambo Open Source Version: 4.5 Beta-1.0.3 [Christine] 09/11/2003 22:42 GMT
User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Relevent PHP Settings: Safe Mode: OFF
Open basedir: none
Display Errors: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: ON
Output Buffering: OFF
Session save path: /tmp
Session auto start: 0
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
WYSIWYG Editor: htmlarea2

Xirtam
November 19th, 2003, 06:07
For me the same but after reading the included textfile Readme.txt and looking at the test-wrapp I figured out how to do this. Please have a look at those wto and you will find out very quickly :-)

Jason407
November 19th, 2003, 08:54
Jasmon,
You need to make a New Main Menu item...a URL which points to the wrapper component, with the wrap=name of wrap

Like this:
http://www.fraxnet.nl/mambo/index.php?option=com_wrapper&wrap=test

Publishing the component doesn't work on its own...maybe I will add an option that it will default to show a wrap called default if the component is called without a wrap= or page= variable. :wink:

konlong,
Sorry about that...I will look into what neds to be done to fix the short_open_tags problems, as well as an uninstall. Thanks for pointing this out...and yes, I did throw this together rather quickly, and I am sure that there will be more bugs found soon. :wink:
Again, sorry, and I will try to fix it! :D

xpi3000
November 19th, 2003, 09:24
i have a suggestion :

add iframe background color.

that prevents the white flicker ...

example :

[code:1:419803587f]<IFRAME style="BACKGROUND-COLOR: #ebe9d8" name=anything align=default
src="http://www.anything.org" frameBorder=0 width=650
scrolling=no height=800 allowTransparency>
</IFRAME>[/code:1:419803587f]

i guess in most cases BACKGROUND-COLOR should be the same as the main site bg color.

i use that on my site (currently without your component)

buy imperator (oscommerce) http://www.ave-imperator.com

Jason407
November 19th, 2003, 10:26
Good idea XPI3000!!! I will look into it...I would like to figure out a way to do this dynamically...I tried some solutions using the css classes, but none of them worked the way i wanted them to. :cry:
I will keep looking into it. :D

Anyway...For everyone...I have patched the few bugs that have been reported, so download the new version!
--------->GET IT HERE!!! (http://www.stupidscifi.com/com_wrapper.zip)

Some bugs had already been fixed, but here are all the bugs that have been found and fixed so far:
-Added support for Mambo Running with SEF URLs Enabled. :)
-Fixed some javascript errors (error on page)
-Added Uninstall features needed for Component uninstall via Mambo
-Fixed problems for site running PHP with short_open_tag = Off

:lol: :lol: :lol:

spignataro
November 19th, 2003, 10:39
nice job jason...hopefully ill find some use for this some day....

mrchild
November 20th, 2003, 02:41
good job! jason that is i am looking for!

by the way after installing i can't search wraper's page. it shows 0 results. did i set the wrong configuration on component wrapper?

jasmon
November 20th, 2003, 04:13
Jasmon,
You need to make a New Main Menu item...a URL which points to the wrapper component, with the wrap=name of wrap


thanks,

it works now fine, great compnent!
thanks Jason


Jasmon

jasmon
November 20th, 2003, 05:07
I was wondering,

is it possible to use it outsite the mainmenu?

example, www.fraxnet.mambo/mambo

on top I have the Com_contact link with the "adres"button

under the button "uw mening" I would like to load an custom forum, which will be placed in an iframe inside the mainbody? can i use "mamwrap" for it too

thanks for any advise,

Jasmon

Jason407
November 20th, 2003, 05:48
mrchild,
Not sure what you mean by Search the Wrappers page...But the answer is probably no...I did not build any search functionality in there. So, Mambo would not be able to search for Wrappers.

jasmon,
You can link to the wrap any way you want, it doesn't have to be in the main menu. Just make a wrap in Admin that points to your Forum (like www.fraxnet.nl/forum/index.php or wherever your forum is) and then in your Template, add the button that links to the wrap. (like index.php?option=com_wrapper&wrap=forum or whatever you named the wrap)

Also, you can include pages without making a wrap if you have the Allow Wrapping URLs setting in Wrapper Config set to on! Just use the url index.php?option=com_wrapper&page=www.google.com :D

BRAINEDGE
November 20th, 2003, 23:12
Your component is perfect to use with Custom forms, etc... Everytime when I need a Iframe, I have to write this... Then is a time saving for me...

But i´m Having a little problem with it::

The url field is too small (50), and sometimes we need to call a long adress and the component doesn´t acept it..

www.sitename.com/cgi-bin/customform/generateform?=12

It cuts the url... Is it easy to solve?

Thanks for saving my time and congratulations for your component

BRAINEDGE
November 20th, 2003, 23:16
Jason, why dont you write a variation of your component as a module too, so we could use it for optin lists, tips or other things at left, right or any other position in the template...

Thanks again

konlong
November 20th, 2003, 23:38
Check line #182 in admin.wrapper.html.php
[code:1:a83d00123d]<td><input class="inputbox" type="text" name="nothing" size="50" maxlength="50" value="<?php echo $wrapperurl; ?>" />[/code:1:a83d00123d]

try changing maxlength to some other value, keeping in mind that the url is
strored in a varchar(100) field in mos_wrapper

John

Jason407
November 21st, 2003, 00:49
BRAINEDGE,
PM me your email address and I will send you a version with the longer address field. :D

EDIT: Or, KONGLONG could beat me to posting, and put the fix! :wink: LOL
But, I actually think he is meaning the URL field as oppossed to the GENERATED URL, so he is looking for this line:
[code:1:0b379a6256]<td><input class="inputbox" type="text" name="url" size="50" maxlength="50" value="<?php echo $row->url; ?>" />[/code:1:0b379a6256]
Edit this line to say maxlength="100" (or more)
Glad you like it!!! :lol:

BRAINEDGE
November 21st, 2003, 04:16
I´ve already make this modifications and now everything is working well.

Thanks again!

Xirtam
November 21st, 2003, 07:19
How about manual installation of the com_wrapper component.
I succeeded with the auto installation but this for somebody else who has the server of his hostingprovider in safe_mode=on running.

I tried but without succes. I don't see Mambo Wrapper in the admin-menu.
Database is updated with the mos_wrapper values.

Please, a tip is needed.

mambosupport
November 21st, 2003, 10:01
That's right Jason.

Take a look at our site:

http://www.mambosupport.com

We used this component for the Mambo Directory!

Fantastic!


John,

Jason407
November 21st, 2003, 10:16
Sweet..that looks great! Glad that you like it! :lol:

Xirtam,
What steps did you take to try and install it manually?

mambosupport
November 21st, 2003, 10:19
It took less than 5 minutes:

Just use Mambo upload component.

Go to Wrapper Confuguration set it up and add it to the menu.

I have to say it again: Fantastic!!!! because it saves a lot of my time to make a directory scripts to be a Mambo component!


Fantastic!!!!!!!!!

mambosupport
November 21st, 2003, 10:24
It took less than 5 minutes:

Just use Mambo upload component.

Go to Wrapper Confuguration set it up and add it to the menu.

I have to say it again: Fantastic!!!! because it saves a lot of my time to make a directory scripts to be a Mambo component!


Fantastic!!!!!!!!!

spignataro
November 21st, 2003, 11:38
do i hear deja vu??lol

neohazard
November 21st, 2003, 13:51
nicely done... now lets see how i can crash my site with this!!!! lol :lol:

great job

largu
November 21st, 2003, 16:30
How about manual installation of the com_wrapper component.
I succeeded with the auto installation but this for somebody else who has the server of his hostingprovider in safe_mode=on running.

I tried but without succes. I don't see Mambo Wrapper in the admin-menu.
Database is updated with the mos_wrapper values.

Please, a tip is needed.

I am the somebody Xirtam is mentioning ;-)

I use the safe_mode patch from Davemac and now i can install the com_wrapper with safe_mode = on http://www.mamboportal.com/index.php?option=content&task=view&id=612

Thank you guys!

Bert

Jason407
November 21st, 2003, 17:32
Awesome! Glad you got it installed!

I like your avatar...I actually performed as Bert for a Touring stage show last year with Noggin. :D I used to teach puppetry at Walt Disney World, have worked on a couple of Henson projects, and currently work part-time for Nickelodeon. (I know...too much info right?) :wink:

byteback
November 22nd, 2003, 08:58
I tried com_wrapper on a bunch of browsers

Doing a really quick test... IE6, Mozilla1.4 - it works great.

But trying Netscape 7 on one machine - it only shows the HTML code. :(

Anyone got a list of browsers where com_wrapper will or won't work ?

Or is there a workaround?

Jason407
November 22nd, 2003, 09:24
Wierd...I tried it on Netscape 7.01 under XP, and it works fine. (except the autoresize)

Supposedly, Opera/Mozilla/NS/MSIE 6.x or later - all considered modern/major browsers support iFrames well.

spignataro
November 22nd, 2003, 13:28
it might be that netscape may not have iframe capability

Jason407
November 22nd, 2003, 13:35
But Netscape DOES Support IFRAMES...

byteback,
Try downloading the latest version from my site, and just replace the file components/com_wrapper/wrapper.php and see if that fixes it.

Also, try turning off the AutoResize for the Wrap you are testing and see if maybe that makes a difference.

--------->GET IT HERE!!! (http://www.stupidscifi.com/com_wrapper.zip)

spignataro
November 22nd, 2003, 13:42
that i know...but it might be turned off...not sure if you can do this in netscape but you can in ie

byteback
November 22nd, 2003, 14:03
I found the problem. :)

I am using com_wrapper to archive the previous copy of a website
that was written by another developer using server side includes.

All the files had ".shtml" extension, and the apache server is on a Windows notebook i use for local testing.

I removed the server side include code and changed it to ".html" - so it is just a static page and it started to work.

Funny thing is that is the .shtml worked on IE but not Netscape.

Anyway - thanks for looking into it.

Jason407
November 22nd, 2003, 14:20
Yippee!!!
You had me worried for a minute! :wink:

Glad you figured it out, and glad it wasn't my fault! :lol:

spignataro
November 23rd, 2003, 03:18
we can all relax now

BRAINEDGE
November 25th, 2003, 22:30
Jason, is it possible that in the next release of your component make it similar to item content edit?

A place to an intro text (not obligatory):: So, we could explain to visitors a little bit about the form, page or other content in the wrapper box.

and hack the main text with wrapper component.

Or something like this, something that permits insert a explanation about the wrapper bellow. But I thing that it could not be mandatory, so if someone need to use the component in the same way that it works today, they could do it.

What you think? I´m very good asking for things, but I don´t know the difficulties to implement (I´m a PHP ignorant :oops: )

I´m using your component today and it´s a amazing "quebra-galho" (in Brazil it´s something like Troubleshooter) :D

Thanx...

gothicreader
November 26th, 2003, 21:51
Having problems. Not unusual there, but if you could help me out that would be great.

I've just upgraded to the latest beta version of Mambo (1.0.4). I went ahead and installed your component via the admin's--components--install. Didn't recieve any errors. However when I go and configure the Wrapper, I get these errors.

Configuration & Default Settings
Allow Wrapping URLs:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 214
Notice: Undefined variable: but15 in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 215
>Yes No (option=com_wrapper&page=www.google.com)
Registered Users Only:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 219
Notice: Undefined variable: but16 in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 220
>Yes No (User must be logged in to view ANY Wrapped page)
Text for Not Authorised Messages:
Text for Open in New Window Link:
Text for Error Messages:

Default Width: (Recommend 100%)
Default Height:
Show Frame:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 244
Notice: Undefined variable: but17 in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 245
>Yes No (Show/Hide Iframe Border)
Show New Window Link:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 249
Yes Notice: Undefined variable: but28 in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 250
> No (Show a link to open Page in a New Window)
Show Item Name:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 255
Yes Notice: Undefined variable: but29 in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 256
> No (Show the URL of the wrapped page at bottom)
Show Scrollbars: no yes auto
Auto Resize:
Notice: Use of undefined constant checked - assumed 'checked' in c:\program files\easyphp1-7\www\mambo\administrator\components\com_wrapper\a dmin.wrapper.html.php on line 271


Have I done something wrong?

Thanks

gothicreader
November 26th, 2003, 23:18
I sure did something wrong :lol:

I fixed the problem, which really wasn't a problem.

uncommented the

error_reporting = E_ALL & ~E_NOTICE

in the php.ini

Jason407
November 27th, 2003, 00:55
That would fix it....and, it also looks like you have an earlier version...thanks to (edit: My pal) konlong, I had fixed those problems...you may want to redownload from my site. (link earlier in thread)

I will email Arthur and try to get the Mamboportal one updated. :D

spignataro
November 27th, 2003, 01:25
good job chap....

hey it is getting better and better every day

gothicreader
November 27th, 2003, 03:22
Thanks!!!

I did see your update and went ahead and overwrote the existing files.

Is there a way to check what version I'm using? I didn't see any listed.

konlong
November 27th, 2003, 05:15
Hey Jason, Thanks for the recognition, but the user name is "konlong." :D
(And your starting to make it harder to find problems!!)

I've been busy studying the table structure to see if there might be a way of
deleting everything from the component uninstall function. Is there a field
which ties a menu and all of its content together??

--------------
John

Jason407
November 27th, 2003, 05:23
Sorry, my brain is soo much better at thinking than my hand is typing. I am always making typos! :oops:
(I actually type with two fingers...I need to take a class or something!)Is there a field
which ties a menu and all of its content together??


I am not sure what you mean...

konlong
November 27th, 2003, 06:09
I know I should just read the tables a little more, but it is so much easier to
ask :?:

How is an item associated with a menu? I can follow the mos_components to
mos_modules , but I do not see the connection to mos_content.

-----
John

spignataro
November 27th, 2003, 08:11
there are some great programs that i used back in the day....but im sure there are now better ones...i had one gotten up to 60 wpm so im sure if i use to type with two finger and type with doing it the two finger old way....im sure you can do it too....

Reiel
November 28th, 2003, 23:57
you're correct in the topic, this is an amazing component!! :)

but i have a (stupid maybe?)question. is it possible to make the frame itself expand, so the page viwed shows as big as it's supposed to be? without the scroll bars i mean...

i believe this is controlled by the template, but i have to ask, just in case...

brynieman
November 29th, 2003, 00:00
you'd just have to make sure that where your calling the content is big enough for the content your calling....

???

does that make sense? it does to me..but not always that easy to do without playing with your design lots!
:-)

Jason407
December 2nd, 2003, 02:09
Like brynieman said...the content area of your template would have to be big enough.

You can set the width, etc in the Wrapper, but it is limited by your template. :D

Cyrana
December 10th, 2003, 01:47
I'm having problems makign this work correctly when the length of the wrapped area is longer than the screen. It is just abruptly cutting it off in Mozillafirebird (tried a lot of versions w/no luck).

You can see an example here:
http://www.errantlands.com/index.php?option=com_wrapper&wrap=forums

I've tried all sorts of things in terms of fixed and relatives lengths, and none of them get it to work unless I make it some like 2000px length (which is annoying, since only the main forums page is long).

Any ideas?

Jason407
December 10th, 2003, 02:20
Your page actually works great for me...
The problem is just that the autoresize feature is not supported by all browsers.

You should probably turn the scroll bars on auto. :D

Cyrana
December 10th, 2003, 02:26
Ok, I'll try that.

Are you sure it is working right? When it does (in IE for me), the bottom has a section which says Board Statistics, and below that is the Board Legend and also the "powered by invisionboard' thing.

Just checking. Sometimes it looks almost correct, but it just got cut off at a 'pretty' spot.

Your page actually works great for me...
The problem is just that the autoresize feature is not supported by all browsers.

You should probably turn the scroll bars on auto. :D

Jason407
December 10th, 2003, 02:58
Yep, works fine...I see all the way down to:
Powered by Invision Power Board(U) v1.3 Final © 2003 IPS, Inc.

And it changes sizes (shrinks to the correct size) on the other pages. :D

Cyrana
December 10th, 2003, 03:04
Argh!

Mind telling me what browser you are using? Just want to test things in a few different engines here. As I said, this was the latest MozillaFirebird Nightly for me that was causing the problem.

I know 90something% of my visitors use IE, but I try to check stuff out for everyone. ehhe

Yep, works fine...I see all the way down to:
Powered by Invision Power Board(U) v1.3 Final © 2003 IPS, Inc.

And it changes sizes (shrinks to the correct size) on the other pages. :D

Jason407
December 10th, 2003, 03:05
IE 6.0 on XP

Is Javascript enabled? Maybe has something to do with that, or security settings?

Cyrana
December 10th, 2003, 03:12
Yeah, I know IE is fine. Just complaining that it won't work in an non-IE browser (mozilla is #2 right?). I thought IE has the lesser of the CSS support as well.

Anyway, yeah Javascript is there, most stuff seems to work. I'm used to stuff not working in IE than the other way around like in this case.

It does work if I do the scrollbars, but its seriously fugly when you do that. :lol: And it then shows up in any browser with the ugly bars (so its not such a pretty inline frame in anything), when you put that setting in.

IE 6.0 on XP

Is Javascript enabled? Maybe has something to do with that, or security settings?

Jason407
December 10th, 2003, 03:20
It isn't a perfect solution. :wink:

If you want things to really be integrated, it can be alot of work...this is basically just a way to get around that, but it isn't as good as the real thing.

To make it look its best, it is often necessary to edit the content that you are wrapping to
a) match your site
b) fit nicely inside the frame (either with or without scrollbars...your choice)

For example, I have some pages that I included, and I had to go in and edit the width of all the tables in it so that it didn't get cut off on the sides.

Anyway, good luck...nice site so far! :D

Saka
December 13th, 2003, 12:46
Good stuff, just tried it. Especially like the height javascript adjustment.
Makes it look like integrated.

Good idea and nice work. :)

Jason407
December 13th, 2003, 13:07
Wow...thanks! Nice to hear...especially from you.
Glad you approve! :D

stingrey
December 23rd, 2003, 03:59
Nothing constructive to add just want to say that I love your little wrapper Jason and you rock.

I'd stayed away from using it as I was intimidated by all this IFrame stuff (don't actually know what it is :oops: ).
But heck it was so easy to use, that even a dumb-*** like me was able to use it :lol:.

Keep up the great work Jason!

gothicreader
December 23rd, 2003, 10:10
What's the latest version? Want to make sure I'm up to date.

Mogens
December 27th, 2003, 13:14
Maybe a silly question :? , but I cannot make this work. After having made the menu item, I get this message when trying to use it "Sorry no page found".

What exactly has to be done in the menu manager? Must the string "http://www.mysitename.com/index.php....." go into parameters, or ??

Could someone please explain how to make the coupling between the wrapper item and the menu please?

Thanks

mogens

Jason407
December 27th, 2003, 13:29
Did you add the correct Wrap name into the url? Calling the component by itself will not show a page, it needs to know what wrap you want to show.
You don't want to publish the component, you want to make a URL Menu Item that leads to the URL that the Wrap gives you...edit your Wrap and you will see the URl at the bottom.

From the Wrapper Readme:[code:1:4cac5c5c07]************* Usage *************
Create a Wrap, defining the values you want that Wrap to have, SAVE IT.
Now that Wrap can be viewed by using a URL like this:
http://www.yoursitename.com/index.php?option=com_wrapper&wrap=wrapname

You can then create a Main Menu link using this Wraps URL! :)

Also, If "Allow Wrapping URLs" is set to "YES" in the configuration, you may also access a URL
by using the "page" option in the call of Mambo Wrapper...like this:

http://www.yoursitename.com/index.php?option=com_wrapper&page=www.anothersite. com
(Note the page= as opposed to wrap=)[/code:1:4cac5c5c07]

Jason407
December 27th, 2003, 13:31
What's the latest version? Want to make sure I'm up to date.1.2
Available on my site:
http://www.jasonmurphy.net/page29/Wrapper.html

Mogens
December 27th, 2003, 13:51
Thanks for a fast reply Jason!
In my "Edit wraps" I have these data:

Name: Testing
Url: www.google.com
.....
Use this Url...: index.php?option=com_wrapper&wrap=testing

And in the main menu I hav created a new item with this under parameters:
http://www."mysite".com/mambo/index.php?option=com_wrapper&page=www.google.com

Jason407
December 27th, 2003, 13:57
Thanks for a fast reply Jason!
In my "Edit wraps" I have these data:

Name: Testing
Url: www.google.com
.....
Use this Url...: index.php?option=com_wrapper&wrap=testing

And in the main menu I hav created a new item with this under parameters:
http://www."mysite".com/mambo/index.php?option=com_wrapper&page=www.google.comUn der parameters? I think you are overthinking this....

Just use the URL it gives you...
Just make a New Menu Item that is a URL that contains this URL:
index.php?option=com_wrapper&wrap=testing

You CAN use the actual URL with the page= attribute, but only if you turn that option on as stated in the Readme I posted above. :D

Mogens
December 27th, 2003, 23:53
Now it works. Thanks for your help!
Mogens

BRAINEDGE
December 29th, 2003, 06:29
Hi Jason, I´d like to ask some improvements in your Wrapper Component. A new version to 2004.

I already make this alterations, but the front end is showing the contents out of order...

What I´m thinking is a way to make the wrapper shows a Unique Title (for using with titledata.php) and a description (to explain to visitor what is in the Iframe, useful to explain forms, etc..).

-----------------
Example::

Wrapper Title (new field :: title)

The description for this wrapper (new field :: description)

The Wrapper iFrame (like it work today)

-------------------

I think this two new fields is very important to make this component more powerful.

Thanks...

martint
December 29th, 2003, 23:42
Jason,

After using your com_wrapper to try out OScommerce with Mambo I can now understand why everyone has been raving about it. 8)

But I have one problem. If I am scrolled part way down a page and click a link in the OSCommerce iframe the new page is also scrolled part way down rather than starting from the top. I must use the main scroll bar to go back to the top of page.

The wrapper setttings are:
Name: OSC_test
URL: www.mydomain.com.au/catalog/index.php
Width: 600 Also tried 100%
Height: BLANK - Also tried 1000
Show Frame: NO
Show New Window Link: NO
Show Scrollbars: NO - Tried AUTO with same result
Auto Resize: YES
Use this URL to make a Menu Item or access this Wrap:
index.php?option=com_wrapper&wrap=OSC_Test

If I access the OScommerce catalog in its own browser window the links always load to the top.

Is this normal behaviour? Any ideas as to how this can be rectified?

PS: For others using OScommerce I can highly recommend:
Simple Template System http://www.oscommerce.com/community/contributions,1524 makes layout modifications really easy.

Dynamic HTML Menu http://www.oscommerce.com/community/contributions,1238 which creates a snazzy top menu bar for categories which makes it fit much better with Mambo.

Jason407
December 30th, 2003, 06:10
Unfortunatly, that is sorta just a drawback of how IFRAMES work. :(

Xirtam
December 30th, 2003, 13:07
Ok, I am stuck on this one.
On http://www.ummagumma.nl (testsite) I use the wrapper for the [jukebox]
If I want to make somekind of a module (upcomming events i.e.) how would a link look like?
I mean, a (mambo'ed link is different from the links in that jukebox. Can I do something that it will work? Or do I realy need a jukebox component?

Mogens
December 30th, 2003, 14:06
Jason, if I choose access level "Registered", then of course only registered users are allowed access. But do you know if it is possible within the iframe application to get access to the users id in table mos_users ?

Mogens

goondu
January 4th, 2004, 02:20
I had a wrapped page, is it possible to search for keywords within the wrapped page?

The wrapper is great!

Jason407
January 4th, 2004, 07:07
Jason, if I choose access level "Registered", then of course only registered users are allowed access. But do you know if it is possible within the iframe application to get access to the users id in table mos_users ? I don't think so.
I had a wrapped page, is it possible to search for keywords within the wrapped page?Not that I know of.

absalom
January 4th, 2004, 20:58
What's the latest version? Want to make sure I'm up to date.1.2
Available on my site:
http://www.jasonmurphy.net/page29/Wrapper.html

Jason, I can't download it from your site. It keeps on saying the requested site is unavailable or cannot be found, after it brings up the prompt to save it to disk.. :cry:

Jason407
January 4th, 2004, 21:13
I just tried it and it worked for me.

absalom
January 4th, 2004, 21:23
No luck.

I get the save to disk prompt, but then I can't save it anywhere (or even open it)..

Jason407
January 4th, 2004, 21:44
I don't know what to tell you...
I can Save it, Open it, and even chop vegetables with it! :wink:

Have you tried a different browser?

If you PM me your email address, I will email it to you.

absalom
January 4th, 2004, 22:36
I don't know what to tell you...
I can Save it, Open it, and even chop vegetables with it! :wink:

Have you tried a different browser?

If you PM me your email address, I will email it to you.

Firebird stalls, on a broadband connection :(

IE spits the dummy.

I'm PM you my address. It seems your site is the only one in Mamboland where I can't download..

Xirtam
January 5th, 2004, 02:09
I get the save to disk prompt, but then I can't save it anywhere Are you sure that you have a harddisk or something like that on your pc? :lol: :lol: :lol:

I tested it and can download/save it.

Stereo
January 8th, 2004, 00:33
if interested demo can be found here too :

http://www.quakefr.com/mambo45/index.php?option=com_wrapper&wrap=Archives%20Demos/sshots

(using autoindex script, whoch is a download manager which make automated downloads page from files from a dir)

JoshM
January 8th, 2004, 20:44
If anyone is interested here is Zina (hacked a bit) wrapped up

Click "music" from here:
http://www.liquid-band.com

absalom
January 9th, 2004, 01:49
Jason,

What's the background of the wrapper hooked into via CSS ?

Your standard <Body> tag or something else ?

I need to be able to change the background colour to suit my W3C CSS compliant design..

~raven~
January 10th, 2004, 16:40
Jason,

First of all, As I was reading through this lengthy topic, it is funny you started by saying, "okay, so maybe it isn't so amazing" 7 pages of posts and replies later, I would have to disagree :-)

Obviously a lot of people are finding it amazing...

Question:

Can you use the wrapper to place something in the administration section? If so, HOW?

EliteRides
January 10th, 2004, 17:33
I couldn't see it asked in scanning the post, sorry if it's a repeat. But, how come the 100% option doesn't work for horizontal? I keep getting stuck with scrollbars within scrollbars.

~raven~
January 10th, 2004, 17:43
I couldn't see it asked in scanning the post, sorry if it's a repeat. But, how come the 100% option doesn't work for horizontal? I keep getting stuck with scrollbars within scrollbars.

From Jason's previous explanation, it is a limiting factor of how I Frames (and hence the component) work...

mamboSkins
January 14th, 2004, 04:46
Hi Jason :D ,
man I have been so busy desiging that I havent had time to play with this yet. ok, I made a static html page and I want to use it as the contnet area for the'homepage' or 'frontpage' of mambo. Is this something I could do with this thing of yours?

btw, awesome! lol that photo of you with mr. evil dead...I loved those movies when i was a teen lol do you remember one called 'Basket Case'?

8)

lewisteo
January 14th, 2004, 06:13
this component does not work with SEF enabled right??? I am having this problem... if SEF is enabled... "page cannot be found"...

Any comments...

mamboSkins
January 14th, 2004, 06:49
i tinkered with it Jason, it is AWESOME!

you are so rock and roll bro :)

now:

help my dense grey matter past this roadblock I am having:

I made a GUI in photoshop , sexported the HTML, put in the links to the Mambo pages within the site for each menu item in the GUI...and I want only this to display in the 'middle content' section of the site when someone goes to www.myurl.com

This is what I did so far:

I uploaded my curtom GUI to my webserver.
I made a new wrapper pointing to it
i made a new main menu item pointing to that wrapper url
I named it Home and unpublished the default Home component.

It works fine ( the Home menu link that is) but how do I define it as a FrontPage item so that when user hits my domian the GUI will be displayed?

Is there a better way to do what I am trying to explain that anyone knows of? Man I hope so:)

Jason407
January 14th, 2004, 07:15
If it is the top Main Menu item, it should display by default as the home page...at least in 4.5 Stable.

lewisteo,
It should work with SEF...it does for me...I do not know about SEF Advanced.

mamboSkins
January 14th, 2004, 07:25
If it is the top Main Menu item, it should display by default as the home page...at least in 4.5 Stable.



hmmm. nope
any ideas

Jason407
January 14th, 2004, 07:32
Hmm...I see...seems that it will not work due to the fact that it depends on the variable being passed from the url.

I am stumped at the moment.

mamboSkins
January 14th, 2004, 07:40
i think i found a way.

i created a new content section named it frontsite
i created a new frontsite category in that section, called it homepage
next i created a new frontsite item in that category, and there I pasted in the HTML for the GUI that I had made before.

I see no option to hide the title , so i titled it (cleverly :lol: ) [code:1:e463554aeb] [/code:1:e463554aeb]

I set this to publish and how on front page and voila!

lewisteo
January 14th, 2004, 07:41
don't know why... just tried... if SEF enabled... then page cannot be found..

[code:1:6bb4f8474c]www.web-servers.org[/code:1:6bb4f8474c] the "MIW" link at the top on the right...

Jason407
January 14th, 2004, 07:44
don't know why... just tried... if SEF enabled... then page cannot be found..

[code:1:9ca2b29f23]www.web-servers.org[/code:1:9ca2b29f23] the "MIW" link at the top on the right...I think this is due to you having a space in the wrap name...because this works:
http://www.web-servers.org/component/option,com_wrapper/wrap,test/

lewisteo
January 14th, 2004, 07:48
Okay but this is what appears in the wrapper and I just copied it in...

Stereo
January 14th, 2004, 07:50
Jason maybe you could change the code so that the title wrap name and the link autogenerated are not linked ?
Coze when i want to specify a link name shorter, it keeps renaming it to wrap title name ...

(like title : "database supervision" shorten to "supdb" is not taken in account)

lewisteo
January 14th, 2004, 07:51
Okay resolved I am not suppose to have space in the title... Sorry for the inconvenience... this is indeed a remarkable component...

goondu
January 22nd, 2004, 09:30
The wrapper component is indeed amazing.

I had an Open-Realty application. And curently I am working to wrap my OR application. I am doing that as I like the feel, appearance, professional look of Mambo CMS.

That is my had created the menus (for accessing to my OR application) via the Mambo Administration. And I had removed those banners, buttons links within my OR application. In another word, my OR application and I use it more for its functionalities....

Everything is ok, but......

How can I stop my users to access my OR application directly (from my OR URL)? I would like my OR application to be accessible only via my Mambo wrappers.

Any suggestions?

JoshM
January 22nd, 2004, 10:30
is the OR app plain html or php or something else?

goondu
January 22nd, 2004, 16:37
is the OR app plain html or php or something else?

Open-Realty is a free easy to install, web content management solution, for real estate listings. Open-Realty uses PHP to drive a SQL backed, thus creating a tool which is fast and flexible. Open-Realty allows non-technical users to easily create and maintain realty listings on their website using a web browser.



Istill have little idea how I can resolve my issue:

a. I had a mambo site, say htp://www.main.com
b. I had a OR site, say htp://OR.main.com
c. I had wrapped my OR site into my mambo site.
d. I can now access my OR site via the Mambo menu URLs links.
e. However I do not want my customers to access to my OR site via htp://OR.main.com
f. How can I achieve that?

All URLs are fictitious.

Cheers!

Jason407
January 22nd, 2004, 17:06
How can I stop my users to access my OR application directly (from my OR URL)? I would like my OR application to be accessible only via my Mambo wrappers.

Any suggestions?
Here is how I would do it...however, this may not work with that particular script...but it may give you an idea.

In your wrapper for this item, I would add ?iswrapped to the end of the url.
Like:
http://OR.main.com/index.php?iswrapped=1

Then, at the top or your wrapped script, I would add some code that basically says...
[code:1:972df37772]if (!isset($iswrapped)){
echo("<meta http-equiv = refresh content=0;url="http://www.main.com/wrapped_version_address">");
}[/code:1:972df37772]
This way, unless they have added the ?iswrapped to the url, they cannot view the unwrapped version...they will automatically be redirected to the Wrapped one! :D

I have not tested this, but in theory it should work. :wink:

goondu
January 23rd, 2004, 01:16
[code:1:29fdccd28c]if (!isset($iswrapped)){
echo("<meta http-equiv = refresh content=0;url="http://www.main.com/wrapped_version_address">");
}[/code:1:29fdccd28c]

I have not tested this, but in theory it should work. :wink:

Thanks for your prompt reply. It helps :D :D :D .

The refresh code does not work however. Not much of a concern for me currently. :)

Another question on the wrapper component.

a. I had a url that take in a variable, example htp:\\OR.main.com\Search.php?ListID=?

b. I had a Search Box which read in the Variable ListID. And will send the page to htp:\\OR.main.com\Search.php?ListID=11 (says I enter 11 in search box)

c. Is it possible to define a Wrapper for htp:\\OR.main.com\Search.php?ListID=? ???

Thanks

Cheer!

Jason407
January 23rd, 2004, 01:36
Yeah, I kinda figured it wouldn't work the way it is...but the concept should work...the code just need to be tweaked and tested. :wink:

I think your second question is asking if you can pass a variable into a wrap's url. I do not believe you can...but, Wrapper has an option to where you can call a wrap by a URL, and you could use that to do it...but the URL will be a bit long.

In the Wrapper Configuration page (in Admin) set Allow Wrapping URLs: to YES.

Now, you can access a wrap by entering this into your browser:
http://yoursite.com/index.php?option=com_wrapper&page=www.google.com

So, you could setup your search form like this:
<form action='index.php?option=com_wrapper&page=OR.main. com\Search.php' method='get'>
<input type="text" name="ListId" height="16" size="15" value="search..." />
</form>

The GET method should add the ListId=??? (provided that the search field is named ListId)

Again, this is another IN THEORY post, I am sure some details are missing, and things would need to be tweaked.

EliteRides
January 27th, 2004, 14:03
-Fixed some javascript errors (error on page)

Is there a fix for the "Error on page" when you wrap external links? I have the latest version, I'm assuming as I only downloaded it about three weeks ago but, I still get the "Error on page" at the bottom on any external link I frame. I have an online store account through a third party site that I have wrapped with the wrapper. Everything works fine but, I get the error. Kind of intimidates customers to have their secure store show up with an error. :cry: Any suggestions?

Jason407
January 27th, 2004, 15:09
-Fixed some javascript errors (error on page)

Is there a fix for the "Error on page" when you wrap external links? I have the latest version, I'm assuming as I only downloaded it about three weeks ago but, I still get the "Error on page" at the bottom on any external link I frame. I have an online store account through a third party site that I have wrapped with the wrapper. Everything works fine but, I get the error. Kind of intimidates customers to have their secure store show up with an error. :cry: Any suggestions?
Yes...this isn't really a bug...the error only appears if you try to wrap an external page and set the AUTO-RESIZE to YES.
As stated in the component:
*Auto Resize ONLY works if the wrapped page resides under YOUR Domain.

Set Auto Resize to NO for your External pages, and you will not have an error. :D :D :D

The newset version was released on 1/22/04 it allows wrapping https:// urls. Sounds like you may need that feature.

burnitall
January 29th, 2004, 16:45
it also seems to happen if there is any type of link to an outside website. I am using Gallery with it and the only thing on the page that could cause the error is the link at the botom of ther page to there website. Thinking of removing it but nay i would rather suport them.

Jason407
January 29th, 2004, 18:13
it also seems to happen if there is any type of link to an outside website. I am using Gallery with it and the only thing on the page that could cause the error is the link at the botom of ther page to there website. Thinking of removing it but nay i would rather suport them.

Strange...I have tested it using a ton of external pages...and have not had an error as long as Auto-size was off.

burnitall
January 30th, 2004, 05:34
i ment when auto size was on. The page is in my mambo directory but has links to other sites on it. But dosn't pull any data from them.

Jason407
January 30th, 2004, 05:45
i ment when auto size was on. The page is in my mambo directory but has links to other sites on it. But dosn't pull any data from them.Are you saying that when you display YOUR page, that has external links, it gives the error if autosize is on?
I do not have this problem. I can wrap a page with external links fine.

Of course, when one of those external links is clicked...then you will get the error. There is nothing I know of that I can do to avoid that other than...don't use the autosize.

Jason407
January 31st, 2004, 04:55
New version 1.4
Fixed it so that javascript errors will not display even when viewing external pages with the Auto-Resize set to On. :D

http://www.jasonmurphy.net/page29/Wrapper.html


(to upgrade, you only need replace the components/com_wrapper/wrapper.php file)

burnitall
February 2nd, 2004, 11:43
thanks for all the good work Jason. Hopfully this will rid my error.

dalon
March 4th, 2004, 11:48
Hi, thx for this excellent component!!!

I notice there is a rather large space under the iframe. I tried changing style.height = h + 60 + 'px'

to

style.height = h + 0 + 'px'

But that doens't work. Eeeh, Jason?

SOLVED: There is a <br> in the code that I removed.