New Module: ContactOwner

rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Wed, 2009-07-22 20:47

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:
http://codex.gallery2.org/Gallery3:Modules:contactowner

It can be downloaded from this post, or from my github account at:
http://github.com/rWatcher/gallery3-contrib/tree/master

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...

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16320
Posted: Thu, 2009-07-23 00:10

Works for me! Thanks.
I suspect that my issue is more of a php/mail issue and not the module but when I get the email, it is all on one line:

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
this is a new line and
another new line.

Dave

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.
Keep up the great work!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Mon, 2009-10-12 19:57
floridave wrote:
Works for me! Thanks.
I suspect that my issue is more of a php/mail issue and not the module but when I get the email, it is all on one line

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:
I've attached a second version, which includes bharat's changes for the recent API update. If you're running Beta 2 use the -fix.zip version. If you're using the latest version from Git use -git.zip instead.

Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 6019
Posted: Thu, 2009-07-23 18:08

I've pulled this into the contrib repo. Thanks!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

Login or register to post comments
haryadimas
haryadimas's picture

Joined: 2009-08-19
Posts: 8
Posted: Thu, 2009-08-27 12:59

Hi,

how do i remove the User Options Sidebar.
i know i cant hide it with css without hiding the admin's sidebar.

any ideas?

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Thu, 2009-08-27 19:58
haryadimas wrote:
Hi,

how do i remove the User Options Sidebar.
i know i cant hide it with css without hiding the admin's sidebar.

any ideas?

I'm not sure what you mean by "User Options Sidebar". Is this the options menu at the top of the screen?

Login or register to post comments
haryadimas
haryadimas's picture

Joined: 2009-08-19
Posts: 8
Posted: Fri, 2009-08-28 08:19

What i meant by User Options Sidebar

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Fri, 2009-08-28 18:53

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" .

Login or register to post comments
haryadimas
haryadimas's picture

Joined: 2009-08-19
Posts: 8
Posted: Sat, 2009-08-29 20:30

is that so. thanks for the reply. i will look at it.

Login or register to post comments
haryadimas
haryadimas's picture

Joined: 2009-08-19
Posts: 8
Posted: Tue, 2009-09-01 13:03

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 ?? -_-..

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Tue, 2009-09-01 15:56

Here's the views directory for the default Gallery 3 theme:
http://github.com/gallery/gallery3/tree/master/themes/default/views

Are you using Gallery 3?

Login or register to post comments
haryadimas
haryadimas's picture

Joined: 2009-08-19
Posts: 8
Posted: Tue, 2009-09-01 16:07

actually no. i'm using Gallery 2. any ideas ?

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Tue, 2009-09-01 17:42

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.

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Thu, 2009-10-29 22:24

I've created an updated version of ContactOwner:
- Merged in ckieffer's CSS changes for Gallery 3 Git
- Updated for the new sidebar code in Gallery 3 Git
- Tested everything against current git (as of commit b6c1ba7ea6416630b2a44b3df8400a2d48460b0a)

It is attached here, and has been uploaded to my github account.

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Thu, 2009-10-29 22:30

New version of ContactOwner:
- I've changed all references of "user::active()->email" to "identity::active_user()->email" to allow the module to work against current Git (as of commit e45ea9359d6cb603be0bc28376d92883aa8d7c7e).

It is attached here, and has been uploaded to my github account.

AttachmentSize
contactowner-git.zip7.32 KB
Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16320
Posted: Fri, 2009-10-30 03:22

rWatcher,
Thanks for your continued contribution and keeping the module up to date!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
hebhansen

Joined: 2009-02-10
Posts: 151
Posted: Sun, 2009-11-08 19:49

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:
in admin there is an Owners email form. Is that the email of the webmaster? or should this be left empty
When filling out the web-form I see the email I entered in admin?

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
HB

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Mon, 2009-11-09 05:24
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.

Login or register to post comments
hebhansen

Joined: 2009-02-10
Posts: 151
Posted: Mon, 2009-11-09 22:23

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:

... 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
HB

Login or register to post comments
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 216
Posted: Tue, 2009-11-10 06:03
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

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.

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.
I could add in some code to require a "From" email, but as there's no way to verify that the email a guest provides actually exists, that's only going to be of limited usefulness.

hebhansen wrote:
- If I Reply the mail I recieve it goes to:

... Who is that? If the above mail is added as from, reply should go to this person...

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.

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
HB

Adding in some admin-controlled default text should be doable.

Login or register to post comments
hebhansen

Joined: 2009-02-10
Posts: 151
Posted: Tue, 2009-11-10 13:20

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

, 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
HB

Login or register to post comments