Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorPieperLy
    • CommentTimeAug 29th 2008
     
    hello sidtheduck,

    i'am now on update...and have a question:
    how can i modify the breadcrumb on picture.php from picture-description to picture-name?
    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008 edited
     
    Posted By: PieperLyhow can i modify the breadcrumb on picture.php from picture-description to picture-name?
    Open 'plog-content/plog-functions.php' and edit the code in generate_breadcrumb() (should be about line 55):
    $picture_name = '<span id="image_name"><strong>' . SmartStripSlashes(get_caption_filename($row)) . '</strong></span>';
    and change it to:
    $picture_name = '<span id="image_name"><strong>' . SmartStripSlashes(basename($row['path'])) . '</strong></span>';
    • CommentAuthorPieperLy
    • CommentTimeAug 29th 2008
     
    thanks...and sorry for wrong thread - i'm be in a disarray

    ....you mean...basename instead baseneme

    thanks again
    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008
     
    Posted By: PieperLy....you mean...basename instead baseneme
    Yep, I have fumbly fongers today :P
    • CommentAuthorPieperLy
    • CommentTimeAug 29th 2008
     
    the captcha don't work. i have that enable with code from above, but comments are going with and without captcha.
    have you an idea?

    sorry for my get on someone's nerves ;-)

    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008 edited
     
    Sorry, you also have to add:
    <?php plogger_require_captcha(); ?>

    So it should be:
    <?php plogger_require_captcha(); ?>
    <p>
    <img src="'.$config["gallery_url"].'plog-captcha.php" alt="CAPTCHA Image" id="captcha-image" />
    </p>
    <p>
    <input type="text" name="captcha" id="captcha" value="" size="28" tabindex="3" />
    <label for="url">' . plog_tr('What does this say') . '?</label>
    </p>
    • CommentAuthorPieperLy
    • CommentTimeAug 29th 2008
     
    don't work

    Notice: Undefined index: url in /homepages/xx/xxxxxxx/htdocs/oldskoolman/bilder/plog-includes/plog-comment.php on line 25

    Notice: Undefined index: url in /homepages/xx/xxxxxxx/htdocs/oldskoolman/bilder/plog-includes/plog-comment.php on line 28

    25: if (check_url($_POST["url"]) == "http"){

    28: else if (check_url($_POST["url"]) == "nohttp"){

    comments working continue with and without captcha include errormessage.
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008
     
    I just noticed I mistyped and missed a ? for the opening <?php tag
    • CommentAuthorPieperLy
    • CommentTimeAug 29th 2008 edited
     
    yes i have see this and correct this, but don't work...

    your code is other as th code from above. your code not parsed, i use this code in comment.php from default theme:



    <?php plogger_require_captcha(); ?>
    <p>
    <img src="<?php echo $config["gallery_url"].'plog-includes/plog-captcha.php'; ?>" alt="CAPTCHA Image" id="captcha-image" />
    </p>
    <p>
    <input type="text" name="captcha" id="captcha" value="" size="28" tabindex="3" />
    <label for="url"><?php echo plog_tr('Gib hier die Zeichen aus dem kleinen Bild obendrüber ein.'); ?></label>
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008
     
    You're correct. It looks like the CAPTCHA is broken in the current SVN trunk. I hadn't noticed that before. I'll take a look at it and let you know what I can find.
    • CommentAuthorPieperLy
    • CommentTimeAug 30th 2008
     
    every time when i reload site after comment, added comment also every time - form must this intercept.

    reagards from germany
    uwe
    ps: sorry for my english...is a rest of school english for 30 years ago and lexirom ;-)
    • CommentAuthorPieperLy
    • CommentTimeSep 2nd 2008 edited
     
    hello,

    is for the captchaproblem a solution in sight?
    reagards from germany
    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 2nd 2008
     
    I haven't had time to work on it right at the moment, PieperLy. I'll try to make it a priority, but this week looks to be pretty slammed.
    • CommentAuthorPieperLy
    • CommentTimeSep 2nd 2008 edited
     
    okay, than i must wait.

    through the new seo function with trailing slash, bots can see the old ...jpg sites as html and find the commentsform. without a spamwall is commentform a risk.
    i become see.

    reagards from germany
    uwe
    • CommentAuthorPieperLy
    • CommentTimeSep 6th 2008
     
    hello,

    i change the code in plog-includes/plog-comment.php...and now it works

    the lines with

    first get all the neccessary variables
    if (check_url($_POST["url"]) == "http"){
    $url = $_POST["url"];// }
    else if (check_url($_POST["url"]) == "nohttp"){
    $url = "http://".$_POST["url"];
    }
    else{// $url = "";
    }
    don't work...
    .
    .
    .
    change plog-comment.php to:
    <?php
    // this is our comment script, it simply writes the comment information
    // to our database and links it to the picture using the pictures id

    if (basename($_SERVER['PHP_SELF']) == basename( __FILE__ )) {
    // ignorance is bliss
    exit();
    }

    // Loosly validate url string format without actually checking the link (cause that takes time)
    function check_url($url) {
    if (preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $url)) {
    return "http";
    }
    else if (preg_match('#^[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $url)) {
    return "nohttp";
    }
    else {
    return "badurl";
    }
    }

    // first get all the neccessary variables

    // if (check_url($_POST["url"]) == "http"){
    // $url = $_POST["url"];
    // }
    // else if (check_url($_POST["url"]) == "nohttp"){
    // $url = "http://".$_POST["url"];
    // }
    // else{
    // $url = "";
    // }

    $parent_id = intval($_POST["parent"]);

    // If the captcha is required, check it here

    if (($_POST['captcha'] != $_SESSION['captcha']) || !$_POST['captcha']) {
    $_SESSION["comment_post_error"] = "CAPTCHA check failed!";
    return;
    }

    $rv = add_comment($parent_id,$_POST["author"],$_POST["email"],$_POST["comment"]);

    // redirect back to picture page
    if (isset($rv['errors'])) {
    // will this work?
    $_SESSION['comment_post_error'] = $rv['errors'];
    }
    else if ($config['comments_moderate']) {
    $_SESSION['comment_moderated'] = 1;
    }

    ?>


    when every come an errormessage with bad variable "url", i delete the call of the variable in this line

    now i have two still problems:

    1. how can i reload the captcha image without lose the form inputs?

    2. how can i use a different errormessage for captchafield to formfields?

    reagards from germany, have a nice weekend :-)
    uwe