News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

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

Hj Ahmad Rasyid Hj Ismail

Link to Mod

SRAVC - Separate Replies And Views Column

- For SMF 2.0.x
- Fully hook, no file modification For SMF 2.0.x.

1. Please do your own backup though every installation is backed up automatically.
2. By default replies and views are joined in one column in message index page.
3. This mod separates replies and views to two columns instead for easy viewing.
4. All you need to do is turn it on or off in Mod Settings page, save it and you are good to go.
5. You can test it in all SMF 2.0.x lower version as IMO it should work just fine. ;)
6. Do report if there is any error(s).


Thank you for using/testing it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep the creator's and the author's link(s) if it is in there somewhere. ;)

Creator: Joker™
Support Site: BurkeKnight Enterprises

 


#Change Logs

@Version 1.9.4
- Fix $options not globalize in subs file.

@Version 1.9.3
- Upgraded to a fully hook mod with no file modification.
- Remove VBulletin Board Index Style modifications that was mixed up from this mod as it should be installed using a separate mod known as VBBIS - VBulletin Board Index Style mod.
- Remove support to YAGAM mod.
- Change license and author.

@Version 1.9.2
- Mod updated and added to Github. - GitHub Link
- License changed to MPL 1.1

@Version 1.9.1
- Updated for SMF 2.0.1

@Version 1.9.0
- Mod updated for SMF 2.0 final
- License added to the mod

@Version 1.8.0
- Some wrong text strings were there. Bug removed.

@Version 1.7.0
- Mod updated for RC4

@Version 1.6.0
- Mod name changed.
- Support for YAGAM mod provided (This mod should be installed after YAGAM).

@Version 1.5.0
- Redirect bug for child boards solved.

@Version 1.4.0
- Child board column was breaking , also the post and topic count of redirected boards was messed up . Both bugs removed.

@Version 1.3.0
- Child board above the posts given the same look. Have a try in see urself ;)

@Version 1.2.0
- Column was breaking when who's viewing board option was enabled. Bug removed.

@Version 1.1.0
- Removed 'Replies' and 'Views' text written with each count.

@Version 1.0.0
- Initial release.

Rohan_

#1
nice mod .. a hint for you if u want to make this like vb style then remove the replies text and views text in every line .. just keep it on top
Proud To Be An Indian

Joker™

ohh i forgot that ... in my site i made it like that only ... will update it soon .

Thanks for pointing it out
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™

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

Rohan_

#4
good.. i have made a lot of changes in my site .. a lot .. really and manually ... after few days i will try to make some awesome mods :)


varun bro .. u must be noticed one thing .. in vb we can use [color="red"] these type of bb codes with " ....... but in smf they won't work .. so the problem is if we want to copy a whole post from a vb forum using quote then the bb codes come with " and this don't work .. so can u make them work ? [color="all colors"], [size="all size"] , [font="all font"]
Proud To Be An Indian

Joker™

i think this is problem of WYSIWYG editor , you should ask for this in coding area .
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

Arantor

Seriously, this is nothing the hell to do with this mod. This mod makes the message index look like vBulletin's.

If you want to deal with the problem of quoting posts, take this up in the Coding Discussion board - or even take it up with the people who wrote the vB->SMF converter.

Rohan_

Proud To Be An Indian

TheListener

I have this error after a manual edit.

Parse error: syntax error, unexpected T_ELSEIF in /home/parascif/public_html/mkaware.co.uk/MKAForum/Themes/default/MessageIndex.template.php  on line 195

Joker™

what manual edit did u made ? as in ur file i can't see anything unusual on line 195 regarding this 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

There were two manual edits required.

I may of made the edits in the wrong places.

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

~DS~

Ok it looks weird with Global mod installed. See second pic.



"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Joker™

Quote from: Dismal Shadow on June 01, 2010, 09:47:06 PM
Ok it looks weird with Global mod installed. See second pic.





can you provide the mod link which is conflicting .
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

~DS~

"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Joker™

You just need to play with some codes in

/themes/default/MessageIndex.template.php


Find:
  // You can see this if you have permission , the right board or admin
            if (((in_array($board_info['id'], $allowed_boards)) || $announcement['id_boards'] == 0) && ((count(array_intersect($user_info['groups'], $permission_groups)) !== 0) || $context['user']['is_admin']))
                {
echo '
<tr>
<td class="windowbg2 icon1 yagam">
<img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" />
</td>
<td class="windowbg2 icon2 yagam">
<img src="', $settings['images_url'], '/post/exclamation.gif" alt="" />
</td>
<td  class="subject windowbg yagam">
    <a href="',$scripturl,'?action=announcements;aid=',$announcement['id_announcement'],'"><strong>',$announcement['title'], '</strong></a>
    <p class="smalltext">', $txt['started_by'], ' <a href="'.$scripturl.'?action=profile;u=',$announcement['author'], '" ', (!empty($modSettings['MemberColorLinkInstalled'])) ? 'style="color: '.$announcement['online_color'].';"' : '', '>',$announcement['real_name'], '</a></p>
</td>
<td class="stats yagam">
    ', ($announcement['can_comment'] == '1') ? ''.$announcement['comment_total'].' ' . $txt['replies'] : '--', '<br />
',$announcement['views'], ' ' . $txt['views']. '
    </td>
<td class="windowbg2 lastpost yagam">
'.$txt['yagam_created'].' : ',timeformat($announcement['date']), '
</td>';
if (allowedTo('yagam_manage') && !empty($options['display_quick_mod']))
echo '<td class="windowbg2 moderate yagam" width="5%"><a href="',$scripturl,'?action=announcements;sa=edit;aid=',$announcement['id_announcement'],'" title="'.$txt['yagam_edit'].'"><img src="'.$settings['images_url'].'/buttons/modify.gif" alt="',$txt['yagam_edit2'], '"></a>
<a href="',$scripturl,'?action=announcements;sa=deleteverify;aid=',$announcement['id_announcement'],'" title="'.$txt['yagam_remove'].'" onclick="return confirm(\''.$txt['yagam_remove_verify'].'\')"><img src="'.$settings['images_url'].'/buttons/delete.gif" alt="',$txt['yagam_remove2'], '"></a>
</td>';
echo'</tr>';      
}



Replace the above code with :

// You can see this if you have permission , the right board or admin
            if (((in_array($board_info['id'], $allowed_boards)) || $announcement['id_boards'] == 0) && ((count(array_intersect($user_info['groups'], $permission_groups)) !== 0) || $context['user']['is_admin']))
                {
echo '
<tr>
<td class="windowbg2 icon1 yagam">
<img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" />
</td>
<td class="windowbg2 icon2 yagam">
<img src="', $settings['images_url'], '/post/exclamation.gif" alt="" />
</td>
<td  class="subject windowbg yagam">
    <a href="',$scripturl,'?action=announcements;aid=',$announcement['id_announcement'],'"><strong>',$announcement['title'], '</strong></a>
    <p class="smalltext">', $txt['started_by'], ' <a href="'.$scripturl.'?action=profile;u=',$announcement['author'], '" ', (!empty($modSettings['MemberColorLinkInstalled'])) ? 'style="color: '.$announcement['online_color'].';"' : '', '>',$announcement['real_name'], '</a></p>
</td>
<td class="windowbg2 lastpost yagam">
'.$txt['yagam_created'].' : ',timeformat($announcement['date']), '
</td>
<td class="stats yagam">
    ', ($announcement['can_comment'] == '1') ? ''.$announcement['comment_total'].' ' . $txt['replies'] : '--', '<br />
    </td>
<td class="stats yagam">
',$announcement['views'], ' ' . $txt['views']. '
</td>';
if (allowedTo('yagam_manage') && !empty($options['display_quick_mod']))
echo '<td class="windowbg2 moderate yagam" width="3%"><a href="',$scripturl,'?action=announcements;sa=edit;aid=',$announcement['id_announcement'],'" title="'.$txt['yagam_edit'].'"><img src="'.$settings['images_url'].'/buttons/modify.gif" alt="',$txt['yagam_edit2'], '"></a>
<a href="',$scripturl,'?action=announcements;sa=deleteverify;aid=',$announcement['id_announcement'],'" title="'.$txt['yagam_remove'].'" onclick="return confirm(\''.$txt['yagam_remove_verify'].'\')"><img src="'.$settings['images_url'].'/buttons/delete.gif" alt="',$txt['yagam_remove2'], '"></a>
</td>';
echo'</tr>';      
}



worked fine for me.
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

~DS~

Thanks, it works now. BTW...I am no code expert. :P
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Joker™

im also a noob in codes , just played them a bit and they got adjusted perfectly ;) ...

glad that i could helped you :)
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

~DS~

Quote from: sid2varun on June 01, 2010, 11:35:45 PM
im also a noob in codes , just played them a bit and they got adjusted perfectly ;) ...

glad that i could helped you :)
I will in due time into code junkie.
Any plans to add the code in the next update for user who use both these mods? Probably not...
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Joker™

umm it would be more convenient if u ask global mod author to change the code for compatibility.
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

Advertisement: