Quick Nav:  Online Store   |   Login | Register

DNN PageBlaster Saved Rules

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 2 of 2<< < 12
AuthorMessages
Host Account
<100 Posts
Posts:82


12/19/2007 3:51 PM  

Lower Attributes

(?=[^>])\s[A-Z-]+=

Assert that the regex below can be matched, starting at this position (positive lookahead) «(?=[^>])»
   Match any character that is not a ">" «[^>]»
Match a single character that is a "whitespace character" (spaces, tabs, line breaks, etc.) «\s»
Match a single character present in the list below «[A-Z-]+»
   Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
   A character in the range between "A" and "Z" «A-Z»
   The character "-" «-»
Match the character "=" literally «=»


I created this with RegexBuddy

Host Account
<100 Posts
Posts:82


12/19/2007 4:02 PM  

Sorry about all the post attempts. I really wanted that RegexBuddy thing to work.

It's very cool because you can hover over each step and it will highlight the part of the regex and explain it.

DavidWSnow
<250Posts
Posts:162


12/19/2007 4:36 PM  

I finished with the global rules for a while and migrated the rules I had been using in the .Net version to the page(s) that required them. I installed a PB module on the page and made it only visable to Admin and put the rules on that page.

While doing this I was logged in to DNN with IE for working on PB and logged out in FireFox for viewing.  The rules workd in IE and not in FF. Afer a test or two I determined that I had to be loggined in for for the ruse to work.  What visibily should the PB module have on the page were it page rules are being executed? 

I ASSUMED that it should not be visable, since I don't want my customers to see it. However, I suppose that the container could not be display and the users have no edit rights.

Needless to say I need to get this right before I do anymore page-specific rules.

/DaveS

John Mitchell
Posts:2779


12/19/2007 4:55 PM  

Correct, PageBlaster honors the security of the module before applying any rules. This allows you to do replacements by role if you like. You can also have more than one module on a page.

Like you pointed out, to make the module invisible, change the settings so that the container does not display.

DavidWSnow
<250Posts
Posts:162


12/19/2007 5:11 PM  

This would explain why you were so quick to know about the "non-displayed container bug with span vs div  ;=}

/Dave

DavidWSnow
<250Posts
Posts:162


12/20/2007 6:33 PM  

Lower attr rule

Now that I understand "zero width positive assertions" a bit better, I still think that this rule is wrong.

It matches "anything that isn't a >" followed by a "white space" followed by "a block of ALL UPPERCASE" followed by =

So it will lowercase SNOW="good" but not Snow="bad" and not DAVE_SNOW="bad"

I think that the [A-Z-] should be [\w-] above but that still doesn't fix the major problem for me. This rule breaks major parts of DNN and I have to comment out PageBlaster from web.config to even be able to delete the rule. Then re-enable Pageblaster and delete the cache.

Quote attr rule

This has similar effects but I have messed with it as much.

On the good side!

 

  • I have most of my site xhtml compliant. I found 15 of my pages with minor html flaws and fixed them. Your rules fixed many others that were DNN or module errors. Of the approximately 100 pages on the site less then a dozen aren’t compliant.
  •  The Blog and Forum are real pieces of work! I am about to give up on the forum module anyway and switch to Active Forum. I really wanted to stick with the DNN forum, but this last release has turned me sour.  If there were another blog module I’d try it as well. Both are poor step children at DNN, where it seems they’d rather work on the core than the  common modules, skins and html/xhtml compliance.
  • My Links and Docs page has several PDF files stored in the file manager and accessed via UDT. The W3C valuator doesn’t like urls that contain ampersand (...link=docs%2fAFH+Assessment+Form.pdf&tabid=94&mid=698" target="_blank">)
  • My SiteMap module has a double layer unordered list that W3C claims has extra “ul”s. Put the page in VWD Express and it thinks the code is just fine. I’ll save that for another day
  • I also found that one of my old PageBlaster rules worked but was eating too many meta-tags in this little exercise and have fixed it up. It looks for a span of a class="NewTitle" eats this span and replaces the title with it. There is also a rule for span of class="NewDescription" These two rules have done wonders with my Datasheet page (72 different pages with query strings) and how Google has indexed them. Google wasn't happy with 72 pages with the same title and description on a site. Now each client has their own page with its own title and desctiption indexed at Google. Couldn't have done this without PageBlaster.
  • To my surprise I had one Module that minor html and css errors that I reported vis Snowcovered and the next day a new module arrived via email.
  • Today I'll go over the non-puiblic pages and fix any html errors.

RegExBuddy looks neat, but I try not to do too many regular expressions any more. The real difficult part is figuring out what you need to be looking for and how not to take too much. I do use their EditPad as a basic text editor. Now that I am nolonger working on Unix systems I have moved away from Xemacs and try to stick with things that use Widows short-cut keys.


Regular Expressions are a Swiss Army knife with six razor blades. You can do very fine surgery if you are lucky. If not you can easily come up a finger short.

On a seperate idea can you tell me how happy you are with Active Forums and if migration of data is part of the install. I plan on trying an evaluation soon.

I hope to deploy the new skin with xhtml compliance on Xmas.


/DaveS

 

DavidWSnow
<250Posts
Posts:162


12/27/2007 4:18 PM  

Making good progress.  Upgraded localhost from DNN 4.5.3 to DNN 4.8.0 and discovered that they added a few features that give you at least one more piece of incorrect html to fix on every page  that has a search form. It now has and Autocomplete="off" which W3C says is invalid. 

While testing I ran pages thru CSS validator and the PageBlaster module's css fails. You have a typo which I fixed and then forgot what it was.You may want to check this and fix it for you next release. I take it that DNN's release process doesn't even require validating CSS code. The new forum module also has CSS errors!

 

I have adopted a much better strategy for working with PageBlaster rules for xhtml. Since most of my simple pages are already compliant I place a PB module on the page I am working on and disable cache. I work on the rules while logged in with IE and test while logged out with Firefox. An error doesn't usually screw me up too bad. If I come across a rule that should be portal wide because it is needed on many pages I mode it to the portal rules. Then I have disable PB in web.config, delete the cache, and re-enable PB befor finding out if this broke somethin else big time.  5 times I have re-done the lower attr rule got it working on the current page and been fried when I let it loose on a portal basis.

Too my suprise the Forum module now has some pages that are complient.  When I tried the blog module W3C is complaining about text that isn't even on the page! Is it possible that a postback is being done and W3C sees that pages as well?  Since the blog's html is soooo bad I won't go any further with it.

I looked at your post of PB rules. How is it that you ender these rules so that they can be read? I have a couple that might be useful.

/DaveS

 

John Mitchell
Posts:2779


12/27/2007 6:05 PM  
It sounds like you are fast becoming the expert on XHTML in DotNetNuke.
Thanks for the heads up on the CSS validation error. I'll check that out before the next release.

I know how you feel about getting a rule just right on one page, only to find out that something else throws a wrench in it on another.

I don't think the W3C validator looks at information from a post-back. I'd be interested to take a look and see I could figure out that error though.

Thos PB Rules are hard to get to cme out right in the forum. What I do is switch to Source mode in the Html Editor, and then wrap the information with a [ code ] [ /code ] block (leave out the spaces to do this).

You can also include them on a regular text file and then attach that to the post.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 2 of 2<< < 12

Forums >Snapsis Product Support >PageBlaster > DNN PageBlaster Saved Rules



ActiveForums 3.7
Powered by: Snapsis Software