×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: email notification

email notification 13 years 10 months ago #11223

  • Joom Laner
  • Joom Laner's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
My wish is to have a function for email notification in the backend, where I can set "notify" as the default option.

email notification 13 years 10 months ago #11224

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I've added it to the tracker.
dev.compojoom.com/issues/show/260

Perhaps you know, but there was a thread in the past that explained what you had to change in the code to make notify the default option.

email notification 13 years 10 months ago #11225

  • Joom Laner
  • Joom Laner's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
Thank you very much!

I know that there is an explanation how to change the code. However, it looks a bit complicated to me. So I better leave it to the real experts.

Best regards,
Jlaner

email notification 13 years 10 months ago #11231

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Could you please post where this explanation is, because think I would like to implement it. Thanks!

email notification 13 years 10 months ago #11233

  • Joom Laner
  • Joom Laner's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
You can find it here . Good luck!

email notification 13 years 10 months ago #11234

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Well that didn't work. :-( Couldn't find the file that was called for but I found the code that was indicated in a file called JOSC_form.php. When I made the changes, and went into the site to see how I'd done- I got a blank page. Blah.

email notification 13 years 10 months ago #11244

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
@Andrea - a blank page means that you've done something wrong(you've introduced a php error or so). And yes, you've found the code in the right place - JOSC_form.php. Comment.class.php - was for joomlacomment :)

email notification 13 years 10 months ago #11250

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Hello Daniel and Happy New Year- Well I can get a bit cocky sometimes and then I get careless. I went back and CUT AND PASTED the right code in - and that worked- I think I missed a couple of characters the first time around.

Howsumever, there is a problem still. Somehow the language file is being ignored. The pull down menu now reads: _JOOMLACOMMENT_ENTERNOTIFY0/ _JOOMLACOMMENT_ENTERNOTIFY1, rather than notify/do not notify. I did look at the language file and it seems ok.

I don't speak PHP- I'm just feeling my way, but I suspect something else is missing or got damaged. Here is the code as it appears now:

function notifySelect() {
$html = "<select name='tnotify' id='tnotify' class='inputbox' tabindex='3'>";
$html .= "<option value='0' ".($this->_tnotify ? "selected=\"selected\"" : "") ." >" . _JOOMLACOMMENT_ENTERNOTIFY0 . "</option>";
$html .= "<option value='1' ".($this->_tnotify ? "" : "selected=\"selected\"") ." >" . _JOOMLACOMMENT_ENTERNOTIFY1 . "</option>";
$html .= '</select>';
return $html;

email notification 13 years 10 months ago #11252

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
the code you changed was
	function notifySelect() {
		$html = "<select name='tnotify' id='tnotify' class='inputbox' tabindex='3'>";
		$html .= "<option value='0' ".($this->_tnotify ?  "" : "selected=\"selected\"")	." >" 	. JText::_('JOOMLACOMMENT_ENTERNOTIFY0') . "</option>";
		$html .= "<option value='1' ".($this->_tnotify ? "selected=\"selected\"" : "")	." >" 	. JText::_('JOOMLACOMMENT_ENTERNOTIFY1') . "</option>";
		$html .= '</select>';
		return $html;
	}

Perhaps you see that you have JText::_('JOOMLACOMMENT_ENTERNOTIFY0') isntead of _jooml.....blabla.

email notification 13 years 10 months ago #11254

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Finally! Took some few passes to get it right. But I did. And it's working. Thanks :-)

I think I need to go learn some basic PHP grammar....

email notification 13 years 10 months ago #11255

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081

Andrea Pluhar wrote: I think I need to go learn some basic PHP grammar....


And I always wanted to teach PHP :) Perhaps I should make another webinar :)

email notification 13 years 10 months ago #11260

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
A php programming webinar sounds great!
But, what level?
I mean, I am stupid with the potential to be really stupid! LOL
Seriously though, I would need something from around Step 1.

email notification 13 years 10 months ago #11261

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Ditto, here! But given what I do- it would be really useful to know enough so I don't make stupid typos- and not even know they're typos!

Daniel- I've got the notify menu defaulting to "notify" correctly- but my test user isn't getting notified. My admin email is but the subject line is: NewComment: [from:mardulia][notify:no]. Is this somewhere in the same block of code? This is what i have now:


function notifySelect() {
$html = "<select name='tnotify' id='tnotify' class='inputbox' tabindex='3'>";
$html .= "<option value='1' ".($this->_tnotify ? "" : "selected=\"selected\"") ." >" . JText::_('JOOMLACOMMENT_ENTERNOTIFY1') . "</option>";
$html .= "<option value='0' ".($this->_tnotify ? "selected=\"selected\"" : "") ." >" . JText::_('JOOMLACOMMENT_ENTERNOTIFY0') . "</option>";
$html .= '</select>';
return $html;
}

email notification 13 years 10 months ago #11262

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hm, actually I think that what you did is wrong.
Try this:
	function notifySelect() {
		$html = "<select name='tnotify' id='tnotify' class='inputbox' tabindex='3'>";
		$html .= "<option value='0' ". ($this->_tnotify ? "selected=\"selected\"" : "")	." >" 	. JText::_('JOOMLACOMMENT_ENTERNOTIFY0') . "</option>";
		$html .= "<option value='1' ".($this->_tnotify ?  "" : "selected=\"selected\"")	." >" 	. JText::_('JOOMLACOMMENT_ENTERNOTIFY1') . "</option>";
		$html .= '</select>';
		return $html;
	}

email notification 13 years 10 months ago #11263

  • Andrea Pluhar
  • Andrea Pluhar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
ok that worked. Thanks for your patience! And let me know when you have that webinar. ;-)
  • Page:
  • 1
Time to create page: 0.180 seconds