Just checking in - I noticed there wasn't any other issue (that I could find) requesting a D7 version of the module. Not only does this module make Views Gallery 100x more functional, it's nice to have Custom Pagers for other uses.

Comments

kim.pepper’s picture

subscribing

kim.pepper’s picture

I've created an initial port for Drupal 7 on github:

https://github.com/previousnext/custom_pagers

It's incomplete and not yet functional, but thought it worth posting here if anyone wants to coordinate efforts.

Kim

robhamm’s picture

Subscribing

AdrianC-1’s picture

Subscribing

webankit’s picture

+1

wilgrace’s picture

+1

d0t15t’s picture

+1

vitok-dupe’s picture

Subscribing

designerbrent’s picture

+1

jonaswouters’s picture

subscribing

sw3b’s picture

subscribing

amalaer’s picture

subscribing

traceelements’s picture

sub

mstrelan’s picture

sub

Shadlington’s picture

Sub

borazslo’s picture

+1

kim.pepper’s picture

Status: Active » Needs review

I have got a basic version of custom_pagers working for D7 at https://github.com/previousnext/custom_pagers

Please test it out and let me know if it works for you.

Kim

Anonymous’s picture

Sub.

simonlagneaux’s picture

It's not working for me. I got this kind of errors on one of the node pages :

Notice: Undefined variable: delta in custom_pagers_block_view() (line 137 of /mounted-storage/home64c/sub029/sc73372-BZDW/yz/sites/all/modules/custom_pagers/custom_pagers.module).
Notice: Undefined index: in custom_pagers_block_view() (line 137 of /mounted-storage/home64c/sub029/sc73372-BZDW/yz/sites/all/modules/custom_pagers/custom_pagers.module).
knigh7’s picture

yes we need a drupal 7 version

valderama’s picture

sub

mmgg’s picture

getting the same error as #19

basicmagic.net’s picture

subscribe

edsko’s picture

StatusFileSize
new689 bytes

The bug reported (#19) is easy to fix. Change

function custom_pagers_block_view($block_name = '')

to

function custom_pagers_block_view($delta = '')

in custom_pagers.module (or apply the attached patch). With this change, the code posted by Kim works for me. Thanks!

edsko’s picture

StatusFileSize
new1.17 KB

The code as posted does not work when you use tokens to pass arguments to views. The attached patch resolves this.

sw3b’s picture

Title: Port Custom Pagers to Drupal 7 » Drupal 7 Release for Custom Pagers?
Issue tags: -d7 ports

With the modifications on #24 and #25 it does the trick.

letzel’s picture

sub

gadams’s picture

subscribing

eaton’s picture

Kim, thanks for the great work on this - I've pushed your repo tothe 7.x-.x branch and will be integrating the small patches from this thread.

schmook’s picture

subscribing

likewhoa’s picture

subscribing

paulgemini’s picture

subscribing!

tinokreutzer’s picture

+1

likewhoa’s picture

Title: Drupal 7 Release for Custom Pagers? » Port Custom Pagers to Drupal 7
Issue tags: +d7 ports
Argus’s picture

subscribing

kemsnake’s picture

in my site i view pager only in block
do i need make any changes in my theme or simple copy custom-pager.tpl.php in theme directory?

kemsnake’s picture

i found error in hook_node_view
drupal7 markup elements has '#markup' attribute instead 'value'
changed hook

switch ($pager->position) {
            case 'top':
              $node->content['custom_pager_top'][$pager->pid] = array('#markup' => theme('custom_pager', array('nav_array' => $nav_array, 'node' => $node, 'pager' => $pager, 'position' => 'top')));
              break;
            case 'bottom':
              $node->content['custom_pager_bottom'][$pager->pid] = array('#markup' => theme('custom_pager', array('nav_array' => $nav_array, 'node' => $node, 'pager' => $pager, 'position' => 'bottom')));
              break;
            case 'both':
              $node->content['custom_pager_top'][$pager->pid] = array('#markup' => theme('custom_pager', array('nav_array' => $nav_array, 'node' => $node, 'pager' => $pager, 'position' => 'top')));
              $node->content['custom_pager_bottom'][$pager->pid] = array('#markup' => theme('custom_pager', array('nav_array' => $nav_array, 'node' => $node, 'pager' => $pager, 'position' => 'bottom')));
              break;
          }
Trunkhorn’s picture

Title: Drupal 7 Release for Custom Pagers? » Port Custom Pagers to Drupal 7
Issue tags: +d7 ports

sub

hobocta’s picture

Subscribing

ElleKitty’s picture

subscribe

joostvdl’s picture

subscribe

iaminawe’s picture

subscribe

remaye’s picture

I tried drupal 7 version in #17 (with patches #24 & #25) and came to this :
Notice : Undefined offset: -1 in pager_entries_by_key() (line 260 in ..../custom_pagers/custom_pagers.module).
and pager is not showing up.

Found also that there is no token listed in the "Placeholder tokens" section in custom_pager admin form and if I add [term-id] in the "View arguments" section, I have in addition and before the previous error :

# Notice : Undefined property: custom_pagers_plugin_style_php_array::$rendered_fields dans views_plugin_style->render_fields() (ligne 323 dans .../views/plugins/views_plugin_style.inc).
# Notice : Undefined offset: 0 dans pager_entries_by_key() (ligne 252 dans .../custom_pagers/custom_pagers.module).
# Notice : Undefined offset: 0 dans pager_entries_by_key() (ligne 253 dans .../custom_pagers/custom_pagers.module).
# Notice : Undefined offset: -1 dans pager_entries_by_key() (ligne 254 dans .../custom_pagers/custom_pagers.module).
# Notice : Undefined offset: -1 dans pager_entries_by_key() (ligne 255 dans .../custom_pagers/custom_pagers.module).

Sorry, I'm not familiar enough with custom_pagers (and Drupal code) to help debugging any further. Just reporting my own experience, if it can help...

Drupal 7.0 / Views : 7.x-3.x-dev
custom_pagers-5f57e9d from https://github.com/previousnext/custom_pagers
Patch #24 and #25 applied
The view used for custom pager is a simple unformatted list displaying node-teaser from a specified type with term-id as argument.

SeriousMatters’s picture

subscribe

torgospizza’s picture

Subscribing with great interest!

EDIT to add that we're using the D7 branch from the github repo, with the aforementioned patches, and it works great! I've got it setup to pull from a View and place the pager in a Sidebar block, which I was then able to add to a Panel pane. You can see it in action here: http://www.legend3d.com/work (click on any film thumbnail).

webankit’s picture

Applying the patches
Notice: Undefined property: stdClass::$nid in custom_pagers_plugin_style_php_array->render() (line 19 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/views/custom_pagers_plugin_style_php_array.inc).
{10-15times}
Notice: Undefined offset: -1 in pager_entries_by_key() (line 260 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/custom_pagers.module).
Notice: Undefined offset: -1 in pager_entries_by_key() (line 260 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/custom_pagers.module).
Notice: Undefined offset: -1 in pager_entries_by_key() (line 260 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/custom_pagers.module).
Notice: Undefined offset: -1 in pager_entries_by_key() (line 260 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/custom_pagers.module).
Notice: Undefined offset: -1 in pager_entries_by_key() (line 260 of /home2/unitinga/public_html/spicmacay/demo/sites/all/modules/custom pagers/custom_pagers.module).

protools’s picture

sub

likewhoa’s picture

Category: feature » task
mrpauldriver’s picture

sub

wilgrace’s picture

Thanks guys, I've got this working as per #45 - see here http://www.massiveinteractive.com/our-work

One minor issue - it seems to break when Block Cache is enabled under Performance. I'm using custom pagers as a block (I couldnt get it to appear in the node header)

Very good though - this is currently the only D7 module with this functionality

torgospizza’s picture

Block Cache has been known to break things. The module is probably missing some code to handle that - as one might expect with pre-release code, there are bound to be bugs. You should submit an issue for that particular problem.

Anonymous’s picture

Since this is now basically working, could a D7 -dev version be put on the main project page, for the benefit of those who don't want to mess with git? Thanks!

eaton’s picture

I'll be taking another crack at getting this updated this week -- sorry for the delays and thanks for the assistance in getting it updated, everyone. ;-)

tchopshop’s picture

Can this D7 version be used with users instead of nodes?

yareckon’s picture

thanks eaton!

eaton’s picture

Can this D7 version be used with users instead of nodes?

At present, no. Once the solid D7 version is out, I'll be looking at a new version that takes advantage of EntityAPI, not unlike EVA module.

zambrey’s picture

subscribe

13rac1’s picture

StatusFileSize
new23.07 KB

Per #29, the 7.x-1.x branch should be the code from the repo in #17, but it isn't. The attached git patch applies to the code in the 7.x-1.x branch. It incorporates the code from #17, plus all attached patches, described code changes and some minor cleanup. I haven't looked further into the issue described in #43.

To use:
git clone --branch 7.x-1.x http://git.drupal.org/project/custom_pagers.git
git apply -v [path]/custom_pagers-7.x-995286-58.patch

pp’s picture

Status: Needs review » Needs work

I tried it, It works fine for me.

I have a question:

Why not use php_eval() for PHPcode proccessing same like block.module? "if (module_exists('php'))" and php_eval() funtion instead of eval and custom permission?

http://api.drupal.org/api/drupal/modules--block--block.module/function/b...

13rac1’s picture

Status: Needs work » Needs review

If it works, you should set this to RTBC, or leave it on Needs Review.

Can you open a different issue for the php_eval() question? It isn't really related to this basic request for a 7.x-1.x release. Thanks!

skizzo’s picture

subscribing

pp’s picture

Status: Needs review » Reviewed & tested by the community

"It isn't really related to this basic request for a 7.x-1.x release. Thanks!"

Yes, you are right.

ccshannon’s picture

subscribe

schmook’s picture

subscribe

chriz001’s picture

subscribe

combicart’s picture

subscribe

opdavies’s picture

Subscribing

Jarviss’s picture

subscribe

BeaPower’s picture

sub

segovia94’s picture

subscribe

pavlosdan’s picture

StatusFileSize
new35.66 KB

Followed the instructions from #58 and was able to successfully create a pager showing a few fields (namely image, title, date posted and Previous/Next) for each node instead of just Previous/Next.

Used Display Suite to achieve this. Added a small how to in the documentation here: http://drupal.org/node/387786#comment-4926686

Thanks for all the work on this.
Pavlos

Edit: +1 for D7 release

opdavies’s picture

+1

#58 works for me too!

MGParisi’s picture

+1 and Subscribe

k4v’s picture

+1

thanks, #58 works for me. great module!

off’s picture

How can i applying rhis patch

ssh: patch < custom_pagers-7.x-995286-58.patch from same directory leads to an error

Argus’s picture

#58 seems ready to be committed so more people can test.

Eaton we needz a 7.x-1.x-dev version to move ahead!

off’s picture

Anybody, please upload fixed version here

torgospizza’s picture

eaton’s picture

Status: Reviewed & tested by the community » Fixed

committed to the 7.x branch -- at a loooong last. Sorry for the delays with this one, and thanks for the patience!

13rac1’s picture

Thanks! Can we get a 7.x-1.x dev release too?

eaton’s picture

I'm running it through a couple of quick paces to make sure it's not totally borked (as it was after my ill-fated commit) and will then roll the -dev release.

torgospizza’s picture

Awesome! Thanks, Jeff!

Macronomicus’s picture

sub

michaelfillier’s picture

+1 and Subscribe

MGParisi’s picture

This is now published!

Argus’s picture

Great, thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

doublejosh’s picture

#1538882: Blocks (view powered) don't work

Anyone care to help get blocks working? Need help from someone who knows view handlers.

doublejosh’s picture

Status: Closed (fixed) » Needs work
Argus’s picture

Status: Needs work » Closed (fixed)

Could you please file a new issue with specific details on what your problem is?

Ah you already did: #1538882: Blocks (view powered) don't work

No need to open old threads!