Contact Page: Adding more options

1 view
Skip to first unread message

Simeon

unread,
Oct 16, 2009, 1:38:29 PM10/16/09
to Pixie
Well I am on a roll today ;<)

How can I add or change the options in the Contact page to possibly
send the contact messages to different departments.
http://www.lorecords.com/news/?s=contact

Right now it comes up with just my name.

Would I be correct in assuming that I could possibly create new user
accounts with the department names I wanted to represent and that they
would show up in the dropdown box? If that is correct how then could
I hide the ones I did not want to appear?

Thanks again for all the help,
His Best,
Simeon Amburgey
Sound Creations, Inc.
www.soundcreationsinc.com
***PS.89:15***

Scott

unread,
Oct 17, 2009, 11:19:45 AM10/17/09
to Pixie
Hi
You are correct - adding more users will populate the dropdown list
with more options. If you are looking to customise it further, you
will need to get your hands dirty with some PHP. All of the modules
can be found in /admin/modules/

Open up /admin/modules/contact.php

at line 96 you have your query for getting the user list:

$rs = safe_rows_start("*", "pixie_users", "1 order by privs desc");

you could modify this to only show certain users:

$rs = safe_rows_start("*", "pixie_users", "WHERE username = 'fred' or
username ='bob' order by privs desc");

Scott


On Oct 16, 6:38 pm, Simeon <soundcreations...@gmail.com> wrote:
> Well I am on a roll today ;<)
>
> How can I add or change the options in the Contact page to possibly
> send the contact messages to different departments.http://www.lorecords.com/news/?s=contact

Simeon

unread,
Oct 17, 2009, 2:59:34 PM10/17/09
to Pixie
Thought so.
Can you just remove that option and have it just go to a general email
address this might be a little easier to manage.

Best,
Simeon

Scott

unread,
Oct 18, 2009, 6:23:27 AM10/18/09
to Pixie
Hi Simeon
Yup you can do that... infact we already thought of that. The drop
down on the contact page is the only element in the form with a unique
#ID. Add this to your CSS file:

#contact_list { display: none; }

And the option will disappear. By default it will always be sent to
the super admin this way - so change your super admin's email to the
one you want to use.

Alternatively you can do a bit of PHP hacking. Open up /admin/modules/
contact.php. On line 59 replace:

$to = safe_field('email','pixie_users',"user_id = '$contact' limit
0,1");

with

$to = "som...@mysite.com";

Done!

Scott
Reply all
Reply to author
Forward
0 new messages