Author

Topic: Long codes messing up the post history appearance. Solutions? (Read 221 times)

hero member
Activity: 510
Merit: 4005
I don't know why this is happening but it is probably a bug and looks like it's time for another PowerGlove SMF forum patch  Cheesy
Jeebus, I'm busy, yo. You can't just say "PowerGlove" every time this forum needs patchin'. (I'm just kidding, you totally can.) Grin

Hang on... I've already done this one, haven't I? Undecided

(In all seriousness, this problem has already been fixed, but it fell off of theymos' radar and has just been collecting dust. I recently reminded theymos about it, and I'm pretty certain he'll accept/merge the patch once I'm finished with one last testing/polishing pass. It's good/fortunate timing that logfiles posted a new topic about this, though, because the approach that PX-Z came up with a few posts up is smarter/neater than the approach I used originally, so I'll probably end up revising the patch as a result. @PX-Z: Nice job, man!)

That makes me think it's a css thing that may be very easy to fix.
I mean, you're not wrong, and there is a simple CSS fix for this (see shahzadafzal's posts here and here).

But, if you look at the stylesheet, it's pretty obvious that the SMF devs didn't want [code] to be presented that way (with "wrapped" contents), and I agree with them. So, while the simple CSS tweak is tempting, I don't think that's the right solution here: changing how code renders in response to a pretty specific layout bug seems clumsy/ill-considered to me.

(BTW, last time this came up, you mentioned something similar happening when replying to wide-code-containing PMs: I've got a patch for that, too, and I'll include it when I update that topic.) Wink
hero member
Activity: 1554
Merit: 880
pxzone.online
I just wanted to know how you know the table name, or row name, or title name, on that page. Is there any other script to extract such data?
You can inspect element your post history or anywhere in this forum to check that every box like UI/look is made with table tags. For me to manipulate all affected tags since there's no class name or id i just use the table, its attributes and its value, also the ":nth-child()" selector. In this case i just use ":first-child" selector since i just need only the first "td", you will need the latter if you need the other nth in order of tags (parent > child)
hero member
Activity: 1414
Merit: 513
Payment Gateway Allows Recurring Payments
to OP: I got confused after opening your profile posts history, I thought you were done here, hehe, as the page was clean, and I did not see the empty space, I thought the code (scammer's) you have provided in the last post, somehow did something, well, I just wasted around 7 minutes on figuring it out, lazy me. Well, AFAIK remember ANN also does the same thing but our other posts remain on the left side of the page CMIIW.
I just made a script to make it work, you can put it on any browser extension like Tampermonkey and Greasemonkey. Or you can try it first in the console of your desktop browser.
The script worked just fine, it's a good thing, I hope the admin will consider this contribution and solve this error ASAP. As a lot of time will be saved, I never faced this error in code tags, but yeah faced it due to ANN threads. Thanks, dear PX-Z you are doing great work, Thanks for making this script. I just wanted to know how you know the table name, or row name, or title name, on that page. Is there any other script to extract such data?

I actually wanted to learn it. Thanks. 
legendary
Activity: 2212
Merit: 7064
Why aren't the long codes in the post history displayed in the same way they appear in threads?
I never liked those stretched pages, mostly when I search post history, and I think it happened even with some signature codes that are not so long.
I don't know why this is happening but it is probably a bug and looks like it's time for another PowerGlove SMF forum patch  Cheesy
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
1. My post containing a long code - https://bitcointalksearch.org/topic/fake-malicious-script-to-double-spend-btc-please-help-decode-the-script-5492490 (Very neat)
2. My post history containing one of the posts with a long code - https://bitcointalksearch.org/user/logfiles-1247226 (Very messy)
If you check the same post in my posts archive or (once in a while) in my notification bot, it's very neat again. That makes me think it's a css thing that may be very easy to fix.
hero member
Activity: 1554
Merit: 880
pxzone.online
It's a known long time website look issue, it's the same thing for those big block images posted in ANN threads if the width is not set and the image is too large then it become like that on user post history. Unfortunately, theymos never fix it, well, unless PowerGlove do something to it.
Is it sort of bug?
I mean, if it's possible for the codes to appear neatly in the threads, then they surely should be able to replicate the same when one is viewing the post history
Looks like it.

I checked and compared both page, the difference is that the post history doesn't have this style "table-layout: fixed;" but if you will put this style on the table tags, the wide code tags content will be fixed but the dates and titles is affected, so putting width will fix it.

I just made a script to make it work, you can put it on any browser extension like Tampermonkey and Greasemonkey. Or you can try it first in the console of your desktop browser.

Code:
var urlString = window.location.href;
// Check if the URL contains "sa=showPosts"
if (urlString.indexOf("sa=showPosts") !== -1) {
  var tables = document.querySelectorAll("table.bordercolor[width='100%'][cellpadding='4']");
  tables.forEach(function(tables) {
    tables.style.tableLayout = "fixed";
  });

  var tds = document.querySelectorAll("table.bordercolor[width='100%'][cellpadding='4'] tr.titlebg2 >td:first-child");
  for (var i = 0; i < tds.length; i++) {
      tds[i].style.width = '15px';
  }
}
copper member
Activity: 2170
Merit: 1827
Top Crypto Casino
It's a known long time website look issue, it's the same thing for those big block images posted in ANN threads if the width is not set and the image is too large then it become like that on user post history. Unfortunately, theymos never fix it, well, unless PowerGlove do something to it.
Is it sort of bug?
I mean, if it's possible for the codes to appear neatly in the threads, then they surely should be able to replicate the same when one is viewing the post history
hero member
Activity: 1554
Merit: 880
pxzone.online
It's a known long time website look issue, it's the same thing for those big block images posted in ANN threads if the width is not set and the image is too large then it become like that on user post history. Unfortunately, theymos never fix it, well, unless PowerGlove do something to it.
copper member
Activity: 2170
Merit: 1827
Top Crypto Casino
Long codes are easily fit in a code box with left to right scroll buttons, and this makes the whole thread neat in the default Bitcointalk pages. However, if you check the post history of a user who recently posted a long code, it's a completely different story where the entire page is stretched based on the length of the code.

Why aren't the long codes in the post history displayed in the same way they appear in threads?

Example:
1. My post containing a long code - https://bitcointalksearch.org/topic/fake-malicious-script-to-double-spend-btc-please-help-decode-the-script-5492490 (Very neat)
2. My post history containing one of the posts with a long code - https://bitcointalksearch.org/user/logfiles-1247226 (Very messy)
Jump to: