![]() |
|
#1
|
|||
|
|||
|
..snip.. (Lionel has further since reneged)
OK, so for my suggestions.. What News pagination should NOT be. <-- This is what I have for my site currently and doesn't work very well. It's simply a "Back" and "Next" and if there are no more news posts, "Next" is still available and leads you to a blank page. ...snip... Last edited by jw0ollard; 07-18-2007 at 02:15 AM. |
|
#2
|
|||
|
|||
|
I really have no need for this. I am using a news slideshow hack I made to display 150 items grouped by 10 categories and the rest of the page is all GARS
Last edited by Lionel; 03-29-2007 at 07:41 PM. |
|
#3
|
|||
|
|||
|
If you changed your mind and don't want to do it now, let me know...
Last edited by jw0ollard; 03-13-2007 at 07:44 PM. |
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
He already has shared it.
But you have to pay for part of the script I think.. so big *thumbs down* Oh, and apparently you now have to jump through a ring of fire just to get the slideshow script from the original developer, since it had been pirated. No thank you. Last edited by jw0ollard; 03-14-2007 at 03:48 AM. |
|
#6
|
|||
|
|||
|
All you have to do is when you buy it to mention to seller it's for vbulletin. But you are right, stay away from it. This is upsetting to people and to me, and I am already sorry I shared it.
|
|
#7
|
|||
|
|||
|
Well, I really love your news slideshow.. I just wish the Joomla addon wasn't commercial.
![]() And that's why I really want news pagination! ![]() Or at least someone to help me update the Pagination in this post so that it hides the Previous or Next if there are no news items in that direction. |
|
#8
|
|||
|
|||
|
I want news pagination too, anyone can help me?
|
|
#9
|
|||
|
|||
|
So anybody willing to tackle this? It's very possible as I've seen it done.. just have no idea how to do it.
![]() Can someone at least update this code here? Code:
$limit = ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']);
if($_GET['start'] < 0){
header('Location: index.php?page=' . $getpage . '&start=0');
}
if ($_GET['start']==NULL){
$start = 0;
} else {
$start = $_GET['start'];
}
$newslimit = 'LIMIT ' . ($start / 2) . ',' . (($start / 2) + $limit);
$previous = ($start + $mod_options['portal_news_maxposts']);
$next = ($start - $mod_options['portal_news_maxposts']);
Last edited by jw0ollard; 03-22-2007 at 06:59 AM. |
|
#10
|
|||
|
|||
|
Bump? This should be fairly simple for coders..
The code in the post above gives me database errors when you click "Previous" and "Previous" or "Next" do not hide properly when there is no news in that direction. |
|
#11
|
|||
|
|||
|
he... ok, i did this just today
![]() here is the 'revisited' version: Code:
$limit = ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']);
if (($_GET['start']==NULL) || ($_GET['start'] < 1)){
$start = 1;
} else {
$start = $_GET['start'];
}
$count = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "thread WHERE forumid in (".$mod_options['portal_news_forumid'].")");
$count['count'] = vb_number_format($count['count']);
$newslimit = 'LIMIT ' . ($start - 1) . ',' . $limit;
if (($start + $mod_options['portal_news_maxposts']) < $count['count']){
$previous = ($start + $mod_options['portal_news_maxposts']);
}
if ($start > $mod_options['portal_news_maxposts']){
$next = ($start - $mod_options['portal_news_maxposts']);
}
the second edit will stay just the same: Code:
eval('$home[$newsmod[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_news_pagenav') . '";');
Code:
<div align="center"><if condition="$next">< <a href="index.php?page=$getpage&start=$next">Back</a> | </if><if condition="$previous"><a href="index.php?page=$getpage&start=$previous">Next</a> ></if></div> <br />
|
|
#12
|
|||
|
|||
|
I may give this one a try... looks like a start in the direction for what I would like to do with my news. This site does it right, in my mind... http://pocketpcthoughts.com/
Main page, news divided by day of the week... then a link at bottom to the archive. The archive page is quite impressive... http://pocketpcthoughts.com/archives.php If anyone has any ideas on how to do that, I'm all ears... |
|
#13
|
|||
|
|||
|
Could you explain where you are putting these edits???? which files, and where? Thanks. I'll try it.
Quote:
|
|
#14
|
|||
|
|||
|
I tried this in the news module and got this result....
PHP Code:
|
|
#15
|
|||
|
|||
|
ok, i didn't try this on a forum where the news were taken from more than one forum
![]() i'm looking on how to transform the array $mod_options['forumid'] in a string ok... here it is... ![]() just at the top of my patch, add these lines: Code:
if (is_array($mod_options['portal_news_forumid'])) {
$forumid = implode(',', $mod_options['portal_news_forumid']);
}
else {
$forumid = $mod_options['portal_news_forumid'];
}
Code:
$count = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "thread WHERE forumid in (".$forumid.")");
Last edited by succo; 06-02-2007 at 02:53 PM. |
|
#16
|
|||
|
|||
|
OK, that solved the multi-forum problem, but I'm still confused about where this needs to go in the code. I put it just after this...
PHP Code:
Then I created a template of that name and dropped the code in it. If I setup to no separate posts, it doesn't show up at all. If I do separate posts, I get this... http://pdaphonehome.com/index.php?page=testnav The page nav is not in the right place I'm guessing. The other problem is that I can navigate with the buttons on this page, but the news displayed doesn't index up or back to the correct posts... it keeps showing the same ones. |
|
#17
|
|||
|
|||
|
you mean the 'eval' line???
it was written in the original post, i guess ![]() it goes just above Code:
$db->free_result($getnews); Code:
$newslimit = 'LIMIT ' . ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']); i rewrote it a little just to make the options be in the cmps administration panel, but it basically stays the same... if interested i could send you the full module bye |
|
#18
|
|||
|
|||
|
Great work Succo, wish I would have checked this thread a month ago.
Did you design this to work with 2.0 or 3.0? I'm having an issue with my News disappearing entirely if I don't have the News Archive enabled. The only reason I had News Archive enabled was because I didn't have working pagination, and now I can't get rid of it! If I disable the News Archive the News disappears entirely, and if I set the News Archive # of posts to 0 the pagination no longer works correctly. Also what I've noticed is that it doesn't show the news posts in the News Archive as full news posts when you go to the second page. So if I have it set to show 10 News Archive posts, those 10 posts are never seen as full news posts when you go to the second page, it just skips them entirely. I've become increasingly good with PHP since I first started this thread, so I may be able to sort out my problems. But it doesn't hurt to ask for help, right?
|
|
#19
|
|||
|
|||
|
Quote:
Thanks |
|
#20
|
|||
|
|||
|
Quote:
Quote:
Quote:
look at the first block of code... Code:
$limit = ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']); after, in this block you can see Code:
$newslimit = 'LIMIT ' . ($start - 1) . ',' . $limit;
if (($start + $mod_options['portal_news_maxposts']) < $count['count']){
$previous = ($start + $mod_options['portal_news_maxposts']);
}
if ($start > $mod_options['portal_news_maxposts']){
$next = ($start - $mod_options['portal_news_maxposts']);
)let me know |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pagination for the news module? | WiBu | Modifications (version 3.x & 2.x) | 6 | 06-13-2007 07:27 PM |
| Pagination on Most Recent Post Module | rbehler | "How Do I..." Questions | 1 | 01-03-2007 03:39 PM |
| Pagination Help | AlienSector | Chit Chat | 10 | 12-15-2005 06:56 PM |
| Pagination | Ian Gordon | Troubleshooting / "How do I..." Questions | 2 | 06-26-2004 04:21 PM |