New Module: Contact Owner

dazza

Joined: 2005-04-24
Posts: 21
Posted: Fri, 2006-04-28 22:39

Hi,

Attached is a zip file for a module I have written that allows a seperate page for contacting the gallery owner through a form.

Very simple to install/use:

Unpack in the modules directory, go to the site admin modules screen and install the module, configure it by putting your details in the relevent fields, save it and activate the module.

There will then be a "Contact" link in the top right links area that will display a form for people to fill in and then the message is emailed to the address given in the setup.

I have tested it with G2.1 Matrix theme and PGThemes.

Hope it is of use to somebody...

AttachmentSize
contactowner.zip11.42 KB
 
jaa1180

Joined: 2005-02-11
Posts: 48
Posted: Sat, 2006-04-29 03:31

WOW!!!!!
I have been working on this exact thing. Yours is much nicer though.
Oh, thank you for your work.
It is wonderful!!!!

 
smbro

Joined: 2005-01-09
Posts: 11
Posted: Sun, 2006-05-07 01:10

installed it, it *almost* works -- it asks for a subject in configuration, but then asks for a subject in the contact for m itself--i presume it's asking to *append* that subject to the mail, then the message.

instead i get a blank body and simply a dash after my custom subject line.

will look into to debug, but incase you can fix it more quickly, that'd be great. :)

---
smartbrother.org

 
dazza

Joined: 2005-04-24
Posts: 21
Posted: Wed, 2006-05-10 00:37

hi,

The subject in the config page is what you will receive in the subject of the email to you (as the gallery owner)
The subject on the user form gets put into the body of the email, under the subject heading.

I did it this way so I could have an automagic email rule set up based upon the known subject line from G2...

If you want to change it so the subject on the user form is used as the subject in the email to you, open Send.inc, find the lines:

$ret = GalleryCoreApi::sendTemplatedEmail(
'modules/contactowner/templates/Email.tpl', $email, $form['custEmail'], $toEmailAddress, $toSubject, $headers);

and replace $toSubject with $form['custSubject']

hope this helps

d.

 
dazza

Joined: 2005-04-24
Posts: 21
Posted: Wed, 2006-05-10 00:43

If you want to append the user subject to the config one, edit as above, but change to $toSubject . $form['custSubject']

(not tested, but should work)

d.

 
stargirlnine

Joined: 2006-05-04
Posts: 5
Posted: Fri, 2006-05-12 01:40

Hi dazza! I am a huge fan of your modules. Thank you so much your time and work! Quick question, what part of the code would I have to delete/change to make the contact link come up without a user being logged in? Many thanks again!

 
dazza

Joined: 2005-04-24
Posts: 21
Posted: Sun, 2006-05-14 22:19

hi,

glad you like the modules...

the contact link doesn't check any permissions and should be there always.
if you are running another theme, it might be worth dropping back to matrix and checking the link is in the top right corner.
it is probably worth flushing your template cache as well.

hope this helps

d.

 
stargirlnine

Joined: 2006-05-04
Posts: 5
Posted: Mon, 2006-05-15 01:57

Yeah, the contact link showed up after like 30 minutes. Sorry!

BTW, Do you do custom stuff? my site is www.fotoswitch.com and basically all I need is similar to your about page, but I need privacy policy, terms and user guide, and I prefer the links to be in the footer. I tried to manipulate one of your scripts and just could not do it. Newbie!! I could leave it as basic html like it is now, but I prefer it to look the same as all the other pages. Let me know if there is a deal we could work out. Thanks!!

 
greigmg

Joined: 2004-02-25
Posts: 29
Posted: Wed, 2006-05-17 22:19

I got an error when trying to configure - anyone know how to solve this? It said it was a "security violation - the action you attempted is not permitted." I appreciate it, thanks.

Error (ERROR_BAD_PARAMETER) : /homepages/10/d91169952/htdocs/Gallery/modules/core/classes/helpers/../../../../modules/contactowner/Admin.inc
in modules/core/classes/GalleryView.class at line 194 (gallerycoreapi::error)
in modules/core/SiteAdmin.inc at line 145 (galleryview::loadview)
in modules/core/classes/GalleryView.class at line 317 (siteadminview::loadtemplate)
in main.php at line 386 (siteadminview::doloadtemplate)
in main.php at line 87
in main.php at line 80

System Information
Gallery version 2.1.1
PHP version 4.4.2 cgi
Webserver Apache/1.3.33 (Unix)
Database mysql 4.0.25-standard-log
Toolkits NetPBM, Gd
Operating system Linux infong 2.4 #1 SMP Wed Jan 18 14:53:29 CET 2006 i686 unknown
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

 
dazza

Joined: 2005-04-24
Posts: 21
Posted: Thu, 2006-05-18 22:53

greigmg,

can you check the permissions of the contact module directory and files are all correct - my contactowner directory is 0755, and the files within are 0644.

i think the problem is happening when it's trying to load the Admin template for configure, so as well as the permissions above, check all the files have unpacked in the right places and the capitalisation is correct.

hth

d.

 
dazza

Joined: 2005-04-24
Posts: 21
Posted: Thu, 2006-05-18 23:11

stargirlnine,

glad it's working now.

I don't normally do custom stuff as i don't get time, but I think you are just asking for the functionality for 3 About pages, but with different captions/data for each?
If so, that might be easy to fix up. I have a couple of photo jobs on over the next week but will take a look when I get a chance.

I suspect adding the links to the footer would be simple enough to do within the theme files, but havn't ever looked.
If you are not worried about saving the Navigation return page (displayed on left when in the About page) you could just put the links in the footer as you have now, but use a URL simaler to this:

http://fotoswitch.com/gallery2/main.php?g2_view=core.UserAdmin&g2_subView=aboutpage.About

this will load your about page

hth

d.

 
kalev377

Joined: 2006-06-06
Posts: 59
Posted: Tue, 2006-06-06 15:06

Hello,

Very useful module.. thank you.
Unfortunately Gmail marks all of these emails as spam..
Why is that?

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Thu, 2006-06-08 06:14

Hi Dazza,

just tried your module - the mails are sent fine, but in my case the messagebody stays empty - any idea what to check?
CU,
Lutz

Gallery version = 2.2-svn core 1.1.9
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.2 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.1.9-beta-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Thu, 2006-06-08 17:15

Dazza,

I've changed line 139 of send.inc to

ret = GalleryCoreApi::sendTemplatedEmail( 
	        			    'modules/contactowner/templates/Email.tpl', $email, $form['custEmail'], $toEmailAddress, $toSubject.' from '.$form['custEmail'], $form['custMessage'], $headers);

an get now proper E-Mail sent.

Quote:
--contactowner44885af1ac15b
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

== CONTACT RECEIVED FROM GALLERY WEBSITE ==

----- Name -----
Lutz-R. Frank

----- Email -----

----- Subject -----
Hello Gallery

----- Message -----
This is
the message
I've entered

--contactowner44885af1ac15b

Seems I've needed the $custMessage.
CU
Lutz

Gallery version = 2.2-svn core 1.1.9
PHP version = 5.1.4 apache2handler
Webserver = Apache/2.2.2 (Win32) DAV/2 PHP/5.1.4 mod_ssl/2.2.2 OpenSSL/0.9.8b
Database = mysql 5.1.9-beta-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de

 
cynode

Joined: 2006-04-08
Posts: 6
Posted: Thu, 2006-06-08 19:45

How would one go about getting the referer into the sent message? I'd like to see where the person was coming from when sending the email. thanks

 
kalev377

Joined: 2006-06-06
Posts: 59
Posted: Mon, 2006-06-19 14:24

LFrank, your change fixed also the problem that gmail junked all the emails sent via Contact Owner.. thank you :)

 
greigmg

Joined: 2004-02-25
Posts: 29
Posted: Sun, 2006-07-02 19:26

It was the permissions - I uninstalled, re-unpacked and made sure the permissions were right before I installed. Works great now, thank you for a simple yet useful tool.

 
Lee Bowser

Joined: 2006-07-05
Posts: 8
Posted: Fri, 2006-07-28 14:11
Quote:
LFrank, your change fixed also the problem that gmail junked all the emails sent via Contact Owner.. thank you

Same here! Thank you very much. I always love those fixes, if someone need some explaining, feel free to pm me.

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Fri, 2006-07-21 23:50

dazza----
Very useful... my thanks;~)

stargirlnine----
You can call the Contact Owner module 'directly' using:

<a href="{g->url arg1="view=contactowner.Contact"}">{g->text text="contact"}</a>

dazza----
I don't have logged-in users (other than admin).
Whilst the above linker for stargirlnine---- works
calling up the module things fall apart after the
fail number is reached. OK the admin logs out and
logs back in... but my anonymous posters cannot
log out for they were never logged in initially;~/
Workaround? Other than disabled numbers of emails?

dazza----
Has the module been proved against injection exploits?

----best wishes, Robert

 
zlwise

Joined: 2005-11-10
Posts: 1
Posted: Mon, 2006-07-31 01:41

Is there a way to use the contact module to contact the owner of a particular album? On my site I recieve emails intended for the owners of the album with comments on the work.

 
rtellis

Joined: 2006-07-14
Posts: 10
Posted: Wed, 2006-08-02 15:46

This is fantastic - solves our problem big time - great mod... THANK YOU

 
kalev377

Joined: 2006-06-06
Posts: 59
Posted: Sun, 2006-08-13 12:03

The possibility of contacting the owner of an album would be so much apperciated..With a donation..

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Thu, 2007-02-15 21:46

I have a few questions about this module:

1) Is there a way to make "Contact" appear as the browser page title?
2) Is there any way to change the position of the contact link? It's currently the first link and i would like to make it the last system link
3) How do I remove the login block that appears on the left hand side of the contact and email sent page?

Thanks!

New York Architectural Photography
Washington DC Photography
Photos of New York City Landmarks
Black and White Photography

 
WItch

Joined: 2005-10-27
Posts: 57
Posted: Sun, 2006-08-27 13:54

Hey,
Make this Contact.tpl and put it in a local folder if you are using PG Theme. This will make the Contact Page match the theme.

{*
 * $Revision: 1.1.1.1 $
 * If you want to customize this file, do not edit it directly since future upgrades
 * may overwrite it.  Instead, copy it into a new directory called "local" and edit that
 * version.  Gallery will look for that file first and use it if it exists.
 *}


<table width="100%">
  <tr>
    <td valign="top">
      <table width="92%" class="gcBackground1 gcBorder2" cellpadding="0" align="center" >
      <tr><td>
      <table width="100%" cellspacing="5" cellpadding="0" class="gcBorder1" >
        <tr valign="top"><td>

<form action="{g->url}" method="post">
  {g->hiddenFormVars}
  <input type="hidden" name="{g->formVar var="controller"}" value="{$form.controller}"/>
  <input type="hidden" name="{g->formVar var="form[formName]"}" value="{$form.formName}"/>

  <p>You can contact Michelle at <b>512-944-3982</b> or send an email below.</p>
<p>
  {if (($badname == true) || ($bademail == true) || ($badsubject == true) || ($badmessage == true))}<p><br><font color="#ff0000"><b>Please correct the required items below</b></font><p><br>{/if}

	<table cellspacing="5">
	  <tr>
	    <td align="right"><strong>Name:</strong></td>
	    <td><input type="text" name="{g->formVar var="form[custName]"}" value="{if isset($form.custName)}{$form.custName}{/if}" size="50"></td>
          {if ($badname == true)}<td align="left"><font color="#ff0000"><b><b>&lt;== REQUIRED</b></b></td>{/if}
	  </tr>
	  <tr>
	    <td align="right"><strong>Email Address:</strong></td>
	    <td><input type="text" name="{g->formVar var="form[custEmail]"}" value="{if isset($form.custEmail)}{$form.custEmail}{/if}" size="50"></td>
          {if ($bademail == true)}<td align="left"><font color="#ff0000"><b>&lt;== INVALID EMAIL ADDRESS</B></td>{/if}
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	  </tr>
	  <tr>
	    <td align="right"><strong>Subject:</strong></td>
	    <td><input type="text" name="{g->formVar var="form[custSubject]"}" value="{if isset($form.custSubject)}{$form.custSubject}{/if}" size="50"></td>
          {if ($badsubject == true)}<td align="left"><font color="#ff0000"><b><b>&lt;== REQUIRED</b></b></td>{/if}
	  </tr>
	  <tr>
	    <td align="right"><strong>Message:</strong></td>
	    <td><textarea rows="10" cols="39" name="{g->formVar var="form[custMessage]"}">{if isset($form.custMessage)}{$form.custMessage}{/if}</textarea></td>
          {if ($badmessage == true)}<td align="left"><font color="#ff0000"><b><b>&lt;== REQUIRED</b></b>

</td>{/if}
	  </tr>
	</table>
<input type="submit" class="inputTypeSubmit"
   name="{g->formVar var="form[action][send]"}" value="{g->text text="Send Email"}"/>

</form>
</td></tr></table></td></tr></table></td></tr></table>

If anyone could tell me how to get the sidebar gone for these add-on pages I would appreciate it. It says "change password" "back" etc.

 
johndoelives

Joined: 2006-07-06
Posts: 11
Posted: Thu, 2006-09-07 11:00

Hi Dazza,

Thanks for the super module. I can't get it to work though. I set the same permissions as you mentioned above, but I still get the following errors. Please help. I'm still learning, so please be patient... Thanks
JohnDoeLives

Notice: Undefined index: badname in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 26

Notice: Undefined index: bademail in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 26

Notice: Undefined index: badsubject in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 26

Notice: Undefined index: badmessage in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 26
Name:
Notice: Undefined index: badname in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 33

Email Address:
Notice: Undefined index: bademail in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 39

Subject:
Notice: Undefined index: badsubject in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 48

Message:
Notice: Undefined index: badmessage in C:\Sites\xxxxx\xxxxx\secure\g2data\smarty\templates_c\%%313289441\%%D7^D7E^D7EE5B68%%Contact.tpl.php on line 54

 
smaurer

Joined: 2006-09-09
Posts: 25
Posted: Sat, 2006-09-09 10:05

Thanks for that great module, dazza!

I had to make LFranks modification to send.inc to make it work. However - the result look slightly different:

Quote:
This is the message body...
... on two lines.

--contactowner450291609a8c1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

== CONTACT RECEIVED FROM GALLERY WEBSITE ==

----- Name -----
Simon

----- Email -----

----- Subject -----
Subject line

----- Message -----
This is the message body...
... on two lines.

--contactowner450291609a8c1

Note that the message body comes also on top of the email message...

... I can't get rid of that, but I am not at all a PHP crack. Can somebody help me correct that code to look the email message like it is intended to look?

Thanks all
-Simon

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2006-10-17 17:19

Is there a way to make the contact link the last link in the system links rather than the first one?

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Tue, 2006-10-17 17:34
ichthyous wrote:
Is there a way to make the contact link the last link in the system links rather than the first one?

Yes.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Tue, 2006-10-17 18:19

icpix, cool answer :/
(Sorry - couldn't resist)

Gallery version = 2.2-svn core 1.1.18
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Tue, 2006-10-17 18:25

Nor could I. Accurate. 100% to the point. Busy.

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Thu, 2006-10-19 20:00

Yes tres cool! Now, does anyone know how to move the link position from 1st to last? Thanks

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Thu, 2006-10-19 20:31

It wasn't cool or even meant to be cool.
It answered your question specifically and I
got called away to resolve server difficulties.
No need to get huffy. See you've been generally getting
wads of answers and help;~) I'll sort out your situation...
{g->block type="core.SystemLinks" order="core.SiteAdmin"}
...now you sort out my predicament - bots/permissions;~)
http://gallery.menalto.com/node/55356#comment-204588

----best wishes, Robert

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Fri, 2006-10-20 21:24

Not getting huffy...I thought you were being a smart a$$...sorry for the a$$umption...it's hard to tell sometimes in posts. Thanks for the code i will try it. I left a post re excluding bots at the post above

Andrew

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Fri, 2006-10-20 22:09

Robert...I'm not sure what the code you posted refers to. Can you elaborate? Thanks

Andrew

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Sun, 2006-10-22 08:25

BT (British Telecom) took me off line for some 24hrs
...no reason, perhaps just because they can;~|

Code refers to the mechanism by which you can re-order
the way the links are presented onscreen. I thought
that that was what you wanted to do.
{g->block type="core.SystemLinks" order="core.SiteAdmin special.tweak core.fancybit"}

----best wishes, Robert

 
mikblik

Joined: 2006-06-20
Posts: 34
Posted: Sun, 2006-10-22 23:43

icpix,

Thank you for such a useful module and your help on this thread.

I am trying to create a "Contact" page which will show just your module. I can't figure out how to do it.

You said:
You can call the Contact Owner module 'directly' using:
<a href="{g->url arg1="view=contactowner.Contact"}">{g->text text="contact"}</a>

So, if I have the Contact file as http://www.innasart.com/contact.php, and I include your line in the contact.php file body, it doesn't work. How do I modify it?

Many thanks in advance,
Mihael

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Sun, 2006-10-22 23:58

It's not my module. I just make use of it. Not sure if I can
explain it 'properly' as I am not a programmer (photographer).
You have to install the module normally from the control panel.
Then you amend your settings in its place in the admin options.
I call it directly from my own (static) frontend, this is the
exact code behind the simple text linker 'contact':
<a href="{g->url arg1="view=contactowner.Contact"}">{g->text text="contact"}</a>

FWIW I'm not fond of being 'thanked in advance', it really
puts me right off helping people who utter it. You're very
welcome to thank me after I (may) have helped you out.

 
mikblik

Joined: 2006-06-20
Posts: 34
Posted: Mon, 2006-10-23 00:12

Well, thanks now then, icpix.

Can you provide a link to your site, to see if I can figure by example?

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Mon, 2006-10-23 06:48

It's unlikely to be any clearer for installation
purposes, it'll only show you how I've used the
actual module on my own site.
http://icpixREMOVE.coBOGUS.ukANTIHARVEST/contact
(filter out the bot stopping capitalisation)

----best wishes, Robert

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2006-10-23 08:25

Can anyone please help indicate how to activate Captcha for the contact page?
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Mon, 2006-10-23 08:26
Dayo wrote:
Can anyone please help indicate how to activate Captcha for the contact page?

Install the Captcha module in the admin control panel.
Then activate the Captcha module in the admin control panel.
What is the problem?

----best wishes, Robert

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2006-10-23 08:34
icpix wrote:
Install the Captcha module in the admin control panel.
Then activate the Captcha module in the admin control panel.
What is the problem?

I have the Captcha module installed ok and the question wasn't on installing Captcha. The problem is that when using the contact module, the form comes up whenthe link is clicked as it should but I want to add Captcha validation to the form.
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Mon, 2006-10-23 08:46

The 'activation' of Captcha is part of the 'installing' process
of Captcha... I experienced no similar difficulty implementing
Captcha in the contactowner module (with my own theme).
I think you should raise this as a theme issue.

----best wishes, Robert

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2006-10-23 09:34

OK. Thanks
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com

 
itsnotlevel

Joined: 2005-09-28
Posts: 25
Posted: Thu, 2006-11-30 19:55

Where do you change the text part of the module to make "contact" show up as "contact album owner" instead, thanks!

Paul Wilson
:::::Stay Gold:::::

 
patrickthickey
patrickthickey's picture

Joined: 2004-08-22
Posts: 164
Posted: Sat, 2006-12-02 01:14

I recently had to toss my favorite PGtheme, until I can figure it out, due to multiple php crashes and unknown foo. I have been converting to carbon.

The contact contrib, which I need badly, does not invoke the CAPTCHA challenge. I have flushed every cache I can find.

I also switched to matrix, the old standby, and the contact page does not use CAPTCHA for this theme either.

Any help or thoughts? I am using the most recently nightly.

thanks.

regards,patrick

http://www.idyll.com/gallery2

Gallery version = 2.2-svn core 1.1.23
PHP version = 4.3.9 apache2handler
Webserver = Apache/2.0.52 (Red Hat)
Database = postgres7 , lock.system=flock
Toolkits = Exif, ArchiveUpload, Ffmpeg, ImageMagick, NetPBM, Gd, Dcraw, LinkItemToolkit
Acceleration = full/21600, full/21600
Operating system = Linux 2.6.9-11.ELsmp #1 SMP Fri May 20 18:25:30 EDT 2005 x86_64
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Rows in GalleryAccessMap table = 46
Rows in GalleryAccessSubscriberMap table = 969
Rows in GalleryUser table = 4
Rows in GalleryItem table = 966
Rows in GalleryAlbumItem table = 111
Rows in GalleryCacheMap table = 8

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Fri, 2006-12-08 17:46

Thanks for the module. I was trying to integrate it with the carbon theme and have the sidebar actually show.

In case anyone else might find this useful, I made the two following changes:

  1. Changed the definition of the link in module.inc from
            $links['Contact'] = array(
      		'text' => $this->translate('Contact'),
      		'params' => array('view' => 'core.UserAdmin',
      				  'subView' => 'contactowner.Contact',
      				  'return' => 1));
    

    to

          $links['Contact'] = array(
    		'text' => $this->translate('Contact'),
    		'params' => array('view' => 'contactowner.Contact',
    				  'return' => 1));
    
  2. Change the Carbon template module.tpl as described in this post http://gallery.menalto.com/node/44814?page=8#comment-212346
 
silverfox

Joined: 2004-10-08
Posts: 21
Posted: Tue, 2006-12-12 05:47

If I put some more thought into this, I imagine it could be more elegant, but since its late, I'll give you the down and dirty. To log IP and referer:

update Send.inc on line 128:

                                        'custIP' => getenv( "REMOTE_ADDR" ) . " " . getenv( "REMOTE_HOST" ),
                                        'custReferer' => getenv( "HTTP_REFERER" ),

This will store the two new variabls $custReferer and $custIP that you can use in the templates/Email.tpl file found in the contactowner module's directory. Add this to templates/Email.tpl:

{g->text text="----- Source Info -----"}
IP Address: {$custIP}
Referer: {$custReferer}

If you wanted to go a step farther, you could cross check an file that lists known bots or regions of the world you wanted to block from this, and also check to ensure that the referer was a local (from your website) page before allowing an email.

 
pengi2

Joined: 2006-10-07
Posts: 19
Posted: Mon, 2006-12-18 00:48

I've installed this module and it's just what I need. However there may be a bug. When I had the module set up to send to a 'regular' email address, everything worked perfectly. When I aim the submissions at a gmail account, the email bodies are lost. It may be a gmail bug, but thought I'd ask here too to see if anyone had info on it. I've tested a good bit and it's 100% consistent.

In the gmail acct if I select "Show Original", I see the contact form submission text ok. Not sure why gmail can't pick it up? It's like this:

----- Name -----
Tester

----- Email -----

----- Subject -----
123123

----- Message -----
this is a test with the site contact form, this is the body.

 
dbeers

Joined: 2006-12-01
Posts: 29
Posted: Sun, 2006-12-24 13:14

Pengi2, I am having the same problem with the Contact page with gmail. The email bodies are lost as well. I think it might be a gmail bug. Anyone have a fix for this or how to resolve.

Thank you,

 
wookie7070

Joined: 2007-01-14
Posts: 2
Posted: Sun, 2007-01-14 20:00

I have been looking for a way to do this when I stumbled upon this. Thanks so much took all of 1 minute to get it up and running on Carbon Theme. Thanks

http://www.simonwootton.com