![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,111
|
PHP Pagination Question(s).
So this week my goal is to setup pagination on my recipe site but, before I dive in I was hoping to get some feedback.
I've been researching a few different options, mainly whether I should begin with recipes.php?page=0 or recipes.php?page=1 as the first page, does either option matter significantly? I have read in a few places then when dealing with potentially hundreds of pages, using OFFSET can cause issue? Secondly, I'm thinking of using this for the main code snippet: Quote:
Also, is that TOO simple and restrictive as far as the functions go of generating the page navigation? Finally, when it comes to the navigation itself, is it best (in your experience) to just have numerical pages listed or should I also include a 'PREVIOUS' and 'NEXT' link on the navigation structure? Thanks in advance for any advice and feedback you can offer ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |||
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Unfortunately nobody can really answer your questions as well as you can yourself, because nobody but you knows what you want to achieve.
Personally I would never use pagination even if the fate of the world depended on it, but then I also wouldn't use a database or PHP when it can be avoided, and I have no idea why you're trying to code everything from the back end to the front end yourself when there are plenty of recipe templates and themes already out there. I think it would actually be less of a chore, and would provide a far better, more interesting/personalized experience for visitors, to simply write a blog on Wordpress.com, adding 10 recipes per day, at least if there's some genuine enthusiasm and knowledge about the subject, than grinding away on what seems to be just another recipe dump like hundreds of others that already exist. To specifically address your questions: Quote:
Quote:
Quote:
If you absolutely must use the worst, most tedious navigation method ever, you can again answer your own question - is it nicer when there's a big PREVIOUS and NEXT button to click, or is it better when you have to exactly hit an 8x8 pixel arrow or number? You're a user too; if you think something makes things easier, do it, and if you think it makes things harder, don't do it. Certainly never let 'style', which is subjective anyway, override user experience.
__________________
__________________ |
|||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | ||||||
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,111
|
Quote:
Quote:
Quote:
Quote:
Based on your opinion, no website anywhere should ever have more than 5 pages. There go all the TGPs, Link Lists, Directories, Review Sites and Pay Site Tours with previews, even GFY has a lot more than 5 pages listed on their page navigation for the forum. ![]() Quote:
Quote:
I appreciate your opinions though and will definitely take them into account, thank you ![]() |
||||||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,004
|
Jesus dude, take this to stackoverflow or something.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Quote:
The best way to find out is to simply try it and see if there are issues or not. Worrying about it in advance is just a waste of time and energy. BTW, your answer as to why you're coding it all is a good one. ![]()
__________________
__________________ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
bored
Industry Role:
Join Date: Aug 2003
Location: Metaverse
Posts: 4,675
|
with pagination, what i like to do is email the visitor the current page, then ask them to enter it on a special form at the bottom of the page. once submitted, i like to shoot a support request over to my ISP and ask them to turn the page.
![]() #
__________________
# ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Pay It Forward
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,894
|
is it wp pr a php script?
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!! END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Sep 2013
Location: The Netherlands
Posts: 805
|
Quote:
![]() OP's website should have a "Proudly powered by GFY" statement in the footer by now. ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
bored
Industry Role:
Join Date: Aug 2003
Location: Metaverse
Posts: 4,675
|
Quote:
![]() #
__________________
# ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Pay It Forward
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,894
|
a guy actually fixed a error in my script there
![]() ![]()
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!! END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() |
|||||||
|
|||||||
Bookmarks |
Thread Tools | |