View previous topic :: View next topic |
Author |
Message |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Thu Dec 19, 2002 12:46 am Post subject: simple way to add '?(blogname)&paged=x' string to any pa |
|
|
hi,
please take a look at my page (still under construction)at http://members.lycos.co.uk/roofdog/welcome.php , i have my weblog integrated on the main page, but when visitors click on the 'previous posts' or 'next posts' links they get taken to the appropriate part of the weblog but on the b2.php page itself. this doesnt happen when you click on the category links on the weblog, so i wondered if theres a way to use the 'previous' and 'next' interface on the weblog but just adding the
string onto the end of the url of the CURRENT page to which the weblog is integrated? it seems quite a simple thing to do but im a php novice at the moment - hope you can help me!
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Thu Dec 19, 2002 1:13 am Post subject: |
|
|
Hi roogdog,
What do you have $blogfilename set to in b2config.php? I bet it's b2.php.
$blogfilename should be set to the the template that is used to render you blog site. In your case that would be welcome.php I would guess.
michael e |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Thu Dec 19, 2002 1:18 am Post subject: |
|
|
yes i have it set to b2.php, but if i changed it, would it actually *publish* the weblog in welcome.php, or is this just for the purpose of when the program creates links such as the ones im trying to use? i dont want to change the config file to find out that b2 has wiped the front page of my website!
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Thu Dec 19, 2002 1:27 am Post subject: |
|
|
roofdog,
You pointed us to the "welcome.php" page in your post. Is this the page that viewers of your site are going to go to to see you blog? Or is this an attempt at some two step sequence?
I don't understand what you ment by "b2 has wiped the front page of my website".
Talk to me,
michael e |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Thu Dec 19, 2002 1:33 am Post subject: |
|
|
hi,
yes, welcome.php is my roofdog main page, and i SSI b2.php into the page to form the content for the 'weblog' box. the reason im asking about a simple way to generate 'previous' and 'next' post links is because if you check the 'category' links in the weblog section, they are generated correctly, presumably just adding the query string to end of the 'current' URL, instead of using the b2.php URL. i'm just wondering if theres a way of telling the weblog to generate just the last part of the URL and add it to the current URL that the visitor is looking at?
try clicking on the category links first, then click on the previous and next post links, and you;ll see what i mean.
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Thu Dec 19, 2002 2:04 am Post subject: |
|
|
Hi again,
I understand, but the value for $blogfilename is used in a lot of places in the generation of a url. Having it point to the b2.php page may not give you the what you expected.
After re-reading your posts and your concern about your "front page" you may be misunderstanding how b2 functions. It never write to a file (at least in this sense.) So if you are concerned that b2 would "wipe out" you page, that wont happen.
The $blogfilename variable is primarily used in creating urls. I did a quick review of its usage in b2, and I would think your going to have more issues like this with it being set to b2.php. So, even though you are including the b2.php page via SSI, $blogfilename should be set to the page that is being used to render the weblog contents; welcome.php in your case. Thus, where urls are completely generated, they will point to the correct page (welcome.php).
michael e
[edit] I just looked at your archive links and they will use b2.php as well. |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Sat Dec 21, 2002 10:50 am Post subject: |
|
|
hey,
i've changed the blogfilename to b2.php now, thanks a lot for your help! now i just have to fix the comments problem, because as you mentioned, lycos hosting makes the comments lead to a 404. any idea how to get around this?
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Sat Dec 21, 2002 6:47 pm Post subject: |
|
|
roofdog,
Look at this tread:
http://tidakada.com/board/viewtopic.php?p=8118#8118
This code goes near the end of the file b2comments.post.php at about line 130 (just prior to setting $location). The code builds a page that the user can then click the link and get back to where they should be. It's a kludge, but it's better than the 404 page
Code: |
?> <!-- escape to html -->
<html>
<head>
<!-- headstuff.... -->
</head>
<body>
Thanks for posting your comment, click
<a href="<?php echo $HTTP_POST_VARS['redirect_to'] .$querystring_start.'p'. $querystring_equal.$comment_post_ID.$querystring_separator.'c'. $querystring_equal.'1'; ?>">here</a> to return to the comments page<br />
</body>
</html>
<?php /* escape back to php */
exit;
|
Michael e |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Sun Dec 22, 2002 5:47 pm Post subject: hey |
|
|
thanks for that, i've changed my code as you suggested and the comments popup is behaving itself now! now all im looking for are a few other tweaks, such as finding out if theres a command where users of the site can choose how many posts are displayed on the page, so they can view them all/one at a time if they wish?
roofdog |
|
Back to top |
|
 |
|