Recent Topics

1 Jul 16, 2006 04:20    

previous/next link is broken

http://www.wildfiremarketinggroup.com/blog/

what do I fix?

2 Jul 16, 2006 04:32

This is just a guess, but probably the thing you changed right before it broke ;)

If you've been messing around in core files that's where you'll have to go to find your answer. If all you've done is mess with the files in your skins folder then look for something like this and see what you can do about getting it back on track:

<p class="center"><strong>
		<?php posts_nav_link(); ?>
		<?php 
			// previous_post( '<p class="center">%</p>' );
			// next_post( '<p class="center">%</p>' );
		?>
	</strong></p>

In the 'custom' skin that was between the "END OF POSTS" and "START OF INCLUDES FOR LAST COMMENTS, STATS ETC." lines.

3 Jul 16, 2006 04:36

Actually nothing has been changed in a while...but in any case, I pulled a fresh copy of the _functions_bposts.php from a client's site and pasted into mine and it works again.

4 Jul 19, 2006 13:24

I had the same problem on my site after upgrading 9.1 to 9.2. It looks like when uploading the new files to the site, not all the files got overwritten. Although it first appeared to be working correctly. I ftp'd all the files from the new 9.2 version, and then it worked again. So it looks like the cause came with a combination of 9.1 and 9.2 files.

5 Jul 19, 2006 13:42

Actually it depends which skin you run with.
Some have the code in _main.php, as EdS has posted and some don't, for some strange reason!!

6 Jul 19, 2006 15:47

nims wrote:

I had the same problem on my site after upgrading 9.1 to 9.2. It looks like when uploading the new files to the site, not all the files got overwritten. Although it first appeared to be working correctly. I ftp'd all the files from the new 9.2 version, and then it worked again. So it looks like the cause came with a combination of 9.1 and 9.2 files.

Yeah that's a problem that is easiest to fix by b2evolution saying to delete all your old files. This is how it can happen: b2evo releases a version on January first, then updates some files on February first. You install the blog on March first, and b2evolution updates the package on April first. Now here comes June third and you install the new package, but it has some files that are older than your existing files. Your FTP client, depending on configuration, doesn't over-write stuff it thinks is 'newer' on the server.

John wrote:

Actually it depends which skin you run with.
Some have the code in _main.php, as EdB has posted and some don't, for some strange reason!!

That'd be a skin-specific option, and in truth there are a couple of different variations of the "previous/next" code out there in different skins. There is also a version that is supposed to give "previous/next" on single post pages but I've never had any luck with it working.

For versions 0.9.* and older, b2evocore/_functions_posts.php is the file that has all the functions called by all the different versions of the "previous/next" code, so that's a good file to suspect if your blog worked then broke.

7 Aug 01, 2006 17:23

I'm using v1.8 beta (upgraded yesterday). I was using previously a hack to produce the Next post/Previous post. Now I see there's the pervious_post() & next_post() functions. That's fine and is working.

However, the links produced by these functions are of the form 'http://whatever.com/index.php?p=1028&more=1&c=1'; while I would like to have links with full path, i.e.: 'http://whatever.com/index.php/2006/07/31/wonderfull_things'. Any easy way to do this?

I see that in b2evocore/_functions_bposts.php these two functions call the function url_add_param() to produce the URL. I think that if they would call instead $Item->gen_permalink() they would give me what I want (and people who use permalinks by posts IDs would still get what they want). Is this correct?

9 Aug 02, 2006 14:06

Sorry, I made the changes you propose and now the links to previous/next post do not appear.

11 Aug 04, 2006 15:33

In my skin's _main.php I have the following:

<?php
if( $disp == 'single' ) {
// save_rate( $Item->get('ID') );
if( ! $preview ) {
$p = $Item->get('ID');
$main_cat_is = $Item->get('main_cat_ID');
?>
<div class="prevnext"> <?php
previous_post( ); echo '<br />' ;
next_post( ); ?>
</div> <?php
}
} // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
//request_title( '<h2>', '</h2>' );
// ------------------------------ END OF REQUEST TITLE -----------------------------
?>

I'm using 1.8-beta.

12 Aug 04, 2006 15:59

I substituted my _item.funcs.php with the one you link to, and now it seems to be working alright.

Also I made a slight addition to both previous_post() and next_post, since they were displaying unpublishesd posts.

Line 348 (nex_post()) ) now look like this:

$sql_only_published = "AND post_status = 'published'" ;
$limitnext--;
$sql = "SELECT post_ID, post_title
FROM T_posts
WHERE post_datestart > '$current_post_date'
AND post_datestart < '$now'
$sqlcat
$sql_exclude_cats
$sql_only_published
ORDER BY post_datestart ASC
LIMIT $limitnext, 1";

and 282 (previous_post()) now look like this:

$sql_only_published = "AND post_status = 'published'" ;
$limitprev--;
$sql = "SELECT post_ID, post_title
FROM T_posts
WHERE post_datestart < '$current_post_date'
$sqlcat
$sql_exclude_cats
$sql_only_published
ORDER BY post_datestart DESC
LIMIT $limitprev, 1";

13 Aug 04, 2006 17:29

Thanks for pointing that out. I've fixed this, but by using a general function for it, which will also show private posts, when you're the editor (AND ".statuses_where_clause().")
The above link should is updated.

Thanks.


Form is loading...