Post Reply 
Fixing posts
Oct. 30, 2012, 04:19 AM
Post: #1
Fixing posts
(Oct. 26, 2010 02:52 PM)whenever Wrote:  http://prxbx.com/forums/showthread.php?tid=143 is not readable now. I think it is related to the code tag patch.

or

http://prxbx.com/forums/showthread.php?t...3#pid16803

As an administrator, I can use the Proxomitron to automatically modify (fix) a post. Ideally, I'd simply open the post for edit and save. More than likely, I'll have to read each post before saving it.

I think the risk is small but I can't guarantee no mistakes, however.

Opinions?

Instead of overwriting the old post, I could prefix or prepend the correction to the post.


Filters could look like

Code:
[Patterns]
Name = "prxbx.com replace %a0 with space"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<textarea name="message"*</textarea>"
Limit = 25600
Match = "(\1[%a0][%a0]+$SET(replace=$GET(replace)\1 ))+{1,100}\1</textarea>"
Replace = "$GET(replace)\1\r\n\r\n\r\n"
          ""
          "Edit by JJoe: %a0 to space. "
          ""
          "</textarea>"

Name = "prxbx fix code post for admins  (2012.08.27)"
Active = TRUE
URL = "$TYPE(htm)prxbx.com/forums/editpost.php?"
Bounds = "<textarea*</textarea>"
Limit = 32764
Match = "(\1\&amp;(^(^#))$SET(a=$GET(a)\1\&))+\2</textarea>"
Replace = "$GET(a)\2$SET(a=)\r\n\r\n\r\n"
          ""
          "Edit by JJoe: \&amp;(^(^#)) to &"
          ""
          "</textarea>"
Add Thank You Quote this message in a reply
Nov. 02, 2012, 12:08 PM
Post: #2
RE: Fixing posts
(Oct. 30, 2012 04:19 AM)JJoe Wrote:  
(Oct. 26, 2010 02:52 PM)whenever Wrote:  http://prxbx.com/forums/showthread.php?tid=143 is not readable now. I think it is related to the code tag patch.

or

http://prxbx.com/forums/showthread.php?t...3#pid16803
...

Opinions?
I understand the need for editing in the first showthread
http://prxbx.com/forums/showthread.php?tid=143
It needs an unencoded overwrite, IMO. The poster didn't originally post in mess-encoded, so leaving the encoded mess provides no intended value to proxo users. The encoded mess serves only as an example of forumware glitches.

But... (?) i don't understand how your pair of filters (code section i snipped) relates to either first or second (http://prxbx.com/forums/showthread.php?t...3#pid16803) showthreads.

(Oct. 30, 2012 04:19 AM)JJoe Wrote:  Instead of overwriting the old post, I could prefix or prepend the correction to the post.
...
"In place" fixes can work, imo. (But I'm not sure if that's what you're suggesting.)
Add Thank You Quote this message in a reply
Nov. 02, 2012, 01:59 PM (This post was last modified: Nov. 02, 2012 02:06 PM by JJoe.)
Post: #3
RE: Fixing posts
(Nov. 02, 2012 12:08 PM)sbk Wrote:  But... (?) i don't understand how your pair of filters (code section i snipped) relates to either first or second (http://prxbx.com/forums/showthread.php?t...3#pid16803) showthreads.

Filters like those will be used to 'fix' the thread and add a note that I fixed it.

(Nov. 02, 2012 12:08 PM)sbk Wrote:  
(Oct. 30, 2012 04:19 AM)JJoe Wrote:  Instead of overwriting the old post, I could prefix or prepend the correction to the post.
...
"In place" fixes can work, imo. (But I'm not sure if that's what you're suggesting.)

Overwriting would be like

.png  Corrected.png (Size: 76.83 KB / Downloads: 721)

Corrected and prefixed would be like

.png  Prefixed.png (Size: 167.59 KB / Downloads: 706)
Add Thank You Quote this message in a reply
Nov. 07, 2012, 10:25 PM (This post was last modified: Nov. 08, 2012 07:25 AM by Kye-U.)
Post: #4
RE: Fixing posts
Fixed the %a0 question mark characters.

Thought I fixed the html entities issue but I didn't (had to revert to a backup I made today just before I started tackling this). I'll need to refine my script and try again later (e.g. to leave deliberate html entities in CODE blocks intact, while decoding others).
Visit this user's website
Add Thank You Quote this message in a reply
Nov. 08, 2012, 08:16 PM (This post was last modified: Nov. 08, 2012 08:40 PM by Kye-U.)
Post: #5
RE: Fixing posts
Done!

Just ran my script and I believe I've gotten most of the html entities Smile! (for safety, I limited the queries only to a limited range of post ids).

If you come across a post that is garbled, please let me know! I've come across a few that I've fixed (where § and "smart quotes" appeared as �)
Visit this user's website
Add Thank You Quote this message in a reply
Nov. 09, 2012, 04:13 AM
Post: #6
RE: Fixing posts
Looks even better! Wink Feels better too. Smile!

Thanks

Hang on to the backup just in case.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: