Keyword

Fill automatically "E-mail to" in k2.

  • Leonardo L.
  • Leonardo L.'s Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 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 4 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 4 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 4 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 4 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 4 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 4 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 4 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 4 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 4 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.


Powered by Kunena Forum