Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: virsa punjabi - tammikuu 23, 2014, 01:11:00 IP

Otsikko: SMF pagination code
Kirjoitti: virsa punjabi - tammikuu 23, 2014, 01:11:00 IP
Hi everyone,
Could anyone please tell me what is the code for smf style pagination?
Otsikko: Re: SMF pagination code
Kirjoitti: JBlaze - tammikuu 23, 2014, 02:46:24 IP
Take a look at the constructPageIndex() (http://support.simplemachines.org/function_db/index.php?action=view_function;id=213) function in the function database.
Otsikko: Re: SMF pagination code
Kirjoitti: virsa punjabi - tammikuu 23, 2014, 10:32:15 IP
Thank you for this link :) is it possible if i can find this code somewhere on script? In SMF Files?
Otsikko: Re: SMF pagination code
Kirjoitti: Arantor - tammikuu 24, 2014, 12:16:23 AP
It's a very large, very nasty chunk of code in Subs.php.

You will get better results if you explain what you're trying to do.
Otsikko: Re: SMF pagination code
Kirjoitti: virsa punjabi - tammikuu 24, 2014, 08:10:04 AP
I have a comment system and i want to use this pagination on that using jquery.
Otsikko: Re: SMF pagination code
Kirjoitti: Arantor - tammikuu 24, 2014, 10:01:58 AP
Which won't work since jQuery exists on the browser, and SMF's pagination exists on the server. You could make the look the same but you will definitely not he using SMF's code to do it.
Otsikko: Re: SMF pagination code
Kirjoitti: Matthew K. - tammikuu 24, 2014, 12:31:15 IP
What do you mean by you want to use this pagination using jQuery? What are you wanting jQuery to do?
Otsikko: Re: SMF pagination code
Kirjoitti: virsa punjabi - tammikuu 25, 2014, 01:22:56 AP
This is what I mean http://flaviusmatis.github.io/simplePagination.js/
Otsikko: Re: SMF pagination code
Kirjoitti: Arantor - tammikuu 25, 2014, 01:27:41 AP
So a completely different piece of code to SMF then.