View Full Version : Pagination and Smarty Arrays
shadav
07-29-2008, 03:35 AM
ok not for bring up a dead thread lol but
Featured Links Page (http://www.phplinkdirectory.com/forum/showthread.php?t=19127)
anyway to get pagination to work with that?
http://www.shadav.info/index.php?list=featured
page is rather long and takes a while to load...pagination would be great :D
Lazer558
08-08-2008, 03:49 PM
I haven't tried it but it may be a simple as this
In index.php add the part in red (Around line 561)
// Assign template variables
$tpl->assign('category' , $path[count ($path) - 1]);
$tpl->assign('path' , $path);
$tpl->assign('count' , $count);
$tpl->assign('links' , $links);
$tpl->assign('feat_links' , $feat_links);
$tpl->assign('articles' , $articles);
$tpl->assign('categs' , $categs);
$tpl->assign('p' , $current_item + 1);
$tpl->assign('StopLinkHits' , $StopLinkHits);
I hope it works.
Edit: Probably doesn't work feat_links already applied to tpl.It may be worth trying.
shadav
08-08-2008, 04:30 PM
thanks but that didn't work...
i also tried
$tpl->assign('featured' , $featured);
seems pagination doesn't work for any of my latest links....
[edit] I got to looking and it's list that's called
but
$tpl->assign('list' , $list);
does not work...makes the page blank
and
$tpl->assign('list' , $_REQUEST['list']);
does nothing
Lazer558
08-09-2008, 09:33 PM
I've been trying to get this to work since yesterday but haven't managed it.:confused: I'm not sure it's possible, at least, not with my limited programming skills. Hopefully someone more knowledgeable out there could come up with an answer.
James
08-09-2008, 09:34 PM
You are going to have to build it a bit more than what you are doing. Sorry I just dont have the time to devote to this right now.
Lazer558
08-09-2008, 09:44 PM
Content visible to registered users only.
Hi James
I've been looking at index.php lines 381 - 568 trying to duplicate the various functions but it's beyond me. I have no need for this mod but was trying to help.:D
shadav
08-10-2008, 01:31 AM
lol i feel the love :p
it's ok James, no big rush, just if and when you get time :D otherwise lol i'll eventually sit down and tinker with it til i either get it or totally blow up my site :D *woho....burn baby burn*
and thanks Lazer :) lol if you're limited, i'm handicapped :P :D
shadav
10-29-2008, 12:22 PM
*bumps to remind self of this*
Lazer558
11-01-2008, 01:01 PM
Whilst searching the forum (for something else) i came across this post
http://www.phplinkdirectory.com/forum/showthread.php?t=18954 by Boby which shows something similar to
what we are trying to achieve
I replaced your code
Content visible to registered users only.
With this
Content visible to registered users only.
Find this in index.php (around line 66)
Content visible to registered users only.
And replace with
Content visible to registered users only.
Find this in index.php (around line 542)
Content visible to registered users only.
and relace with this
Content visible to registered users only.
In .htaccess find
Content visible to registered users only.
After add (this works but may be incorrect)
Content visible to registered users only.
and in your template add this to call it
Content visible to registered users only.
This works (for me) with seo enabled (page-2.html,page3-html etc) but as stated my .htaccess may
be wrong. If seo is not enabled then paging goes to the correct page but shows up wrong ie.if 10
links per page shows as 11,21,31 etc
Maybe someone can correct the .htacess code and the wrong page count please:D
I hope this helps
Mike
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.