1 of 2
1
No Instructions
Posted: 17 December 2008 01:08 PM   Ignore ]  
Newbie
Rank
Total Posts:  20
Joined  2008-11-13

Can you provide instructions for changing the core template to utilize the Pagination ext?

Thanks,
P

Profile
 
Posted: 17 December 2008 01:50 PM   Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

Hi Paul,

Sorry I thought we had included more detailed instructions in the extension. Here use this as a starting point.

the core.paginate.php needs to be hacked to add the hook, so if you upgrade or reinstall this would need to be redone every time. Maybe the powers to be could add this hook in the next build:

// -------------------------------------------
        // '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;
            
}
        
//
        // ------------------------------------------- 


To use this extension add the link_class parameter to the weblog tag like so:

{exp:weblog:entries pagination=“top” link_class=“my_pagination_class”}

Then in your CSS you can define the class:

.my_pagination_class a { color: #000; border: solid 1px #333; etc…....}

Signature 

Mike

HCC Development

Profile
 
Posted: 17 December 2008 04:48 PM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  20
Joined  2008-11-13

Thanks Michael,

I’ve added the hook to core.paginate.php and the parameter to the weblog entry tag.

Extension is enabled.

This page error occurs.

Parse errorsyntax errorunexpected T_IFexpecting T_FUNCTION in /home/-----/public_html/-----/-----/-----/core/core.paginate.php on line 247 
Profile
 
Posted: 17 December 2008 10:57 PM   Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

Can you post your template and your core file so I can look at it?

Signature 

Mike

HCC Development

Profile
 
Posted: 18 December 2008 08:09 PM   Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  20
Joined  2008-11-13

Thanks for taking a look at this.

I wasn’t able to attach the core file - spat back Mime Type errors on upload.  I’ve sent it directly via email.

Weblog code is as follows:

{exp:weblog:entries weblog="{my_weblog}" disable="member_data|trackbacks" sort="desc" limit="5" category="40" link_class=“my_pagination_class”}
<div class="designContainer"
    <
div class="designText"
        <
h2><img src="{site_url}images/interface/g-quote-left.gif" alt=""/>{title}<img src="{site_url}images/interface/g-quote-right.gif" alt=""/></h2>
        
{body}
    
</div>  
</
div>

{paginate}
<div class="paginate">
    <
span class="pagecount"><b>Page {current_page}</bof <b>{total_pages}</bpages</span><span class="bodybd"{pagination_links}</span>
</
div>
{/paginate}   

{
/exp:weblog:entries} 
Profile
 
Posted: 18 December 2008 09:34 PM   Ignore ]   [ # 5 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

So your core hack should go under line 77 of the core.pagination file. Also your class defined in your weblog tag should match the class your using in your pagination div.

Signature 

Mike

HCC Development

Profile
 
Posted: 19 December 2008 08:36 AM   Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  20
Joined  2008-11-13

I moved the hack to line 78 and adjusted the class.

Didn’t make a difference.  Still getting an error:

Notice: Undefined variable: EXT in /home/—-/public_html/—-/—-/—-/core/core.paginate.php on line 83

Fatal error: Call to a member function active_hook() on a non-object in /home/—-/public_html/—-/—-/—-/core/core.paginate.php on line 83

Profile
 
Posted: 19 December 2008 09:50 AM   Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

hmmm, OK that was the only thing I could see that needed corrected. Let me ask Brian if there is anything in your PHP settings that could effect this extension.

We’ll get you sorted out, strange though. Whos your host?

Signature 

Mike

HCC Development

Profile
 
Posted: 19 December 2008 10:06 AM   Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  20
Joined  2008-11-13

Fused Network

Profile
 
Posted: 19 December 2008 10:58 AM   Ignore ]   [ # 9 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

Never heard of them, is this a standard Linux server? We may need access to your CP to see if there is a module conflict. We have found a few in the past.

Signature 

Mike

HCC Development

Profile
 
Posted: 14 January 2009 06:47 PM   Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  4
Joined  2009-01-12

Hi,

I love the idea of this extension but I’m struggling to get it to work. I’m running EE1.6.6 hosted at MediaTemple.

I’ve hacked the core.paginate.php file and added parameters to my {exp:weblog:entries} tag but that breaks the template. Before trying to get to the bottom of what I’m doing wrong I have a few questions to see if it’s worth it…

1) Can I have pagination both top and bottom?
2) Do I still need to declare {paginate} [...] {/paginate} where I want the pagination to appear? (I’ve tried both with and without)

Neither of these factors are clear on the EE forum extension thread and it’s a shame that there’s no demo of the markup that results, merely an image.

My motivation for trying this plugin is that it seems to offer a route to executing a proper semantic markup of the pagination links…

Since the links are a list, they ought to be marked up along the lines of:

<div class="pagination">Page {current_page} of {total_pages}
  <
ul>
    <
li class="first"><a href="url">First</a></li>
    <
li class="previous"><a href="url">Previous</a></li>
    <
li><strong>5</strong></li>
    <
li><a href="url">6</a></li>
    <
li><a href="url">[...]</a></li>
    <
li class="next"><a href="url">Next</a></li>
    <
li class="last"><a href="url">Last</a></li>
  </
ul>
</
div

I was planning on changing your use of span to li!

Hoping you can help.

Profile
 
Posted: 14 January 2009 07:03 PM   Ignore ]   [ # 11 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

Hi Jonathan,

You can see the extension in action HERE and HERE

Its pretty basic, all EE documented pagination code remains the same. add the parameter in your weblog tag link_class=“my_pagination_class” and create a CSS entry for “my_pagination_class” like .my_pagination_class a { color: #000; border: solid 1px #333; etc…....}

Other then that everything in regards to you templates remains the same.

Make sure you core file hack is around line 77 as talked about in the beginning of this thread.

Signature 

Mike

HCC Development

Profile
 
Posted: 14 January 2009 07:17 PM   Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  4
Joined  2009-01-12

Thanks, Michael, for such a fast response. I’ll have another crack at it and get back to you!

Profile
 
Posted: 16 January 2009 06:18 PM   Ignore ]   [ # 13 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-01-11

Hi there! I’m new to this extension; Can somebody tell me wherre exactly I have to put the hack in the core file??? Really appreciate that! (what lines)

thanks!

Profile
 
Posted: 16 January 2009 07:30 PM   Ignore ]   [ # 14 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1653
Joined  2007-11-23

At the top of this post you can see were we point out it should go after line 77. There are also detailed examples of how to add the parameters to your template tags.

Signature 

Mike

HCC Development

Profile
 
Posted: 18 January 2009 09:25 AM   Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-01-11

Hi there - I’m using EE 1.6.6 - yes I read the instructions and yet I get this error message:
“Parse error: syntax error, unexpected T_STRING in /home/.catherine/joerg/londonyc/ldnycsys/core/core.paginate.php on line 84”


Can you email my a correctly hacked version of the core file?
( I have my version attached )

That would be fantastic!

Thank you!

File Attachments 
core.paginate_jw.php.zip  (File Size: 3KB - Downloads: 220)
Profile
 
   
1 of 2
1
 
     Instructions ››

Join our Mailing List