Posted on: 05/18/04 04:59pm
By: geirj
I want to remove the Preview button when posting comments.
I have set $_CONF['skip_preview'] = 1 in config.php so that users can post without previewing, but I havent figured out how to remove the Preview button.
I guess it's some code in comment.php or lib-common.php that has to be removed, but I'm not sure wich code..
Disable/Remove "Preview" - button when posting comments
Posted on: 05/18/04 06:34pm
By: geKow
try
your_layout/admin/story/storyeditor.thtml
geKow
Disable/Remove "Preview" - button when posting comments
Posted on: 05/19/04 04:38am
By: geirj
Thank's for your reply geKow.
I have taken a look at the storyeditor.thtml-file, and the only thing in it about "Previewing" was this line:
I tryed to remove it, but the preview button is still present when posting comments.
Any other ideas?
Disable/Remove "Preview" - button when posting comments
Posted on: 05/19/04 04:51am
By: geKow
[QUOTE BY= geirj] Thank's for your reply geKow.
I have taken a look at the storyeditor.thtml-file, and the only thing in it about "Previewing" was this line:
I tryed to remove it, but the preview button is still present when posting comments.
Any other ideas?[/QUOTE]
It's hard to guess wich line you meant
To post code in this forum, you need to use the CODE button above.
Ok I made a mistake you need also to change it in
your_layoutsubmitsubmitstory.thtml
look for
<input name="mode" type="submit" value="{lang_preview}">
I forget that there are two kinds of storyediting, one for admins and one for user. So the first one was the admins one, the second one for usersubmissions.
Sorry
geKow
(who hits the preview button to check his post)
Disable/Remove "Preview" - button when posting comments
Posted on: 05/19/04 05:22am
By: geirj
Problem solved.
I think I might have expressed my self unclearly in my previous post's. It was thinking about the preview button in the form when people are posting comments to articles I have written on my main-page (ehrr.. Bad english..) Hope you understand what I mean.
Anyway, I solved the problem by editing the file commentform.thtml in /layout/theme/comment/
Thank's for taking time geKow.
Disable/Remove "Preview" - button when posting comments
Posted on: 07/20/06 05:56am
By: LWC
I've submitted a full patch for it for Geeklog v1.4:
config.php :
$_CONF['skip_preview'] = 2;
// If = 0, don't allow user to submit comments and stories without previewing
// If = 1, do allow user to submit comments and stories without previewing
// If = 2, do allow user to submit comments and stories without previewing AND disable previewing in general
system/lib-comment.php :
$comment_template->set_var('lang_instr_line5', $LANG03[23]);
// custom code - start
if (($_CONF['skip_preview'] > 0) || ($mode == $LANG03[14])) {
$comment_template->set_var('save_option', '<input type="submit" name="mode" value="' . $LANG03[11] . '">');
}
if (($_CONF['skip_preview'] < 2)
$comment_template->set_var('preview_option', '<input type="submit" name="mode" value="' . $LANG03[14] . '">');
// custom code - end
$comment_template->set_var('end_block', COM_endBlock());
public_html/layout/professional/comment/commentform_advanced.thtml and
commentform.thtml :
<li>{lang_instr_line5}</li></ul>
<! -- custom code - start -->
{preview_option}
<! -- custom code - end -->
{save_option}
Same for stories:
public_html/submit.php :
$storyform->set_var('story_date', $A['unixdate']);
// custom code - start
if (($_CONF['skip_preview'] > 0) || ($A['mode'] == $LANG12[32])) {
$storyform->set_var('save_button', '<input name="mode" type="submit" value="' . $LANG12[8] . '">');
}
if (($_CONF['skip_preview'] < 2)
$storyform->set_var('preview_button', '<input name="mode" type="submit" value="' . $LANG12[32] . '">');
// custom code - end
$storyform->parse('theform', 'storyform');
public_html/layout/professional/submit/submitstory_advanced.thtml and
submitstory.thtml :
{save_button}
<!-- custom code - start -->
{preview_button}
<!-- custom code - end -->
</td>
I hope to see this applied officially!