Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #11  
Old 07-18-2007, 03:53 AM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
I remember the team had said it has a strong security on anti-spam,do we need this addon on pp1.6?
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
  #12  
Old 07-18-2007, 04:12 AM
JETC Offline
pp regular
 
Join Date: Mar 2006
Posts: 36
I still got spams without captcha on 1.6 so I just still implemented it. I'm probably going to recode the comments and use AJAX or something instead of captcha to prevent spam. I'll have to see but captcha has done wonders. Completely zero spam when it's in effect so I'm not complaining at all.
__________________
JETCs Photoblog
Reply With Quote
  #13  
Old 08-14-2007, 05:07 PM
weberknecht's Avatar
weberknecht Offline
forum loafer
 
Join Date: Aug 2007
Location: near cologne
Posts: 11
thank u so much its works beautyfull
Reply With Quote
  #14  
Old 08-25-2007, 03:38 PM
jesperj's Avatar
jesperj Offline
forum loafer
 
Join Date: Mar 2007
Location: Sweden
Posts: 15
I've installed this hack and it works fine with my default langugage (english) image_template.html but on my image_se_template.html, the <CAPTCHA> tag simply isn't replaced. I've been desperately trying various things to hack the code to work for me but since I suck at such things, I have to give up. I reuploaded the default addon index.php on my site for now.

I found that if I replaced this section in the code:

PHP Code:
 else

  {

      
// we use our special designed language templates.

      
if( isset($_GET['x'])&&file_exists"templates/".$cfgrow['template']."/".$_GET['x']."_".$language_abr."_template.html"))

        {

        if (
eregi("[.]",$_GET['x']))

        die(
"Come on! forget about it...");

      
$tpl file_get_contents("templates/".$cfgrow['template']."/".$_GET['x']."_".$language_abr."_template.html");

        
//next 1 line for CAPTCHA hack --- insert by Chaney SUN

    
$tpl str_replace("<CAPTCHA>","<input type='text' name='userinput' class='input' value='' id=\"userinput\"/>&nbsp;&nbsp;&nbsp; <label for=\"userinput\">"$captcha_insert_message ."</label><br /><br /><img src=\"./includes/captcha.php\"><br><br /> ",$tpl);      

        } 
with:

PHP Code:
  else

  {

      
// we use our special designed language templates.

      //if( isset($_GET['x'])&&file_exists( "templates/".$cfgrow['template']."/".$_GET['x']."_".$language_abr."_template.html"))

          
if(file_exists"templates/jj2/image_se_template.html")) 
        {

        
//if (eregi("[.]",$_GET['x']))

       // die("Come on! forget about it...");

      //$tpl = file_get_contents("templates/".$cfgrow['template']."/".$_GET['x']."_".$language_abr."_template.html");
       
$tpl file_get_contents("templates/jj2/image_se_template.html");

        
//next 1 line for CAPTCHA hack --- insert by Chaney SUN

    
$tpl str_replace("<CAPTCHA>","<input type='text' name='userinput' class='input' value='' id=\"userinput\"/>&nbsp;&nbsp;&nbsp; <label for=\"userinput\">"$captcha_insert_message ."</label><br /><br /><img src=\"./includes/captcha.php\"><br><br /> ",$tpl);      

        } 

If I do that, the swedish archive gets broken BUT the captcha does work on the swedish image comment function. Some errors in finding my swedish templates?

I hope someone here can help me. It works if you try it in the english version.
Even if you don't know swedish the links are placed on the same spot so it shouldn't be too hard to figure out for debugging.

http://www.jesperjacobsson.com/

Thank you very much in advance. My brain is toast now.
Reply With Quote
  #15  
Old 08-26-2007, 02:07 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Jesper, you should not code the image_template manually. The template selection is dynamically based on $_GET['x'], so doing this doesn't makes any sense.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #16  
Old 08-26-2007, 02:11 PM
jesperj's Avatar
jesperj Offline
forum loafer
 
Join Date: Mar 2007
Location: Sweden
Posts: 15
Dennis,

Ok. I have to look into how to make a proper template then, since if I understand your answer correctly, the one I'm using now is not correct.

Alas, that will have to wait till a day when I'm not zombified by depressive symptoms.

Thank you.

A lot of things don't make sense.
Reply With Quote
  #17  
Old 08-26-2007, 02:24 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Perhaps you could send me the template so I can have a look.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #18  
Old 08-26-2007, 02:40 PM
jesperj's Avatar
jesperj Offline
forum loafer
 
Join Date: Mar 2007
Location: Sweden
Posts: 15
Oh Dennis

That is a very sweet offer.

You must have better things to do with your time but how can I resist if you say so.

I will pm you an URL where I have uploaded a zip with the files.

Thank you very much!

Jesper
Reply With Quote
  #19  
Old 09-06-2007, 05:15 PM
mauritz Offline
pp regular
 
Join Date: Jun 2006
Posts: 48
Nice, it works for me.
Now just wait and see if it stops the spam flood

But one question; how can I adjust the position of the field, text and the captcha image. Right now it's first the field, then a text (type over the code please) and below that the captcha image.
Is it possible to adjust these things?
Reply With Quote
  #20  
Old 09-06-2007, 07:24 PM
sentinel's Avatar
sentinel Offline
pixelpost guru
 
Join Date: Sep 2005
Posts: 130
you've to change 2 lines in the index.php file

the following snippeds assume you're using the addon for pp 1.6

PHP Code:
line 260 and 272:
     
$tpl str_replace("<CAPTCHA>","<input type='text' name='userinput' class='input' value='' id=\"userinput\"/>&nbsp;&nbsp;&nbsp; <label for=\"userinp
        ut\">"
$captcha_insert_message ."</label><br /><br /><img src=\"./includes/captcha.php\"><br><br /> ",$tpl); 
you have to modify the second part of the str_replace command (beginning with "<input type... ") the way you want. but change the code the same way in both lines in case you want to switch the template (comments in popup or not)
__________________
my pp
good day good light
\martin_d
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:42 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs