Recent Topics

1 Nov 10, 2007 16:20    

My b2evolution Version: 2.x

Before upgrading to 2.x I used to us arrows (less than/greater than) at the bottom of the page to link to the next page of blog posts.

However in 2.x I seem to have lots of page numbers instead. And in another thread I discussed how can't seem to get them to work anyway.

I'm rather confused by the skin system in 2.x so I'm unable to find exactly what I should edit to allow me to use the arrows for next and previous page navigation rather than the page numbers.

Can someone tell me which file I should edit and how?

Also I have this error at the bottom of the page of blog posts:

"Notice: Only variable references should be returned by reference in /home/cartmywn/public_html/inc/_core/_template.funcs.php on line 428"

What's wrong?

2 Nov 10, 2007 20:14

Find something similar to this and replace it:

<?php
// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
mainlist_page_links( array(
	'block_start' => '<p class="center"><strong>',
	'block_end' => '</strong></p>',
	'links_format' => '$prev$ :: $next$',
'prev_text' => '&lt;&lt; '.T_('Previous'),
'next_text' => T_('Next').' &gt;&gt;',
) );
// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
?>

Good luck

3 Nov 11, 2007 10:20

Thanks for your reply.

That works in the sense it gives me my "next" link which is exactly what I wanted.

But it seems there's something more broken on my site than that. Because the "next" link sends me to the following url:

<code>http://www.cartmel-bar.co.uk/?blog=2&order=ASC&orderby=main_cat_ID%20title&unit=all&show_past=1&show_future=1&paged=2</code>

Which it shouldn't do.

4 Nov 11, 2007 10:32

It seems to me that you haven't updated your index.main.php
You have a NEXT link that is not what the current 2.1.0 beta has.

There are a lot of changes in this release and it pays to carefully compare your original index.main.php and the new one.

It makes far more use of array's...
this is what's in the current release

?php
		// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
		mainlist_page_links( array(
				'block_start' => '<p class="center"><strong>',
				'block_end' => '</strong></p>',
   			'prev_text' => '&lt;&lt;',
   			'next_text' => '&gt;&gt;',
			) );
		// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
	?>

5 Nov 11, 2007 10:50

The only reason I have a different NEXT link is because I implemented what the previous poster suggested.

Before I did so I had what you've posted. And the page numbers still directed incorrectly to the wrong URL - the one in my previous post.

6 Nov 11, 2007 10:56

Sorry mate, good luck with sorting it

7 Nov 11, 2007 11:03

Thanks.

I've actually just deleted ALL the files and uploaded a fresh install of the beta and I'm getting exactly the same problem, the next page URLs redirecting completely wrong.

I have absolutely no idea why this is the case as there are no files not being replaced.

8 Nov 11, 2007 14:46

Have you tried it with the built-in skins especially the evopress and custom skins?

If it produces the same error, then it might be a bug. A bug that could be happening depending on the environment.

Haven't tested on my production blog since I am still on the process of updating my skins to 2.1-beta, a lot has changed, and I barely started ;)

Maybe more info can help like your server environment, your first b2e installation version, etc. It may work on my production and test servers (IF it does work) coz both came from upgrades since b2e v0.9x. Haven't really tried installing fresh.

Just an idea :)

9 Nov 11, 2007 20:35

I don't think my code has anything to do with this and if it does that's a bug somewhere else in the code. I wonder if you (unknown to you) had this problem before you changed this code.
Your blog seems down. If you want further assistance please let us know.

Good luck

edit:
The blog is ok: see http://www.cartmel-bar.co.uk/?blog=2&skin=evopress. This one (with the numbers) gives the correct link to the next page.

edit:
I applied my patch to the 2.1 version of the custom skin and it works like expected. What this means is that you need to update your skin to be compatible with 2.1. I refer to the articles by Laibcoms to get you going.

10 Nov 12, 2007 09:24

I'm not sure I understand what you mean, which patch?

I thought the skins that feature in the beta download are compatible with that beta?

The other skins seem to have working navigation in the beta, it's evocamp that doesn't seem to want to work for me (all I've changed is the header) and the problem existed before I did.

And the error message refering to template.funcs.php exists on all skins on my blog.

12 Nov 12, 2007 09:43

hi,

I have now evocamp installed on my blog: http://www.blog.hemminga.net/NewSkin_stub.php. I altered ../skins/evocamp/items.main.php around line 176 where I canged:

	<?php
		// ----- PREV/NEXT PAGE LINKS (POST LIST MODE) ------
		mainlist_page_links( array(
				'block_start' => '<div class="navigation">',
				'block_end' => '</div>',
   			'prev_text' => '&lt;&lt;',
   			'next_text' => '&gt;&gt;',
			) );
		// ----- END OF PREV/NEXT PAGE LINKS -----
	?>


in:

<?php
// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
mainlist_page_links( array(
    'block_start' => '<p class="center"><strong>',
    'block_end' => '</strong></p>',
    'links_format' => '$prev$ :: $next$',
'prev_text' => '&lt;&lt; '.T_('Previous'),
'next_text' => T_('Next').' &gt;&gt;',
) );
// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
?>


As you can see from my blog, that works OK.

Did you change somthing different?

Good luck

13 Nov 12, 2007 11:29

No, that's the odd thing. The vanilla install has the same problem. Very odd isn't it?

Thanks for the link regarding the error report issue, that's fixed that issue.


Form is loading...