Month's top: Carnack with 100$
Want LAH to translate a manga for you?
Little Angels Hentai Forum Index
It's for you!
PLEASE LOG IN OR REGISTER TO BE ABLE TO SEE THE PICTURES AND ATTACHED FILES!
Quickly selecting a specific page in a thread
Goto page 1, 2  Next
 
Compose reply Little Angels Hentai Forum Index » Help and test-post forum View previous thread
View next thread
DMCA
Quickly selecting a specific page in a thread
Author Message
spinningchurro
Warnings:
Posts: 0

Post Quickly selecting a specific page in a thread Quote
In multi-page threads/topics, specifically ones with a large number of pages, is there any way I can navigate to a specific page quickly? For example, take the "Oral" topic in Pictures: Little Angels board:

http://littleangelshentai.net/forum/viewtopic.php?t=290

What if I wanted to navigate from the 16th page without having to click each page up to the 16th? Is there a way to do that by clicking, or must I do a little multiplication and put the corresponding page id number into the URL?

To those who don't know, the URL of a topic's first page looks something like this (using the aforementioned topic as an example): http://littleangelshentai.net/forum/viewtopic.php?t=290&postdays=0&postorder=asc&start=0

The number at the end determines the page number. Each consecutive page corresponds to an increase of 15 in the URL. So the second page would be this: http://littleangelshentai.net/forum/viewtopic.php?t=290&postdays=0&postorder=asc&start=15

The third would be: http://littleangelshentai.net/forum/viewtopic.php?t=290&postdays=0&postorder=asc&start=30

And so on. My question is if there's a way to quickly navigate to a specific page using the navigation option on the site, or must I input the URL number by hand?

Thanks in advance.


_________________
Loli-pop loli-pop oh loli loli loli
Tue Apr 03, 2012 9:43 pm Profile PM
ult_combo
Matrix Angel
Warnings:
Posts: 86

Post Quote
spinningchurro:
To those who don't know, the URL of a topic's first page looks something like this (using the aforementioned topic as an example): http://littleangelshentai.net/forum/viewtopic.php?t=290&postdays=0&postorder=asc&start=0

The number at the end determines the page number. Each consecutive page corresponds to an increase of 15 in the URL.

You did some smart thinking there, just a little correction: Each page displays 15 posts (replies). The number corresponding to the "start" php GET parameter is actually the post (reply inside the topic)'s ID number, that means, the START number is the ID of the reply inside the topic which will load and display in the top of page (starting the viewtopic.php's internal data grab from LAH's database) followed by the next 14 consecutive iterations inside the same loop building the html of the topic page displayed to you.

This means, you could put "20" as start there, and it'd load the 5th post of the 2nd page at the top of the page followed by the next 14 posts (replies). You see, for the database there's no "page" ID, there are just reply IDs and the topic display pages are built of 15 consecutive posts + links linking to multiples of 15 replies as pages.

Eh, I hope I didn't make it too complicated, but anyway, to answer your question more precisely (now that you hopefully have a little more insight), there's no "page" ID so it might be a little hard navigating to an exact page without doing some basic arithmetic, that is, unless someone develops a chrome/firefox addon/plugin or beg Sat to make it easier. Razz

Yeah, thinking a little more, it could even be implemented with the current system... a little white box where you can type the page number and submit with Enter, upon submit it'd check if it's a valid page number and multiply it by 15 sending it to the php as the START php GET parameter.. Not hard to do, really.

Edit: I didn't have much to do last night so here it's.. an working Chrome/Firefox Goto page number LAH addon.

It adds a small textbox to the side of the page Nav feature, so you can type the page number and submit with Enter.

I made 2 versions, the "professional" one will also add topic-page search directly from the topics listing (viewforum.php). Screenshots below.

Install notes:

1. Install an userscript manager extension for your browser -- Chrome: Tampermonkey, Firefox: Greasemonkey.
2. Choose a version of this script: clean or professional. Click in the "Install" button and confirm any prompts. (if you ever want to switch versions, just install the other one - the previously installed version will be automatically overwritten).
3. You're all set. Just open a LAH page or refresh your currently opened tabs and the script will take effect.

Specifications:
*The "Goto page number" feature will appear in nav only when not all the thread's/forum's pages are being displayed (it means, only topics/forums with "..." in the page nav will have a Goto page number box, i.e. topics with 2-3 pages won't show it as all its pages will be listed and clickable in the page nav).

*The Goto page number search box will only accept numeric values (duh). If there's non-numeric values entered in the box through paste/drag and drop and you press Enter, nothing will happen unless it's a valid numeric value. If you enter a page number higher than the last page of a given topic, the php will return a "post not found" message.

*This addon is working perfectly fine now, but it may stop working if there are changes to the site layout/php code. Most likely to be broken when Sat implements the PhPBB Code 3. But this extension is open source, so you may edit it to suit your needs as well as fixing it if it ever stops working.

*You may report any encountered bug and send them to me for review, as well as suggestions, comments etc.

*I've added 2 Easter Eggs to the code as little extras, you shouldn't have no problem spotting them if you have a minimum of javascript knowledge. Feather Smilie

edit: updated install instructions to work with Chrome 35+ and moved the userscripts hosting to userscripts.org

For any reviews/comments/bug reporting, post it in the respective userscript page or contact me through PM.


_________________
My main MF acc was suspended, use other mirrors until I re-up it all to a new host.



There is no knowledge that is not power.
Our only limitations are those we set up in our own minds.
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs.
Programming is an art form, whose real value can only be appreciated by another versed in the same arcane art.


Last edited by ult_combo on Sat Jun 14, 2014 12:40 am; edited 9 times in total
Wed Apr 04, 2012 8:19 pm Profile PM MSN Skype
frzangel
Tiny Angel
Warnings: Warning
Posts: 2

Post Quote
Respect Ult C. (:


_________________

DON'T ASK FOR PASS IN PM! READ THE RULES AND FAQ!
Thu Apr 05, 2012 1:55 am Profile PM
spinningchurro
Warnings:
Posts: 0

Post Quote
Thank you ult_combo! I wish there was a way to up your reputation or give you points or something, because your script is awesome!


_________________
Loli-pop loli-pop oh loli loli loli
Sun May 06, 2012 10:49 pm Profile PM
frzangel
Tiny Angel
Warnings: Warning
Posts: 2

Post Quote
Well, develop a Rep System and you can give Rep to Ult. C! Razz


_________________

DON'T ASK FOR PASS IN PM! READ THE RULES AND FAQ!
Mon May 07, 2012 5:19 am Profile PM
Sat
Star Angel
Warnings:
Posts: 7539

Post Quote
We have a rep system, it is disabled because equality is important Razz


_________________

Some people say, the universe is a Star Ocean!

Want to donate to keep the site up? PM me for possible donation ways!
We now also accept Bitcoin.

Got a suggestion on how we can improve LAH? Post it here or vote for other people's suggestions!
Mon May 07, 2012 5:34 pm Profile PM WWW Skype
frzangel
Tiny Angel
Warnings: Warning
Posts: 2

Post Quote
Sat:
We have a rep system, it is disabled because equality is important :P
Hehe, it is... Anyway rep systems just piss me off. I wouldn't get as much rep+ as I think I'd deserve. xD


_________________

DON'T ASK FOR PASS IN PM! READ THE RULES AND FAQ!
Mon May 07, 2012 8:03 pm Profile PM
Sat
Star Angel
Warnings:
Posts: 7539

Post Quote
OVER 9000 REPS!

Well, we will experiment with points and whatnot at a later point in time Smile


_________________

Some people say, the universe is a Star Ocean!

Want to donate to keep the site up? PM me for possible donation ways!
We now also accept Bitcoin.

Got a suggestion on how we can improve LAH? Post it here or vote for other people's suggestions!
Mon May 07, 2012 8:06 pm Profile PM WWW Skype
ult_combo
Matrix Angel
Warnings:
Posts: 86

Post Quote
Yes, I'm happy with just my Rep on Stack Overflow for now. Laughing


_________________
My main MF acc was suspended, use other mirrors until I re-up it all to a new host.



There is no knowledge that is not power.
Our only limitations are those we set up in our own minds.
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs.
Programming is an art form, whose real value can only be appreciated by another versed in the same arcane art.
Mon May 07, 2012 11:03 pm Profile PM MSN Skype
courious_wolf
Warnings:
Posts: 0

Post Quote
I am liking this script! Thank you for posting it, ult_combo! Very Happy

Sat:
OVER 9000 REPS!

Well, we will experiment with points and whatnot at a later point in time

I personally believe that a rep system is a BAD idea. I would hate to see this great site end up down the same road as another lolicon site that I am a current admin of.

Sure, rep can be a means of thanking the user for his contributions... but it gets abused WAY too much.

Users start whining & begging for rep if they feel they don't get enough or none at all, they start neg repping others for no good reason, other than to say they don't like them. It ends up creating a negative atmosphere.

I know this site used to have a rep system for a brief period some years back, and I was glad to see it was disabled. A rep system doesn't fit here imo. A simple 'thanks' or 'Thank you' is better.


_________________
Love me or hate me, I will always be me! Long live LAH! Thumbs up!
The answer to all your questions about LAH can be found here.
Sat May 19, 2012 8:25 am Profile PM Skype
Sat
Star Angel
Warnings:
Posts: 7539

Post Quote
@curious_wolf

Do not worry, I said points, not reputation. Precisely why a similar system is currently disabled
on this site, and will not be used. There is no point in encouraging anything negative.
Let us just have fun on LAH instead Very Happy


_________________

Some people say, the universe is a Star Ocean!

Want to donate to keep the site up? PM me for possible donation ways!
We now also accept Bitcoin.

Got a suggestion on how we can improve LAH? Post it here or vote for other people's suggestions!
Sat May 19, 2012 10:25 am Profile PM WWW Skype
courious_wolf
Warnings:
Posts: 0

Post Quote
Sat:
@curious_wolf

Do not worry, I said points, not reputation. Precisely why a similar system is currently disabled
on this site, and will not be used. There is no point in encouraging anything negative.
Let us just have fun on LAH instead Very Happy

*whew*
I am happy to hear that. Sorry for any misunderstanding.
Very Happy


_________________
Love me or hate me, I will always be me! Long live LAH! Thumbs up!
The answer to all your questions about LAH can be found here.
Sat May 19, 2012 8:44 pm Profile PM Skype
ult_combo
Matrix Angel
Warnings:
Posts: 86

Post Quote
Seeing as LAH is a (relatively) mature site IMO, down-rep'ing for no reason shouldn't happen often. I can't really be positive on any sides as I don't know exactly the inner working of LAH's Democracy addon (disabled) neither your site's, but other mature sites' rep systems work very well with a defined set of rules and privileges - e.g. SO requires you to have 125 rep before you can down-rep others. Smile

But I agree, a thanks button with a thanks-count would be just as good here and generate much less headaches. Razz Glad you're enjoying the script. Smile


_________________
My main MF acc was suspended, use other mirrors until I re-up it all to a new host.



There is no knowledge that is not power.
Our only limitations are those we set up in our own minds.
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs.
Programming is an art form, whose real value can only be appreciated by another versed in the same arcane art.
Sat May 19, 2012 10:15 pm Profile PM MSN Skype
jacxxx
Beginner Angel
Warnings:
Posts: 14

Post Quote
ult_combo:
It adds a small textbox ... so you can type the page number and submit with Enter. --> textbox looks ok, but I can't enter any character from the keyboard; when I type e.g. 26 [enter], nothing happens while the box remains completely empty; copy 26, paste and [enter] does work however Very Happy

I made 2 versions ... --> I only installed the clean one.

*You may report any encountered bug and send them to me for review, as well as suggestions, comments etc.
See yellow remarks. My browserid is Opera/9.80 (Windows NT 5.1; U; nl) Presto/2.10.289 Version/12.00. Perhaps you still have a working copy?


_________________
My avatar shows the first encounter of Yuki in the Land of Eternal Snow. Yuki would become my favorite character in the on-going Mystics Saga by arrancar85 In Love
Tue Jul 03, 2012 2:24 pm Profile PM
ult_combo
Matrix Angel
Warnings:
Posts: 86

Post Quote
Don't you feel like upgrading to Opera 12? It should have much better performance and HTML5 support. I'd suggest using Firefox or Chrome which these run perfectly but yeah, I'll test it on my Opera 12 later when I get used to using Opera's developer tools (right now, I don't even know where's the JS console in Opera).

jacxxx:
ult_combo:
It adds a small textbox ... so you can type the page number and submit with Enter. --> textbox looks ok, but I can't enter any character from the keyboard; when I type e.g. 26 [enter], nothing happens while the box remains completely empty; copy 26, paste and [enter] does work however Very Happy

I made 2 versions ... --> I only installed the clean one.

*You may report any encountered bug and send them to me for review, as well as suggestions, comments etc.
See yellow remarks. My browserid is Opera/9.80 (Windows NT 5.1; U; nl) Presto/2.10.289 Version/12.00. Perhaps you still have a working copy?
As commented in my last post, the version works perfectly fine with Firefox and Chrome.

The incompatibility was in Opera's onkeypress event handling, which makes use of event.keyCode instead of event.charCode for printable chars in the keypress event, contrary to how Firefox behaves (Chrome uses both, hence the old code was compatible with FF and Chrome).

I've added an workaround adding the event.keyCode to the handler function, it should work on Opera now as well. Just download the newer versions in the userscript pages, thanks for the report jacxxx. Smile

*sigh* Thankfully LAH's next official addons will be using jQuery which provides event.which, a normalized cross-browser way to handle user input.

And yes, you can technically only have one of them at a time, as they use the same namespace and are automatically overwritten when you install the other version in FF/Chrome. I've posted 2 versions, because, well, I made the code for the professional version which saves a couple seconds in power users' life, for the cost of a cluttered screen with boxes even inside the topic listings.
  • If you want to save a couple seconds in your life and want to go directly to a given page in a thread without having to open the thread first, go for the professional.

  • If you just want the Goto page number feature for the forum and thread pages with a much cleaner and more traditional view of the site, go with the clean. Razz


_________________
My main MF acc was suspended, use other mirrors until I re-up it all to a new host.



There is no knowledge that is not power.
Our only limitations are those we set up in our own minds.
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs.
Programming is an art form, whose real value can only be appreciated by another versed in the same arcane art.
Tue Jul 03, 2012 9:47 pm Profile PM MSN Skype
Display posts from previous:    
Options Quick Reply
Show Smilies

 
Compose reply Quick reply Little Angels Hentai Forum Index » Help and test-post forum All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
You can post new threads in this forum
You can reply to threads in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Do not upload or mention any illegal content. Violators will be reported to the authorities. You are responsible for your uploads and actions.
If it is illegal for you to view adult lolikon material in your current location, leave this site immediately.
LAH is in compliance with DMCA.
LAH works best with JavaScript enabled. Enable it for a better experience. (´・ω・`)
Your browser is outdated and insecure! Please update your browser to fully enjoy LAH.