Skip to:
Content
Pages
Categories
Search
Top
Bottom

.alt classes not recognised

  • @footybible

    Participant

    Hi @jeffsayre from trawling round the forums and trac tickets looking for information on this you seem to be somewhat of an expert so I’m hoping you can help me :-)

    Basically in my installation of wordpress 3.0 and Buddypress 1.2.5.2, with social theme, the .alt class is not recognised. When I use it in css it shows up in the stylesheet, but the actual element refuses to take it on board:

    http://www.footybible.com/groups/coaching-fitness/forum/topic/test/

    I’m pretty sure it is nothing I’ve done because the problem also exists when I switch to social parent theme, to which i’ve made very few changes. It is obviously something to do with the theme, however, because I can use it when I switch to default. Yet other people have told me they use .alt in social with the same version of BP and WP with no problems!

    Do you have any ideas?

Viewing 17 replies - 1 through 17 (of 17 total)
  • @hnla

    Participant

    Obviously these themes are at fault in as much as there were changes to the approach that zebra striping took the majority of the changes were in core files which you should have in 1.2.5.2 but also there were changes made to theme files which is always likely to be an issue where non default themes are used as you will need to be aware of changes or wait for the theme author to update.

    The table that lives in the forum directory is missing a class you need to go through all tables and add ‘zebra’ to the table class

    Very minor point when posting to forums it’s better not to call on a member directly, the community has a lot of very knowledgeable people helping out a particular member may not be available or may be busy, so don’t impose or limit yourself :)

    @footybible

    Participant

    Thanks @hnla point taken :-)

    So to clarify I need to make the changes here:

    https://trac.buddypress.org/changeset/3111/branches

    but with the theme edits made in my custom theme rather than the default theme?

    @hnla

    Participant

    Yes those are the changes and you need them made to any of the files that ordinarily live in /bp-default/ but in this instance will reside in your theme folder.

    @footybible

    Participant

    @hnla I’m afraid to say I have changed the 4 php files and the js in my theme and still no luck

    @hnla

    Participant

    Have you got any tables with more than one row? (sorry if that sounds a silly question or I’ve missed them)

    @footybible

    Participant

    I’ve just added one- and the .alt is working:

    http://www.footybible.com/groups/coaching-fitness/forum/

    But still no luck with the forum posts:

    http://www.footybible.com/groups/coaching-fitness/forum/topic/test/

    @hnla

    Participant

    That second link: this is not a table! its a ul construct.

    @footybible

    Participant

    But is it not still .alt css that should alternately highlight that? Like the ul#topic-post-list li.alt command in this forum?

    @hnla

    Participant

    Not sure without checking but I don’t think ul lists were taken into account, it shouldn’t be difficult to add that ul li to the jQuery function though.

    @footybible

    Participant

    Ok thanks. I can only think that must be it because I have tried everything else. Unfortunately I have no idea when it comes to jquery though. So is my best option to wait for an update on this? Or is there something more pro-active I can do?

    @hnla

    Participant

    Try this; replace the line with this version:

    jq(‘body#bp-default table.zebra tbody tr:odd, ul#topic-post-list > li:odd’).addClass(‘alt’);

    However that does just target the members list you may need to change / remove or add #members-list

    Foor that specific page you would want #topic-post-list – I’ve edited above.

    @footybible

    Participant

    I’ve edited it to read:

    jq(‘body#bp-default table.zebra tbody tr’).mouseover( function() {
    jq(this).addClass(‘over’);
    }).mouseout( function() {
    jq(this).removeClass(‘over’);
    });

    jq(‘body#bp-default table.zebra tbody tr:odd, ul#topic-post-list > li:odd’).addClass(‘alt’);

    jq(‘div.message-box’).each( function(i) {
    if ( i % 2 == 1 )
    jq(this).addClass(‘alt’);
    });

    But no luck

    @hnla

    Participant

    Your code looks correct and I’m afraid it works for me so at a bit of a loss as to why it’s not working for you.

    @footybible

    Participant

    Ok thanks for your help anyway. This is so frustrating!

    @hnla

    Participant

    one thing if you copy and pasted from here check that the characters didn’t paste as back ticks or other incorrect characters, so backspace the ‘ and , and enter them from your keyboard.

    @footybible

    Participant

    YES! That was it! I was getting tired and sloppy :-) Put the two ‘ in and now it works. Thanks so much, this has been tormenting me for a week!

    @hnla

    Participant

    Great stuff. Must remember that code can’t be copied from the posts for the time being until a proper code block is put in place.

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘.alt classes not recognised’ is closed to new replies.
Skip to toolbar