New Module: ContactOwner
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
I've created a new module, called "ContactOwner" which should create a page in Gallery with a form that a website visitor can use to send an email to the site's owner. More information can be found on the module's wiki page: It can be downloaded from this post, or from my github account at: It seems there's some kind of compatability issue between my web server and Gallery's sendmail code which causes error messages whenever I hit the "Send" button, but in theory it should work fine on a properly configured Gallery setup. If anyone has the time to try it out, let me know how it works... ---
|
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
Works for me! Thanks. Quote:
Message Sent From Dave This is the message body this is a new line and another new line. Dave This is what I sent: Quote:
This is the message body But I think this might be hard to make work on the various send mail versions etc. It would be nice if the from box could be populated from the logged in user. Dave |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
floridave wrote:
Works for me! Thanks. Weird, I just messed around with the line break code a bit, it might work better now. floridave wrote:
It would be nice if the from box could be populated from the logged in user. Done! Edit: |
||||
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
|||
I've pulled this into the contrib repo. Thanks! |
||||
haryadimas
![]()
Joined: 2009-08-19
Posts: 8 |
![]() |
|||
Hi, how do i remove the User Options Sidebar. any ideas? |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
haryadimas wrote:
Hi, I'm not sure what you mean by "User Options Sidebar". Is this the options menu at the top of the screen? |
||||
haryadimas
![]()
Joined: 2009-08-19
Posts: 8 |
![]() |
|||
What i meant by User Options Sidebar |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
You appear to be using some kind of custom theme. The sidebar is not part of my ContactOwner module, it's part of the Gallery theme. Specifically, it's generated by the file "page.html.php", located in "themes/THEMENAME/views" . |
||||
haryadimas
![]()
Joined: 2009-08-19
Posts: 8 |
![]() |
|||
is that so. thanks for the reply. i will look at it. |
||||
haryadimas
![]()
Joined: 2009-08-19
Posts: 8 |
![]() |
|||
funny, i got to the path that you mentioned and can't find views directory. i changed to the matrix template and the sidebar still there. where is it from ?? -_-.. |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
Here's the views directory for the default Gallery 3 theme: Are you using Gallery 3? |
||||
haryadimas
![]()
Joined: 2009-08-19
Posts: 8 |
![]() |
|||
actually no. i'm using Gallery 2. any ideas ? |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
Sorry, no. I'm not familiar with Gallery 2 code at all. You'd probably have better luck if you asked in one of the Gallery 2 forums though. |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
I've created an updated version of ContactOwner: It is attached here, and has been uploaded to my github account. |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
New version of ContactOwner: It is attached here, and has been uploaded to my github account. |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
rWatcher, Dave |
||||
hebhansen
![]()
Joined: 2009-02-10
Posts: 573 |
![]() |
|||
Nice app here. I installed for the latest Git and obove Zip. Seems to work fine inside Gallery. However, I don't get emails through. Any ideas why? A bit confused: Is the mail sender not supposed to fill in his email, in order for webmaster to reply to the contact. This may be obvious once mails are going through - but for now they don't :-/ all the best |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
hebhansen wrote:
I don't get emails through. Any ideas why? Gallery uses PHP's mail function to send email's. Perhaps mail isn't configured properly on your web server? hebhansen wrote:
in admin there is an Owners email form. Is that the email of the webmaster? Sure, you could use it for that. The module is capable of setting up two contact links -- One for the person who created / uploaded the item on the current page (which can change from photo to photo if your Gallery has multiple users), and one for the sites "owner" (this contact link would be the same on every page). hebhansen wrote:
When filling out the web-form I see the email I entered in admin? It will automatically fill in the email address of the current logged in user for the "From" line (this is for where the email was sent from). If the current visitor is not logged in, then they will need to manually fill in their email here. |
||||
hebhansen
![]()
Joined: 2009-02-10
Posts: 573 |
![]() |
|||
Sorry abaout the missing emails. It turned out that my host had mailserverdowntime over the weekend. Recieved everything tonight... and module works fine A couple og requests on my part: - The from is fine for admin but for the sender is to me strange. It's obvious where the mail is sent from, and an anonymous sender kan put in anything, confusing the webmaster where this came from. If this form is changed to "your email" (person filling out the form) and making that field obligatory. That way there is someone to reply to. - If I Reply the mail I recieve it goes to: public@gallery3.com... Who is that? If the above mail is added as from, reply should go to this person... Hope you understand what I mean. The from field could be changed to a text field only available to admin. That way admin can add a default text included in all mails, such as: "Someone contacted you via. your mailform at yoursite.com, don't ignore this one, it's important!" BTW Rwatcher very clean and valid modules you're adding for the new Gallery3. Most appreciated from here. all the best |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
hebhansen wrote:
Sorry abaout the missing emails. It turned out that my host had mailserverdowntime over the weekend. Recieved everything tonight... and module works fine My goal was to lay out the To/From/Subject/Message fields to look like the "standard" compose email screens found in every email program I've ever used. If it seems confusing I guess I could change it a little bit. hebhansen wrote:
public@gallery3.com- If I Reply the mail I recieve it goes to: public@gallery3.com is the default "From" address that Gallery 3 uses in every email it sends. You can change this to something else, but there's no way to make the email come from the visitor who's filling out the contact form. From the codex: Quote:
This module uses Gallery's built in Sendmail code. To configure this, copy modules/gallery/config/sendmail.php to application/config/sendmail.php and edit the file to set the from and reply_to addresses. hebhansen wrote:
Hope you understand what I mean. Adding in some admin-controlled default text should be doable. |
||||
hebhansen
![]()
Joined: 2009-02-10
Posts: 573 |
![]() |
|||
I am aware that the field will not verify wether the email exists but it will verify that it is an email and that the field is actually added by sender. Yes if that email could take the place of public@gallery3.com, replies would easy. A sender might forget to give up contact info. Since this is a webform, it's too late once sent off. By prompting for mail it's all in one place all the best |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
I've finished up a new version of my ContactOwner module. This version includes the changes bharat made for compatibility with the current version of Gallery 3 on git. I've also added some code to require users to fill out the entire form in order to send the message and the module now does some basic checking to make sure the provided email address actually looks like an email. Additionally, I've added an admin field for an "Email Message Header", which is some admin-definable text that will be inserted into the beginning of every email sent using this module. Everything has been tested against the current Gallery 3 Git (as of commit 38f2784fbbb0661dc57627d2878cb640bbffe271) and works fine for me. It will definitely NOT work with Beta 3 and older, so please make sure you're using the current code before installing this module. |
||||
hebhansen
![]()
Joined: 2009-02-10
Posts: 573 |
![]() |
|||
Rwatcher: You have hardcoded a border around the contact form. May be in css. It stands out quite wild on dark background. To avoid this is it possible to remove the border code css entirely and let themers decide whether they want a border around content or not and if so, control this globally from scren.css Again - I am concerned about upgrades and the need to remember too many hacks around G3 once this thing takes off Other than that, nice work here as well. Might run over the css here for possible ideas and I will post it later all the best |
||||
salemnalle
![]()
Joined: 2010-04-11
Posts: 1 |
![]() |
|||
hi thanx guys for all the contribs. im no coder at all and i keep getting these errors when i try to send emails through the contactowner. im sure that there is something missing in some send code somewere. i did all the things in the installation process but still the same: Exception [ 0 ]: @todo SEND_MAIL_FAILED 1. C:/xampp/htdocs/galleri/modules/gallery/libraries/Sendmail.php[ 89 ] C:/xampp/htdocs/galleri/modules/contactowner/controllers/contactowner.php[ 133 ] » Sendmail_Core->send() 128 ->to($str_emailto) 3. {PHP internt anrop} » ContactOwner_Controller->sendemail() C:/xampp/htdocs/galleri/system/core/Kohana.php[ 330 ] » ReflectionMethod->invokeArgs( argument ) object object ContactOwner_Controller(0) { args array(0) 325 5. C:/xampp/htdocs/galleri/system/core/Event.php[ 208 ] » Kohana_Core::instance( argument ) 0 NULL 203 Event::$data =& $data; 6. C:/xampp/htdocs/galleri/application/Bootstrap.php[ 67 ] » Event_Core::run( argument ) name array(2) ( data array(1) ( 62 7. C:/xampp/htdocs/galleri/index.php[ 91 ] » require( argument ) what am i missing guys?? |
||||
graphius
![]()
Joined: 2006-03-29
Posts: 11 |
![]() |
|||
edited.... after having problems, I uninstalled the module, deleted the folder on the server, and re-downloaded and re-installed |
||||
markosb
Joined: 2009-08-20
Posts: 47 |
![]() |
|||
This module is great, but does nothing to block or prevent spam. |
||||
Shemo725
Joined: 2008-04-18
Posts: 424 |
![]() |
|||
rwatcher..is it possible to include the recaptcha in the contact form that comes included with gallery? I have another request..not sure if you can work this in or not. I'm actually trying to use your contact module and turn it into a contact form where people can upload photos via the form and them the form email the photos along with their message. is it possible?! |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
I've updated this module to include captcha support. The new version can be downloaded from here, or from my github. |
||||
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
|||
Pulled! |
||||
ajorgereis
Joined: 2008-09-06
Posts: 132 |
![]() |
|||
When guest send email report this error
Talk to your Gallery administrator for help fixing this! Error log 20:33:52 +00:00 --- error: Exception [ 0 ]: @todo SEND_MAIL_FAILED /var/www/vhosts/ajorge.net/httpdocs/gallery3/modules/gallery/libraries/Sendmail.php [ 90 ] #0 /var/www/vhosts/ajorge.net/httpdocs/gallery3/modules/contactowner/controllers/contactowner.php(148): Sendmail_Core->send() #1 [internal function]: ContactOwner_Controller->sendemail('-1') #2 /var/www/vhosts/ajorge.net/httpdocs/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(ContactOwner_Controller), Array) #3 [internal function]: Kohana_Core::instance(NULL) #4 /var/www/vhosts/ajorge.net/httpdocs/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array) #5 /var/www/vhosts/ajorge.net/httpdocs/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute') #6 /var/www/vhosts/ajorge.net/httpdocs/gallery3/index.php(97): require('/var/www/vhosts...') #7 {main} |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
The error is saying that Gallery's Sendmail.php library was unable to send the message. Do you use any other modules that send emails (such as notification)? If so, do they generate the same error? I'd guess the problem would be one of two things: Either php's mail function isn't set up properly on your server, or the mail server your using only accepts email from a specific "from" address, which is different from the one Gallery is set up to use (this is controlled on the Admin -> Settings -> Advanced screen, it's the gallery / email_from and email_reply_to values). ajorgereis wrote:
When guest send email report this error |
||||
aakkonen
Joined: 2010-11-06
Posts: 1 |
![]() |
|||
Hello! Could it be possible to implement a feature that allows writing custom text in the sidebar for example under the link? I would like to add something like "or if you prefer IRC contact nickname in IRCnet". Thanks, aakkonen |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
aakkonen wrote:
Hello! You can insert whatever text you want by editing the /modules/contactowner/views/contactowner_block.html.php file and inserting the desired text/html at the end. |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
You can use the codeblock module as well. Dave |
||||
marcosxd
Joined: 2010-11-21
Posts: 1 |
![]() |
|||
Hi, I am new in the community and I have a question. I was testing with this module and I always receive the mails on my Hotmail junk folder. Any ideas about what do I need to do? I don't want my hotmail users to not receive it on their inbox. Thanks in advance! |
||||
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
|||
The module sends an email to the site owner, so the users shouldn't be looking for an email. If, however, the mail's going to the junkmail folder, there could be a huge number of reasons. It could just be the way you've configured your hotmail filters. You can also try to set up spf or domainkeys records. |
||||
randy9000
Joined: 2012-05-17
Posts: 16 |
![]() |
|||
rWatcher, how can I add more information to the right of the form? Which file do I edit? |
||||
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
|||
This file handles printing the actual email form: You could edit it to insert additional information above or below the form easily enough, although inserting text to the right might take a little more work. |
||||
randy9000
Joined: 2012-05-17
Posts: 16 |
![]() |
|||
Thanks. Can you point me in the direction of adding information to the right 0f the From and To fields (in that blank open area)? I'd like to add a phone number and address in that space that not being used. Thanks for your help. |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
<?php defined("SYSPATH") or die("No direct script access.") ?> <table> <tr> <td style="width:50%"><?= $sendmail_form ?></td> <td>stuff here with regular html that you will have to know.</td> </tr> </table>
Dave |
||||
randy9000
Joined: 2012-05-17
Posts: 16 |
![]() |
|||
Thanks floridave!!! But, do I create a new file with this information or add it to an existing file? |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
Edit the existing file referenced above. Dave |
||||
mosquito2012
![]()
Joined: 2012-11-09
Posts: 80 |
![]() |
|||
Hiya, I can't get this to work, I can't locate the php files I need to change |
||||
mosquito2012
![]()
Joined: 2012-11-09
Posts: 80 |
![]() |
|||
the PHP files arent located where it is listed above, any ideas? really want to get a contact button or something on there |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
The file is in modules / contactowner / views / contactowner_emailform.html.php Dave |
||||
mosquito2012
![]()
Joined: 2012-11-09
Posts: 80 |
![]() |
|||
this is what I see in the PHP file you mentioned Quote:
<?php defined("SYSPATH") or die("No direct script access.") ?> |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
OK that is the file you want to edit. <?php defined("SYSPATH") or die("No direct script access.") ?> <table> <tr> <td style="width:50%"><?= $sendmail_form ?></td> <td>stuff here with regular html that you will have to know.</td> </tr> </table> the stuff here with regular html that you will have to know. is what you would edit to add the stuff you want to add like a phone number or contact button. Dave |
||||
mosquito2012
![]()
Joined: 2012-11-09
Posts: 80 |
![]() |
|||
hmmm..strangely I havent changed anything and its working now!?!? Just so I know, what would I add to the above to get it to work? Sorry I am not fully understanding what I would have needed to do, just want to know so I can learn. |
||||
mosquito2012
![]()
Joined: 2012-11-09
Posts: 80 |
![]() |
|||
also, at the moment it seems you dont have to be registered on the site to send a message, and its possible to edit the "TO" field, upon testing it still goes through to the owner email address but it seems abit messy. One other issue I am concerned about is spam, can a capture be added to this easily? |
||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||
Quote:
Just so I know, what would I add to the above to get it to work? Perhaps your best bet is to start a new thread. Your requirements are different that the "adding information to the right 0f the From and To fields (in that blank open area)?" Dave |
||||
1forrest
Joined: 2013-02-03
Posts: 1 |
![]() |
|||
Hi! Dang... Something went wrong! Can you help to figure out what is the issue? |
||||