News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

quick buttons

Started by sakis11111, October 12, 2016, 02:42:03 PM

Previous topic - Next topic

sakis11111

I am searching for at least 15 days and I am still not able to find anything about how to change position of Modify, Quote, Remove button. Any ideas?

ps....... I am sure that there is no mod out there, so it seems that I have to modify CSS. I tried several modifications on index CSS of default theme but still nothing!


Gary

This might seem obvious but are you actually using the default theme? Copies and themes installed have their own index.css.

Also try forcing your browser cache to refresh by hitting Ctrl+F5
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

sakis11111

yes, default Gary, thank you.

I always refresh but it seems that I edit the wrong values. I am not an expert either in css, just a newbie with some very basic knowledge.

I read somewhere that I have to edit Display Template php, others say to edit something else. But I cant find a serious answer via google

Gary

In that case, what is it that you want the end result to be, I might then be able to then tell you what to move or change.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

sakis11111

I would like to have all the buttons at the bottom right corner of every post Gary.

To be more specific, I want the quote-edit (modify)-delete (remove),split topic-quick moderation check box-report-ip address buttons at the bottom right corner of every post but below the signature. I would also like the rest of the buttons (share, reply and like) at the same place,  but share, reply and like buttons are there because of 3 mods that I installed, so I dont expect from you directions for those buttons too. I will try by myself. If I dont succeed, I will have to ask you again  :)


Gary

Ah. I've done something like that before.

You'll want to move this chunk in Display.template.php

// 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>';


to be after this code:


// 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>';


Keep in mind I've not tested it or anything.


I'd suggest creating a copy of the default theme in the Themes and Layout section of your admin center, then when you upload your new Display.template.php upload it into there, and set that as your forum's default theme.

That way when you install mods or need to upgrade, your personal edits wont be effected. It's always recommended to work on a copy of the default theme, then the default theme itself.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

sakis11111

#6
simply fantastic Gary! Thank you very much. That was a very big issue for me and my customers :) :)

Now I have to work on share social-report and ip address button. I will let you know 8)


sakis11111



All set Gary, thank you again!!

Advertisement: