Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

User problems with forums and quick question about paypal

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


kgross at jensalt

Jan 26, 2008, 7:05 PM

Post #1 of 9 (452 views)
Permalink
User problems with forums and quick question about paypal

I am running interchange 5.4.2 running on Debian with the standard store
installed with my products in it.

I have a problem with jerks putting comments in the products that are
links to porn sites. Is it possible to setup the system to only allow
comments from logged in users and not anonymous? I am hoping that will
prevent my problems.

I want to integrate paypal payments, does anybody know if the paypal
gateway can be installed in the standard store easily?

Thanks in advance.

Kim

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


peter at pajamian

Jan 26, 2008, 7:56 PM

Post #2 of 9 (426 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

On 01/26/2008 07:05 PM, kim Gross wrote:
> I am running interchange 5.4.2 running on Debian with the standard store
> installed with my products in it.
> I have a problem with jerks putting comments in the products that are
> links to porn sites. Is it possible to setup the system to only allow
> comments from logged in users and not anonymous? I am hoping that will
> prevent my problems.

Yes, put the following above the [tmp page_title] line of
pages/forum/reply.html and pages/forum/submit.html:
[tmp members_only]1[/tmp]

Alternatively you can look into using captchas, I use a combination of
both so that logged in members don't have to fill in a captcha but
everyone else does. Note you will need to download and install the
captcha tag from:
<http://www.icdevgroup.org/cgi-bin/cvsweb/~checkout~/interchange/code/SystemTag/captcha.coretag?rev=1.4;content-type=text%2Fplain>

...and make sure to install the Authen::Captcha perl module as well.
The tag is documented internally and you can read the docs by typing:
perldoc captcha.coretag

> I want to integrate paypal payments, does anybody know if the paypal
> gateway can be installed in the standard store easily?

IC certainly will integrate with paypal but I haven't done it myself.
There are others on this ml who can help you with that more than I can.

Peter

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


josh at kingdomdesign

Jan 28, 2008, 1:54 PM

Post #3 of 9 (415 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

On Jan 26, 2008, at 9:05 PM, kim Gross wrote:

> I want to integrate paypal payments, does anybody know if the paypal
> gateway can be installed in the standard store easily?

Use PayPal Express from here:
http://www.interchange.rtfm.info/downloads/payments.html

Works nicely!

Josh
_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kgross at jensalt

Mar 6, 2008, 3:23 PM

Post #4 of 9 (359 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

Peter wrote:
> On 01/26/2008 07:05 PM, kim Gross wrote:
>> I am running interchange 5.4.2 running on Debian with the standard
>> store installed with my products in it.
>> I have a problem with jerks putting comments in the products that are
>> links to porn sites. Is it possible to setup the system to only
>> allow comments from logged in users and not anonymous? I am hoping
>> that will prevent my problems.
>
> Yes, put the following above the [tmp page_title] line of
> pages/forum/reply.html and pages/forum/submit.html:
> [tmp members_only]1[/tmp]
>
I am still fighting with this.

Here is the top few lines from my
/usr/interchange/standard/pages/forum/reply.html

[comment]
ui_template: Yes
ui_template_name: leftonly
[/comment]

[flag type=write table=forum]
[tmp members_only]1[/tmp]

[tmp page_title]Reply to [data table=forum col=subject key="[data
session arg]"$
[set members_only][/set]

[control reset=1]

The submit.html has this for the first few lines.
[comment]
ui_template: Yes
ui_template_name: leftonly
[/comment]

[flag type=write table=forum]
[tmp members_only]1[/tmp]
[tmp page_title]Submit a forum story[/tmp]
[set members_only][/set]

[control reset=1]


And it is still allowing people to leave nasty comments without creating
accounts or logging in.

Any other suggestions. I am getting very tired of deleting the porn
messages every multiple times a day.

Kim


_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


peter at pajamian

Mar 6, 2008, 8:17 PM

Post #5 of 9 (361 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

On 03/06/2008 03:23 PM, kim Gross wrote:
> Peter wrote:
>>
>> Yes, put the following above the [tmp page_title] line of
>> pages/forum/reply.html and pages/forum/submit.html:
>> [tmp members_only]1[/tmp]
>>
> I am still fighting with this.
>
> [tmp members_only]1[/tmp]
...
> [set members_only][/set]


> [tmp members_only]1[/tmp]
...
> [set members_only][/set]

The [set members_only] lines are overriding the [tmp members_only]
lines, get rid of them.

Peter

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kgross at jensalt

Mar 6, 2008, 8:40 PM

Post #6 of 9 (361 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

Peter wrote:
> On 03/06/2008 03:23 PM, kim Gross wrote:
>> Peter wrote:
>>>
>>> Yes, put the following above the [tmp page_title] line of
>>> pages/forum/reply.html and pages/forum/submit.html:
>>> [tmp members_only]1[/tmp]
>>>
>
> The [set members_only] lines are overriding the [tmp members_only]
> lines, get rid of them.

Thanks for the help, the set members_only lines have been deleted out of
each file.

Thanks again.

Kim Gross

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kgross at jensalt

Mar 11, 2008, 9:08 PM

Post #7 of 9 (350 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

>
> The [set members_only] lines are overriding the [tmp members_only]
> lines, get rid of them.
>
> Peter

Here is what I have for the first few lings of the reply.html file

[comment]
ui_template: Yes
ui_template_name: leftonly
[/comment]

[flag type=write table=forum]
[tmp members_only]1[/tmp]

[tmp page_title]Reply to [data table=forum col=subject key="[data
session arg]"$


[control reset=1]

[control-set]
[component]search_box_small[/component]
[/control-set]

[control-set]
[component]cart_tiny[/component]
[/control-set]

[control-set]
[component]product_tree[/component]
[/control-set]

[control reset=1]

[comment]
Form shamelessly stolen from Slash, thanks guys.
[/comment]

@_LEFTONLY_TOP_@

[if cgi product]
[if type=!data term="forum:code:[data session arg]"]
[perl tables="forum products"]
my $db = $Db{forum};


And I am still having problems with jerks posting porn/spam as
comments. They are not having to log in, and most do not even have an
ip listed.

Any other suggestions as to what I am doing wrong?

Thanks

Kim


_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


kgross at jensalt

Apr 16, 2008, 12:39 AM

Post #8 of 9 (295 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

>>>
>>> Yes, put the following above the [tmp page_title] line of
>>> pages/forum/reply.html and pages/forum/submit.html:
>>> [tmp members_only]1[/tmp]
>> I am still fighting with this.
>>
>> [tmp members_only]1[/tmp]
>
>> [set members_only][/set]
>
>> [tmp members_only]1[/tmp]
>
>> [set members_only][/set]
>
> The [set members_only] lines are overriding the [tmp members_only]
> lines, get rid of them.
>

I made this change and I am still having people post porn without
logging in. So do you know of any how to's on installing the captcha?
I am getting tired of deleting 100+ porn messages in the forums every day.

Thanks

Kim


_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


tracy at mainstreetmusic

Apr 16, 2008, 6:32 PM

Post #9 of 9 (293 views)
Permalink
Re: User problems with forums and quick question about paypal [In reply to]

On Wed, 2008-04-16 at 01:39 -0600, kim Gross wrote:
> >>>
> >>> Yes, put the following above the [tmp page_title] line of
> >>> pages/forum/reply.html and pages/forum/submit.html:
> >>> [tmp members_only]1[/tmp]
> >> I am still fighting with this.
> >>
> >> [tmp members_only]1[/tmp]
> >
> >> [set members_only][/set]
> >
> >> [tmp members_only]1[/tmp]
> >
> >> [set members_only][/set]
> >
> > The [set members_only] lines are overriding the [tmp members_only]
> > lines, get rid of them.
> >
>
> I made this change and I am still having people post porn without
> logging in. So do you know of any how to's on installing the captcha?
> I am getting tired of deleting 100+ porn messages in the forums every day.
>
> Thanks
>
> Kim

Kim - Been there, done that, feel your pain. Here is what I did for
captcha. Since captcha is new in 5.5.1 I borrowed the new tag and added
it as a user tag in 5.4, with a few mods. It works GREAT!

