Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[ New Plugin ] ContactPage v1

Quote Reply
[ New Plugin ] ContactPage v1
ContactPage Plugin

Price: $30
More details: http://ultranerds.com/cgi-bin/details/7.html

Description: The basic features of this Plugin are simple. It allows you to support an unlimited number of checkbox/select/input type boxes (not 'file' fields yet), and get them sent to your email address. From the users point of view, they are just sending their details/comments via the online form, which is nice and simple from their end. From the admin side; they are getting a formatted email, with the fieldname and value, as well as the form submissions date. This is basically a cleaner version than using a FormMail.pl script.

If you have any questions, please feel free to ask (either here, in my forum, or via email).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Feb 27, 2008, 3:07 AM
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v1 In reply to
Hello Andy,

Your ContatPage script is very useful.

But, it is possible to still develop it ?

1/ I would like that the users are recorded to use script
2/ I would like that the email are recorded in a file (data bases).
3/ It is possible to protect it from the spamers?

It is much of work. Also, if other users of liens SQL are interested by your work you can let it know?

Thank you for your answer.

Mick
Quote Reply
Re: [mick31] [ New Plugin ] ContactPage v1 In reply to
Yeah, I'll try and get these added. Not got a lot of free time on my hands at the moment... but I'll try my best =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

Its been a long time coming.. and now its here =)

Version 2.0 is now available for download!

A full list of features can be found here: http://ultranerds.com/cgi-bin/details/7.html

A round up of the new main features;

1) Ability to block IP (or even IP ranges)
2) Template based emails.
3) Documentation update.
4) General cleanup, and performance improvments.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

The new version of ContactPage now has a security image feature built in. You can download it form the Members Area now (if you already own it). If not, then I'm afraid the price has gone up to $30 (it was quite a bit of work getting this security image stuff in place, but I'm sure those who use it, will agree its a pretty cool feature =))

For anyone interested, here is the link: http://www.ultranerds.com/...ins/Contact_Page_L7/

As usual, please feel free to email me, or post here if you have any questions.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Hi Andy,
I have a gcommunity login field in the leftsidebar of gossamer links. Everytime a logged in user is going to use the contact form he is logged out?
Is there a way to keep the users logged in?
Or even better.
Is there a way to autofill the name and email fields in the contact form, when the user is already logged in. At the moment a logged in users has to type in his name and emailadress.

Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ New Plugin ] ContactPage v2.0 In reply to
Hi Andy,
your code works perfect. Name and Email are passed in for logged in users.
I changed the html and css to fit the form into the luna.css.
Looks better than the standard contactpage.

Here are my changes. Perhaps you can use it. So other users don't have to do
the work again. There are german descriptions, but you can change it in a minute.

Thanks
Matthias

Code:
<div class="row clear">
<label class="name">Dein Name: </label>
<div class="value">
<%if Name%><input type="hidden" value="<%Name%>"
name="Contact_Name"><%Name%><%else%><input type="text" name="Contact_Name"
size="20"><%endif%>
</div>
</div>
<div class="row clear">
<label class="name">Deine Email: </label>
<div class="value">
<%if Email%><input type="hidden" value="<%Email%>"
name="Contact_Email"><%Email%><%else%><input type="text"
name="Contact_Email" size="20"><%endif%>
</div>
</div>
<div class="row clear">
<label class="name">Deine Nachricht: </label>
<div class="value"><textarea rows="4" name="Contact_Comments"
cols="20"></textarea>
</div>
</div>
<p>Gib bitte die folgenden Buchstaben/Zahlen ein:<br />
<div class="row clear">
<label class="name">Code: </label>
<div class="value"><%security_image%>
</div>
</div>
<div class="row clear">
<label class="name">Code eingeben: </label>
<div class="value"><input type="text" name="SessionID" value="" />
<input type="hidden" name="SessionDate" value="<%SessionDate%>" />
</div>
</div>

Matthias
gpaed.de
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v1 In reply to
Hi Andy,

I really liked your original Contactpage plugin. I have no need for a security image, but there seems to be no way of removing that function. To me and my visitors security images are just a pain and doesnt really help against spam as such.

How can i remove it from your new version?

Also when I try and click on "remove image" on the menu i just get errors - "invalid plugin".

The plugin does work though, just not that option.
Quote Reply
Re: [demon] [ New Plugin ] ContactPage v1 In reply to
Hi,

The easiest way, is to just comment out these lines (in contact.cgi):

Code:
my $security_image = Make_Security_Image();

..and

Code:
my $test = Do_Image_Check();

if ($test < 1) {
print $IN->header();
print Links::SiteHTML::display('error', { error => "The security image you entered didn't match up with what we have. Please go back and try again." });
exit;
}

..so it looks like:

Code:
# my $security_image = Make_Security_Image();

..and

Code:
# my $test = Do_Image_Check();

# if ($test < 1) {
# print $IN->header();
# print Links::SiteHTML::display('error', { error => "The security image you entered didn't match up with what we have. Please go back and try again." });
# exit;
# }

Then, just remove the template stuff for the "image" in contact_form.html.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v1 In reply to
thanks, that worked perfectly.
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
When installing ContactPage, in left menu there is link "Remove Images" and "Clean Sessions"

1. When I click on Remove Images, a got error

Code:
A fatal error has occured:

Invalid plugin function: RemoveImages at admin.cgi line 215.

Please enable debugging in setup for more details.

2. When click on Clean Sessions I got:
Code:
A fatal error has occured:

Invalid plugin function: DoClean at admin.cgi line 215.

Please enable debugging in setup for more details.

3. In include_headers template I have this link
Code:
<%if user.Username%><li><a href="http://www.glinks.com/cgi-bin/community.cgi?do=user_home">Community</a></li><%endif%>

But on contact.cgi I don't see this link on header.

4. All emails are sent as attacments (filename "none" or "attachment")


Regards.

UnReal Network

Last edited by:

deadroot: Feb 16, 2008, 10:51 AM
Quote Reply
Re: [deadroot] [ New Plugin ] ContactPage v2.0 In reply to
deadroot wrote:

3. In include_headers template I have this link
Code:
<%if user.Username%><li><a href="http://www.glinks.com/cgi-bin/community.cgi?do=user_home">Community</a></li><%endif%>

Fixed. Links::init_user(); missing in contact.cgi Wink

UnReal Network
Quote Reply
Re: [deadroot] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

Thanks for the reports - they must have been missed out for some reason :/

I've added in the "Clean Sessions" and "Remove Images" functions, and also added in the Links::init_user() call (I was aware of that bug, but thought it had already been fixed :))

Also, the emails coming through as an attachment was a bug. The format that was used for "plain" emails (i.e not HTML) was plain/text - but should have been text/plain =)

I've uploaded version 2.2 into the Members Area now.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

I've just released version 2.5 now.

This includes the following changes:

1) You can now call contact.cgi with contact.cgi?LinkOwner=admin (or whatever username you want), and it will send the completed email to the "Email" address held in your glinks_Users table, for that particular username
2) The contact_form.html has been updated to use CSS <divs>, which gives a much friendlier (and cleaner) interface for your users to use. The old one looked pretty rubbish, so I thought it was time to get that sorted =)
3) The $USER bug has also been fixed (I thought I fixed this up ages ago, but it must have crept back in some how). This wasn't a major problem, as all it really did was make the script think you were not logged in (in the templates), so you would see the "login" link, instead of "logout"

If you don't own this plugin, you can find out more here:

http://www.ultranerds.com/...ins/Contact_Page_L7/

..or for people who already own it, you can download the latest version from our Members Area.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Will this work with the new profile plugin?
Quote Reply
Re: [netnow21] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

Yup.

Call it from view_user_profile.html, with:

Code:
<%config.db_cgi_url%>/contact.cgi?LinkOwner=<%user_Username%>

Should do it fine Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Hi there,

In the contact_email.html template all blank lines are stripped out when the email is sent.

I want to keep the email format as text/plain but how do I get the template file carriage returns to show in the sent emails? Everything just gets bunched up together with no spacing lines between them.

Cheers,
Piers
Quote Reply
Re: [Piers1] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

What do you have in your plugin settings? I expect you have it set to send as text/html :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Aug 24, 2008, 3:07 AM
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
No - it is set as plain/text

I have removed all of the <p> and <br> tags as they shouldn't need to be in the template, but when I want to have a blank line (as seen in the template) they don't come through in the received email.

Cheers,

Piers
Quote Reply
Re: [Piers1] [ New Plugin ] ContactPage v2.0 In reply to
Can you send over GLinks details please? I *think* I know the problem - but just need to check (its a setting in glinks, which removes newlines)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
I've just emailed login details to you.

This doesn't happen with any of the other Links templates....

Cheers,

Piers
Quote Reply
Re: [Piers1] [ New Plugin ] ContactPage v2.0 In reply to
Hi,

Should be sorted now. As I expected, you had compress => yes set in the Setup > Build Options area =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v2.0 In reply to
Cool - I've learnt something!

Thank you,

Piers
Quote Reply
Re: [Andy] [ New Plugin ] ContactPage v1 In reply to
Hi Andy

I use your plugin so that the users send an email to the contact of the link.
I would like to INSERT data (subject and message) since LinksSQL towards another database.

Do you think that it possible ?

I thought of being able to use a similar code in the file contact.cgi after # show the success page...:

Code:
use DBI;
my $dbh = DBI->connect('DBI:mysql:DB_NAME', 'DB_USERNAME', 'DB_PASSWORD') || die "Could not connect to database: $DBI::errstr";
my $query = "INSERT INTO cm_page_details({`subject`, `message`) VALUES ('$subject', '$message')";

my $sth = $dbh->prepare($query) || die $DBI::errstr;
$sth->execute() || die $DBI::errstr;

$sth->finish();
$dbh->disconnect();

Thanks!

Mick
Quote Reply
Re: [MJ_] [ New Plugin ] ContactPage v1 In reply to
Hi,

Sure - that should work - but I expect you would want to use "bind" of the values - so you don't have to worry about SQL injection / possible SQL errors:

Code:
use DBI;
my $dbh = DBI->connect('DBI:mysql:DB_NAME', 'DB_USERNAME', 'DB_PASSWORD') || die "Could not connect to database: $DBI::errstr";
my $query = "INSERT INTO cm_page_details(`subject`, `message`) VALUES (?,?)";

my $sth = $dbh->prepare($query) || die $DBI::errstr;
$sth->execute($subject,$message) || die $DBI::errstr;


$sth->finish();
$dbh->disconnect();

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!