×

Notice

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

TOPIC: Changing notify mail icon fuction, to mailto

Changing notify mail icon fuction, to mailto 15 years 6 months ago #3763

  • pchela1313
  • pchela1313's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi,
is there any way to change behavior of notify icon function, to mail to? What i need is, when user agree to notify, then others users can sent e-mails to this user.
I know that, this is in 'function notifyLink' and i have to replace '_JOOMLACOMMENT_NOTIFYTXT1' to something else, but i can't figure out what put there.

Thanks in Advance ..

Changing notify mail icon fuction, to mailto 15 years 6 months ago #3764

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hi there find the following in comment.class.php:
	$html 		= str_replace('{notify}', $this->notifyLink($notify, $this->_notify_users) , $html);
 
and change it to this
$html 		= str_replace('{notify}', $this->_item['email'] , $html);
 

This should do the trick.

Changing notify mail icon fuction, to mailto 15 years 6 months ago #3765

  • pchela1313
  • pchela1313's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi,
thanks for help, it works great. Actually I've tune it a little bit. Now i have a mail icon only when user choose 'notify' option, which i renamed to 'show' option. ALso when I hover over mail icon the popout message shows 'Write message to 'user name'' where user name is changing dynamic.

here is the code:
/* {notify} 	*/
	if ($notify==1)
	{
		if ($this->_item['email'] != "" && strstr($this->_item['email'], "@")){
		$html 		= str_replace('{notify}', "<span id='mailIcon'><a href='mailto:" . $this->_item['email'] . "'>
		<img src='/components/com_comment/joscomment/templates/SSlide-emotop/images/mailred.jpg' title='"
		. (_JOOMLACOMMENT_NOTIFYTXT1) . $this->profileLink($name, $this->_user_id) ."'></a></span>
		|", $html);}
		else
		{
		$html 		= str_replace('{notify}', "", $html);
		}
	}
	else
	{
		$html 		= str_replace('{notify}', "", $html);
	}
	/*

And here is the web adres of my site where i use this: http://www.pchela.pl/ARTnewsy/nowy-artyku-na-stron-gown.html The site is in Polish language but You will get the point ;)

But i need just one more thing:

Can You tell me, how to make notify automatic when user write his email in new post form?

Also if this is posible that user can unsubscribe by clicking in link or something like that? I as admin can unsubscribe users but can they do this in other way, than choose to not notify in new post form?

The hole idea is simple:
- when user put his email, he gets automatic subscribe
- then he can choose to 'show' or 'hide' option (previosly 'notify' don't notify'
- if he choose to show email, other users can write to him as well
- when he gets an email, when new comment is added, at the bottom of email is link to unsubscribe from emails.

I know that this is a lot of questions, but i need to know is this posible.

Thanks in Advance
  • Page:
  • 1
Time to create page: 0.122 seconds