Skip to:
Content
Pages
Categories
Search
Top
Bottom

Request to all developers and plugin writers

  • I realise this is a difficult one and happens with dynamically generated markup all too easily but please can all developers and plugin authors remember that an ID may only be used once! per page and to check their output to catch this error. at present they are an endemic problem found throughout pages, and very easily corrected.

    :)

Viewing 7 replies - 1 through 7 (of 7 total)

  • Peter Anselmo
    Participant

    @peteranselmo

    +1, not only will this make your markup not validate, but it can also cause problems when trying to extend using Javascript & CSS. It’s not difficult, just remember, don’t use id’s inside loops. And if you do, append something unique to the string.

    Exactly Peter, it’s looping where the issue usually arises, appending something unique usually works or just change to classes.

    and while we’re on the subject most Standards focused frontend coders have a fit at elements misused for clearing please please do not splatter the DOM with empty divs just ask how to contain floats the correct way :-)


    Mariusooms
    Participant

    @mariusooms

    Thanks! Good to be reminded, I’ll make sure to check again in case I missed something.

    The new bp-default is already a MAJOR change in a good way since the old BuddyPress theme btw. The old theme was littered with empty clearing div’s.


    modemlooper
    Moderator

    @modemlooper

    One problem I have is when plugins style thngs like <p> <a> and <h2> Let the template style these things. That way the plugin fits into sites better. Code for structure let the theme style the elements.


    stwc
    Participant

    @stwc

    Definitely this last as well — Group wikis, excellent as it is, does this with its 8 or 10 CSS files and has been a (minor) headache to override for a dark theme I’m putting together.

    The new bp-default is already a MAJOR change in a good way since the old BuddyPress theme btw. The old theme was littered with empty clearing div’s.

    Agreed out of the box the new default theme is a vast improvement and there are pages that validate fully – that’s not to say all the markup is as good as it could be with the odd div used to present data when a div carries no semantic value and shouldn’t really ever wrap plain text, many of the divs used that way perhaps ought to be paragraph tags or LI elements, and there are still the odd clearing div used (just happened across one on blog listing page)

    I don’t especially want this thread to just be a moan but something I have just noticed has really annoyed me.

    Glancing through source a minute ago and I found a plugin had managed to insert it’s style tag and rulesets within the body tag after analytics code just before body closes this kind of thing is utterly unforgivable and now means that I have to waste valuable time working out where this BP plugin has gone wrong and try and correct matters, sadly it was requested and as much as I would like to simply disable it in disgust I won’t be able to.

    Tell me this isn’t madness? (Names obscured to prevent embarrassment )

    function offensive_function_add_css() { ?>
    <style type="text/css">

    .**** .left-menu, .group-create .left-menu {
    width: 550px;

    add_action( 'wp_footer', 'offensive_function_add_css' );

    Why?

    I now have to work out how to move this to it’s own style sheet and have it called in as other plugins seem to manage!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Request to all developers and plugin writers’ is closed to new replies.
Skip to toolbar