1

Topic: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

This post become obsolete and don't work for public pages: blogs, pictures, videos. Update and description is here
Hello,

This thread intended for satisfying all possible needs in pagination smile and is advanced continuation of Search Results pagination thread for intermediate vldP admins.

You need basic knowledge of vldP templating system and be able to edit a little some .php files (adding total_pages template variable).

Extensions pack download http://www.vldcrowd.com/media/uploads/f … q7q8q8.zip

Archive consists of two .php files for placing in /ext/ folder.

ext.upgn.php - "Universal pagination" extension for pagination everything you need in Front end.

ext.cppgn.php - "Control panel pagination" extension for pagination of Members, Pictures, Music, Videos in your control panel

clean_style_for_cp.txt - source code to copy/paste to your /includes/templates/media/somerainbow/style.css

usage of ext.upgn.php

for:
search_results.tpl:
{upgn:tp=total_pages,pn=page_number,hs=hash}

member_blog.tpl:
{upgn:tp=total_pages,pn=page_number,mem_id=member_id}

account_blog.tpl:
{upgn:tp=total_pages,pn=page_number}


But since it's universal extension it uses core language file and you need to add this strings to you lang.lib.core.php:

"next_page" =>
"Next page",

"previous_page" =>
"Previous page",

usage of ext.cppgn.php

for CP: Members, Pictures, Music, Videos (members.tpl, pictures.tpl etc.)
{cppgn:tp=total_pages}


In some cases you will get notice or even error that system doesn't have $total_pages variable defined.
You'll need to assign that variable at appropriate .php file (for CP includes/cp/members.php,pictures.php etc)

Find this: $TEMPLATE->assign("pages",       $pages);
and add right bellow it:
$TEMPLATE->assign("total_pages", $totalpages);

But I have to repeate you have to understand everything that you do and also be able to revert all changes in case of failure.

I subscribed to this topic and always ready to answer all your questions.
It's much simpler to implement than it seems smile

Good luck!

P.S.: Those extensions are very flexible and extensible and they are in beta testing phase so using them you can help me to find some little glitches.

Last edited by radioact (2009-08-11 21:49:29)

2

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

I'll start testing right away and let you know

for me, there's really only two things missing from the script
1-navigate by page numbers
2-upload progress meter

anything else is icing on the cake

1 down, 1 to go

I'll keep ya posted on how the new ext. are working on my site

thanks again Radioact

I add another vote for Radioact for member of the year

then 10 minutes later.....

big_smile installed the code and it works perfectly big_smile

I have just one correction
on line 48 of ext.cppgn.php
I had to fix line 48
instead of the [:] after "dateadded" I had to use [;]

my line 48:    $sort    = isset($_GET['sort'])  &&  ($_GET['sort']) ? $_GET['sort'] : "dateadded" ; "joindate";

I want page number navigation in the control panel for members, pictures and audio
So I added: $TEMPLATE->assign("total_pages", $totalpages);
to:
/includes/cp/file.php
as in
cp.members.php------->Line 2073
cp.pictures.php-------->Line 679
cp.audio.php----------->Line 660

then add the call: {cppgn:tp=total_pages}
to:
/includes/templates/file.tpl
as in:
members.tpl---------> Line 104
pictures.tpl----------->Line 96
audio.tpl-------------->Line 96

I also removed the standard [previous_page]  {pages}   [next_page]
navigation links and call

now, I have page number navigation on the front end and in the control panel, sweet!!! big_smile

Most excellent extension Radioact
Thank you
seeme101

Last edited by seeme101 (2008-03-31 01:08:45)

3

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

Thank you for using, for thanks and for the better explanation.
Oh, I forget to upload my bug-fixed archive probably because of hurrying to bed. You better download cppgn again since

my line 48:    $sort    = isset($_GET['sort'])  &&  ($_GET['sort']) ? $_GET['sort'] : "dateadded" ; "joindate";

you don't need that line at all

I updated download file and since now you don't need any modifications in it.

Last edited by radioact (2008-03-30 23:38:25)

4

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

hello radioact. I like this extension. Very useful. One question:
the extension results align the page numbers vertically like:
1
2
3
4
...

How can I align them horizontally? 1 2 3 4 ... 

Thanks

5

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

Hello! Are you talking about upgn or cppgn? In any case reason in css styling. Copy source from .txt file and paste it in your style.css
Then press F5 to refresh page.

6

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

It is about the upgn file. I have added the following code in the /includes/templates/media/rainbow/style.css as you stated in this forum:

/* -------------------------------------------- */
/* ------------- Pagination: Clean ------------ */
/* -------------------------------------------- */
#pagination li          { border:0; margin:0; padding:0; font-size:11px; list-style:none; /* savers */ float:left; }
/* savers #pagination li,*/
#pagination a           { border-right:solid 1px #DEDEDE; margin-right:2px; }
#pagination .previous-off,
#pagination .next-off   { color:#888888; display:block; float:left; font-weight:bold; padding:3px 4px; }   
#pagination .next a,
#pagination previous a  { border:none; font-weight:bold; }   
#pagination .active     { color:#888888; font-weight:bold; display:block; float:left; padding:4px 6px; /* savers */ border-right:solid 1px #DEDEDE; }
#pagination a:link,
#pagination a:visited   { color:#0e509e; display:block; float:left; padding:3px 6px; text-decoration:underline; }
#pagination a:hover     { text-decoration:none; }
-------------------------------------------------------------

and have this added in the search_results .tpl
<div class="footer">
{upgn:tp=total_pages,pn=page_number,hs=hash}
</div>

do I need to change the class name or??  thanks.

7

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

Oh, /includes/templates/media/rainbow/style.css responsible for CP styling
For front end you need to add that style instructions at your templates site.css (ex. templates/webby2/media/site.css

This is Clean style but you can also use Digg-like, Flickr-like styles. Look at my previous topic Search Page pagination for details and styling tutorial link.

8

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

yupe
downloaded the new ext. and works perfectly right out of the box

9

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

download link not work ...

10

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

Link fixed.

11

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

thanks radioact ...

12

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

I tried using this mod, but did not work for me. When I clicked the next or a number, it would jump back to the search page instead of going to the next page. I also had problems with the formatting.

Not sure, but maybe this mod is not compatible with 2.5.3.

13

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

works fine with version 2.5.3

14

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

ok....maybe because of my other mods there is a conflict and why it won't work for me.

15

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

No, perhaps it's because you did something wrong wink

16

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

yes..I think the instructions from another post is needed that I did not include....hard to follow this thread....will take another look when I can give it more attention.

17

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

There is an update to the Pagination Mod for the Front End of 2.5.3. You will find the update at:

http://www.vldcrowd.com/member/8/blog/view/96/

18

Re: Hard Cover Extensions: Pagination 2. Double pack for advanced use.

Does this mod work ok with version 2.5.5?  I would like to install it also.