News:

Wondering if this will always be free?  See why free is better.

Main Menu

How do i remove this?

Started by 1833, September 28, 2014, 10:57:03 AM

Previous topic - Next topic

Gwenwyfar

True. I was thinking it would be too icky to go around absolute positioning stuff to the top, but could always just move the whole thing to the top and then use css on it if that was a problem. Quite busy these last few days, didn't even think about it more than what was already suggested here :P I Guess I ended mistaking how the default looks with what my forum looks as well, where the topic name occupies the area above the avatar.
"It is impossible to communicate with one that does not wish to communicate"

Hj Ahmad Rasyid Hj Ismail

No problem. We all have our own real life to attend to. I can see you giving a good css solution in other post. Keep it up.

Hj Ahmad Rasyid Hj Ismail

I was bored and played around with my earlier suggestion. This is an alternative/upgrade to my earlier suggestion:

Change the above CSS code to:
.poster, .postarea .flow_hidden ul, .keyinfo, .modifybutton, #forumposts .reportlinks a {display:none;}
.postarea, .moderatorbar {margin: 0 0 0 1em;}
ul.quickbuttons {margin: 1em 0; float:left; text-align:left;}
ul.quickbuttons li {margin:0 0.5em 0 0;}
.keyinfo2 .avatar {float:left; margin-right: 5px; height:2em; width:2em;}
ul.quickbuttons li.approve_button, ul.quickbuttons li.quote_button, ul.quickbuttons li.modify_button, ul.quickbuttons li.remove_button, ul.quickbuttons li.split_button, ul.quickbuttons li.restore_button {background:none;}
ul.quickbuttons li a {padding:0 0.5em; border:1px solid lightblue; border-radius:5px;}
ul.quickbuttons li a:hover {background: #fff; border: 1px solid lime; border-radius:5px;}


This will hide quick edit button, report to moderator and warning from its current position as well other than just hide poster area and the top part of your post. It also adjusts the margin and padding where it is concerned. Button is roundly bordered with lightblue color and highlighted upon hover.

For button code, try to use this instead.

// 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?  Show the modify inline image.
if ($message['can_modify'])
echo '
<li class="quick_edit_button"><a id="modify_button_', $message['id'], '" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" class="modify_button">Quick Edit</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>';

// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
echo '
<li class="report_button"><a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">Report</a></li>';

// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
echo '
<li class="warning_button"><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '">Warn</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>';


Quick edit, report to moderator and warning buttons are added here. Note that I hard coded the text for Quick Edit, Report and Warn. You may warn to add $txt strings and replace them accordingly.

Kindred

Meh... I am Opposed to leaving crap present in the HTML if it is not getting displayed...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Hj Ahmad Rasyid Hj Ismail

Lol... Original SMF code is not a crap. But sure, you can remove the unused code if all seems to work fine.

Kindred

Crap is any code that is not being actually used.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gwenwyfar

If its something you're sure you'll remove for good, I agree, had forgotten about this detail. On my forum there are very few stuff I hid, but when I'm done changing everything it'll be fun to remove them from the code all at once and compare the improvement, reason I'm leaving them there for now :P

Getting some more free time soon, I'll post the update to that code later in case he still wants that.



"It is impossible to communicate with one that does not wish to communicate"

1833

Yes, I still want everything coming from anyone that spare some time to help. I will go through the codes and apply them where necessary. Thanks

Will be uploading screenshots soon

Hj Ahmad Rasyid Hj Ismail

This how the upgraded one looks.

1833

#49
I got this after putting your codes to overwrite the default.

The upgraded codes.

1833


1833

#51
I encountered little problem with the first php codes, I ll explain below..



QuoteFind:

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.


I located that and  didn't see this inside it or before it:

QuoteAdd before:

echo '

<div class="keyinfo2">

<div class="normaltext">', $message['member']['link'], ' ',$txt['on'], ' ', $message['time'], '';

// Show avatars, images, etc.?

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

echo '

<div class="avatar">

<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">

', $message['member']['avatar']['image'], '

</a>

</div>

</div>

</div>';





This is what i find inside;


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


And this before it;

// 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>'; [code]


Hj Ahmad Rasyid Hj Ismail

The css is not working correctly. Please remove all the changes you made and restore the original. Then please attach your Display.template.php as well as your index.css files.

1833

Quote from: ahrasis on October 03, 2014, 02:52:06 PM
The css is not working correctly. Please remove all the changes you made and restore the original. Then please attach your Display.template.php as well as your index.css files.

You mean I shall attach them seperately? If yes av already attached the php? Shall I restore everything and add the css alone to the default and upload for you to see?

Hj Ahmad Rasyid Hj Ismail

I prefer if you can attach your files as before they are modified. It is easier to attend to them. Thank you.

1833

#55
Owwwk. Will do just that. Thanks.

Antechinus

Quote from: Kindred on October 03, 2014, 10:35:53 AM
Meh... I am Opposed to leaving crap present in the HTML if it is not getting displayed...

*mumble* responsive design *mumble*

Gwenwyfar

Quote from: Antechinus on October 03, 2014, 04:13:25 PM
Quote from: Kindred on October 03, 2014, 10:35:53 AM
Meh... I am Opposed to leaving crap present in the HTML if it is not getting displayed...

*mumble* responsive design *mumble*
Isn't that the opposite on many cases? People remove functions that would normally be there just so it fits on mobile, on both versions...

Though with all the bootstrap and so on stuff there's probably a lot of useless stuff on either case :P
"It is impossible to communicate with one that does not wish to communicate"

Hj Ahmad Rasyid Hj Ismail


Antechinus

Quote from: Fortytwo on October 03, 2014, 04:18:46 PM
Quote from: Antechinus on October 03, 2014, 04:13:25 PM
Quote from: Kindred on October 03, 2014, 10:35:53 AM
Meh... I am Opposed to leaving crap present in the HTML if it is not getting displayed...

*mumble* responsive design *mumble*
Isn't that the opposite on many cases? People remove functions that would normally be there just so it fits on mobile, on both versions...

Though with all the bootstrap and so on stuff there's probably a lot of useless stuff on either case :P

Nope. People usually do responsive by simply hiding markup on small screens. It's very inefficient, in terms of both markup and CSS.

And Bootstrap is chockers full of all sorts of crud. :D

Advertisement: