DavidWSnow
 Posts:162

| | 12/17/2007 5:54 PM |
| I just upgraded from the free (.net) PageBlaster to the DNN version. - I discovered that the config files are different and merged my rules into the new one.
- I discoveregd that the caches are in different places and deleted the old place.
- I created a page just for PageBlaster and installed the module.
- I had dread Seablick Consulting's review of the module and realized that it came with several rules for xhtml compliance. Having just run into a couple of DNN module coded by people still thinking in the last century, I thought that PB would be an easy way to convert UPPER to lower and add ending slashes in the right spots.
- From the module I can't see the saved rules and move them from the saved to the portal rules. WHAT AM I MISSING?
- PB is working with my old rules, so it is running just fine.
- I do wonder whither "portal rules" are for a single portal or the whole site? I have several parent portals and will want most rules to cover the whole site. Do I need to put theses in the config file to work?
Regards, /DaveS | | | |
|
|
|
John Mitchell Posts:2779


| | 12/17/2007 6:14 PM |
| Hi Dave, Thanks for purchasing. The XHTML rules are in a file called PageBlaster.SavedRules.Xhtml.config located at /DesktopModules/Snapsis/PageBlaster/Config/SavedRules I took those rules out of the default saved rules file because the UI slows down when there are a lot of rules to load and most people don't need them. You can look in that file to find rules that do what you want. The one to do lowercase on html tagslooks like this: SearchFor: ?\w+\b ReplaceWith: [RE:toLower()] And this one does lowercase on attributes: SearchFor: (?=[^>])\s[A-Z-]+= ReplaceWith: [RE:toLower()] And this one fixes elements that are not closed: SearchFor: <(img|meta|link|input|br|hr)\s*([^>]*)([^/])>(\1>)? ReplaceWith: <$1 $2$3 /> | | | |
|
John Mitchell Posts:2779


| | 12/17/2007 6:17 PM |
| I was afraid of that. They didn't all come out in the post. You can look in that file to get them, and keep in mind that you don't need the CDATA wrapper when you are using the PB config interface. The UI will add that itself. | | | |
|
DavidWSnow
 Posts:162

| | 12/17/2007 10:25 PM |
| I had already found the file but assumed that it was part of the kit. I have set the cache times in the config file for 5 & 10 minutes, and added about 8 rules. The rules I transfered from my DotNet-PageBlaster appear to be working. The new rules don't What is the easiest way to troublshoot PageBlaster rules? When I am working on content on my localhost I shut PB down, but now I want it working but re-processing the pages evey time a rule or the page content changes. Also are the portal rule just for one portal and I would need to migrate them to the config file to get them to work for the parent portals as well? Calling it a day now, /DaveS | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 7:37 AM |
| I usually test out rules on a single page first, and it helps if you insure each one is doing what you want individually since doing replacements on text can change what the next rule in the execution order has for input.
Yes, the Portal Rules work on every page in a single Portal. If you want rules to work in all Portals of a DNN Install then they will either need to be added to the portal Rules of each portal (preferred), or added to the main config file in the root. The reason you may want to just add them individually is because each rule takes some performance, and if you are applying them to all pages of all portals then you may be hurting the performance of all portals.
If you want to send me an e-mail with login info to your portal I'll be happy to take a look at your config. | | | |
|
DavidWSnow
 Posts:162

| | 12/18/2007 9:32 AM |
| Works to-good. I added a Text/HTML module to the page and moved a couple of rules to the page rules. It fixes the bad HTML while I am still in the editor. All I have to do is switch between "Source" and normal mode and the html is fixed on the page.
Email to follow, /DaveS
| | | |
|
John Mitchell Posts:2779


| | 12/18/2007 9:44 AM |
| | What you described is a function of the FCK editor. It will also try to produce XHTML compliant markup. | | | |
|
DavidWSnow
 Posts:162

| | 12/18/2007 11:08 AM |
| I think that I have it working now. BTW where are the rules so that I can migrate them to my production site when I want to? /DaveS | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 11:18 AM |
| The Rules are stored in the DesktopModule/Snapsis/PageBlaster/Config folder by default. There is a folder for PageRules and inside that folder the filenames have the [ModuleID] as part of the filename. If you move the rules, you may have to match up the ModuleID accordingly.
The PortalRules folder has the Portal Rules config files with the [PortalID] in the filename. | | | |
|
DavidWSnow
 Posts:162

