Please post full example code
Posted: 02 April 2009 09:54 AM   Ignore ]  
Member
RankRankRank
Total Posts:  87
Joined  2008-11-13

I have been messing with this pagination script for hours. I have the hook in, but I am not sure how to setup my expression engine template. The class is not being put into anything.

Please just post the code of a working examle:
I need the CSS and the expression engine template code that makes it work.

Thanks

Profile
 
Posted: 02 April 2009 11:58 PM   Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

Here is the template from our Showcase:

{exp:weblog:entries weblog="just_released" orderby="date" dynamic="on" limit="2" rdf="off" disable="trackbacks" pagination="bottom" link_class="pagi_style"}

<div id="just_released">
    <
div class="jr_title">
        <
div class="jr_title_text">
            <
h3>Just Released<br /></h3>
            <
h4>{title}</h4>
        </
div>
    </
div>
        <
div class="jr_image">
          
{featured_image}
        
</div>
            <
div class="jr_text">
            
{featured_summary}
            
<br />
            
{featured_body}
            
<br />
            
{featured_extended}
            
            
            
<div class="jr_table">
                <
div class="jr_table_left">
                
Technology:<br />
                
Platform:<br />
                
Credits:<br />
                
TTL:<br />
                </
div>
                
                <
div class="jr_table_right">
                                
{featured_technology}
                {featured_platform}
                {featured_credits}
                {featured_ttl}
                
</div>
            </
div>
        </
div>
        
        
  
</
div>

<
br class="clear">

<
hr>
<
div class="jr_title">
<
div class="jr_title_text">
        
{paginate}
            {if 
"{total_pages}" != 1}Page {current_page} of {total_pages} pages {pagination_links}{/if}
        {
/paginate}
</div>
</
div


and here is the CSS:

.pagi_style a:link, .pagi_style a:visited {
    background
-color#efefef;
}

.pagi_style a:hover {
    color
#fff;
}

.pagi_style {
    border
solid 1px #aaaaaa;
    
padding2px 4px 2px 4px;
    
margin-left8px;
    
Signature 

Mike

HCC Development

Profile
 
Posted: 03 April 2009 08:19 AM   Ignore ]   [ # 2 ]  
Member
RankRankRank
Total Posts:  87
Joined  2008-11-13

Ive got everything setup the way it should be, but the class is not being inserted into the tags like its supposed to.

It even breaks the pagination stuff out from its containing

any ideas?

Profile
 
Posted: 03 April 2009 04:09 PM   Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

can you post your pagination core file (at least the top w/ the hack)

Signature 

Mike

HCC Development

Profile
 
Posted: 03 April 2009 05:30 PM   Ignore ]   [ # 4 ]  
Member
RankRankRank
Total Posts:  87
Joined  2008-11-13
Filecore.paginate.php
-----------------------------------------------------
 
PurposeThis class creates links like this

    
First 3 4 [5] 6 7 Last
=====================================================
*/

if ( ! 
defined('EXT'))
{
    
exit('Invalid file request');
}



class Paginate {

        
var $base_url         ''// The page we are linking to (when using this class in the CP)
        
var $path            ''// The page we are linking to (when using this class in a public page)
        
var $prefix            ''// A custom prefix added to the path.
        
var $suffix            ''// A custom suffix added to the path.
        
var $qstr_var         ''// The name of the query string variable containing current page number
        
var $cur_page         ''// The current page being viewed
        
var $total_count      ''// Total number of items (database results)
        
var $per_page         ''// Max number of items you want shown per page
        
var $max_links        =  2// Number of "digit" links to show before/after the currently viewed page
        
var $first_page       '';
        var 
$last_page        '';
        var 
$next_link        '>';
        var 
$prev_link        '<';
        var 
$first_marker    '&laquo;';
        var 
$last_marker    '&raquo;';
        var 
$first_url        ''// Alternative URL for the First Page.
        
var $first_div_o    '';
        var 
$first_div_c    '';
        var 
$next_div_o        '';
        var 
$next_div_c        '';
        var 
$prev_div_o        '';
        var 
$prev_div_c        '';
        var 
$num_div_o        '';
        var 
$num_div_c        '';
        var 
$cur_div_o        '';
        var 
$cur_div_c        '';
        var 
$last_div_o        '';
        var 
$last_div_c        '';

    
/** ----------------------------------------
    /**  Constructor
    /** ----------------------------------------*/

    
function Paginate()
    
{
        
global $LANG;               
    
}
    
/* END */

      
    /** ----------------------------------------
    /**  Show links
    /** ----------------------------------------*/

    
function show_links()
    
{
        
global $IN$FNS$LANG$EXT;
        
        
// -------------------------------------------
        // 'paginate_edit_object' hook.
        //  - Rewrite the show_links function in the core file and change variables
        //    ADDED BY HCCDevelopment 08/19/08 Brian Greenacre
        //
            
if ($EXT->active_hook('paginate_edit_object') === TRUE)
            
{
                $edata 
$EXT->universal_call_extension('paginate_edit_object'$this);
                if (
$EXT->end_script === TRUE) return;
            
}
        
//
        // -------------------------------------------
        
        /** ----------------------------------------
        /**  Do we have links to show?
        /** ----------------------------------------*/
                    
        // If our item count or per-page total is zero there is no need to continue
        
        
if ($this->total_count == || $this->per_page == 0)
        
{
           
return;
        
Profile
 
Posted: 09 April 2009 06:41 PM   Ignore ]   [ # 5 ]  
Member
RankRankRank
Total Posts:  87
Joined  2008-11-13

see anything out of the ordinary?

Profile
 
Posted: 09 April 2009 08:36 PM   Ignore ]   [ # 6 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

No, that looks fine. Its probably something in your templates.Make sure you have the class label correct.

Signature 

Mike

HCC Development

Profile
 
   
 
 

Join our Mailing List