Uutiset:

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

Main Menu
Advertisement:

How to getrid of last edit ?

Aloittaja Majik_Imaje, syyskuu 02, 2019, 05:55:51 IP

« edellinen - seuraava »

Majik_Imaje

When I edit a post and I have to go back and modify it, is there any way to remove the edit by  blah blah blah message ??

I am using 2.0.15

Tonyvic

There is a Mod to disable last admin edits, but will not affect posts already edited.
https://custom.simplemachines.org/mods/index.php?mod=3016

Antechinus

Index.css:

Koodi (Find:) [Valitse]
.moderatorbar
{
clear: right;
}


Koodi (Add after:) [Valitse]
.moderatorbar>.modified {display: none;}

Sir Osis of Liver

It's an admin option, pretty sure it removes the edit text from existing posts.  As posted on thekrashsite -

Lainaus käyttäjältä: Krash - syyskuu 01, 2019, 03:02:07 AP
Think you're talking about Admin -> Current Theme -> Show last modification date on modified posts.
When in Emor, do as the Snamors.
                              - D. Lister

Antechinus

Ha. Forgot about that. It's a weird one though. It's coded to leave the parent div, but not echo the content. Which seems bonkers because there's no reason that I can see to leave the parent div if there's not going to be anything in it.

<div class="moderatorbar">
<div class="smalltext modified" id="modified_', $message['id'], '">';

// Show "Last Edit: Time by Person" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';

echo '
</div>
<div class="smalltext reportlinks">';


Seems to me it would have made more sense as this:

<div class="moderatorbar">';
// Show "Last Edit: Time by Person" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
<div class="smalltext modified" id="modified_', $message['id'], '">
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;
</div>';
echo '
<div class="smalltext reportlinks">';


Sir Osis of Liver

Well, it works as is.  A little late to be be cleaning up stuff like that in 2.0 code.  There are css classes in some templates that aren't in the css.  Been a long road for 2.0, hopefully 2.1 will do as well.

When in Emor, do as the Snamors.
                              - D. Lister

Antechinus

Not only are there CSS classes in templates that aren't in the CSS*, but while playing around with this responsive Curve clean up I've noticed that there were quite a few declarations in the CSS for things which were dropped from the markup during 2.0 beta. Y'know, handy stuff for confusing anyone who wants to do a bit of theming, because they shouldn't have it too easy. :D

*This actually is not silly. There are plenty of styling hooks in the markup which aren't used in the default theme, but which were put there in case they were useful for custom stuff. So having stuff in the markup but not in the default CSS is not a bug. In this case it really is a feature.

Sir Osis of Liver

Actually, I've used them for that purpose, saves some work.
When in Emor, do as the Snamors.
                              - D. Lister

Antechinus

Speaking of saving work, I've been walloping gnarlies in the default CSS. Take something as simple as the default declaration for the reset list class.

/* a quick reset list class. */
ul.reset, ul.reset li
{
padding: 0;
margin: 0;
list-style: none;
}


Now at first glance this looks pretty harmless. However, the specificity of it becomes problematic when you want to write the rest of your CSS. The quickbuttons lists are marked up as class="reset quickbuttons". Since reset is declared by tag name and class, that means when you want to write quickbuttons code you have to use ul.quickbuttons. If you use the (normal, you might think) .quickbuttons it won't work, because it will be overridden by the more specific ul.reset.

The follow on from that is all your individual button declarations. They have to be declared as ul.quickbuttons li and ul.quickbuttons .quote_button etc, or they won't work either, for the same reason. The good news is that if you change the original reset class declaration to this:

/* Quick reset ul class. */
.reset, .reset li {
padding: 0;
margin: 0;
list-style: none;
}


...then straight away the problems disappear, because it's now just calling by class name, and that won't override simple use of other classes later in the cascade. It doesn't cause any issues either, because the only use of class="reset" is for ul's, so the tag name in the declaration was redundant anyway.

2.0.x default CSS is full of gremlins like this. The buttonlist coding was another example.

ET: Oh yeah, here's another one. Some classes are used for more than one tag, and they require different CSS, so then you have to call by tag name chained with the class to hit your target. Which, as I have just pointed out, tends to be a PITA when you want to write further CSS. Now if the tags had been given different class names, which would not have been hard to do :P , then each class could have been targeted directly without any faffing around, and without making people scratch their heads wondering which instance of class="this_damned_thing_is_everywhere" they were dealing with.

Advertisement: