Keyword

Fill automatically "E-mail to" in k2.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96559 by Leonardo L.
Fill automatically "E-mail to" in k2. was created by Leonardo L.
Hello,

 

Is it possibile to change the parameter: "EMAIL_TO", through the e-mail link that appears when I'm seeing an article?

I mean that I would like to fill automatically the "email to" field with an existent email address, to use it to ask information about an article. I'm not good in php to do it by myself.

I'm attach an image to explain better what I mean.

 

Thanks a lot.
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96560 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
You want to change it to an option to contact Author of Item ?

 

You see, that is not stupid idea. I am using Aiocontactsafe extension and plugin for that.

 

I vill test something later and see if it is difficult.

Please Log in or Create an account to join the conversation.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96561 by Leonardo L.
Replied by Leonardo L. on topic Fill automatically "E-mail to" in k2.
 

hello, thansk to reply!

 

Yes exactly, I would like to change it to an option to contact the author of item...because it's more useful, imho, contact the author instead a "friend" (and anyway I need this option! :) )

 

Thanks for your hep.

 

Ps.If is not possible I'll send you a pm to know how to do it with aiocontactsafe.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96562 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
Aicontactsafe is easy. You can show whole form in K2 Item, or you can show just a link to a form. Button "Back" is working and send you back to K2 Item.

 

I am not sure for K2 Item title, or URL of Item. Have not tested all. It is working OK if you show whole AIO form in Item.

 

But this tweak from your question is more interessting.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96563 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
It is better to try to tweak "Send to a friend" because AIO ad own JS and CSS files. Better for page load with native tweak in K2.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96564 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
I see now. It is Joomla native mail form. If it is OK for you to change it for whole Joomla then:- Components ---> com_mailto ----> views ---> mailto ---> tmpl ---> default.phpChange:<input type="text" name="mailto" class="inputbox" size="25" value="<?php echo $this->escape($data->mailto) ?>"/>to:<input type="text" name="mailto" class="inputbox" size="25" value="This email address is being protected from spambots. You need JavaScript enabled to view it." readonly="readonly"/>I vill try to find out how to hide field.And change language strings as you wish:EMAIL_THIS_LINK_TO_A_FRIEND

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96565 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
Please test it if you have live site. I don´t have mail server at my localhost. Haven´t configured Google mail SMTP.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96566 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
Put it like this if you want hide field:

 

<input type="text" name="mailto" class="inputbox" size="25" value="This email address is being protected from spambots. You need JavaScript enabled to view it." readonly="readonly" style="visibility:hidden;display:none"/>

 

And comment or delete:

<?php echo JText::_('EMAIL_TO'); ?>:

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96567 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
Or maybe style="visibility:hidden;display:none;"/>

 

It is working either way.

Please Log in or Create an account to join the conversation.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96568 by Leonardo L.
Replied by Leonardo L. on topic Fill automatically "E-mail to" in k2.
hello, thanks for your help!

I used your solution and it works, it loads automatically the email recipient! :)

Anyway I receive an error in "EMAIL_NOT_SENT" where I get "this email was not sent correctly".

Should be a problem of the code?

 

thanks again!

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96569 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
What version of Joomla you use ?

Please Log in or Create an account to join the conversation.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96570 by Leonardo L.
Replied by Leonardo L. on topic Fill automatically "E-mail to" in k2.
I'm using 1.5.22

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96571 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
I just tested at one live site. It is working but not all times. Almost as some Joomla anti-spam control.

I received 2 mails.

 

There is another problem. It needs message text field. But it is maybe easy to copy that piece of code from contact extension.

Please Log in or Create an account to join the conversation.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96572 by Leonardo L.
Replied by Leonardo L. on topic Fill automatically "E-mail to" in k2.
but did you get the "sent error" ?

 

And yes, if I would like to add a field text and a field phone, for example, what should I modify?

 

Thanks a lot for your support.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96573 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
I got just mail not send. Site is in some other language.

It never send at first click.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96574 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
There is a 20 seconds delay in controller.php in com_mailto.

But why it wont send at first click.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96575 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
I see now. Same problems even with default Joomla code.

Strange.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96576 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
In source code i see that email adress is not valid. (Joomla native code)

Not specified what adress of those two.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96577 by BBC
Replied by BBC on topic Fill automatically "E-mail to" in k2.
It is easy to send spam via that. Allways activated at default in K2.

 

It raises questions. How can we check if someone is missusing this option ?

Not all has access to server logs. And you can get easy in spam black lists over the world. Then it is very diffcult to be removed from black lists.

Please Log in or Create an account to join the conversation.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96578 by Leonardo L.
Replied by Leonardo L. on topic Fill automatically "E-mail to" in k2.
So it's for that I get "sent error"?!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum