Recent Topics

1 Aug 04, 2005 06:36    

Hi..I'm back. Just when I thought everything was rock solid and all good, I hit a mountain..a big one (for me at least) :-/ >:( .

Sigh, here's my question:
Is it possible to fix the "Read more" and "Next Page" links, because they do not work properly- this is because I've overridden my stub file, so that only one default category shows up on the main page..so if I click a "read more" or "next page" link, it won't work.

I tried numerous ways like editting b2evocore/_class_item.php, but to no avail. The way to solve this, is to add a "cat=n" where n is the category that you are [b]currently viewing[/b]. But so far I CAN'T GET THIS TO HAPPEN.

If you're confused, here's what I mean:

This is the permalink b2evo outputs when I click " => Read more" on one of my post in a category different that the default:

http://www.yoursite.com/index.php?p=45&more=1&c=1&tb=1&pb=1#more45

To fix this, I must add "cat=n" like:

http://www.yoursite.com/index.php?cat=3p=45&more=1&c=1&tb=1&pb=1#more45

BUT HOW :?: !!!

Here's what I did when I say I set up a default category:
http://forums.b2evolution.net/viewtopic.php?t=1214

As you can see, ANAMASSANET has had the same problem as me, but I think he found a temp. solution..I need a more permanent one:( :

I made the stub file that restricts the category and made that default category show up in the main part of the blog, and the other ones in the sidebar. But when i click on "read more..." in the sidebar it outputs "sorry, there is no post to show" (im translating from Spanish, it probably would say something different in the English version)

The thing is: you can override the stub file if you put a cat=n parameter, but you canĀ“t override it if you are clicking a permalink.

Can anyone help me here? pls!!!

Okay, I really hope you understand what I mean...you can probably tell that I really want this problem solved after spending many hours trying to do it myself :oops: . Thank for any help in advance.. :'(

2 Aug 04, 2005 06:58

The "read more" link is for a continuation of the current post. In other words, the first half of the post will show up on a main blog page but the part after the read more link will only show up on the permalink page. What would be the purpose of defining a category for the continuation of a post since the post (by definition) already has it's categories defined?

Are you looking for a way to identify additional posts in the category that the post is part of?

I'm confused...

3 Aug 04, 2005 07:00

Aha!

"read more" and "next page" are unrelated. Read More is for continuation of a specific post. Next Page goes with Previous Page, and is for navigation within a blog (which can include several categories).

Are you trying to restrict the "Previous Page / Next Page" links to a specific category?

4 Aug 04, 2005 07:07

I knew that would happen..
no, I know that. The problem is that I have set one main category for my journal that shows up on the main page of my site, and have other categories for different post genres that show up on their own page and not mixed with my "journal" posts. It's on one of those other categories, that I want to use the read more function, but it gives me an error when I click it, saying post not found...I've found out that if I add the cat=3 or whatever to the "read more" link, my extended post comes up..but what I want is for the read more link to automatically generate the cat=whatever number the post is in so that that it works..

5 Aug 04, 2005 07:12

Okay, here's the link to the page where I want the read more link to work..
http://www.aestaria.com/indexx.php?cat=30 Beware my site is under construction..

So, click the read more link, and it won't work. but if you add "cat=30" to the address on your browser it'll work..
-------------------------wait, I just clicked the link, and it started working. how did this happen?
Is it working for you?

6 Aug 04, 2005 07:29

http://www.aestaria.com/indexx.php?cat=30 shows me a blog with one post that contains a "read more" link, and a permalink.
The read more link sends me to http://www.aestaria.com/indexx.php?p=45&more=1&c=1&tb=1&pb=1&cat=#more45 which, as far as I can tell, provided me the full post. Well, one additional line but no opportunity for trackback url or to make a comment. If that is the rest of the post then the read more seems to work.
The permalink is a different story. The permalink icon sent me to http://www.aestaria.com/indexx.php?title=b2evolution&more=1&c=1&tb=1&pb=1 which tells me there is no post to display. I believe that is the 'clean url' format - a checkbox in your admin area, and something that doesn't always work. There is a note that says "...if your host supports it...", and there have been comments in this forum about what you can do to get that to work. For me it worked when I checked the box so I have no direct knowledge of what it takes to make it happen. That's not really your read more issue, but it might be somehow related. Maybe!

Sorry, but I could not duplicate your issue. Have fun!!!

7 Aug 04, 2005 07:33

Okay, so after looking a little closer at the link that's now coming up:
http://www.aestaria.com/indexx.php?p=45&more=1&c=1&tb=1&pb=1&cat=#more45

:p ...I see that it's not the original one that was generated by b2evo, but an altered one (by me, when I was playing around with the _class_item.php file..).

I really am not skilled in PHP, but I played around with it never the less, and changed my code on line 536 in _class_item.php from:

 '<a href="'.$this->gen_permalink( 'pid', $more_file).'#more'.$this->ID.'">'.$more_link_text.'</a>' .


to:

 '<a href="'.$this->gen_permalink( 'pid', $more_file).( get_bloginfo( $curr_blogparams).'&amp;cat='.$cat_ID ).'#more'.$this->ID.'">'.										$more_link_text.'</a>' .


the "cat=" in the link is the thing that's making it work..

8 Aug 04, 2005 07:39

EdB wrote:

http://www.aestaria.com/indexx.php?cat=30 shows me a blog with one post that contains a "read more" link, and a permalink.
The read more link sends me to http://www.aestaria.com/indexx.php?p=45&more=1&c=1&tb=1&pb=1&cat=#more45 which, as far as I can tell, provided me the full post. Well, one additional line but no opportunity for trackback url or to make a comment. If that is the rest of the post then the read more seems to work.
The permalink is a different story. The permalink icon sent me to http://www.aestaria.com/indexx.php?title=b2evolution&more=1&c=1&tb=1&pb=1 which tells me there is no post to display. I believe that is the 'clean url' format - a checkbox in your admin area, and something that doesn't always work. There is a note that says "...if your host supports it...", and there have been comments in this forum about what you can do to get that to work. For me it worked when I checked the box so I have no direct knowledge of what it takes to make it happen. That's not really your read more issue, but it might be somehow related. Maybe!

Sorry, but I could not duplicate your issue. Have fun!!!

Okay, you say that the permalink doesn't work, and I agree. But when I add a "cat=" to the URL, it comes up! Like so:
http://www.aestaria.com/indexx.php?title=b2evolution&amp;cat=&more=1&c=1&tb=1&pb=1

So, now all I have to do is figure out in what file I'll find this piece of code, and change it like I did with the "Read More"... :) Any suggestions as to what file it would be in?

9 Aug 04, 2005 08:12

Sigh, okay, tackled the Permalink problem! It was the same file, _class_item.php, on line 200:
I changed the code from this:

$permalink = url_add_param( $blogurl, $urlparam.$glue.'more=1'.$glue.'c=1'.$glue.'tb=1'.$glue.'pb=1', $glue );

To this:

	$permalink = url_add_param( $blogurl, $urlparam.'&amp;cat='.$glue.'more=1'.$glue.'c=1'.$glue.'tb=1'.$glue.'pb=1', $glue );


Goodie, everything working now...thanks for your patience!! and if I've done something wrong or it might potentially cause problems, please tell me so.. :D . Thanks again.


Form is loading...