I use SMF and the SMF Bridge on my site. I have installed the sky theme. All the blocks in Sky look fine except the one that is a list of new forums posts. I am attaching a screen shot here since it will be easier to see than for me to describe.

I am trying to figure out how to correct the formatting for this block. Firebug shows me that the information appears in line 815 of the style.css file and that entry looks like this:

ul.menu li, ul.menu li.leaf, ul.menu li.expanded, ul.menu li.collapsed {
border-bottom:1px solid #EEEEEE;
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:0;
padding:0;
}

Can anyone help me correct this?

CommentFileSizeAuthor
sky_format.jpg13.15 KBparagon77

Comments

jacine’s picture

Status: Active » Closed (fixed)

Well, I took a look at your site, and all I can say is that it's a bad implementation by that module. The code is being output as if it was a menu. Really bad idea. It should be running through theme_item_list(). I would file a request with the module developer to do just that if I were you.

I'm sorry but I don't have time to troubleshoot this type of thing.

paragon77’s picture

This theme is the only theme that causes that to happen, but thank you for at least taking the time to look at it. I will pass along to the SMF Forum Module Developers what you said about it being a bad implementation.

jacine’s picture

The reason it happens in this theme is because ul.menu li a has display:block; plus padding and margins. That is the style of menus in Sky. If you don't like it, you are free to do what you want with it. You are also free to write your own CSS to target that block.

An actual menu item is expected there with one link from the menu system, not a bunch of text and links. That is what theme_item_list() is for, and why I think it's a bad implementation.

paragon77’s picture

I think I have isolated the part of the module that outputs to the block and formats it the way it does. Is there anyway you could should me what I might need to change to get it to output better?

It's either this section:

function smfforum_recent_posts($num_recent = SMF_NUM_RECENT_POSTS, $exclude_boards = null, $output_tag = "<ul>", $output_br = "<br />", $output_method = '') {
  global $smf_settings, $smf_user_info, $smf_txt;

Or this section:

if (variable_get('smfforum_recent_posts_br', 1))
          $delimeter = SMF_RECENT_DELIMITER_BR;
        else
          $delimeter = SMF_RECENT_DELIMITER_SPACE;
        $c = smfforum_recent_posts((int)variable_get('smfforum_num_recent_posts', SMF_NUM_RECENT_POSTS), null, "<ul class = \"menu\">", $delimeter);
        $block['subject'] = t('New forum posts');
        $block['content'] = $c;
        return $block;

I haven't gotten any response from anyone with the SMFForum module which is why I am asking you.

Thanks

jacine’s picture

Yes, you've found it. Sigh. This is really bad practice...

Anyway, this is the problem:

"<ul class = \"menu\">"

But honestly, I can't make sense of this code, and don't know if removing that will end up breaking things.

paragon77’s picture

Wow thanks for the PROMPT response!!!

I have been doing some tweaking. I changed the \"menu\"> to \"li\"> and it removed all the extra lines in the block. Feel free to go look.

I would love to add a line back between each actual new forum post list but this is at least a start unless you have any other suggestions based upon what I have just done.