Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi,
just realized there arent any pagers for me to goto a new page. would be great if it could be on the top and bottom of a topic.
thanks!
Comments
Comment #1
Michelle#240176: Add pagination to top of forum topic is the D6 issue for this. I'll leave it up to Troky if he wants to tackle it in D7 2.x. I will likely be able to do it in 3.x but am not planning to try in 2.x.
Michelle
Comment #2
troky CreditAttribution: troky commentedI am not sure I understand what is the real problem here: pager not displayed on top of a topic or not displayed at all?
If you want pager displayed on top of a topic quick fix is to add:
to
advanced-forum.naked.topic-header.tpl.php
Comment #3
MichelleI don't know if things have changed in D7 but it's not that simple in D6. The pager is tied to the query and the query isn't available there unless you rerun it, which will double the load time.
Michelle
Comment #4
troky CreditAttribution: troky commentedWell, solution from #2 works for me without any other modifications.
Comment #5
MichelleInteresting... Something must have changed in D7, then. Glad to know what was once a horribly complex problem has been made simpler. :)
Michelle
Comment #6
patoshi CreditAttribution: patoshi commentedbeautiful... thanks! ill be contributing more bug reports.. i guess not many people are adopting D7 yet since this basic necessity wasnt implemented. great work tho! i would love to contribute, but i havent even developed a module yet.. i do alot of theming and could do some php..
Comment #7
troky CreditAttribution: troky commented$pager variable added to topic-header template.
Proper way to display pager in topic-header template would be:
Comment #8
patoshi CreditAttribution: patoshi commentedI only see the pagers in forum view but not in topic view. Do I need to add some code manually?
Comment #9
troky CreditAttribution: troky commentedPager should be visible on the bottom of topic view page. What style do you use?
Comment #10
patoshi CreditAttribution: patoshi commentedThe forum style is Silver Bells.
Comment #11
troky CreditAttribution: troky commentedCan you send some screenshot(s)? I don't see any problems with silver bells style.
Comment #12
patoshi CreditAttribution: patoshi commentedjust switched to blue lagoon .. see here: http://prntscr.com/22817
Comment #13
patoshi CreditAttribution: patoshi commentedi do see the pager on the topic list view.
Comment #14
troky CreditAttribution: troky commentedwhat about bottom of page?
Comment #15
patoshi CreditAttribution: patoshi commentednothing.. screen shot: http://prntscr.com/22dim
what could it be ? how would u like me to debug.
Comment #16
MichelleAre there more replies after that one? What do you have your replies per page set to? I think it defaults to 30, which would mean you don't have enough to have a second page, yet, if that's the end of them.
The other possibility is something is interfering with the comment wrapper preprocessing. That happens now and then in D6 and may still be an issue in D7.
Michelle
Comment #17
patoshi CreditAttribution: patoshi commentedThere are over 50 replies in that topic. I have it set to 30 now.
Comment #18
patoshi CreditAttribution: patoshi commentedwhere is the comment wrapper preprocessing located?
Comment #19
troky CreditAttribution: troky commentedadvanced_forum_preprocess_comment_wrapper()
in includes/theme.inc... but I don't think there's your problem. You should try to disable some of modules that could mess with forum.
Also, you could send me (private) link to your forum pages so I can check it out.
Comment #20
Michelle@troky: I don't know if it affects D7, but I had problem with various themes and sometimes even modules that would have their own comment wrapper stuff that clobbered the preprocess. Even Garland did, but I think that's been fixed, now. So I would check that the AF template is even being used by sticking a bit of text in it and clearing the cache.
Michelle
Comment #21
troky CreditAttribution: troky commentedHere is comment-wrapper.tpl comparison:
Original:
AF7 naked (needs tiny adaptation to above):
AF7 custom template with (bottom) pager disabled. Pager is displayed like described in #7:
Pager is set in core comments module so that's why I don't see any problem with AF.
AF comment-wrapper.tpl IS actually used. Tested.
Comment #22
Michelle"Pager is set in core comments module so that's why I don't see any problem with AF."
Doh! Ok, ignore all my comments and I'm sorry for getting things off track. For some reason I was mixing the pager with the reply button that AF adds. I have no idea why... Just a brain slip, I guess.
Michelle
Comment #23
patoshi CreditAttribution: patoshi commentedhi troky.. PMed u a login/pass to my site for u to check out. thanks!
Comment #24
troky CreditAttribution: troky commentedComment #25
btweedy CreditAttribution: btweedy commentedI am also experiencing this. I put in the following code in advanced-forum.naked.topic-header.tpl.php
It always displays "No Pager" regardless of how many comments are on the thread. That makes me think the $pager variable is just not getting passed to the template. I, unfortunately, do not know enough to try to troubleshoot it any more.
Comment #26
btweedy CreditAttribution: btweedy commentedComment #27
btweedy CreditAttribution: btweedy commentedAny updates to this?
Comment #28
troky CreditAttribution: troky commentedSorry. Can't reproduce this so debugging is impossible.
Comment #29
wfragakis CreditAttribution: wfragakis commentedHope this helps someone add pagination to the bottom of the comments on each page. I am using silver bells based on naked.
In advanced_forum/includes/theme.inc
becomes
In styles/naked/advanced-forum.naked.comment-wrapper.tpl.php
orig
becomes