Changeset 274 for trunk/app/views/users/entry.ctp
- Timestamp:
- 02/22/08 22:39:23 (9 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/users/entry.ctp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/users/entry.ctp
r264 r274 13 13 $pl = 'Permalink: http://' . $_SERVER['SERVER_NAME'] . '/users/entry/'.$blog["User"]["username"].'/'.$entry_id; 14 14 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)); 16 16 17 17 if ( $discution == 1 ) … … 26 26 if ( $discution == 1 ) //is the comments in this entry actived by blogger? 27 27 { 28 if ( ! $othAuth->sessionValid() ) // if user logged, anchor to textarea28 if ( !isset( $cU['User'] ) ) // if user logged, anchor to textarea 29 29 { 30 30 echo '<div id="comments">' . $html->image('static/comment.gif', array("alt"=>"Comments")) . ' Comments:</div>'; … … 53 53 54 54 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); 58 58 59 if ( $othAuth->sessionValid() )59 if ( isset( $cU['User']['id'] ) ) 60 60 { 61 61 ?> … … 63 63 <legend id="new_comment">New Comment</legend> 64 64 <?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:"; 68 68 ?> 69 69 <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.'); ?> 73 73 </p> 74 74 <br /> 75 <?php echo $ html->submit('Send') ?>75 <?php echo $form->end('Send') ?> 76 76 </fieldset> 77 77 </form> … … 80 80 else 81 81 { 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')); 83 83 } 84 84