| | 12/18/2007 6:21 PM |
| The “quote attr” rule messes up items that are quoted with single quotes a=’b’ I happen to have a couple places in a ListX module that has both single and double quotes. Double for ListX code and singles for HTML. It doesn’t work the other way around. I think there is some nasty ListX escaping that I might be able to use. I don’t even know is single quotes are legal in xhtml, put W3C didn’t complain about them. One of the “remove type”, “style type” and “script type” rules break the Drop-down Actions for the container and I had to comment out PB from the web.config to and remove these rules continue. I would have though one of the lower rules would have caught this from Blogs "td colSpan="2"..." or "a Class='Forum_BreadCrumb' ...." from Forum. Wow the blogs & forum modules are really interesting HTML code!
I assume that I make a rule to change the doctypes on a per page basis. You might want to provide one if you are going to supply these rules as part of PageBlaster. Clearly Blogs and Forum will be ‘Quirks Mode’ for some time to come.
I have gotten most of MY pages xhtml compliant. Exceptions are Blogs, Forums, a couple DNN modules that have poorly formed script lines. I need to go into DNN and fix the alignment error when you don’t display the container. All in all not too bad for a days work.
Regards,
DaveS | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 6:35 PM |
| Thanks for the Feedback Dave. It sounds like you have taken this farther than I have. I created all those rules and spent a lot of time on them so that it would work cleanly on most pages, but as you have found there is always something coded a little different than the rules expect. I'm pretty sure I have a rule in there to change DocType. I ended up just making my home page XHTML Strict so that first time vistors to my site would at least have the best experience I could make there. There is another thread in these forums where we were colaborating a bit on this subject here: http://www.snapsis.com/Support/tabid/601/view/topic/forumid/9/postid/4706/Default.aspx I may merge this thread with that one as we move forward. Another little trick I use in my Snapsis.PageBlaster.config file is add an exclude pattern="xxx" to exclude from replacements. Then if I ever have a rule that is keeping the page from working I just add the XXX to the querystring so I can pull it back out. | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 8:29 PM |
| I just read through ths again and I see a couple things I didn't answer. Yes, Single or Double quotes are valid for attributes as long as they are correctly paired.
One thing you might consider for the problems in the ListX code is to put comment and/or CDATA blocks around it, just like you do with inline Javascript. | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 8:37 PM |
| | Another thing that may help for when you are not displaying a container. The problem is because the No Container.ascx file in portals/_default/containers/_default is using a SPAN. Change that to a DIV, since SPAN elements are not valid for wrapping other block elements. | | | |
|
DavidWSnow
 Posts:162

| | 12/18/2007 9:35 PM |
| | That was the fix I had planned. I was just going to have to re-listed to a DNN Creative Video to find it and now I don't --- Thanks | | | |
|
DavidWSnow
 Posts:162

| | 12/18/2007 9:45 PM |
| BTW for the next version of PageBlaster I would re-think that Ajax drag and drop interface. If you have a dozen or so saved rules you are about at the limit of what you can see on the screen to move one. I am almost ready to bring the two files up in VWD Express and cut and paste between them as I move stuff back and forth.
I would like you to try the script related ones. They absolutely kill my system. My container have the DropDown Actions and the little button to make the action disappears. Others will be interested in those.
There is a doctype rule, but I didn't think it was set up for what I needed. I'll make one that reverts to a 4.01 doctype and use that where I have to.
/Dave | | | |
|
John Mitchell Posts:2779


| | 12/18/2007 10:33 PM |
| There is also the ability to copy/paste and move rules in the config tree using the right-click context menu.
What do you mean about trying the script related ones? You want me to try the Xhtml rules I created for replacing script tags? If so, I use all those rules on my home page and I am still able to use the action menus. | | | |
|
DavidWSnow
 Posts:162

| | 12/19/2007 9:45 AM |
| Do you use the action menus or the drop-down actions? I have always used the drop-down actions in containers because the SolPart actions were so non-xhtml compliant. Maybe with the fix-ups of these scripts I can now use them. Those three rules break the dropdown big time - the button that you have to click disappears. You try the drop-down actions and I'll try the SolPart actions and I'll let you know what happens. /DaveS | | | |
|
John Mitchell Posts:2779


| | 12/19/2007 9:48 AM |
| | Ahh, now I get it. I didn't catch that you were talking about the Drop-Down List. I'll have to try that and see what is happening. | | | |
|
DavidWSnow
 Posts:162

| | 12/19/2007 10:14 AM |
| There was also one rule or set that seemd to effect the second row of the silver hover menu from showing up. But with all of the enabling - disabling of PB etc. I forgot to write it down. I thought it was the script ones but it isn't and they do work with the SolPart Actions. Since I like them better than the dropdown and PB now fixes their crappy HTML I just tweaked by container pak to use them. Moving forward slowly but steadily --- DaveS | | | |
|
DavidWSnow
 Posts:162

| | 12/19/2007 3:10 PM |
| Being an old (very old) Unix regex coder I have some questions about the rules: Is this regex 8 with extensions as it appears? As I look at the "lower attr" rule (?=[^>])\s[A-Z-]+= I am having a little trouble figuring it out You are looking for BOL or > folled by a space and one or more UPPER case letters followed by and = sign and you are going to lowercase just the uppercase. If I have decifered this correctly I don't undersand the > or the BOL or why you aren't lowwering casing the entire word. Before I hack into this I thought I should understand what you are trying to do. /Dave Hope this renders ok ==} | | | |
|