News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SRAVC - Separate Replies And Views Column (Fully Hook!)

Started by Hj Ahmad Rasyid Hj Ismail, May 02, 2010, 04:10:19 AM

Previous topic - Next topic

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Quote from: PascalCX on June 23, 2010, 03:41:07 AM
how can I move "started by" into separate column?

is that style u want ?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

#Pascal

exactly !
---
better only an author name (without creation time and started by text)

Joker™

Quote from: PascalCX on June 23, 2010, 09:04:44 AM
exactly !
---
better only an author name (without creation time)


install the mod.after installing

open themes/default/MessageIndex.template.php

Find:
<th scope="col" class="smalltext first_th" width="8%" colspan="2">&nbsp;</th>
                            <th scope="col" class="smalltext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';



Replace it with:
<th scope="col" class="smalltext first_th" width="8%" colspan="2">&nbsp;</th>
                            <th scope="col" class="smalltext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
                            <th scope="col" class="smalltext" width="17%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
       




Find:
            echo '
                                    <p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
                                        <small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
                                    </p>
                                </div>
                            </td>
                            <td class="lastpost ', $alternate_class, '">
                                <a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
                                ', $topic['last_post']['time'], '<br />
                                ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
                            </td>
                            <td class="stats ', $color_class, '">
                                ', $topic['replies'],'
                                </td>
                                <td class="stats ', $color_class, '">
                                ', $topic['views'],'
                            </td>';



Replace it with:
            echo '
                                    <p>
                                        <small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
                                    </p>
                                </div>
                            </td>
                            <td class="lastpost ', $alternate_class, '">
                            ', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
                            </td>
                            <td class="lastpost ', $alternate_class, '">
                                <a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
                                ', $topic['last_post']['time'], '<br />
                                ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
                            </td>
                            <td class="stats ', $color_class, '">
                                ', $topic['replies'],'
                                </td>
                                <td class="stats ', $color_class, '">
                                ', $topic['views'],'
                            </td>';



Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

#Pascal

#44
thanx a lot !
---
and can I do it without installing mod?
just separate column Subject / Started by into 2 columns

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

#Pascal

#46
i've tried to separate "author/started by" columns without installing your mod and I got 2 problems:
"started by" not centered and missing block

first problem can be fixed by
<center> ', $topic['first_post']['member']['link'], ' </center>

second problem can be fixed by replacing 6, 5\7,6 6\7 colspans:
<td colspan="', !empty($context['can_quick_mod']) ? '7' : '6', '" class="smalltext">';
<td colspan="', !empty($context['can_quick_mod']) ? '7' : '6', '">
<td colspan="7" align="right">

but I dont think that it is a good idea                                        
my changes:

<th scope="col" class="smalltext first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col" class="smalltext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th scope="col" class="smalltext center" width="10%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th scope="col" class="smalltext center" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';

echo '
<p>
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</p>
</div>
</td>
<td class="lastpost ', $alternate_class, '">
                            ', $topic['first_post']['member']['link'], '
                            </td>
<td class="stats ', $color_class, '">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>';


can you help me plz?

the second screenshot with applied two fixes

Joker™

colspans changes have to be made to extend that bar.u can see mod parse also,to see where else to make colspans changes .
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved


TheListener

Managed to finally install the mod with one edit required.

However is there a way to move the avatar so it is next to the text rather than below it?

Also the box with the icons is bigger than I would like.

Joker™

Quote from: Brack1 on July 26, 2010, 01:28:26 PM
However is there a way to move the avatar so it is next to the text rather than below it?
you must be using some mod to bring avatar's on message index , as afaik it's not a default feature

Quote
Also the box with the icons is bigger than I would like.
i think it's same size as of default look.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

TheListener

The mod is the avatar on board one.


Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved


Joker™

For me it comes out ok , see



If you want something else can you show me by some screen shot etc , would be easy for me to understand ;)

Quote from: Brack1 on July 26, 2010, 01:28:26 PM
Also the box with the icons is bigger than I would like.

the width of boxes is used coz of that avatar mod .
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

TheListener

The page you are showing is the main board index.

The board in question is the message index.

I have attached a pic for ya.

Joker™

1. i've shown you Message Index only (see there is page No. in screen shot )

2. As far as i can see you are having problem in Child Boards Last post section.

Is your theme using it's own MessageIndex.template.php , as on default theme even that section is alright for me.See the screen shot below

http://img401.imageshack.us/img401/8191/59307433.png

It'vd be more easy if i can have your site link and you can give some theme details.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

TheListener

The forum uses the default themes message index template.

The forums link is www.miltonkeynesaware.co.cc/mkaforum


Joker™

Quote from: Brack1 on July 27, 2010, 10:33:54 AM
The forum uses the default themes message index template.

The forums link is www.miltonkeynesaware.co.cc/mkaforum

Just saw your forum and it's very easy work ;) , can you attach your MessageIndex.template.php here
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

TheListener

#59
Will do bud.

Easy? Easy? Is there such a word?  :o

:)


Edit: File attached.

Advertisement: