Hi, all!
I want to delete the form of choosing a blog's comment.
I find code in mod\blog\views\default\blog\forms\edit.php
<div id="blog_edit_sidebar"> <div id="content_area_user_title"><h2>
{$conversation}</h2>< /div> <div class="allow_comments">
<p><label>
<input type="checkbox" name="comments_select" {$comments_on_switch} /> {$allowcomments}
</label></p>
</div>
</div>
...and I delete it
Next...
I need to allow comments on the blog, when someone adds a new post or editing an old post.
I try editing these files:
mod\blog\views\default\object\blog.php
mod\blog\views\default\totem\forms\edit.php
mod\blog\actions\add.php
mod\blog\actions\edit.php
That codes:
$comments_on = get_input('comments_select','Off');
also
if ($vars['entity']->comments_on == 'Off') { $comments_on = false; } else {
$comments_on = true;
}
But..nothing :-(
How can I do the blog's comments will always be allowed without the form for allow/disallow its?
Need solution
Thanks
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Trajan@Trajan
Trajan - 0 likes
- ura soul@tunist
ura soul - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
You must log in to post replies.You could set it as a hidden input on the form that's always set to on. That might save you a bit of coding. That way users don't have control over the choice. I'll think about adding this as a feature to the robust blog plugin currently in production.
the robust_blog plugin currently has a bug where the comments field is set to off, even when it has been set to on previously and the form is then re-opened..
i think it works best as defaulting to on and only being off when someone deliberately chooses off.
The editable_comments plugin works well for me:
http://community.elgg.org/pg/plugins/project/469716/developer/caedes/editable-comments
Or is that what you want? It is unclear to me from your post ...
Thanks very much for your answers, folks.
But I don't search easy ways ;-)
@Trajan If I create hidden input form then I can see the unneeded code's text in the source code of the blog's page . It's not correctly, imho
@tunist I want to create the non-default form
I think need to link in the file mod\blog\views\default\blog\forms\edit.php
this code:
with this code:
then to pass into the code of other files
option for allowed comments
But how to do it?
Maybe, you know the simple solution?
@Kevin Jardine Thanks, I'm checking this plugin right now
...No it's not what I need.
This plugin makes comments editable.
I need to get the user can't disable comments on the blog posts.
I need to get all the comments allowed
Hi SubCrew:
In English you would say "I want to prevent blog writers from disabling comments."
This seems like a strange idea to me. Why shouldn't people be able to disable comments on their own blog posts? I would never sign up for a site where I couldn't do that.
But yes, to do this you could just remove the form element to do this on the blog edit view.
@Kevin Jardine Excuse me for my English :(
Yes, it's a strange idea. You're right. But I need a solution.
If I delete the form, the comments are not allowed by default (Elgg 1.7.7)
Need to change the code for $ comments_on.
I'm looking for a solution. Welcome your advice )
Thank you for your help
Hi, again!
I know how do it!
Into file
elgg\mod\blog\views\default\blog\forms\edit.php
change code
on
delete code
delete code
delete code
Into file
elgg\mod\blog\actions\edit.php
and file
elgg\mod\blog\actions\add.php
change this code
on
And in to this file
elgg\mod\blog\views\default\object\blog.php
need change also
as
It's work for me very well!