In reply_form add:
[if !session logged_in]
<tr>
<td></td>
<td>[oicaptcha function="image"]</td>
</tr>
<tr>
<td style="text-align: right;">Codeword: </td>
<td><input class="forumsubrepsubject" TYPE="text"
NAME="mv_captcha_guess" VALUE="" SIZE=10 MAXLENGTH=10> (type the four
characters you see above)</td>
</tr>
[/if]

In reply.html add where the form processing occurs:
delete $Scratch->{guess};

unless ($Session->{logged_in}) {
if ($CGI->{mv_captcha_guess}) {
$Scratch->{guess} = $Tag->oicaptcha({function => 'check', keepfailed
=> 1});
unless ($Scratch->{guess}) {
$Scratch->{guess} = $Tag->error({name => 'captcha', show_error =>
1});
return "Bad anti-spam code: $Scratch->{guess}
($CGI->{mv_captcha_guess}). Go back and try again.";
}
} else {
return "Bad anti-spam code: No code entered. Go back and try again.";
}
}

Here is the captcha user tag code which has only minor changes as
compared with the original 5.5.1 tag. It also includes some good Perl
doc instructions from the tag's author (Mike Heins).

# Copyright 2006-2007 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
# v 1.4 2007/03/30 23:55:57 pajamian Exp $
# 2007/09/22 added keepfailed, removed '_' from other options

UserTag oicaptcha Order function
UserTag oicaptcha attrAlias func function
UserTag oicaptcha addAttr
UserTag oicaptcha Description Generate captcha codes for authentication
check
UserTag oicaptcha Version $Revision: 1.4 $

UserTag oicaptcha Routine <<EOR
my $Have_Captcha;
eval {
require Authen::Captcha;
$Have_Captcha = 1;
};

sub {
my ($func, $opt) = @_;

use vars qw/$Tag/;

if(! $Have_Captcha) {
::logError("Use of captcha tag without Authen::Captcha, skipping");
return '';
}

$func = lc($func);
$func =~ s/[^a-z]+//g;
my $result = '';
if($func eq 'code') {
$result = $Vend::Session->{captcha};
}

$opt->{length} ||= 4;
my $en = $opt->{errorname} || 'captcha';

my $keep = $opt->{keepfailed} || 0;

my $subdir = $opt->{imagesubdir}
|| $::Variable->{CAPTCHA_IMAGE_SUBDIR}
|| 'captcha';
my $tmpdir = "$Vend::Cfg->{ScratchDir}/$subdir";

mkdir($tmpdir) unless -d $tmpdir;

my $imgdir = $opt->{imagelocation} ||
$::Variable->{CAPTCHA_IMAGE_LOCATION};

unless ($imgdir ) {
if(! $Global::NoAbsolute and $::Variable->{DOCROOT}) {
$imgdir = "$::Variable->{DOCROOT}$::Variable->{IMAGE_DIR}/$subdir";
}
else {
$imgdir = "images/$subdir";
}
}

my $imgpath = $opt->{imagepath}
|| $::Variable->{CAPTCHA_IMAGE_PATH}
|| "$::Variable->{IMAGE_DIR}/$subdir";


my $captcha = Authen::Captcha->new(
data_folder => $tmpdir,
output_folder => $imgdir,
keep_failures => $keep,
);

my $guess = $opt->{guess} || $CGI::values{mv_captcha_guess};
my $code = $opt->{source};

if($func eq 'check') {

my $check_against = $code || $Vend::Session->{captcha};
my $status = $captcha->check_code($guess, $check_against);
if($status > 0) {
return $status;
}
elsif($status == 0) {
$Tag->error( { name => $en, set => "Code not checked: error" });
return 0;
}
elsif($status == -1) {
$Tag->error( { name => $en, set => "Code expired" });
return 0;
}
elsif($status == -2) {
$Tag->error( { name => $en, set => "Code never generated" });
return 0;
}
elsif($status == -3) {
$Tag->error( { name => $en, set => "Code doesn't match" });
return 0;
}
}
else {
my $save_u = umask($::Variable->{CAPTCHA_UMASK} || 2);

if($opt->{reset}) {
undef $Vend::Captcha;
delete $Vend::Session->{captcha};
}

if($Vend::Captcha) {
$code ||= $Vend::Session->{captcha};
}

if($func eq 'code' and $code) {
return $code;
}

eval {

unless( Vend::File::allowed_file($imgdir, 1) ) {
my $msg = errmsg("No permission to write directory '%s'", $imgdir);
$Tag->error( { name => $en, set => $msg });
return 0;
}

mkdir($imgdir) unless -d $imgdir;

if(! $code) {
$code = $Vend::Session->{captcha} =
$captcha->generate_code($opt->{length});
$Vend::Captcha = $code;
}
umask $save_u;
};

if($@) {
$Tag->error( { name => $en, set => "Error: $@" });
return '';
}

if($func eq 'code') {
return $code;
}

# Now probably an image function.

unless ($func =~ /ima?ge?/) {
$Tag->error({
name => $en,
set => errmsg("Unknown function %s", $func),
});
return undef;
}

my $path = $opt->{relative} ? "$subdir/$code.png" :
"$imgpath/$code.png";

if(! $opt->{nameonly}) {
return $Tag->image($path);
}
else {
return $path;
}
}

}
EOR

UserTag captcha Documentation <<EOD
=head1 NAME

Interchange [captcha] tag

=head1 SYNOPSIS

[captcha function="check|code|image|relative_image|image_tag"
length="4"
image-subdir="captcha"
image-location="images/captcha"
image-path="/standard/images/captcha"
source="[cgi mv_captcha_source]"
errorname="captcha"
guess="[cgi mv_captcha_guess]"
keepfailed="0"
]

=head1 DESCRIPTION

This tag generates and/or checks "captcha" images to authenticate user
input.
If called for the first time in a page, it generates a code/image pair
and
sets the code in the session (at $Vend::Session->{captcha}).

There are several functions.

=over 4

=item check

Checks the captcha source code (presumably from the previous page)
against
the guess. If it matches, returns 1. If not, returns 0 and puts error
in $Tag->error.

=item code

Returns the generated code. Generates one if not done previously in
session.

=item image

Returns an IMG tag as generated by Interchange's [image] tag. If the
name-only=1 option is passed, no surrounding IMG tag will be generated,
only the image name. If the C<relative=1> option is passed, that name
will not be prefaced with the ImageDir.

=back

The additional options are:

=over 4

=item guess

The input from the user when the function is C<check>. Default is the
contents of [cgi mv_captcha_guess].

=item image-subdir

The image subdirectory (based in images directory) which will
be used.

=item image-path

The base path for URL generation. Default is the Interchange IMAGE_DIR
variable.

=item image-location

The directory where image files will be generated. Default is the
Interchange IMAGE_DIR variable based in the Interchange DOCROOT
variable, with the subdirectory above, i.e. C<[var DOCROOT][var
IMAGE_DIR]/captcha>.

=item length

Length of the input for the captcha. Default is 4 characters.

=item nameonly

When set, tells the image function to not generate an HTML IMG tag.

=item relative

When set, tells the image function (when in name-only mode) to
return relative path.

=item reset

Normally only one captcha code / image will be generated per page
transaction. If this is set, you can generate another one -- though
you would have to take care of saving the generated code yourself,
as $Session->{captcha} is overwritten.

=item source

The captcha base to guess against for the C<check> function. Default is
the
contents of the last-generated captcha, or [cgi mv_captcha_source].

=item keepfailed

Optional. Defaults to zero. This option controls whether or not the
captcha
will remain valid after a failed attempt. By default, we only allow one
attempt to solve it. This greatly reduces the possibility that a bot
could
brute force a correct answer. Change it at your own risk.

=back

=head1 EXAMPLE

[if cgi mv_captcha_guess]
[tmp good][captcha check][/tmp]
[if scratch good]
You guessed right!
[else]
Sorry, try again.
[/else]
[/if]
<br>
[/if]

[captcha function=image]

<form action="[process href="@@MV_PAGE@@"]">
<input type=text name=mv_captcha_guess size value="">
<input type=submit value="Guess">
</form>

[error auto=1]

=head1 PREREQUISITES

Authen::Captcha

=head1 AUTHOR

Mike Heins, <mike AT THE DOMAIN perusion.com>.

EOD

I hope this helps.
Tracy
OvalEye Web Solutions



_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.