Hey, first off this is a FANTASTIC plugin so thank you thank you.
Seems to work great. The only thing I noticed is that I had a node with a title (which was the sorting criteria) that started with "35mm blah blah". I guess Alpha Pager choked on that beause I got a pager that looked like:
0 A B C D E F (etc)
where the letters were BLACK (ie, not links) and the only node that showed up was the "35mm" titled node. I don't know why it said "0" and not "3" but I haven't peered to closely to the code.
Anyway, a solution might be to make a link called "#" or "other" or something for all non-alphabetically sorted nodes. I have no idea what to do for non-english node fields... that could be tricky to even know what a "letter" consists of in say, chinese or something.
Anyway, a fix for the non-numeric english would be great. Thanks!
W
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Picture 1_38.png | 7.49 KB | VValdo |
Comments
Comment #1
douggreen commentedI display "0" for all numbers and "_" for all punctuation. I agree that "#" would probably make more sense.
When alpha pager is first called, it returns the first set of nodes. If the first article starts with an "C" then you'll get back all of the "C" nodes. If the first article starts with a number, you'll get back all of the node that start with a number. This is by design. So, the fact that you're getting back the 35mm node and that's all, is by design.
However, the alpha letters should be links. I don't know why this is happening. If the 35mm node isn't in the result set, do the alpha links display? You can test this by unpublishing the node and then adding the "Node: Published" filter to the view.
Comment #2
VValdo commentedWell, what i did was delete the node, and suddenly everything worked, which lead me to expect that the module wasn't properly handling numbers. I don't know why not only the "0" link but all the links were plain black and not actual working links. I can investigate this a little more but it will mean some work (I'd have to roll back to the previous db before I killed that "35mm" one.. or try to recreate it) so this may take a few days.
I think the "#" may be a little clearer as I though it was a bigger bug than it was, since the node title started with at 3 but the link was a "0"...
Thanks. I love this module and would love to see it make it to Views proper :)
W
Comment #3
diegogers commentedI'm having the same issue, here is part of the output, i have a couple of nodes beggining with numbers, and al the letter of the pager are just black...
nice module, btw
Comment #4
douggreen commentedYou'll have to do some debugging, or provide a test case. If it was me, I'd add a few print statements in theme_alpha_pager() to see what $current and $items (and maybe $item) are set to. At the top of the function, try adding the following code:
Paste the results back here, BUT PLEASE use your browser's "View Source" feature, copy the results from the source, then paste it back here between the tags <code> and </code>. Do not copy the results from the browser directly as that will create an unformatted string that takes 10 times longer for me to view.
Comment #5
VValdo commentedI added your code and this is what I received:
Hope this helps. Here is also an attachment showing the problem. In this case there is only one node displayed, with a title starting with "35mm"..
W
Comment #6
douggreen commentedThe problem appears to be related to comparing as numbers instead of strings. Please try changing == on line 241 to ===. If this fixes it, then report back, and I'll patch the module.
Comment #7
VValdo commentedFixed!
:)
Thx,
W
Comment #8
VValdo commentedOh, while you're patching, I think "#" makes more sense than "0" for all non-alphabetic characters... I had thought that "0" for "35mm" was a bug.
W
Comment #9
douggreen commentedI've checked a new version in as the 5.x-dev. Could you please test with this. I also changed the 0 to a #, you weren't the first person to complain about this.
Comment #10
douggreen commentedI think this is fixed, please re-open if you still have problems. Thanks!
Comment #11
(not verified) commentedComment #12
slidescanner commentedThis is what I was looking for. Thanks for the fix!
35mm slide scanner
Comment #13
lpn online commentedthanks for this amazing piece of code - exactly what I was searching for.
lpn online, zoo coupons
Comment #14
nikon monarch commenteda very useful code indeed
Comment #15
lpn online commentedgreat resource !
mercury barometer
barometers