Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: TY on February 23, 2008, 08:19:26 PM

Title: Neat Board Layout
Post by: TY on February 23, 2008, 08:19:26 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1099)

This is a minor modification to make your board index layout become neater. Similar to vbulletin and IPB.

-Neater "Last Post".
-Icon of the message of last post will be shown.
-Separation of number of topics and posts.
-Child Board in board index does not 'colspan' other columns. (Please see screenshot)
-Will also modify MessageIndex.template.php, Child Board view inside parent board will also be changed.

A picture is worth a thousand words. Please see the screenshot.

15/2/2008 - Version 1.0 Released
22/6/2008 - Version 1.5 Released
   - Support for 1.1.5
   - Child Board in board index does not 'colspan' other columns.
   - Neater child board view inside parent board.

Your feedback is appreciated.
Title: Re: Neat Board Layout
Post by: goldenboy48 on February 23, 2008, 09:34:17 PM
Looks better. More like vBulletin, am I right?
Title: Re: Neat Board Layout
Post by: ApplianceJunk on February 24, 2008, 04:51:08 PM
Hi,

It looks much better with your mod in your image example.

I downloaded it and install went ok without any errors, but we are using Delber MC theme.
It did not change anything.

Can I manualy install this and have it work?
Title: Re: Neat Board Layout
Post by: vbgamer45 on February 24, 2008, 06:00:52 PM
The mod by default only works with the default theme but you can try installing on the other theme's using a manual install and see how it looks.
Title: Re: Neat Board Layout
Post by: goldenboy48 on February 24, 2008, 09:26:12 PM
SMF Package Parser says,

"Error: This package is not Installable on SMF 1.1.3!"
Title: Re: Neat Board Layout
Post by: ApplianceJunk on February 24, 2008, 09:32:16 PM
Quote from: vbgamer45 on February 24, 2008, 06:00:52 PM
The mod by default only works with the default theme but you can try installing on the other theme's using a manual install and see how it looks.

That's what I thought. :)

Any chance of someone posting the manual install info?

Thanks,
Title: Re: Neat Board Layout
Post by: TY on February 25, 2008, 04:32:37 AM
Quote from: PanesarV on February 24, 2008, 09:26:12 PMSMF Package Parser says,"Error: This package is not Installable on SMF 1.1.3!"

You can try by changing the package-info.xml file.
change the <install for="1.1.4"> to your version. I did not test it on 1.1.3, but most probably it will work. Just try your luck.

Quote from: ApplianceJunk on February 24, 2008, 09:32:16 PM
Quote from: vbgamer45 on February 24, 2008, 06:00:52 PMThe mod by default only works with the default theme but you can try installing on the other theme's using a manual install and see how it looks.
That's what I thought.Any chance of someone posting the manual install info?Thanks,

Use the package parser: http://www.smfhacks.com/packageparser/package.php
Title: Re: Neat Board Layout
Post by: Bluey on February 25, 2008, 05:39:02 AM
On install I get a Test Failed error on ./Themes/default/BoardIndex.template.php

I choose to install anyway and this is my index.template.php

Update


It appears that this mod is conflicting with the View Only Boards mod I have installed.  I need some help with working out the code sequence as I am not a coder by a long shot. 
Title: Re: Neat Board Layout
Post by: lookang on February 25, 2008, 08:52:03 AM
2.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed

any tips have to install ?

