News:

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

Main Menu

Locked subject field.

Started by dtm.exe, September 11, 2005, 09:21:43 PM

Previous topic - Next topic

Elmacik

Setting it disabled wont cause a "no subject" error because I already set the value.
But if its always disabled, this means counter is always returning 0 when editing the message.
I am not sure then.
Home of Elmacik

Enc0der

#21
hey, I've just found out (looked in /Sources/Post.php) that there IS a "$context['is_first_post']" variable!

here is my working code:
<input name="subject" value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"' , (!$context['is_first_post']) ? 'type="hidden" /> <b>' . $context['subject'] . '</b>' : 'type="text" />', '

The only thing I wish to add, is the exact thing for the AJAX editing.. so if it's not the first post, only allow to edit the message's content..

Advertisement: