Jump to content

I am Bored

Member
  • Posts

    706
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by I am Bored

  1. If your willing, I could go through the mapping and properly translate the characters used currently to their HTML entity equivalents, which should solve any possible encoding issues. The only other potential issue with silvertongue is certain fonts not containing certain characters, which will take a bit more work to resolve, but is possible.

  2. The announcement issue was because mur had literally *just* deleted the announcement (don't know if it was ever actually in the DB, not having checked the Wookie link for the announcement), upon reloading the page a few seconds after I initially clicked the announcement link, Mur had replaced the announcement with the current one. As a note, it might have been worth keeping the old announcement text but striking it out. (the announcement did need to be re-created properly to begin with, as it didn't show up as there being a new announcement)

     

    As this is a bug in a one-off piece of code, it might be best moved to resolved bugs.

     

    And, in a completely unrelated note, am I the only one who just can't manage to type announcement, and keeps typing it as annoucement? Except for the previous sentence, where I specifically worked to type it correctly the first time, I failed to type it correctly the first time even once. :))

  3. Well, how about we change it so that it doesn't do absolute positioning then?

     

    Some jQuery code to achieve the desired effect:

    // Now, on to the main changes.
    // First we replace all of the absolute positioned pieces with relative positioned versions.
    // The creature holders are inline-block so that they flow appropriately.
    $('div[id^="div_allcreatures_holder_"]').attr('style', 'display: inline-block; height: 128px; vertical-align: top;');
    $('#div_allbckpids_holder').attr('style', 'text-align: center');
    
    // There is an outermost div that is aligning the content to center by default,
    // we need it to align left for things to look right.
    $('body > table > tbody > tr > td > div[align="center"]').attr('align', 'left');
    
    // We could just put a div around all the creature holders and set a left margin on that,
    // but it's a pain to do via jQuery, so we do it this way instead.
    $('div[id^="div_allcreatures_holder_"]').each(function(i, elem)
    {
    	if (i % 4 == 0)
    		elem.style.marginLeft = "8px";
    });
    
    // Now we get to remove the padding lines that are added by the current code to
    // account for the size of the normal content.
    $('body > p:has(> br)').remove();
    
    // Add a blank line after the creature capacity info.
    $('#div_allcreatures_holder_1').before('<br />');
    
    

    And, if you are running that code to test what it looks like, you'll also have to recalculate the size of the pagecontent frame:

    // And, lastly, we re-calculate the pagecontent size, because we've changed it.
    // This doesn't need to be done in the actual changes.
    var pagecontent_ifrm = parent.document.getElementById('pagecontent');
    pagecontent_ifrm.style.height = 800; //reset
    pagecontent_ifrm.style.height = document.body.scrollHeight; //orig
    
    
  4. I'm not certain why your's is showing up with nice spacing below that text, but in Opera Classic, there is no room between the bottom of the text and the top of the creature icons. Adding 20px to the base of the absolute positioning used by the elements should provide the correct spacing.

     

    I've attached screenshots of what it looks like currently, what it looks like with 20px spacing (ignore the first column, I was seeing what it looked like with 40px spacing), and a highlighted version showing exactly where the top of the element is with 20px spacing.

  5. After a bit of digging, I've been able to come up with a fix. Changing "js/dlg/subModal.js" line 206 from:

    doc.getElementById("popupMainPage").style["position"] = "relative";

    to:

    doc.getElementById("popupMainPage").style["position"] = "absolute";

    Solves the problem and is still correct, because the popupMainPage div is at the root of the document, and absolute positions are calculated relative to the iframe, rather than the document.

     

    I have not yet been able to figure out why it keep scrolling to the middle of nowhere when I click things though.

     

    Edit:

    It appears that the scrolling is due to Chrome behaving absolutely absurdly with go-nowhere links (<a href="#">), as it auto-scrolls to the link when clicked. I'm currently trying to figure out a non-absurd way of solving this. (the bug has existed for at least 4 years) The initial report is issue 92301, which is closed as obsolete, and the newest one is issue 364999 which is still open.

     

    The absurd answer to fixing the second issue is to find every go-nowhere link in MD, and add "e.preventDefault(); return false;" to the end of it's on-click handler.

  6. So, it appears Chewett wasn't aware that the DB backup was causing an issue like this. Working under the assumption that MD is non-responsive due to the SQL server being slammed by the dump, I was instructed to look into the details and present my findings.

     

     

    My proposed solution is to add the --single-transaction option to the invocation of mysqldump. The --single-transaction parameter is to ensure a single, consistent, state is backed up. It also means that every table doesn't have to be locked while the backup is occurring. It should be noted that MyISAM tables, as they don't support transactions, will be accessed in whatever state they are at the time. As hinted in the first answer to this StackOverflow question, it might be necessary to add --skip-lock-tables to the options list, however I believe it would be redundant.

    It may also be worth looking into using --result-file rather than piping the console output to disk. I doubt this will have any impact on dump speed, but it's worth mentioning.

     

     

    My initial response included adding the --quick option, but, upon further reading, it is enabled by default, and specifying it manually is not needed.

     

    I was going to suggest mysqlhotcopy if MD contained solely MyISAM and ARCHIVE tables, however it was deprecated in MySQL 5.6.20 and removed in MySQL 5.7.

     

    An initial alternative idea was to have the dump occur via a user that had a resource limitation of the number of queries a second, but, as the only query limitation available is a per-hour limit, and, as the result of too many queries is that the server will return an error, rather than waiting until the user is allowed to make more queries, this is not a viable way to limit the resource usage of the DB backup process.

  7. Well, I *thought* a topic for this already existed, but I can't seem to find it.

     

    The issue is that, when upgrading a creature you can set a custom name, however the input box has its maxlength property set to 20. I believe that custom names can be longer than 20 characters, and certain creature names are longer than 20 characters to begin with. "Imperial Aramor Assassin" for instance.

  8. Currently, entering "CTC" into the chat transforms it into "Creature Transfer Code: CTC". This is way overly optimistic, and will trigger on phrases such as "CTC sent". 

     

     

    The transform should instead check that CTC is followed by "[0-9]+[A-Z]{5}[0-9]{2}" (in the form of a regex)

     

    The reason I do not suggest that it check for the presence of "MDC" is because a partial CTC, such as what is used to check information about the creature via clickables, should still be transformed.

     

     

     

    The ITC (Item Transfer Code) and ATC (Avatar Transfer Code) transforms also suffer from the same problem, and can be solved with the same regex solution.

×
×
  • Create New...