DavidWSnow
 Posts:177

| | 04/21/2008 10:29 AM |
| John, On my web site www.AgingSafely.com I have have a page that contains the data for each Adult Family Home listed with us. I also have a parent portal for most of these homes with 2 pages (home and photos) I would like to find a way to make the data sheet from the first site to show up as a page on the parent portal. I have found two ways both with severe down sides: - Create a page on the parent portal and use and iFrame to display the contents of the data page. This doens't look good, it confuses Google Analytices.
- Tell DNN to create a page that is a link and point to the original data page. This works with Google Analytics. However, the user has actually moved to our website, sees our menu and can't use our menu to get back to the parent portal.
I am hoping that with the amazing magic in your menu and mind, you might have a way to accomplish this without the negative side effects. /DaveS | | | |
|
|
|
John Mitchell Posts:3085


| | 04/21/2008 10:45 AM |
| Hi Dave, I think I would do it with the WebCapture feature of PageBlaster. With a WebCapture you get all the benefits of using an Iframe, but the results are actually injected into the page. You can even make the capture dynamic if needed so that if you click on a link within the captured page it will result in another capture : [PB:WebCapture(http://www.snapsis.com/default.aspx?[PB:Request.Url.Query]) ] | | | |
|
DavidWSnow
 Posts:177

| | 04/24/2008 4:01 PM |
| I am a little confusded aboiut how to do this if I wanted www.Snapsis.com to appear as a page in one of my sites: - In the parent portal create a page called Datasheet.
- Add Pageblaster to the page
- Add a rule with no search for and a replace with[PB:WebCapture(http://www.snapsis.com/default.aspx?[PB:Request.Url.Query]) ]
I tried this and I get a page of garbage and had to delete the page becasue I couln't access PageBlaster anymore. A little more detail in the PB manual would help ;=} I was sure that PB would come to the rescue, it is the ultimate Swiss Army Knife for DNN  /DaveS | | | |
|
John Mitchell Posts:3085


| | 04/24/2008 4:11 PM |
| | You'll need to search for something in the rule you create. If you want to replace the entire page then Search For: .* | | | |
|
Host Account
 Posts:83


| |
DavidWSnow
 Posts:177

| | 04/25/2008 10:23 AM |
| Love it. Your are more than welcom to use this as an example. I welcome all links  I'll try the code very soon. I wonder how Google Analytics counts the accesses? /DaveS | | | |
|
DavidWSnow
 Posts:177

| | 04/25/2008 12:52 PM |
| What I really want is the menu etc. from basic.agingsafely.com but the content from the datasheet. What you have specified does exactly the same thing as putting a URL in the menu. I suppose that I could create a basix.agingsafely.datasheet.aspx with only a token in an html module, then with PB: - Get the real datasheet page
- replace the token on the first page with the contents of a div from the webcapture page
I was hoping for something simplier /Dave | | | |
|
John Mitchell Posts:3085


| | 04/25/2008 1:21 PM |
| Do you need two webcaptures pasted back together as one?
Doesn't your sub-portal already have the basic menu system?
You can make the WebCapture do two captures in one by adding more parameters.
After the original Url that you want to capture, you can specify search and replace parameters using regex.
If you let me know exactly what parts that you want to capture I can help you with the regex.
You could even setup several WebCaptures and assign the Search For in the rule as tokens like {Header}, {Data}, {Footer}
Then anywhere you use those tokens it will be replaced with a specific webcapture.
That is how I made this page: http://drf.statfox.com/, all the navigation, header, and footer, are coming from http://www.drf.com, and the middle sports content comes from a different server. You can "see under the hood" by using this url: http://drf.statfox.com/?pbx=all This is kind of like a reverse IFrame since we are hosting their Sports section, but templating it with automatic includes from their system. | | | |
|
DavidWSnow
 Posts:177

| | 04/25/2008 1:51 PM |
| On http://basic.agingsafely.com/Services.aspx page I want to replace the ContentPane with the ContentPane from http://www.agingsafely.com/Listed_Homes/Datasheet/vrecordid/2475.aspx
/DaveS | | | |
|
John Mitchell Posts:3085


| | 04/26/2008 10:14 AM |
| Ok, I updated my Webcapture at the link above using this rule: SearchFor: {AgingSafelyData797} ReplaceWith: [PB:WebCapture(http://www.agingsafely.com/Listed_Homes/Datasheet/vrecordid/2475.aspx, .*?Start_Module_797 -->(.*?).!-- End_Module_797.*,$1)] Now anywhere I put the token {AgingSafelyData797} it will replace it with the capture from that module on that page. | | | |
|
John Mitchell Posts:3085


| | 04/26/2008 10:17 AM |
| Oh, I almost forgot the most important part. While I was making this work, I found a bug in my rule parser, so you'll need the latest DLL to do the capture of a group inside the WebCapture function. I have attached the latest to this post. |
Attachment: 14261761171.zip
| | |
|
DavidWSnow
 Posts:177

| | 04/27/2008 9:19 PM |
| One quick clearification about the tokens and and the dilimiting characters {AgingSafelyData797} are tye {} characters supposed to be in the token to be replaced? On the page that I a capturing content from ReplaceWith: [PB:WebCapture(http://www.agingsafely.com/Listed_Homes/Datasheet/vrecordid/2475.aspx, .*?Start_Module_797 -->(.*?).!-- End_Module_797.*,$1)] what chars are the identifyinhg wrapper? Start_Module_797 --> to End_Module_797 I am concernd that the characters not show so that the tokens should be comments I suppose. I thoung that div's would be good but then I realized that regex would match the number of begining dis with the ending divs. /DaveS /DaveS | | | |
|
John Mitchell Posts:3085


| | 04/28/2008 7:24 AM |
| You can make the token to be replaces anything you want. It you want to make it with comments around it and replace the comments with the token then you can be sure the token never shows up.
Yes, I identified the start and stop of the content with the Start_Module and End_Module, You can use something else there also, but it gets difficult to start and stop on Divs without something more unique to identify them.
Another idea would be to put some better start and end markers in your skin where you are getting the content from to identify everything in the content area. | | | |
|
DavidWSnow
 Posts:177

| | 04/28/2008 1:26 PM |
| Almost got it working. See the differences between http://basic.agingsafely.com/Services/tabid/1406/Default.aspx and http://www.agingsafely.com/tabid/263/Default.aspx?vRecordId=2475 A couple issues have come up. - Disabling cacheing also disables WebCapture.
- PB seems to cache the WebCapture long after the page has been caputured or changed. I had to change the source of my PrintPage button to be just the div with the data rather than the whole ContentPane and change the "Return to List" button to be "Close Tab or Window" and they have stayed in PB's cahce thru a cache flush, numerous ^Shift R's etc.
- There appears to be more white space ahead of the moved text than there was on the original page.
- Also I am copying the text from inside of the ListX module on the original page, where I have html comments dellimting the area being copied, yet I appear to be getting the module title and other items outside that area.
Otherwise good job. I can see several places to use this. I suspect that I will have to combine its use with my Copy Title and Copy Description rules so that both the Datasheet page and the Services page have exactly the same title, so Google Ahalytics will show all of the access in one place. Who knows maybe it will even double count them  Are the rules for a page executed in order? /DaveS | | | |
|
DavidWSnow
 Posts:177

| | 04/29/2008 10:42 AM |
| [PB:WebCapture(http://www.agingsafely.com/tabid/263/Default.aspx?vRecordId=2475, -->(.*?).!--(.*?)..*,$1)] What do the --> before the (.*?) and the !-- after do for the regex? Also I appear to be getting more that just the text between my HTML comments < !--StartDataSheet-- > and < !--EndDataSheet-- > If while I am on the Services Page I click on Login I get a Yellow screen exception /DaveS | | | |
|
John Mitchell Posts:3085


| | 04/29/2008 10:56 AM |
| Those were parts of the html comment for the start and end module in my example. I used the period in front of !-- to take the place of < so I could post it and it wouldn't get interpreted wrong. So the regex is supposed to capture everything after the start module comment and before the end module comment which works on my example page. I think yours is not ending correctly and you are getting two viewstate fields on your page and also two footers.
That would be why you get an error on the page that did the capture. I started answering your other questions yesterday, but I must have been distracted before I posted and closed the window (Working with tabbed windows can be dangerous). The webcapture is part of Replacements, so as long as you don't exclude that it should still be executed.
The caching you are seeing may be happening on the source page instead of at the target.
Yes, the Page Rules are executed in order, so you can do more cleanup after the capture if needed. I'm not sure what you are using for your capturing Regex, but if you want to attach it in a text file, I can try it out in Regex Buddy to see if it is working as expected. | | | |
|
DavidWSnow
 Posts:177

| | 04/29/2008 12:29 PM |
| We really need a better way to post rules. Active Forum truly gets in the way! Maybe you could lean on its developer and see if he can include some easy way to quote HTML so that it displays correctly. Sort of that maybe we should both all rules as attached text files. I missed that you had the Started and end in an html comment because of the crap you were doing to try to fool Active Forum into displaying it and added extra comment characters.
/Dave | | | |
|
DavidWSnow
 Posts:177

| | 05/17/2008 5:27 PM |
| Still having problems with this one. Again extra space before and after < and > to keep AF happy Test to Teplace = ReplaceThisTextToken < !--StartDataSheet-- > and < !--EndDataSheet-- > are the first and last text in the ListX module on
http://www.agingsafely.com/listed_homes/datasheet/vrecordid/2475.aspx On the Services page of basic.AgingSafely.com the PB rule is Replace:
ReplaceThisTextToken With:
[PB:WebCapture(http://www.agingsafely.com/listed_homes/datasheet/vrecordid/2475.aspx, < !--StartDataSheet-- > (.*?) < !--EndDataSheet-- > ,$1)] Several things are happening in addition to the copy of the text. - I am getting data outside the Start and End. I get some of the skin,
- I get a white area at the top
- Logging in and out from this page causes the yellow screen
Any ideas here? /DaveS | | | |
|
John Mitchell Posts:3085


| | 05/18/2008 10:18 AM |
| | Did you mean to have a space directly before the < in the !--EndDataSheet part? Because there is not a space there in your page you are capturing from. If you just copy and paste my replacement rule, it is working correctly. | | | |
|
DavidWSnow
 Posts:177

| | 05/18/2008 4:51 PM |
| You really need to look at the page. I am picking up much more data: - 1.5 in extra white space above
- The border around the content pane
- The module title from the source page
- The footer from the source page.
I should only have picked up from the Basic Adult Family Home - This is not a real AFH! -- Bellevue, WA to the disclaimers at the bottom. its like I replaces with .* /DaveS | | | |
|