Recent Topics

1 Dec 30, 2005 22:07    

hello there,

Great software - thank you! I set up my blog a few weeks ago and its working really well!

Am working on a new plan. I would like to be able to merge highlights of my blog (as in say a couple of the most recent posts possibly shortened or in the form of teasers) into the homepage of my website.

Has anyone done anything like this before? Any suggestions on how to go about it?

Thomas
http://www.photography-art-contemporary.info/

2 Dec 30, 2005 22:20

There's a file called summary.php that comes with b2evolution. Check it out. You might be able to modify it and then include it in your homepage to do what you want.

3 Dec 30, 2005 22:59

Thanks personman - i'll do that!

4 Dec 30, 2005 23:16

I just had a look at the summary file - it looks like it has the bits for putting together a sitemap or a table of contents:

http://www.photography-art-contemporary.info/summary.php

What I am looking for is more like the title, details and first x words of a blog entry. Do you think the code for 'the first x words of the blog entry' would be around anywhere?

5 Dec 30, 2005 23:34

summary.php will show the last five posts from each blog. But, like I said, you'll have to modify it for your purposes. Strip out the formatting and stuff that you don't need. You'll need to add $Item->content() to display the post content. To cut the content down you have a couple of options. You can use the Read More tag when you're writing the post to break it into a teaser and a main body of the post. That will affect how your blog displays, too, not just the summary page. Or, you could do some tricky hacking in the summary.php to grab the content, then truncate it. If you want to go that way, I can help you.

Another option is to skip this whole thing and use something like magpierss to include post summaries into your main page.

6 Dec 31, 2005 00:06

Ok, this isn't so bad. I've modified my summary.php file in the direction you want:

http://www.brendoman.com/b2e/summary2.php

I removed the header and added in the first 10 words of each post. Note that this is showing the latest 3 posts for each blog, but you could limit it to one blog easily. Let me know how you want it to look and I'll keep tweaking this. When you're ready I'll give you the source code and you can put it on your site and include it in your main page.

7 Dec 31, 2005 00:55

wow! thanks for you help!

can't look at this now - party going on - will check it in the morning...

you're a star!

8 Feb 03, 2006 02:30

I dont want to needlessly start a new thread - I think this is roughly talking about what Im after...

I have a few bloggers on my board, and what Ideally I would like is when they blog, for their name and title of their blog to appear on my .php. homepage.

I am unsure how exactly to edit my summary.php file... is there a wlk through anywhere here I could read?

9 Feb 04, 2006 05:23

The summary.php file is fairly well commented, so just open it up and see if what it says makes some sense. Trial and error could help you out a bit in this case, I think.

10 Feb 11, 2006 04:29

Ok this thread is along the lines of what I want; just need to clarify how I would randomise.

What I want it to display a *Random* blog of the week on my homepage. I want it to havethe blog title, entry description and say the first 25 words for the latest blog entry. Then I want a "read more" link.

I think the summary demo provided will help me with most of this, but how would I go about extracting a *random* blog and display it. I want it to only change the displayed blog *once* per *week* and to do with change automaticly.

11 Feb 14, 2006 00:46

Should I use a stub file, or this summary file to display just a single blog?

The blog I want to display is #2, but I don't know how to exclude multiple blogs from the summary.php file. What would that snippet look like? thanks (my error was: Parse error: parse error, unexpected T_DNUMBER)

12 Feb 15, 2006 02:48

solecist, you should use a stub file to display a single blog. Just open up the a_stub.php example and edit it with the correct info for your #2 blog, then save it as a new file name like (myblog.php). Then in the backoffice you can go into the blog properties for blog #2 and point it to your myblog.php. That should get you set to see http://www.mysite.com/myblog as the url.

13 Feb 15, 2006 02:50

smash, you might want to post your request in a new thread and see if there are any php gurus out there willing to lend a hand.


Form is loading...