-
AuthorPosts
-
fabiojordan Friend
fabiojordan
- Join date:
- August 2014
- Posts:
- 48
- Downloads:
- 20
- Uploads:
- 2
- Thanks:
- 8
- Thanked:
- 5 times in 5 posts
February 21, 2017 at 5:36 pm #1012631Hi there.
I use the JA Quick Contact Module to let our users sent emails about errors or sugestions to our articles.
I want to know if its possible to setup the module to capture the URL where the user sent the form (so they dont have to inform the link manually) and send it within the form to my email.
Anyway to do that?
Thanks in advance!
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
fabiojordan Friendfabiojordan
- Join date:
- August 2014
- Posts:
- 48
- Downloads:
- 20
- Uploads:
- 2
- Thanks:
- 8
- Thanked:
- 5 times in 5 posts
February 22, 2017 at 1:51 pm #1012890Hi,
I didn’t try other extensions, because JA Quick Contact are enough for my needs, except for this one about the URL. So, what I was expecting to do is to add something like this:
<?php $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; echo $link; ?>
Add this inside the email, but I dont know in which file and the part I have to do that. If it’s not possible, I guess I’m gonna live with that, because I cant spend money in another solution right now.
Do you think that code would do the trick?
Thanks again for your time.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 23, 2017 at 4:17 am #1012989Hi,
If you wanna customize this module, the base file of module locates in this directory: ROOT/modules/mod_jaquickcontact/tmpl/
You can copy files in this folder and copy to folder of template: ROOT/templates/your_default_template/html/mod_jaquickcontact/ and add your custom change there.
Regards
fabiojordan Friendfabiojordan
- Join date:
- August 2014
- Posts:
- 48
- Downloads:
- 20
- Uploads:
- 2
- Thanks:
- 8
- Thanked:
- 5 times in 5 posts
February 23, 2017 at 4:01 pm #1013175Thanks for the reply, Saguaros.
I have two workarounds for those needing similar solutions:
1) Add the following code inside "<textarea class="textarea" id="contact_text" name="text" rows="10" cols="40" >"
<?php $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; echo $link; ?>
This will output the URL inside the textarea, sending the URL within the message (but maybe the user can delete the URL by mistake). So, I have a second solution:
2) Before the li of "<label id="contact_subjectmsg", insert the following php code:
<?php $doc = JFactory::getDocument(); $pagetitle = $doc->getTitle(); ?>
After that, change the input of "contact message like that":
<input class="input-text" id="contact_subject" name="subject" value="Error in page *<?php echo $titulopagina ?>*" size="40"/>
This will output the page title in the subject of the email. Again, someone can delete the text, so you can hide this li . 😉
Hope that helps someone.
Please, mark the topic as solved.
1 user says Thank You to fabiojordan for this useful post
-
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by fabiojordan 7 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum