Changeset 457


Ignore:
Timestamp:
06/03/10 15:34:54 (20 months ago)
Author:
aarkerio
Message:

Bugs fixed

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/controllers/comentnews_controller.php

    r386 r457  
    1414class ComentnewsController extends AppController 
    1515{    
    16  public $helpers    = array('Ajax', 'Time'); 
     16 public $helpers    = array('Time'); 
    1717     
    1818 public $components = array('Captcha', 'Mailer'); 
  • trunk/views/elements/new.ctp

    r400 r457  
    9494                          $avatar = $this->Html->image('avatars/'.$v['User']['avatar'],  
    9595                            array('alt'=>$v['User']['username'], 'title'=>$v['User']['username'],  'height'=>20, 'width'=>20)); 
    96                   $user   = $this->Html->link($v['User']['username'], '/users/about/'.$v['User']['username']) .' '; 
    97                   $user  .= $this->Html->link($avatar, '/users/about/'.$v['User']['username'], null, null, false); 
    98               else:                                                                                               
     96                      $user   = $this->Html->link($v['User']['username'], '/users/about/'.$v['User']['username']) .' '; 
     97                  $user  .= $this->Html->link($avatar, '/users/about/'.$v['User']['username'],array('escape'=>False)); 
     98                  else:                                                                                               
    9999                  $avatar = $this->Html->image('avatars/t_icon.jpg', array('alt'=>$v['name'], 'title'=>$v['name'], 'height'=>20, 'width'=>20)); 
    100100                  $user   = '<span style="font-weight:bold;">' . $v['name'] .'</span>  ' .  $avatar ;     
    101               endif; 
     101                  endif; 
    102102               
    103103              echo $this->Html->div('comentnew', null, array('style'=>'background-color:'.$bg));   
    104                   echo  '<span style="font-weight:bold;color:#000;">'.$i.'.-</span> '.$user . '<br />'; 
    105                   echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['name']    . '</b> wrote:<br />'; 
    106                   echo nl2br(h($v['comment'])); 
     104              echo  '<span style="font-weight:bold;color:#000;">'.$i.'.-</span> '.$user . '<br />'; 
     105              echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['name']    . '</b> wrote:<br />'; 
     106              echo nl2br(h($v['comment'])); 
    107107              echo '</div>'; 
    108108              $i++; 
     
    110110        echo '</div>'; 
    111111        # Print comment form     
    112         echo $this->Form->create('Comentnews'); 
     112        echo $this->Form->create('Comentnews', array('action'=>'add')); 
    113113        echo $this->Form->hidden('Comentnews.new_id', array('value'=>$val['News']['id']));  
    114114        echo $this->Form->hidden('Comentnews.user_id', array('value'=>$val['News']['user_id']));  
     
    125125        else:  # anonymous user 
    126126            echo $this->Form->hidden('Comentnews.user_id', array('value'=>0)); 
    127             echo $this->Form->label('Comentnews.name', ' Nombre (requerido)' ); 
    128127            echo $this->Form->input('Comentnews.name', array('size' => 25, 'maxlength' => 50)); 
    129             echo $this->Form->error('Comentnews.name', 'Name is required.'); 
    130128      
    131129            echo '<br /><br /> <img src="'. $this->Html->url('/comentnews/captcha') .'" alt="Captcha" /> <br />'; 
    132             echo $this->Form->input('Comentnews.captcha', array('size' => 6, 'maxlength' => 6)); 
    133             echo $this->Form->label('Comentnews.captcha', 'Introduce el codigo, todas la letras son minusculas' ); 
     130            echo $this->Form->input('Comentnews.captcha',array('size'=>6,'maxlength'=>6,  'label'=>'Introduce el codigo, todas la letras son minusculas')); 
    134131        endif; 
    135132 
     
    142139 endif;     
    143140 echo '</div>'; 
    144 # ? > 
     141 
     142# ? > EOF 
  • trunk/views/news/display.ctp

    r392 r457  
    11<?php 
    2    $this->Html->div('cintillo', 'Noticias'); 
    3    $this->Html->div('barra', 'Noticias del mundo libre'); 
    4    echo $this->element('new', array('cache' => false, 'val'=>$data, 'frontend'=>false)); 
    5 ?>    
     2echo   $this->Html->div('cintillo', 'Noticias'); 
     3echo   $this->Html->div('barra', 'Noticias del mundo libre'); 
     4echo $this->element('new', array('cache' => false, 'val'=>$data, 'frontend'=>false)); 
     5# ? > EOF    
Note: See TracChangeset for help on using the changeset viewer.