• 13-06-2013, 14:52:32
    #1
    Arkadaşlar merhaba. Joomla da kullanılan bir ibleşen hakkında yardımınıza ihtiyacım var. Aşağıdaki tabloda ile elde edilen veriler tek sayfada alt alta sıralanıyor. Ben bu verileri sayfalara ayırmak istiyorum nasıl yapabilirim acaba. Tıknamış durumdayım



    <?php
    /**
    * $Id: default.php 71 2011-06-28 20:42:18Z LSzabo $
    * @Project Saxum Picker Extension/Component
    * @author Laszlo Szabo
    * @package Saxum Picker
    * @copyright Copyright (C) 2010 Saxum 2003 Bt. All rights reserved.
    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
    */
    defined('_JEXEC') or die('Restricted access');
    ?>
    <div>
    <table id="saxumpicker">
    <?php
    if ($this->type->evaluation==1){
    for (
    $i=0, $n=$this->type->pieces; $i < $n; $i++){
    $s=$this->items[$i];
    echo
    '<tr>';
    echo
    '<td STYLE="padding:10px; vertical-align:top;">';
    echo
    JHTML::_('image', $this->path.$s->picture, $i,'id='.$i);
    echo
    '</td><td STYLE="vertical-align:top">';
    echo
    '<h3>'.$s->title.'</h3>';
    echo
    '<h4>'.$s->name.'</h4>';
    echo
    $s->text;
    if (
    $s->text==null) echo JText::_('NO_EVALUATION');
    echo
    '</td>';
    echo
    '</tr>';
    }
    } elseif (
    $this->type->evaluation==0){
    echo
    '<tr><td>';
    $e=$this->spread;
    echo
    $e->title;
    echo
    '</td></tr>';
    echo
    '<tr><td>';
    for (
    $i=0, $n=$this->type->pieces; $i < $n; $i++){
    $s=$this->items[$i];
    echo
    JHTML::_('image', $this->path.$s->picture, $i,'id='.$i);
    }
    echo
    '</td></tr>';
    echo
    '<tr><td STYLE="vertical-align:top">';
    echo
    $e->text;
    if (
    $e->text==null) echo JText::_('NO_EVALUATION');
    echo
    '</td></tr>';
    }
    ?>
    </table>
    </div>
    <?php
    $link
    =JRoute::_('index.php?option=com_saxumpicker&view=picker&Item id='.$this->Itemid.'&islp='.$this->islp);
    ?>
    <div class="readon" style="float:left; margin:20px;"><a href="<?php echo $link;?>"><?php JText::_('TRY_AGAIN')?></a></div>
    <?php
    echo '<form action="'.$link.'" method="post" name="submit">';
    echo
    '<div class="readon" style="float:left; margin:20px;"><input type="submit" value="'.JText::_('TRY_AGAIN').'" name="submitButton" class="button" /></div>';
    echo
    '<input type="hidden" id="typeid" name="typeid" value="'.$this->type->id.'">';
    echo
    '</form>';
    ?>
  • 14-06-2013, 18:52:39
    #2
    Şuradaki gibi bir şey mi? http://galaktikusportal.hu/component...1/view,picker/
    Sayfalama yapılabilir ama tam anlamadım, 6 kart seçtirip tarot falı bakıyor bu sayfadaki
  • 14-06-2013, 20:16:29
    #3
    Aynen. Sizin verdiğin sayfada da sonuclarin hepsi alt alta çıkıyor. Her kartın açıklamasını sayfalandırmak istiyorum.
  • 14-06-2013, 20:38:28
    #4
    Sonuç kısmında sayfalama yapmak için post verileriyle de uğraşmak gerekir.
    O yüzden javascript div mantığıyla yapılması daha kolay olur. Hem tekrar tekrar sayfa yükletmemiş olursun.
  • 14-06-2013, 21:47:51
    #5
    kodlama kısmında çok bilgili değilim. Kodların mantığını çözebiliyorum ilaveler yapamıyorum. Yavaş yavaş olacak hepsi ama biraz yol gösterir misiniz
  • 14-06-2013, 22:04:07
    #6
    Bende js konusunda fazla bilgili değilim ama müsait olunca araştırırım.
  • 14-06-2013, 23:28:47
    #7
    Teşekkürler
  • 15-06-2013, 15:28:14
    #8
    elseif ($this->type->evaluation==0) koşulunda sayfalamaya gerek yok gibi, oraya dokunmadım.

    head tagı arasına:
      <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
    
    <script type='text/javascript'>//<![CDATA[ 
    $(window).load(function(){
    $('#next').click(function() {
        $('.current').removeClass('current').hide()
            .next().show().addClass('current');
        if ($('.current').hasClass('last')) {
            $('#next').attr('disabled', true);
        }
        $('#prev').attr('disabled', null);
    });
    
    $('#prev').click(function() {
        $('.current').removeClass('current').hide()
            .prev().show().addClass('current');
        if ($('.current').hasClass('first')) {
            $('#prev').attr('disabled', true);
        }
        $('#next').attr('disabled', null);
    });
    
    
    });//]]>  
    
    </script>
    <?php 
    /** 
    * $Id: default.php 71 2011-06-28 20:42:18Z LSzabo $ 
    * @Project Saxum Picker Extension/Component 
    * @author Laszlo Szabo 
    * @package Saxum Picker 
    * @copyright Copyright (C) 2010 Saxum 2003 Bt. All rights reserved. 
    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2 
    */ 
    defined('_JEXEC') or die('Restricted access'); 
    ?> 
    <div>
    <button id="prev" disabled="disabled">Önceki</button> <button id="next">Sonraki</button>
    <table id="saxumpicker"> 
    <?php 
    if ($this->type->evaluation==1){ 
    	for ($i=0, $n=$this->type->pieces; $i < $n; $i++){
    		$s=$this->items[$i];
    		if($i==0){
    			echo '<tr class="first current">';
    		}elseif($i==5){
    			echo '<tr class="last">';
    		}else{
    			echo '<tr style="display:none">'; 
    		}
    		echo '<td STYLE="padding:10px; vertical-align:top;">'; 
    		echo JHTML::_('image', $this->path.$s->picture, $i,'id='.$i); 
    		echo '</td><td STYLE="vertical-align:top">'; 
    		echo '<h3>'.$s->title.'</h3>'; 
    		echo '<h4>'.$s->name.'</h4>'; 
    		echo $s->text; 
    		if ($s->text==null) echo JText::_('NO_EVALUATION'); 
    		echo '</td>'; 
    		echo '</tr>'; 
    	} 
    } elseif ($this->type->evaluation==0){ 
    	echo '<tr><td>'; 
    	$e=$this->spread; 
    	echo $e->title; 
    	echo '</td></tr>'; 
    	echo '<tr><td>'; 
    	for ($i=0, $n=$this->type->pieces; $i < $n; $i++){ 
    		$s=$this->items[$i]; 
    		echo JHTML::_('image', $this->path.$s->picture, $i,'id='.$i); 
    	} 
    	echo '</td></tr>'; 
    	echo '<tr><td STYLE="vertical-align:top">'; 
    	echo $e->text; 
    	if ($e->text==null) echo JText::_('NO_EVALUATION'); 
    	echo '</td></tr>'; 
    } 
    ?> 
    </table> 
    </div> 
    <?php 
    $link=JRoute::_('index.php?option=com_saxumpicker&view=picker&Item id='.$this->Itemid.'&islp='.$this->islp); 
    ?> 
    <div class="readon" style="float:left; margin:20px;"><a href="<?php echo $link;?>"><?php JText::_('TRY_AGAIN')?></a></div> 
    <?php 
    echo '<form action="'.$link.'" method="post" name="submit">'; 
    echo '<div class="readon" style="float:left; margin:20px;"><input type="submit" value="'.JText::_('TRY_AGAIN').'" name="submitButton" class="button" /></div>'; 
    echo '<input type="hidden" id="typeid" name="typeid" value="'.$this->type->id.'">'; 
    echo '</form>'; 
    ?>