News:

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

Main Menu

Warnings and Moderation

Started by robinrobin, February 06, 2009, 03:32:15 PM

Previous topic - Next topic

aldo

If you remove the whole input, it could mess up peoples user settings if they wanted to return to the topic...

So try:

<td class="smalltext"><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . ($context['back_to_topic'] || !empty($options['return_to_post']) ? ' checked="checked"' : '') . ' value="1" class="check" />


replace with:

<td class="smalltext"><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . ($context['back_to_topic'] ? ' checked="checked"' : '') . ' value="1" class="check" />

As I am not sure which variable is which ;)

And yes, you could do that, the variable $context['user']['is_guest'] holds a boolean value, so true if they are not logged in, false if they are a member.

robinrobin

Good day Aldo.

Yeah, i thought about that too, but everything works fine so far. I don't see why anyone would need this feature anyways.

Uh, would You also happen to know how i can use that boolean value within this tag:

($context['becomes_approved'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');')

Where do i add $context['user']['is_guest'] ?

aldo

You would do it like this:

($context['becomes_approved'] || $context['user']['is_guest'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');')

robinrobin

Nice one. Thank You! You're not done with me yet i'm afraid :P

I got into the language files to get rid of the approval requirement note that the author see in the top of their posts inside topics, but that container made up of red lines is still there and i don't even see where that stuff comes from while viewing the html source code. Any idea on how to get rid of it?

Not that it matters much, but i found and set the color of unapproved topics and posts in the css, and since there's only one color definable for that originally red color of unapproved posts when viewing topics, they either have to be light gray or dark gray to look similar to the other posts around them. This creates a minor problem, which is that if i set the color to the darker gray that every other post inside topics use, there can be two posts with that color or even more next to each other, which looks pretty odd. Any ideas?

Thank!

aldo

So you want to remove the red borders and the red background on unapproved topics/posts? For topics it would be found in MessageIndex.template.php and posts would be found in Display.template.php

robinrobin

I've only got the red border in posts left now actually, so i guess that would be in Display then. I'll see what i can find!

robinrobin

Goo day Aldo. How are You?

I just wanted to report back on the red border-lines. It is an entry called ".approve_post" in forum.css that defines those borders. With that gone, i've finally achieved what i wanted to with this topic, so i'll make this one solved now. =O)

Thanks to Aldo for his fantastic assistance!

Advertisement: