Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 08:48:33 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: 1 2 3 4 [5] 6 7 8 9 ... 40   Go Down
  Send this topic  |  Print  
Author Topic: Captcha (Visual Confirmation) for comments/registration/reporting/login/ecard  (Read 222713 times)
0 Members and 1 Guest are viewing this topic.
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #80 on: November 08, 2006, 05:16:48 am »

Ok I will try to update to the most recent version as soon as I have the time... Wink
But I thought this plugin was for 1.4X?  Huh Anyway...
In fact I guess that you may change $template_gallery_admin_menu variable under themes.inc.php and it's cause the issue , but after all you must upgrade ASAP for security reason and upgrade proccess will over write new themes.inc.php and will correct it ...
Another question, is it possible to change the display of the comment box. In my theme (eyeball), the comment box is beside the name box and it is appearing small. can I put the comment box below the name box? This way it will take all the space from the left to the right.

http://claudebriere.net/coppermine/displayimage.php?pos=-1697&PHPSESSID=aa633cb40c4535680cce9ca26c87fcf0
Yes it's possible
- Copy $template_image_comments variable from themes/sample/theme.php to your theme , if you don't have it already
- Move the textarea to a new TR
Logged

‍I don't answer to PM with support question
Please post your issue to related board
m@rk
Contributor
***
Gender: Male
Posts: 39


« Reply #81 on: December 12, 2006, 01:24:08 am »

Here's my German Translation, but...

I'm wondering why the Language Detection in "init.inc.php" doesn't seem to work ??

I had to rename "german.php" to "english.php" to get results - this is curious ...

* german.php.zip (0.61 KB - downloaded 204 times.)
Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #82 on: December 12, 2006, 05:36:13 am »

Your German.php works fine with my test bed !
what version of captcha plugin you're using?
Logged

‍I don't answer to PM with support question
Please post your issue to related board
m@rk
Contributor
***
Gender: Male
Posts: 39


« Reply #83 on: December 12, 2006, 01:39:38 pm »

You say it works? Strange thing.
I'm using CAPTCHA v1.7, currently attached in the very first post of this thread, running with CPG 1.4.10.

I thought this might be related to the language detection in include/init.inc.php:

Code:
if (file_exists("plugins/captcha/lang/{$CONFIG['lang']}.php")) {
  require "plugins/captcha/lang/{$CONFIG['lang']}.php";
} else {require "plugins/captcha/lang/english.php";}


* captcha_01.png (2.47 KB, 239x111 - viewed 403 times.)

* captcha_02.png (6.96 KB, 275x82 - viewed 355 times.)
Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #84 on: December 12, 2006, 08:47:36 pm »

would you please post a link to your gallery
Logged

‍I don't answer to PM with support question
Please post your issue to related board
m@rk
Contributor
***
Gender: Male
Posts: 39


« Reply #85 on: December 13, 2006, 12:55:46 am »

Hallo Sami,

thank you for engagement!

I didn't implement your fine plugin in my gallery finally, since I want to make layout modifications first.

The problem occurs in following test environment:

XAMPP for Windows Version 1.5.3a
Apache/2.2.2 (Win32)
PHP/5.1.4

while similar language detection with other plugins works.
Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #86 on: December 13, 2006, 06:27:34 am »

Can you enable debug mode and see if it's giving you any error
And also check if file_exists is enable and working (safe mode restrictions)
Logged

‍I don't answer to PM with support question
Please post your issue to related board
Tommy2506
Coppermine newbie

Posts: 2


« Reply #87 on: December 13, 2006, 08:48:00 pm »

Hello

I have problem with this plugin

After instalation everything seemd to be ok

but when you enter wrong cnofirmation code and pressed OK in order to add a comment there appears some window with

Code:
Template error
Failed to find block 'admin_approval'(#(<!-- BEGIN admin_approval -->)(.*?)(<!-- END admin_approval -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>

                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>

this above
My theme is
Code:
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  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.
  ********************************************
  Coppermine version: 1.4.5
  $Source:$
  $Revision$
  $Author$
  $Date$
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
// define('THEME_IS_XHTML10_TRANSITIONAL',1);

// Added to display flim_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&amp;cat=' $cat;

    
$thumbcols $CONFIG['thumbcols'];
    
$cell_width ceil(100 $CONFIG['max_film_strip_items']) . '%';

    
$i 0;
    
$thumb_strip '';
    foreach(
$thumb_list as $thumb) {
        
//modify $new_size for max dimension of thumbnails in filmstrip
        
$new_size 65;
        
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcWidth=$matches[0][0];
        
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcHeight=$matches[0][0];
        
$ratio max($srcWidth$srcHeight) / $new_size;
        
$ratio max($ratio1.0);
        
$destWidth = (int)($srcWidth $ratio);
        
$destHeight = (int)($srcHeight $ratio);
        
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
        
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
        
$i++;
        if (
$mode == 'thumb') {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        }
        
$thumb_strip .= template_eval($thumb_cell$params);
    }

    if (
defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
        
$tile1 $THEME_DIR 'images/tile1.gif';
        
$tile2 $THEME_DIR 'images/tile2.gif';
    } elseif (
defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
        
$tile1=$tile2=$THEME_DIR 'images/tile.gif';
    } else {
        
$tile1=$tile2'images/tile.gif';
    }

    
$params = array('{THUMB_STRIP}' => $thumb_strip,
        
'{COLS}' => $i,
        
'{TILE1}' => $tile1,
        
'{TILE2}' => $tile2,
        );

    
ob_start();
    
starttable($CONFIG['picture_table_width']);
    echo 
template_eval($template$params);
    
endtable();
    
$film_strip ob_get_contents();
    
ob_end_clean();

    return 
$film_strip;
}

// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left" valign="middle"><img src="themes/fiblack3dgreen/images/folder.gif" border="0" width="25" height="25" alt="" align="left" />{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td valign="middle"><img src="themes/fiblack3dgreen/images/folder.gif" border="0" width="25" height="25" alt="" align="left" />{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;


?>



Sorry if I've done sth wrong - My English is very poor ;]

My gallery adres is http://www.delirium.ovh.org
 
Please help me Smiley what should I do ?
« Last Edit: December 14, 2006, 02:39:20 pm by Tommy2506 » Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #88 on: December 14, 2006, 06:16:50 am »

Rename your theme.php (themes/your theme/theme.php) to theme.txt and attach it to this thread using additional option
Logged

‍I don't answer to PM with support question
Please post your issue to related board
Tommy2506
Coppermine newbie

Posts: 2


« Reply #89 on: December 15, 2006, 01:24:20 pm »

I've added my theme php in my post above , and I still don't know what to do ?
Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #90 on: December 16, 2006, 04:48:45 am »

Tommy you are running 1.4.2 which is very old !
Upgrade to 1.4.10 and you'll be fine
Logged

‍I don't answer to PM with support question
Please post your issue to related board
spikeweb
Coppermine newbie

Posts: 4


« Reply #91 on: December 22, 2006, 09:50:54 am »

Hi all,
Attached is the french translation  Wink
But I had to modify english.php in lang folder as french.php is not recognized ??

* french.zip (0.61 KB - downloaded 216 times.)
Logged
HF OADA
Coppermine newbie

Posts: 4


« Reply #92 on: January 04, 2007, 08:19:24 pm »

Hi,

attached the dutch translation.
I see that I'm not the only one that's having troubles with getting the correct language file to be set. I've had to hard code mine to set it as dutch as default instead of english. Is there something wrong with the language selection of this plugin or is it something related to coppermine? To make it clear I'm running version 1.4.10 at the moment. You can see the version running at the following URL: http://vakantieparken.hfoada.nl

With kind regards,
HF OADA

* dutch.zip (0.61 KB - downloaded 204 times.)
Logged
moli
Coppermine newbie

Posts: 8


« Reply #93 on: January 04, 2007, 11:10:30 pm »

i've installed the plugging, it seems to work but imagen is not clearly readeble
Logged
BigWig
Coppermine newbie

Posts: 5


« Reply #94 on: January 08, 2007, 10:36:00 am »

Hi Sami,

I have overwrote the codebase.php included to Captcha plugin v1.7 form first message of this topic with your codebase.php for Captcha registration attached to your message http://forum.coppermine-gallery.net/index.php?topic=36319.msg180154#msg180154, however on the registration page I don’t see any visual confirmation, whereas Captcha for comments is working well down.
Could you please advice me what I did wrong?
My album updated to 1.4.10 and located here http://stepclub.net .

Thank you.
Logged
BigWig
Coppermine newbie

Posts: 5


« Reply #95 on: January 08, 2007, 08:50:50 pm »

Sorry, after reinstalling all works fine!

Thank you!
Logged
JvM
Coppermine newbie

Posts: 4


« Reply #96 on: January 14, 2007, 10:49:22 pm »

Is there a possibility to use this plugin without a freetype GD.
The next code works perfect it gives a verification code, however it isn't working correct. You can enter the comment without code too.
I pasted this code in catcha.php and commented (//) the require(...class..) and the constructors ($oPhpCaptcha)

Code:
session_start();

// !!! don't edit this file except for the hex code for the background color - line 27 and line 30 for text color
// go to http://web.forret.com/tools/color.asp for color conversions - do not edit any other lines!!!

// make a string with all the characters that we want to use as the verification code
// left out o, 0, U and V - look too much alike
$alphanum  = "ABCDEFGHIJKLMNPQRSTWXYZ123456789";

// generate the verication code
$rand = substr(str_shuffle($alphanum), 0, 5);

// create the hash for the verification code and put it in the session
$_SESSION['php_captcha'] = md5($rand);

// create the image
$image = imagecreate(60, 23);

// use lite blue as the background image - change the hex code to match your background - ex. 245, 245, 255 is light blue; 255, 255, 255 would be white on so on - go to http://web.forret.com/tools/color.asp for color conversions
$bgColor = imagecolorallocate ($image, 245, 245, 255);

// the text color is black - change the hex code to clor of your choice - ex. 0, 0, 0 is black
$textColor = imagecolorallocate ($image, 0, 0, 0);

// write the random number
imagestring ($image, 5, 5, 8, $rand, $textColor);
   
// send several headers to make sure the image is not cached   
// taken directly from the PHP Manual
   
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");

// send the content type header so the image is displayed properly
header('Content-type: image/png');

// send the image to the browser
imagepng($image);

// destroy the image to free up the memory
imagedestroy($image);
Logged
moli
Coppermine newbie

Posts: 8


« Reply #97 on: January 17, 2007, 09:48:47 pm »

i´ve tryed other ways with out fortune. now, I´'m doing all steps but captcha don't apear on plugins installed (but it's on plugins folder)

i'm getting crazy.
Logged
moli
Coppermine newbie

Posts: 8


« Reply #98 on: January 17, 2007, 10:05:41 pm »

don't pluging installed solved.
but it can´t be read.

http://usuarios.lycos.es/moliterni/web/displayimage.php?album=lastup&cat=0&pos=7

why?
Logged
Sami Topic starter
Dev Team member
****
Gender: Male
Iran, Islamic Republic of Iran, Islamic Republic of

Posts: 3689


BMossavari


WWW
« Reply #99 on: January 18, 2007, 08:42:06 am »

You should have FreeType support on your PHP and you don't have
this means you can't use this plugin try another solutions
Logged

‍I don't answer to PM with support question
Please post your issue to related board
Pages: 1 2 3 4 [5] 6 7 8 9 ... 40   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.08 seconds with 17 queries.