Elxis CMS Forum

Support => General => Topic started by: elpvn on December 31, 2009, 09:46:53

Title: Commentary in article section???
Post by: elpvn on December 31, 2009, 09:46:53
Commentary section was set to "no-one" by Elxis CMS default.

So how to set the commentary for everyone (include unregister members) by default at every article?
However, when I test by post a comment on an article, then clear cache to show it below that artilce, but it still not appear???? Why? How to fix it?

Thank everyone for help and support!
Title: Re: Commentary in article section???
Post by: ks-net on December 31, 2009, 12:25:53
Quote
Commentary section was set to "no-one" by Elxis CMS default.

So how to set the commentary for everyone (include unregister members) by default at every article?

/public_html/administrator/components/com_content/content.xml
and look at the end of the file for these lines:
 <param name="post_comments" type="list" default="0" dir="rtl" label="AX_COMMENTARY" description="AX_COMMENTARYD">
         <option value="0">AX_NOONE</option>
         <option value="1">AX_REGUSERS</option>
         <option value="2">AX_ALL</option>
   </param>

modify the default="0"   (eg. for all use default="2" ) and from now on all new articles will have as default to allow all users submit comments.

NOTE  that in every case comments are  auto-published only for registered users..
Also for any article that pre-exists of this mofication =>you have to edit again  the parameters to override the value stored in db

Quote
However, when I test by post a comment on an article, then clear cache to show it below that artilce, but it still not appear?Huh Why? How to fix it?
I think this is what you missing=> comments are  "auto-published only for registered users"

more info => http://wiki.elxis.org/wiki/User_commentary
Title: Re: Commentary in article section???
Post by: elpvn on December 31, 2009, 13:10:06
Thanks sir,

Done, its work now for member's comment. But when I tested as an unregister user, my comment not appear after I post comment??? How to solve it?

Please help

:-)
Title: Re: Commentary in article section???
Post by: ks-net on December 31, 2009, 16:10:03
i repeat...

I think this is what you missing=> comments are  "auto-published only for registered users"

more info => http://wiki.elxis.org/wiki/User_commentary
***

basically you have to login as admin to fronted and accept the comments that guests have submit

read the wiki there are all there!
Title: Re: Commentary in article section???
Post by: elpvn on December 31, 2009, 19:05:04
Quote
Posting Comments

If user comments are enabled for a content item and you are allowed to post comments then Elxis will display you a form to add a new comment. If you are a visitor your comment will stay unpublished until the article's author or a site's super administrator publish it. Elxis sends a notification e-mail to the article's author in order to notify him about the new added unpublished comment. Registered users comments are published automatically. HTML is not allowed inside comments. Elxis will strip out any html tags may found in your comment and it will also remove some special characters that could be dangerous. Elxis will also convert URLs to click able links. So, if you wish to add a link in your comment just type the URL.

Well, I know, for now just ask for this problem: How to confirm visitor comments in the administrator back-end? I can't find anywhere to done that task in administrator section? Show me any link or solution to solves it, please?

Thanks a milion time :)
Title: Re: Commentary in article section???
Post by: ks-net on December 31, 2009, 19:10:38
Quote
How to confirm the visitor comments in the administrator back-end?

read carefully what i have written above:
basically you have to login as admin to fronted and accept the comments that guests have submit

only in fronted if you login as admin.. you will see the links ..as the picture shows.
(http://wiki.elxis.org/images/7/74/Comments_list.jpg)

****

edit..
although wiki mention it and have an image showing the links you asking for .. i decided to make it more clear ..
I  updated wiki entry..
http://wiki.elxis.org/wiki/User_commentary#Manage_Comments
Title: Re: Commentary in article section???
Post by: elpvn on December 31, 2009, 19:48:36
Great solution, problem was solved!

Special thank to ks-net for your patience time on my question & Elxis CMS project.

 :-* :-* :-* :-* :-* :-* :-* :-* :-* :-*

Happy new year to you and your farmily ^^
Title: Re: Commentary in article section???
Post by: ks-net on December 31, 2009, 20:12:03
you are welcome!

Happy new year!
Title: Re: Commentary in article section???
Post by: Luca on January 25, 2010, 22:54:37
Dear ks-net, me too have a to ask something:

In case i have many articles and some registered user comments on them (comment automaticaly published) does elxis notifies me of that?
Is there a way to not surf daily the entire site searching for new comments?
I searched unsuccesfully the forum for this option.
Thanks

Luca
Title: Re: Commentary in article section???
Post by: ks-net on January 26, 2010, 00:46:12
you will be informed by email when a comment needs to be approved these are the comments from guests

since register-users comments are auto published .. no approval needed and no email will be send to administrator.

this is the way that it works!


EDIT a quick hack to sent an email to article author .. always... on registered-users or guest comment submission

   
Quote from:  find in componets/com_content/content.php  line~ 2245
   if (!$auto_publish) {
         $database->setQuery("SELECT name, email, preflang FROM #__users WHERE id='".$row['created_by']."' AND block='0'");
         $recipient = $database->loadRow();
         if ($recipient) {
            $prlang = new prefLang();
            $prlang->load($recipient['preflang']);

            $msg = $prlang->lng->_E_HI.' '.$recipient['name'].",<br />\r\n";
            $msg .= sprintf($prlang->lng->_E_NEWCOMBYTITLE, '<b>'.$com->author.'</b>', '<b>'.$row['title'].'</b>')."<br />\r\n";
                $msg .= $prlang->lng->_E_COMMENTS.": ".$com->cmessage."<br /><br />\r\n";
            $msg .= $prlang->lng->_E_COMSTAYUNPUB."<br />\r\n";
            $msg .= 'URL: <a href="'.$redLink.'">'.$redLink."</a><br />\r\n";
            $msg .= $prlang->lng->_DATE.": ".mosFormatDate($this->now)."<br /><br />\r\n";
            $msg .= '<a href="'.$mainframe->getCfg('live_site').'">'.$mainframe->getCfg('sitename').'</a>';
            $msg .= "<br /><br /><br /><br />\r\n";
            $msg .= '<small>Generated by '.$_VERSION->PRODUCT.' '.$_VERSION->RELEASE.'.'.$_VERSION->DEV_LEVEL.' ('.$_VERSION->CODENAME.')</small>';
            $msg .= "<br />\r\n";
            $msg .= '<small>'.$_VERSION->COPYRIGHT.'</small><br />';
            mosMail($mainframe->getCfg('mailfrom'), $mainframe->getCfg('fromname'), $recipient['email'], $prlang->lng->_E_NEWCOMNOTIF, $msg, 1);
         }
      }


Quote from:  change to this:
      //if (!$auto_publish) {  comment out
         $database->setQuery("SELECT name, email, preflang FROM #__users WHERE id='".$row['created_by']."' AND block='0'");
         $recipient = $database->loadRow();
         if ($recipient) {
            $prlang = new prefLang();
            $prlang->load($recipient['preflang']);

            $msg = $prlang->lng->_E_HI.' '.$recipient['name'].",<br />\r\n";
            $msg .= sprintf($prlang->lng->_E_NEWCOMBYTITLE, '<b>'.$com->author.'</b>', '<b>'.$row['title'].'</b>')."<br />\r\n";
                $msg .= $prlang->lng->_E_COMMENTS.": ".$com->cmessage."<br /><br />\r\n";
                                if (!$auto_publish) {
            $msg .= $prlang->lng->_E_COMSTAYUNPUB."<br />\r\n";
                                 }
            $msg .= 'URL: <a href="'.$redLink.'">'.$redLink."</a><br />\r\n";
            $msg .= $prlang->lng->_DATE.": ".mosFormatDate($this->now)."<br /><br />\r\n";
            $msg .= '<a href="'.$mainframe->getCfg('live_site').'">'.$mainframe->getCfg('sitename').'</a>';
            $msg .= "<br /><br /><br /><br />\r\n";
            $msg .= '<small>Generated by '.$_VERSION->PRODUCT.' '.$_VERSION->RELEASE.'.'.$_VERSION->DEV_LEVEL.' ('.$_VERSION->CODENAME.')</small>';
            $msg .= "<br />\r\n";
            $msg .= '<small>'.$_VERSION->COPYRIGHT.'</small><br />';
            mosMail($mainframe->getCfg('mailfrom'), $mainframe->getCfg('fromname'), $recipient['email'], $prlang->lng->_E_NEWCOMNOTIF, $msg, 1);
         }
      //}  comment out
Title: Re: Commentary in article section???
Post by: Luca on January 26, 2010, 22:20:46
Thank you so much.
That is. I would suggest that as a permanent feature (on-off) as it would be much more clever.
As for followup and so on.. control.. etc.

Many thanks and thumbs up all the time.

Luca
Title: Re: Commentary in article section???
Post by: Luca on January 26, 2010, 22:44:16
Oh.
And what about the admin being notified upon new comments, no matter from anonymous or registered, please.
It's important to know what's going on in your site.
Cheers
Title: Re: Commentary in article section???
Post by: ks-net on January 26, 2010, 23:59:32
Quote
That is. I would suggest that as a permanent feature (on-off) as it would be much more clever.
thats why a called it a quick hack
Title: Re: Commentary in article section???
Post by: Luca on January 28, 2010, 12:44:04
Quote
That is. I would suggest that as a permanent feature (on-off) as it would be much more clever.
thats why a called it a quick hack

If "quick hack" means that I suggested something useful and that it will be taken in consideration on later releases I am happy, then, to having contributed to a better environment.
Ciao