ear1grey (@ear1grey)

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 122 total)
  • The first google result for “IE7 border-bottom” gives the answer to this.

    I got it to work in IE7 by…

    1. changing all references from id="current" to class="current" (because I refuse to write semantically wrong css :) )
    2. replacing #current with .current { display: block; BORDER-BOTTOM: #2e6e15 3px solid; }

    if something “doesn’t work” then:

    1. if you have an error message, google it, it may be something trivial.
    2. if you can’t understand what you see on google, post the error message here, so the magical community mind can see it – the key benefit of the forum is that one person’s fix becomes a solution for every person who follows with similar problems.

    I think your post may be corrupted: did you mean to say

    <li class= >


    Syntactically speaking: only if a page does not validate is it “wrong”.

    Semantically speaking: if a page uses id to encode semantic meaning then it is syntactically correct, but semantically naive (which for a “semantic personal publishing platform” is sub-optimal).

    There are possibly places where WP gets semantically wrong, but, a lot (possibly all) of this is down to theme and plugin designers who are often unaware of the semantic issues.

    Anyhow, your description in the opening post (two items returning “current” as their id) is something that will create a non-validating document, so it would be syntactically wrong.

    In summary: id is for addressing elements, class is for describing them.

    So, I think now you’re getting the function name “is_bb_search” (among other function names) from the db and you want to execute it to know if a particular list item should be marked as current.

    If that’s the case then it’s what I described before, which is something like where the function name is defined in $rw["location"] so…


    $page_location = $page->location;

    $switch = eval("return ".$rw["location"]);

    $current = ($switch ? ' class="current"' : "");

    echo "<li $current><a href="$page_id">$page_item</a></li>";


    …only the front page is id-ed as current as the forum link is active, while topic-page should return as current aswell, cause I want this page to be “under” the forum link as well…

    <grimace />

    If you do that (a) your page won’t validate and (b) there’s no guarantee of how the browser will interpret the content because HTML4 and XHTML specs require that element ID is unique in a page.

    From HTML4 spec:

    “id ID #IMPLIED — document-wide unique id —

    class CDATA #IMPLIED — space-separated list of classes —

    Yet another reason to use class="current". Using classes and ID’s appropriately is important.

    In reply to: Flooding user accounts

    FWIW I’ve kept bb stand alone for simplicity but I’m still getting a lot of registration spam that misses Akismet, so what are the plans for an Akismet UI in the admin panel? It’s all very black box at the moment, which is probably what’s causing a lot of these questions.

    In reply to: Suggestion

    Speaking only as an interested observer with nothing to gain beyond a better piece of GPL software, I can’t see anything wrong with the idea, except that if there’s a link for one site, then egalitarian spirit would dictate that there should be a link to every site that claimed to be supportive; so then there’s a need to create some kind of criteria for worthy sites, then the list has to be maintained, or it’s of little worth, etc. etc.

    So, what’s needed therefore, perhaps, is wiki.bbPress.org where such discussion and linkage can naturally live and die without too much administrative overhead.

    la la la spencerp does not exist la la la :P

    I’m an imaginary housewife with an unhealthy side-line in goat herding and theoretical underwater basket-weaving. My favourite colours are not visible to those without impaired vision. I believe I am allergic to prime numbers that do not appear as part of the sequence of Pi and spend my spare time checking this list in order to find such a number. Only one statement here is true, but it should help you deduce the rest.

    In reply to: query/php problem

    Release early, release often. Release it as a non-working draft. Email is a hassle, and many eyes can benefit from the learning experience.

    In reply to: insert/hyperlink file

    You may be looking for the object tag (it’s not permitted in the standard set of markup, so you’d have to explicitly allow it).

    See the HTML 4.01 Specification [1] and scroll down a little for examples.

    [1] http://www.w3.org/TR/html4/struct/objects.html#h-13.3

    In reply to: query/php problem

    It looks like your $rw["location"] variable contains the text "(is_front() || is_forum() || is_tag() || is_topic() || is_bb_feed() || is_bb_profile() || is_bb_favorites() || is_view())"

    Is that what you’re describing?

    If so a ternary structure (the x?y:z thing) won’t work because you need to give it a boolean value, so this may work…

    $switch = eval("return ".$rw["location"]);

    $current = ($switch ? ' id="current"' : "");

    … but if that does work, then you seriously need to ask yourself why you have such code in a variable – why can’t it be evaluated first then the result put in the variable – and if you can’t come up with a cogent answer you need to rethink your code.

    If that’s not what you’re describing then can you describe “not working” a bit better? Error messages and variable dumps help… or upload the source somewhere.

    In reply to: query/php problem

    Note: using id="current" in this way is dodgy because plugins have to generate content that co-operates with other plugins.

    If another plugin also uses id="current" the page will not validate (because each ID (identity) should be unique).

    You could just say id="X8VQm2_current" but (a) it would look ugly and (b) regardless, you’re not changing the identity of the row, you’re just saying something about it, so using ID is still wrong.

    The solution is easy: use class="current" instead and adjust your css so that instead of #current {} you use .current {}

    The example I wrote for you before shows how to do it.

    There is a painful habit of mis-using the id attribute among many theme designers and that makes it difficult to know what to do or why to do it :)

    In reply to: AWFULL DESIGN

    Roland, you might see that there’s at least a sense of humour here, and at best, a whole bunch of people who are interested in making the design better, so don’t be shy, say more, explain what confuses you, what irks you, what pleases you.

    Of course, you might not be a person at all, you might be a bot that’s been programmed to send just one message so as to avoid bozo-type forum filters that automatically kill off users after they’ve registered but not posted; then later you’ll update your website link to one that sells gentleman’s remedies.

    In reply to: AWFULL DESIGN

    Awful spelling.

    In reply to: for each question

    Huh? Thou speaketh in jest surely!

    In reply to: for each question

    ...current"; }


    ...current"SEMICOLON }


    In reply to: for each question


    global $bbdb;

    $r = mysql_query("SELECT * FROM $bbdb->menu WHERE set = 'active' ORDER BY order ASC");

    while($rw = mysql_fetch_array($r)) <strong>{</strong>


    if ($rw['is']) { $class .=" current" }

    echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';



    In reply to: for each question

    the while looks like it needs curly brackets adding to it or you’re just going to repeatedly set $class="" then remove the curly bracket above the echo.

    In reply to: for each question

    Just compute the computable stuff beforehand and it becomes a lot more maintainable/readable.

    // setup the basic data



    // compute the computable data

    if ($rw['is']) { $class="current" }

    // write the line

    echo "<li><a class='$current' href='$uri'>".$rw['item']."</a>"

    Note that I’ve used class rather than id for semantic purposes – the ID of an element shouldn’t change, but it’s class can change and can be multiple, so you could even do:


    if ($rw['is']) { $class .=" current" }

    In reply to: for each question

    That’s very difficult to decipher, so for maintainability may I suggest you break out the code so you create variables first then use them when creating the echo statement.

    It looks like you need to use call_user_func(tabel["is"]) to run the function names that you’re retrieving from the db.

    In reply to: Google Adsense

    Hi Disier, did you make any other changes other than add the plugin as above? Do you have other plugins installed? Which hook did you use (i.e. what does your add_action line say)?

    In reply to: for each question


    foreach($foo as $bar) {

    echo("<p class='$class'>$bar</p>);



    In reply to: No Login with IE6

    Any plugins installed?

    See also: https://bbpress.org/forums/topic/236

Viewing 25 replies - 26 through 50 (of 122 total)