thanks! :D
Title: Re: Neat Board Layout
Post by: waremock on February 25, 2008, 02:40:50 PM
Neat and simple MOD, Thanks.
Title: Re: Neat Board Layout
Post by: syzable on February 26, 2008, 04:39:27 AM
Thanks for this............works a charm. :)
Title: Re: Neat Board Layout
Post by: Caitlain on February 27, 2008, 03:37:08 PM
When I try to upload this to my site, I get "The package you tried to upload either is not a valid package or has become corrupted." 
Title: Re: Neat Board Layout
Post by: waremock on March 20, 2008, 12:44:21 PM
Does this work with 2.0?
Title: Re: Neat Board Layout
Post by: Nibogo on March 24, 2008, 02:53:18 PM
Nice modification but didnt work with my theme :(
Title: Re: Neat Board Layout
Post by: Chewy954 on March 24, 2008, 08:10:22 PM
doesnt work good with child boards =[
Title: Re: Neat Board Layout
Post by: Joker Grafix on April 19, 2008, 05:21:01 PM
Execute Modification ./Themes/default/BoardIndex.template.php Test failed

I am sure this is because I hid the childboards from the index is there a way I can get this mod to work with the childboards still hidden?
Title: Re: Neat Board Layout
Post by: InternetMafia on June 08, 2008, 12:16:47 PM
I have a way different sets of variables for the following two mods.  Any advice of workarounds.

/* Each board in each category's boards has:
            new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
            children (see below.), link_children (easier to use.), children_new (are they new?),
            topics (# of), posts (# of), link, href, and last_post. (see below.) */
            foreach ($category['boards'] as $board)
            {
                echo '
            <tr>
                <td class="alt1" width="51" align="center" valign="middle"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

                // If the board is new, show a strong indicator.
                if ($board['new'])
                    echo '<img src="'.$settings['images_url'].'/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
                // This board doesn't have new posts, but its children do.
                elseif ($board['children_new'])
                    echo '<img src="'.$settings['images_url'].'/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
                // No new posts at all! The agony!!
                else
                    echo '<img src="'.$settings['images_url'].'/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';

                echo '</a>
                </td>
                <td class="alt2" style="padding-top:12px; padding-bottom:12px;">';if ($board['new'])
                echo'
                    <b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><img src="'. $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt=" " border="0" /><br />
                        ', $board['description'];
else
            echo'
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
                        ', $board['description'];

                // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
                if (!empty($board['moderators']))
                    echo '
                    <div style="padding-top: 1px;" class="smalltext"><br/><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';
               
                // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
                if (!empty($board['children']))
                {
                    // Sort the links into an array with new boards bold so it can be imploded.
                    $children = array();
                    /* Each child in each board's children has:
                            id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
                    foreach ($board['children'] as $child)
                    {
                            $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                            $children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/subon.gif" alt="' . $txt[333] . '"/><b>' . $child['link'] . '</b>' . ' <img src="'. $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" width="25" height="15" alt=" " border="0" />': '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/suboff.gif" alt="' . $txt[334] . '"/>' . $child['link'];                           
                    }

                    echo '
                    <table style="float:right; margin-top: 15px;" width="100%" cellspacing="0" cellpadding="3" border="0">
                        <tr>
                            <td class="middletext" valign="middle" align="center" width="30%">
                                <b>', $txt['parent_boards'], ':</b><br/><br/>
                            ';

                    $child_counter = 0;
                   
                    if(empty($settings['child_boards_rows']))
                    {
                        echo '   
                            </td>
                            <td class="middletext" valign="top">';
                               
                                for(; $child_counter < ceil(count($children)/2); $child_counter++)
                                        echo $children[$child_counter], '<br/>';
                    }
                   
                    echo '
                            </td>
                            <td class="middletext" valign="top">';   
                                for(; $child_counter < count($children); $child_counter++)
                                        echo $children[$child_counter], '<br/>';
                    echo '
                            </td>
                        </tr>
                    </table>';
                }
                // Show some basic information about the number of posts, etc.
                    echo '
                </td>
                <td class="alt1" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
                    ', $board['posts'], ' ', $txt[21], ' <br />
                    ', $board['topics'],' ', $txt[330], '
                </span></td>
                <td class="alt2" valign="middle" width="22%">
                    <span class="smalltext">';

                /* The board's and children's 'last_post's have:
                time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
                link, href, subject, start (where they should go for the first unread post.),
                and member. (which has id, name, link, href, username in it.) */
                if (!empty($board['last_post']['id']))
                    echo '
                        <b>', $txt[22], '</b>  ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
                        ', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
                        ', $txt[30], ' ', $board['last_post']['time'];
                echo '
                    </span>
                </td>
            </tr>';


Also,the other mod is quite a bit different.

// Assuming the category hasn't been collapsed...
        if (!$category['is_collapsed'])
        {
            echo '
        <div class="catwrapleft">
<div class="catwrapright">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" style="">
<tbody>


Not really sure how to work it out.
Title: Re: Neat Board Layout
Post by: razorblitz07 on June 10, 2008, 12:56:20 AM
I'm wondering if there was any way the following modification can happen:

Turn this layout:

(http://img364.imageshack.us/img364/5117/smflayoutlb5.png)

into this

(http://img257.imageshack.us/img257/7233/vbulletinlayoutmc2.png)

I want the Board Name, Latest Posts, Threads, and Posts table row to move up to the top instead of it being under each forum board header just like vBulletin has it.
Title: Re: Neat Board Layout
Post by: razorblitz07 on June 10, 2008, 09:02:20 PM
any help please?
Title: Re: Neat Board Layout
Post by: razorblitz07 on June 13, 2008, 01:39:21 AM
sorry for triple post but i want to keep my question alive....and I really don't want to annoy any staff members with a pm.
Title: Re: Neat Board Layout
Post by: TY on June 22, 2008, 11:00:46 AM
Mod UPDATED!!



Quote from: razorblitz07 on June 10, 2008, 12:56:20 AM
I'm wondering if there was any way the following modification can happen:

Turn this layout:

(http://img364.imageshack.us/img364/5117/smflayoutlb5.png)

into this

(http://img257.imageshack.us/img257/7233/vbulletinlayoutmc2.png)

I want the Board Name, Latest Posts, Threads, and Posts table row to move up to the top instead of it being under each forum board header just like vBulletin has it.

Thanks for your suggestion. I will try work around to see if it works nicely.
Title: Re: Neat Board Layout
Post by: God Of Mana on August 05, 2008, 04:23:04 PM
IMHO, it was neater before the mod. Still, good work.
Title: Re: Neat Board Layout
Post by: jusplay77 on September 21, 2008, 06:11:54 AM
Any plans to allow it to work with 1.1.6?  I get a message stating that it is not compatible with it at this time.
Title: Re: Neat Board Layout
Post by: BlackXBOX on September 21, 2008, 10:33:47 PM
I installed it but it didnt change a thing!
Title: Re: Neat Board Layout
Post by: stingerman on October 10, 2008, 03:52:50 AM
1.6?
Title: Re: Neat Board Layout
Post by: gameradvance on November 08, 2008, 11:00:09 PM
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

PLEASE HELP!!!! My smf version is 1.1.7
Title: Re: Neat Board Layout
Post by: TheDisturbedOne on November 08, 2008, 11:17:49 PM
Quote from: gameradvance on November 08, 2008, 11:00:09 PM
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

PLEASE HELP!!!! My smf version is 1.1.7
here ya go!
Title: Re: Neat Board Layout
Post by: TheDisturbedOne on November 09, 2008, 05:10:43 PM
Any chance that somebody can make ss1 look like ss2 with the child boards?
The child boards' posts box thing is much smaller, and the topics one is much bigger.
Title: Re: Neat Board Layout
Post by: vyb3 on November 10, 2008, 08:56:00 AM
Nice mod, how can i install it on my custom theme though?
Title: Re: Neat Board Layout
Post by: TheDisturbedOne on November 10, 2008, 03:25:40 PM
Quote from: vyb3 on November 10, 2008, 08:56:00 AM
Nice mod, how can i install it on my custom theme though?
What files are in your custom theme?
Title: Re: Neat Board Layout
Post by: Low on December 07, 2008, 03:33:45 PM
Quote from: TheDisturbedOne on November 08, 2008, 11:17:49 PM
Quote from: gameradvance on November 08, 2008, 11:00:09 PM
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

PLEASE HELP!!!! My smf version is 1.1.7
here ya go!
Broke my forum lol.

OP please make this available for 1.1.7
Title: Re: Neat Board Layout
Post by: TheDisturbedOne on December 09, 2008, 09:14:32 PM
Broke your forum?  All that I did was just change the version to make it go for 1.1.7
There were no template edits since 1.1.4 I think so it must be your forum
Title: Re: Neat Board Layout
Post by: chrishicks on February 16, 2009, 03:05:30 AM
I was doing some other installs earlier and I noticed that I somehow have both 1.0 and 1.5 of this installed. Apparently 1.0 is the version applied but now for the odd part. 1.0 is listed as the current version while 1.5 is the outdated one. I would like to make the changes in order to go to the 1.5 version but my codes are pretty different due to other mods. The big culprit is the Images on Board(v.1.0) mod. I can uninstall it to clean up the code some but my boardindex.template.php still needs even more work due to code I'm not sure about(be it left over from another uninstall or another mod - I'm not sure).

Now should I just tackle this with the existing Images mod still there or should I remove it and go from there? The easier thing for me would be to uninstall the Images On Board Mod but then will that be harder to reinstall after the edits?  I used the above edited version posted above for 1.1.7 on a test board and it worked just fine on 1.1.8 so I'm hoping it will be fine on my normal board as well. If I post my boardindex.template.php file could someone give me a hand with the edits please? I believe I can take care of the other edits on my own.

Thanks in advance for any help you can provide.
Title: Re: Neat Board Layout
Post by: stingerman on February 17, 2009, 01:21:44 AM
What about 1.18?   ;D
Title: Re: Neat Board Layout
Post by: abbyh on March 24, 2009, 12:53:37 AM
Quote from: stingerman on February 17, 2009, 01:21:44 AM
What about 1.18?   ;D

I got broken lines between the main board and child boards after installing this mod to my forum.  My forum is 1.1.8 and done manual edit to my custom theme at board.index.template.

I attached an image for the modder be able to look at on my problem. Could you help me to clear this out? It look nice in my forum though.
Title: Re: Neat Board Layout
Post by: coldy316 on June 08, 2009, 12:50:19 AM
this is a very good and handy mod to have but does anyone know if this will be updated for
the latest version of smf boards..
Title: Re: Neat Board Layout
Post by: trekkie2444 on August 14, 2009, 05:59:56 PM
How do I get rid of the Moderators section on my board index?
Title: Re: Neat Board Layout
Post by: trekkie2444 on August 14, 2009, 06:04:29 PM
Whoops, just realized that was an entirely different mod.
Title: Re: Neat Board Layout
Post by: trekkie2444 on August 14, 2009, 06:05:59 PM
1.1.9 gives me errors on installing the package for default/boardindex.template.php and default/messageindex.template.php.
Title: Re: Neat Board Layout
Post by: trekkie2444 on August 14, 2009, 06:06:30 PM
Does anyone have a newer version of it?