Xenforo Like Display / Post Page for SMF 2.0

Started by Hj Ahmad Rasyid Hj Ismail, July 19, 2011, 02:04:35 AM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Hiya all,

I am thinking of sharing a tip or trick on how to create a xenforo like display / post page (i.e. it may look alike but not the same ;)) for SMF 2.0.

Mainly we are gonna make some changes (so called modifications) to the Display.template.php file and index.css file.
Display.template.php
1. Find:
// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">
<div class="flow_hidden">
<div class="keyinfo">
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';

// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li class="approve_button"><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a></li>';

// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
<li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';

// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

echo '
</div>';

// Ignoring this user? Hide the post.
if ($ignoring)
echo '
<div id="msg_', $message['id'], '_ignored_prompt">
', $txt['ignoring_user'], '
<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
</div>';


Change to:
// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">';


2. Find:


// Can the user modify the contents of this post?  Show the modify inline image.
if ($message['can_modify'])
echo '
<img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';


Change to:
/*
// Can the user modify the contents of this post?  Show the modify inline image.
if ($message['can_modify'])
echo '
<img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
*/


3. Find:
echo '
</div>
<div class="smalltext reportlinks">';

// Maybe they want to report this post to the moderator(s)?

Change to:
echo '
</div>';


// Are there any custom profile fields for above the signature?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 2 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<div class="custom_fields_above_signature">
<ul class="reset nolist">';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</div>';
}

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';

echo '
<div class="flow_hidden">
<div class="keyinfo">'; /*
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext" style="align:bottom"><strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], '.</div> */
echo '
<div class="smalltext" style="align:bottom">', $message['member']['link'] . ',', '
<a href="', $message['href'], '" rel="nofollow">', $message['time'], '</a>
';

// Maybe they want to report this post to the moderator(s)?


4. Find:
echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';

// Show the IP to this user for this post - because you can moderate?

Change to:
/* echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
*/
// Show the IP to this user for this post - because you can moderate?


5. Find:
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];

echo '
</div>';

// Are there any custom profile fields for above the signature?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 2 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<div class="custom_fields_above_signature">
<ul class="reset nolist">';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</div>';
}

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';

echo '
</div>
</div>
<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />';
}

Change to:
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];

echo '

</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';
echo '
<li style="float:left"><a href="', $message['href'], '" rel="nofollow">', !empty($message['counter']) ? '#' . $message['counter'] : '', '</a></li>';

// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li class="approve_button"><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a></li>';

// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
<li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';

// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';
echo '
</div>';

// Ignoring this user? Hide the post.
if ($ignoring)
echo '
<div id="msg_', $message['id'], '_ignored_prompt">
', $txt['ignoring_user'], '
<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
</div>';

echo '
</div>
</div>
<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />';
}


index.css
1. Find:
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.85em;
font-family: verdana, sans-serif;
}

Change to:
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.7em;
font-family: verdana, sans-serif;
}


2. Find:
/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature, .attachments
{
width: 98%;
overflow: auto;
clear: right;
padding: 1em 0 3px 0;
border-top: 1px solid #aaa;
line-height: 1.4em;
font-size: 0.85em;
}

Change to:
/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature, .attachments
{
width: 98%;
overflow: auto;
clear: right;
padding: 1em 0 3px 0;
line-height: 1.4em;
font-size: 0.85em;
}


3. Find:
ul.quickbuttons
{
margin: 0.9em 11px 0 0;
clear: right;
float: right;
text-align: right;
font: bold 0.85em arial, sans-serif;
}
ul.quickbuttons li
{
float: left;
display: inline;
margin: 0 0 0 11px;
}
ul.quickbuttons li a
{
padding: 0 0 0 20px;
display: block;
height: 20px;
line-height: 18px;
float: left;
}
ul.quickbuttons a:hover
{
color: #a70;
}
ul.quickbuttons li.quote_button

Change to:
ul.quickbuttons
{
margin: 0 11px 0 0;
clear: right;
float: right;
text-align: right;
font: 0.7em arial, sans-serif;
}
ul.quickbuttons li
{
float: left;
display: inline;
margin: 0 0 0 11px;
}
ul.quickbuttons li a
{
display: block;
height: 20px;
line-height: 18px;
float: left;
}
ul.quickbuttons a:hover
{
color: #a70;
}
/*
ul.quickbuttons li.quote_button


4. Find:
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
ul.quickbuttons li.inline_mod_check

Change:
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
*/
ul.quickbuttons li.inline_mod_check


5. Find:
.inner
{
padding: 1em 1em 2px 0;
margin: 0 1em 0 0;
border-top: 1px solid #99a;

}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
margin-right: 1.5em;

text-align: right;
clear: right;
}

Change to:
.inner
{
padding: 0 1em 1em 2px;
margin: 0 1em 0 0;
}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
}


6. Find:
.signature, .custom_fields_above_signature
{
border-top: 1px #ccc solid;
}

Change to:
.signature, .custom_fields_above_signature
{
border-top: 1px #ccc dashed;
}


I think that is all. I will package this if there is a lot of request, later.

Robert.


Hj Ahmad Rasyid Hj Ismail


Esspwebbb

Quote from: ahrasis on July 19, 2011, 02:04:35 AM
Hiya all,

I am thinking of sharing a tip or trick on how to create a xenforo like display / post page (i.e. it may look alike but not the same ;)) for SMF 2.0.

Mainly we are gonna make some changes (so called modifications) to the Display.template.php file and index.css file.
Display.template.php
1. Find:
// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">
<div class="flow_hidden">
<div class="keyinfo">
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';

// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li class="approve_button"><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a></li>';

// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
<li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';

// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

echo '
</div>';

// Ignoring this user? Hide the post.
if ($ignoring)
echo '
<div id="msg_', $message['id'], '_ignored_prompt">
', $txt['ignoring_user'], '
<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
</div>';


Change to:
// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">';


2. Find:


// Can the user modify the contents of this post?  Show the modify inline image.
if ($message['can_modify'])
echo '
<img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';


Change to:
/*
// Can the user modify the contents of this post?  Show the modify inline image.
if ($message['can_modify'])
echo '
<img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
*/


3. Find:
echo '
</div>
<div class="smalltext reportlinks">';

// Maybe they want to report this post to the moderator(s)?

Change to:
echo '
</div>';


// Are there any custom profile fields for above the signature?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 2 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<div class="custom_fields_above_signature">
<ul class="reset nolist">';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</div>';
}

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';

echo '
<div class="flow_hidden">
<div class="keyinfo">'; /*
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext" style="align:bottom"><strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], '.</div> */
echo '
<div class="smalltext" style="align:bottom">', $message['member']['link'] . ',', '
<a href="', $message['href'], '" rel="nofollow">', $message['time'], '</a>
';

// Maybe they want to report this post to the moderator(s)?


4. Find:
echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';

// Show the IP to this user for this post - because you can moderate?

Change to:
/* echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
*/
// Show the IP to this user for this post - because you can moderate?


5. Find:
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];

echo '
</div>';

// Are there any custom profile fields for above the signature?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 2 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<div class="custom_fields_above_signature">
<ul class="reset nolist">';
}
echo '
<li>', $custom['value'], '</li>';
}
if ($shown)
echo '
</ul>
</div>';
}

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';

echo '
</div>
</div>
<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />';
}

Change to:
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];

echo '

</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';
echo '
<li style="float:left"><a href="', $message['href'], '" rel="nofollow">', !empty($message['counter']) ? '#' . $message['counter'] : '', '</a></li>';

// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li class="approve_button"><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a></li>';

// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
<li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';

// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
<li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';
echo '
</div>';

// Ignoring this user? Hide the post.
if ($ignoring)
echo '
<div id="msg_', $message['id'], '_ignored_prompt">
', $txt['ignoring_user'], '
<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
</div>';

echo '
</div>
</div>
<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />';
}


index.css
1. Find:
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.85em;
font-family: verdana, sans-serif;
}

Change to:
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.7em;
font-family: verdana, sans-serif;
}


2. Find:
/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature, .attachments
{
width: 98%;
overflow: auto;
clear: right;
padding: 1em 0 3px 0;
border-top: 1px solid #aaa;
line-height: 1.4em;
font-size: 0.85em;
}

Change to:
/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature, .attachments
{
width: 98%;
overflow: auto;
clear: right;
padding: 1em 0 3px 0;
line-height: 1.4em;
font-size: 0.85em;
}


3. Find:
ul.quickbuttons
{
margin: 0.9em 11px 0 0;
clear: right;
float: right;
text-align: right;
font: bold 0.85em arial, sans-serif;
}
ul.quickbuttons li
{
float: left;
display: inline;
margin: 0 0 0 11px;
}
ul.quickbuttons li a
{
padding: 0 0 0 20px;
display: block;
height: 20px;
line-height: 18px;
float: left;
}
ul.quickbuttons a:hover
{
color: #a70;
}
ul.quickbuttons li.quote_button

Change to:
ul.quickbuttons
{
margin: 0 11px 0 0;
clear: right;
float: right;
text-align: right;
font: 0.7em arial, sans-serif;
}
ul.quickbuttons li
{
float: left;
display: inline;
margin: 0 0 0 11px;
}
ul.quickbuttons li a
{
display: block;
height: 20px;
line-height: 18px;
float: left;
}
ul.quickbuttons a:hover
{
color: #a70;
}
/*
ul.quickbuttons li.quote_button


4. Find:
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
ul.quickbuttons li.inline_mod_check

Change:
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
*/
ul.quickbuttons li.inline_mod_check


5. Find:
.inner
{
padding: 1em 1em 2px 0;
margin: 0 1em 0 0;
border-top: 1px solid #99a;

}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
margin-right: 1.5em;

text-align: right;
clear: right;
}

Change to:
.inner
{
padding: 0 1em 1em 2px;
margin: 0 1em 0 0;
}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
}


6. Find:
.signature, .custom_fields_above_signature
{
border-top: 1px #ccc solid;
}

Change to:
.signature, .custom_fields_above_signature
{
}


I think that is all. I will package this if there is a lot of request, later.


Your post include great detail of inforamtion yet you managed to keep it understandable.



Hj Ahmad Rasyid Hj Ismail

OP is updated - top border for signature is maintained with dashed line instead of solid line. I am packaging this as a mod and will announce when it is ready. Further features will be added and some preferred mod will be supported.

Leemy


Hj Ahmad Rasyid Hj Ismail

I am not active in SMF for quite sometimes, if some one wishes to package this, he may do so.

nza2k

I may be a noob, but I don't see what's new on the screen shots. Please, could you highlight the differences with the common design ? Happy new year !
Avis sur les voyagistes dans le forum de Voyage-Net, propulsé par SMF depuis des années :)

Hj Ahmad Rasyid Hj Ismail

Quote from: nza2k on January 05, 2012, 02:00:15 AM
I may be a noob, but I don't see what's new on the screen shots. Please, could you highlight the differences with the common design ? Happy new year !

That's odd. Anyone can see the differences. (And yes, i know this is an old post).
1. No post title. I believe that it is not necessary to repeat the topic again and again in reply post. We only need the reply post number to track it. This is removed by removing the post topic from Display.template.php and editing index.css accordingly.
2. No icon for quickbutton menu (quote, modify, remove etc). It is removed simply by editing the css.
3. Poster and post time info is moved to the bottom instead and they are made inline with reply post number, quickbutton etc...
4. Xenforo Forum Software default theme looks like this (not fully, just a bit).

TomW

#9
Very nice, I will have to try this !  You should make this a mod.  Also, it would be cool if the post.template.php was modified to not include the subject line for replies also.

Hj Ahmad Rasyid Hj Ismail

I have given advice on hiding subject line in replies. Let me check if I can find it for you.

TomW

Quote from: No More Mr Nice Sully on October 22, 2012, 07:31:57 PM
I have given advice on hiding subject line in replies. Let me check if I can find it for you.

Thank you.


Hj Ahmad Rasyid Hj Ismail

Quote from: TomW on October 22, 2012, 08:15:37 AM
Very nice, I will have to try this !  You should make this a mod.  Also, it would be cool if the post.template.php was modified to not include the subject line for replies also.
I almost forgot about this but you can try this: http://www.simplemachines.org/community/index.php?topic=487879.msg3417568#msg3417568

Advertisement: