Giter VIP home page Giter VIP logo

pdo-mysqli-pagination's People

Contributors

4xvk avatar agking avatar bengriffiths avatar ivanprat avatar pixeline avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdo-mysqli-pagination's Issues

Trailing Slash Causes 404

With this rewrite
RewriteRule ^tag/([^/]+)(/([0-9]+))?$ tag.php?tagslug=$1&page=$3 [NC,L]
I always get a 404 if a trailing slash is present like this:

http://example.com/tag/colours/2/
or
http://example.com/tag/colours/

however it's fine without the last slash on either URL.
I've tested it without the pagination class and it works, this lead me to believe that it could be this class causing the 404.
What could be the problem?
Any help/suggestion/fix would be absolutely appreciated!

links

Would it be possible to expose the links as maybe an array/array of object instead of html. This would be useful for MVC type apps?

Make project Composer friendly

Hey there. Your project is awesome and I use it for my commercial web application. Many people around the globe use composer widely to reduce work burden and make the script execute faster.

You can make sure that your project is also friendly to composer by uploading this script to https://packagist.org/ and autoloading your script by either using PSR-4 standards or using PSR-0 standards.

Doing this will make sure that your script is ready to be plugged in and played without any hassle. Let composer manage the dirty work. Cheers ๐Ÿฅ‚

bindValue for PDO

As title, we have bindParam for PDO. I think bindValue should be included.

classes on li instead of links

hi!
First of, thank you: this class is really great.

I have one minor issue: you put classes to A elements instead of their containing LI elements.
I use zurb foundation on this project and they have their classes on the containing LI.

It's a better way because in css, you can style easily the containing elements, but not the containers. By putting the class on the parent element, it is trivial to style both parents and children elements, thus giving more possibilities to the designer.

I've modified your class to fix that on my local copy. Let me know if you want me to send a pull request.

multiple queries

I tried my best to make the pagination work with multiple queries or say it multiple tables but I am still stuck. I tried to contact you via ur email and website but you never replied to my request. I am only having one problem which is making the pagination work with multiple queries. I have over 50 tables and I created a separate query for each table and it worked however the links at the bottom don't work. Even if I set results per page to 1 I get 50 results that is because each query is fetching 1 row from each table. So have you ever thought of about how to implement this script with multiple queries(I need multiple queries not tables, I don't want to have one query with multiple tables,that is because I need to redirect the results from each table to a different page.) I won't probably get a solution to my problem but I just wanted to let you know.

Mod Rewrite

I'm using it with rewritten urls like this:

/test/page/1 etc
$options = array(
'results_per_page' => 6,
'url' => 'http://example.com/test/page/*VAR*',
'db_handle' => $conn
);

But I get errors, Can this be used with rewritten urls? Works fine without it.

results disappearing

page1
page12

This is so weird but the links disappear when after page 4. What I mean is like on the first page I see 10 links and when I go by clicking next next, on page 4 the next button doesn't work and all the rest pages are gone. I just downloaded fresh copy and tried it on yours and this doesn't happen on there but when I change the table I experience the same problem. Is this issue related to table? I am not using any css just trying the example included in the file and the links keep disappearing.. Any ideas?
okay I deleted one row from your example table and the same problem happened. Take a look on the images which is from the example_pdo file. on page 12 the next button is disabled and the page number changes.

Current Page Question

First off, I would like to say the class is amazing and very easy to use. I do, however, have a small question/concern. No matter what I do, I cannot get the current page to highlight. For the most part I just use 'class_ul' and because I have everything nested to a class most settings are inherited, but even if I directly use the 'class_current_page' I cannot get it to work. Here is my CSS for the class:

ul.pagination-list {
margin-bottom: 40px;
}

ul.pagination-list li {
display: inline-block;
}

ul.pagination-list li a {
display: inline-block;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background: #f3f3f3;
padding: 5px 10px;
text-decoration: none;
font-family: 'Open Sans', sans-serif;
font-size: 13px;
color: #000;
transition: all 0.17s ease-in-out;
-moz-transition: all 0.17s ease-in-out;
-webkit-transition: all 0.17s ease-in-out;
-o-transition: all 0.17s ease-in-out;
}

ul.pagination-list li a.current-link,
ul.pagination-list li a:hover {
background: #0076f9;
color: #fff;[/code]

I am sure the issue is based on my css formation. I would greatly appreciate the help. There is a lot of code in the class to pluck through to find exactly how and where the current page is determined.

how to display just prev and next links

I would like to display only next and prev links. Is there any class for that? I don't need the numbers. If there is a class for that, all I need to do is use css and set it to display:none without any modification on php side. I need this for mobile version of my site. Thanks

Fatal Error: Line 367

Do you know why this is causing an error?

Fatal error: Call to undefined method Core::prepare() in pagination.php on line 367

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.