Show
Ignore:
Timestamp:
02/22/08 22:39:23 (9 months ago)
Author:
aarkerio
Message:

Update karamelo to 1.2 cake version

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/users/entry.ctp

    r264 r274  
    1313    $pl = 'Permalink: http://' . $_SERVER['SERVER_NAME'] . '/users/entry/'.$blog["User"]["username"].'/'.$entry_id; 
    1414     
    15     echo '<p><a style="font-size:7pt" href="/users/entry/'.$blog["User"]["username"].'/'.$entry_id.'">'.$pl.'</a></p>'; 
     15    echo $html->para(null, $html->link($pl, '/users/entry/'.$blog["User"]["username"].'/'.$entry_id)); 
    1616     
    1717    if ( $discution == 1 )  
     
    2626    if ( $discution == 1 )  //is the comments in this entry actived by blogger? 
    2727    { 
    28         if ( !$othAuth->sessionValid() )  // if user logged, anchor to textarea 
     28        if ( !isset( $cU['User'] ) )  // if user logged, anchor to textarea 
    2929        { 
    3030                 echo '<div id="comments">' . $html->image('static/comment.gif', array("alt"=>"Comments")) . ' Comments:</div>'; 
     
    5353         
    5454         
    55         echo $html->formTag('/comments/add/','post', array("onsubmit"=>"return chkForm()")); 
    56         echo $html->hiddenTag('Comment/redirect_to', '/users/entry/'.$blog["User"]["username"].'/'.$entry_id); 
    57         echo $html->hiddenTag('Comment/entry_id', $entry_id); 
     55        echo $form->create('Comments', array("onsubmit"=>"return chkForm()", "action"=>"add")); 
     56        echo $form->hidden('Comment.redirect_to', '/users/entry/'.$blog["User"]["username"].'/'.$entry_id); 
     57        echo $form->hidden('Comment.entry_id', $entry_id); 
    5858         
    59         if ( $othAuth->sessionValid() ) 
     59        if ( isset( $cU['User']['id'] ) ) 
    6060        { 
    6161?> 
     
    6363         <legend id="new_comment">New Comment</legend> 
    6464         <?php 
    65             echo $html->hidden('Comment/user_id', array("value"=>$othAuth->user('id'))); 
    66             echo $html->hidden('Comment/username', array("value"=>$othAuth->user('username'))); 
    67             echo $othAuth->user('username') . "  writes:"; 
     65            echo $html->hidden('Comment.user_id', array("value"=>$cU['User']['id'] )); 
     66            echo $html->hidden('Comment.username', array("value"=>$cU['User']['username'])); 
     67            echo $cU['User']['username'] . "  writes:"; 
    6868         ?> 
    6969         <p> 
    70          <?php echo $form->labelTag('Comment/comment', 'Comment:' );?><br /> 
    71          <?php echo $html->textarea('Comment/comment', array("rows" => 10, "cols" => 50)); ?> 
    72          <?php echo $html->tagErrorMsg('Comment/comment', 'A comment is required.'); ?> 
     70         <?php echo $form->labelTag('Comment.comment', 'Comment:' );?><br /> 
     71         <?php echo $form->textarea('Comment.comment', array("rows" => 10, "cols" => 50)); ?> 
     72         <?php echo $form->error('Comment.comment', 'A comment is required.'); ?> 
    7373         </p> 
    7474         <br /> 
    75          <?php echo $html->submit('Send') ?> 
     75         <?php echo $form->end('Send') ?> 
    7676         </fieldset> 
    7777         </form> 
     
    8080         else 
    8181         { 
    82             echo '<p>' . $html->link('You must be logged to write a comment', '/users/login'). '</p>'; 
     82            echo $html->para(null, $html->link('You must be logged to write a comment', '/users/login')); 
    8383         } 
    8484