email notification to admin

Category: Community Polls 9 years ago
hello, is it possible to receive a mail when a guess user ad a new poll ?


thanks
Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
  • Re: email notification to admin

    by » 9 years ago


    You can do it with the below hack.
    Edit components/com_communitypolls/controllers/polls.php and find below code

    PollsHelper::sendMail($from, $fromname, $recipient, $subject, $body, true);
                        if($jcp_config[IS_MODERATED] == '1' || ($jcp_config[IS_MODERATED] == '2' && $user->guest)) {
    $message = JText::_('MSG_SENT_FOR_APPROVAL');
    }else {
    PollsHelper::do3rdPartyTask("POLL", $poll);
    $message = JText::_('MSG_SAVE_SUCCESS');
    }

    Now add this code just below above code
    PollsHelper::sendMail($from, $fromname, $recipient, $subject, $body, true);

    $from - An email from which the mail will send
    fromname - Name of the sender (Site admin or something)
    $recipient - Email to whom the email should sent
    $subject - mail subject
    $body - Mail body

    Ex:
    PollsHelper::sendMail(This email address is being protected from spambots. You need JavaScript enabled to view it.', 'Site Admin', This email address is being protected from spambots. You need JavaScript enabled to view it.', 'A new poll is created', 'A user created poll - ' . $poll->title, true);

    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    CjFitCjForum | Polls | Answers | Quizzes | Quotes | Surveys | GPS Tools | CjBlog


    Thank you said by: artnco

  • Re: email notification to admin

    by » 9 years ago


    thanks, could you please ad this on a next version ?

  • Re: email notification to admin

    by » 9 years ago


    Sure..

    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    CjFitCjForum | Polls | Answers | Quizzes | Quotes | Surveys | GPS Tools | CjBlog


    Thank you said by: artnco

You do not have permissions to reply to this topic.

Powered by CjForum

Site Search

Trending Topics

Bug in the new 5.0.9 version?
  • 13 replies
There's a line in the changelog: * Guests are unable to view the...

Js conflict
  • 3 replies
Hi,   On...

How I could paint comment lines in different colours?
  • 8 replies
How I could paint comment lines in different colours? Sometimes...

Dashboard Recent quizzes
  • 4 replies
Dear support, I would like to show more than five quizzes in the...

No Start topic button
  • 5 replies
Hi there, I've recently installed and updated CJforum. For some...

Subscribe Newsletter