Customizing SMF > Tips and Tricks
Xenforo Like Display / Post Page for SMF 2.0
ahrasis:
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:
--- Code: --- // 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">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</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>';
--- End code ---
Change to:
--- Code: --- // Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">';
--- End code ---
2. Find:
--- Code: ---
// 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'], '\')" />';
--- End code ---
Change to:
--- Code: ---/*
// 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'], '\')" />';
*/
--- End code ---
3. Find:
--- Code: --- echo '
</div>
<div class="smalltext reportlinks">';
// Maybe they want to report this post to the moderator(s)?
--- End code ---
Change to:
--- Code: --- 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)?
--- End code ---
4. Find:
--- Code: --- echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
// Show the IP to this user for this post - because you can moderate?
--- End code ---
Change to:
--- Code: ---/* echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
*/
// Show the IP to this user for this post - because you can moderate?
--- End code ---
5. Find:
--- Code: --- // 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" />';
}
--- End code ---
Change to:
--- Code: --- // 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" />';
}
--- End code ---
index.css
1. Find:
--- Code: ---/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.85em;
font-family: verdana, sans-serif;
}
--- End code ---
Change to:
--- Code: ---/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.7em;
font-family: verdana, sans-serif;
}
--- End code ---
2. Find:
--- Code: ---/* 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;
}
--- End code ---
Change to:
--- Code: ---/* 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;
}
--- End code ---
3. Find:
--- Code: ---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
--- End code ---
Change to:
--- Code: ---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
--- End code ---
4. Find:
--- Code: ---ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
ul.quickbuttons li.inline_mod_check
--- End code ---
Change:
--- Code: ---ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
*/
ul.quickbuttons li.inline_mod_check
--- End code ---
5. Find:
--- Code: ---.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;
}
--- End code ---
Change to:
--- Code: ---.inner
{
padding: 0 1em 1em 2px;
margin: 0 1em 0 0;
}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
}
--- End code ---
6. Find:
--- Code: ---.signature, .custom_fields_above_signature
{
border-top: 1px #ccc solid;
}
--- End code ---
Change to:
--- Code: ---.signature, .custom_fields_above_signature
{
border-top: 1px #ccc dashed;
}
--- End code ---
I think that is all. I will package this if there is a lot of request, later.
Doctor Deejay:
Nice work and thankyou for sharing :)
ahrasis:
--- Quote from: Dr. Deejay on July 19, 2011, 02:28:32 AM ---Nice work and thankyou for sharing :)
--- End quote ---
Thanks Deejay.
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:
--- Code: --- // 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">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</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>';
--- End code ---
Change to:
--- Code: --- // Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">';
--- End code ---
2. Find:
--- Code: ---
// 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'], '\')" />';
--- End code ---
Change to:
--- Code: ---/*
// 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'], '\')" />';
*/
--- End code ---
3. Find:
--- Code: --- echo '
</div>
<div class="smalltext reportlinks">';
// Maybe they want to report this post to the moderator(s)?
--- End code ---
Change to:
--- Code: --- 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)?
--- End code ---
4. Find:
--- Code: --- echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
// Show the IP to this user for this post - because you can moderate?
--- End code ---
Change to:
--- Code: ---/* echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" />';
*/
// Show the IP to this user for this post - because you can moderate?
--- End code ---
5. Find:
--- Code: --- // 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" />';
}
--- End code ---
Change to:
--- Code: --- // 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" />';
}
--- End code ---
index.css
1. Find:
--- Code: ---/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.85em;
font-family: verdana, sans-serif;
}
--- End code ---
Change to:
--- Code: ---/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext, tr.smalltext th
{
font-size: 0.7em;
font-family: verdana, sans-serif;
}
--- End code ---
2. Find:
--- Code: ---/* 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;
}
--- End code ---
Change to:
--- Code: ---/* 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;
}
--- End code ---
3. Find:
--- Code: ---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
--- End code ---
Change to:
--- Code: ---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
--- End code ---
4. Find:
--- Code: ---ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
ul.quickbuttons li.inline_mod_check
--- End code ---
Change:
--- Code: ---ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
*/
ul.quickbuttons li.inline_mod_check
--- End code ---
5. Find:
--- Code: ---.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;
}
--- End code ---
Change to:
--- Code: ---.inner
{
padding: 0 1em 1em 2px;
margin: 0 1em 0 0;
}
img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
}
--- End code ---
6. Find:
--- Code: ---.signature, .custom_fields_above_signature
{
border-top: 1px #ccc solid;
}
--- End code ---
Change to:
--- Code: ---.signature, .custom_fields_above_signature
{
}
--- End code ---
I think that is all. I will package this if there is a lot of request, later.
--- End quote ---
Your post include great detail of inforamtion yet you managed to keep it understandable.
ahrasis:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version