[Resolved] A few bugs

  • Hello,

    Just a few bugs… couldn’t figure them out. The number of posts to display is always showing 5 posts even if you change the number. Also, under “Output Options” > “Title of Posts:”, the box doesn’t retrieve code properly. I had the following entered:

    <h4 class="entry-title">Others Also Looked At...</h4>

    and it messes up the format in the box after you save. So when you go back to make a few changes, the wrong format appears and saves for every tweak.

    Hope that helps, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In case anyone is scratching their head over the first admin option… “Number of Posts to Display”…

    Problem: Say you want to display 5 posts but 6 always comes up instead. To fix, you would have to change the 6 to a 5. This is actually caused by a logic error.

    The Fix:

    First open where-did-they-go-from-here.php. Find the following line:
    if ($count > $limit) break; // exit loop if we cross the max number of iterations

    Change it to the following:
    if (!($count < $limit)) break; // exit loop if we cross the max number of iterations

    The “Number of Posts to Display” option will now function correctly. Still working on the second bug…

    The second bug’s solution…

    Problem: if you enter HTML code (or probably any code for that matter) into the admin field “Title of posts,” it will save correctly but when the page reloads, the code is stripped out. If you do not re-enter the title with the code, then it will come out all weird-looking. The reason is because stripslashes was applied when the title was retrieved for display but the code was not escaped.

    The Fix:

    First open admin.inc.php.

    Then find the following line:
    <input type="textbox" name="title" id="title" value="<?php echo stripslashes($wherego_settings[title]);

    Replace it with this:
    <input type="textbox" name="title" id="title" value="<?php echo attribute_escape(stripslashes($wherego_settings[title]));

    You will now be able to use code in the “Title of posts” admin field.

    Didn’t experience the number of posts bug, but the heading problem popped up really soon when I added style info.

    Thanks for the fix, it does work.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] A few bugs’ is closed to new replies.