email notification to admin

Category: Community Polls 11 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 » 11 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.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS Tools


    Thank you said by: artnco

  • Re: email notification to admin

    by » 11 years ago


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

  • Re: email notification to admin

    by » 11 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.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS Tools


    Thank you said by: artnco

You do not have permissions to reply to this topic.
Powered by CjForum