email notification to admin

Category: Community Polls 10 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 » 10 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 ToolsCjFit | CjBlog


    Thank you said by: artnco

  • Re: email notification to admin

    by » 10 years ago


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

  • Re: email notification to admin

    by » 10 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 ToolsCjFit | CjBlog


    Thank you said by: artnco

You do not have permissions to reply to this topic.

Powered by CjForum

Trending Topics

There is no altauserpoints profile selection
  • 5 replies
Good afternoon! There is no altauserpoints profile selection. You...

Accepted response is the best response
  • 4 replies
Good afternoon! In my opinion, you need to take the answer once....

Users vote for their questions and answers
  • 6 replies
Good afternoon! Users vote for their questions and answers and earn...

There is no limit on the number of characters
  • 6 replies
Good afternoon! There is no limit on the number of characters. You...

Unable to add ot edit photo
  • 8 replies
Hi, Unable to add or edit photo in CJForum profile. The folder open...