Recent Topics

1 Jul 17, 2005 22:30    

I want to use the titles from the blog all in a page that links to that section...like...I have an index page on the site that's not b2 evolution and I want to pull all the titles from the blog all to show in the index page. So as someone adds a new entry to their blog it shows up on the front of the site. Would anyone have any suggestions as to where I should start looking or what I can do to make this happen?

2 Jul 17, 2005 23:12

Take a look at the summary.php file. I think it does something very similar to what you're looking for.

3 Jul 18, 2005 00:28

Thanks I will try that

4 Jul 18, 2005 01:04

Ok...I'm very well versed in html, am above the learning curve w/css and div tags....I'm not very good w/php. Is this what I need to place in my page to get the blog titles to aggregate on the static php page from the summary file?

<?php // --------------------------- BLOG LIST -----------------------------
	for( $blog=blog_list_start('stub');
				$blog!=false;
				 $blog=blog_list_next('stub') )
	{ # by uncommenting the following lines you can hide some blogs
		// if( $blog == 1 ) continue; // Hide blog 1...
		?>
<h3><a href="<?php blog_list_iteminfo('blogurl', 'raw'); ?>" title="<?php blog_list_iteminfo( 'shortdesc', 'htmlattr'); ?>"><?php blog_list_iteminfo( 'name', 'htmlbody'); ?></a></h3>
		<ul>
		<?php	// Get the 3 last posts for each blog:
			$BlogBList = new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '3', 'posts' );

			while( $BlogBList->get_item() )
			{
			?>
			<li lang="<?php the_lang() ?>">
				<?php the_time( 'd.m.y' ) ?>:
				<a href="<?php permalink_link() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php the_title( '', '', false ); ?></a>
				<span class="small">[<?php the_lang() ?>]</span>
			</li>
			<?php
			}
			?>
			<li><a href="<?php blog_list_iteminfo('blogurl', 'raw'); ?>"><?php echo T_('More posts...') ?></a></li>
		</ul>
		<?php
	}
	// ---------------------------------- END OF BLOG LIST --------------------------------- ?>

5 Jul 18, 2005 06:55

Can someone help me here?

6 Jul 18, 2005 08:37

I can not understand what you want exactly, but the code you pasted will show the complete text of the 3 last posts in every blog exept blog 1

7 Jul 18, 2005 21:51

ok, I want the titles of the posts in the aggregated blogs(blog_all) to be placed inside a free standing page webpage(a page that is totally sep from b2evo.)

I want the titles of the new entries in blogs of the ppl on my site to show up on the front page of the site, so that when a new entry is added it auto updates to the front of the site. Is there something I can use that will easily facillitate that?

8 Jul 18, 2005 22:00

Yes, there is, but not "totally separate from b2evo." If it shows b2evo content, and is "auto-updated" when you enter a new post, then it's not "totally separate" - any more than salad is totally separate from lettuce.

Look at the summary.php, like personman told you.

Learn php in the process. The file is heavily commented, and should be easy enough to learn from.

Make your "front page" a .php page, and do the same thing in it that summary.php does.

Better yet, just use summary.php, and tweak it until you get it to look like your existing front page (with the links to the recent articles, of course,) and then rename it to "index.php" when you're done.

There's a million ways to do this, but all of them involve accessing b2evo in some way from your main page.

9 Jul 18, 2005 22:05

Do an include for the code you need. So, in your main page, you'll have something like this

<?php include 'http://www.yoursite.com/blogs/summary.php'; ?>

Then you'll need to massage the code in summary.php to show what you want (or make a new file, paste in the code you need and include that instead).

10 Jul 21, 2005 20:51

Thank you for that information. That was absolutely correct. A friend of mine (fortunately) gave me that information a few days ago and I used it to pull the blogs in from the summary. For the gentleman that suggested that I sit and learn php when I have a project to finish, I don't appreciate your glib comment. For the others in this forum that have been so helpful thank you very much for all of your help. :)

11 Jul 21, 2005 22:15

I think there's been a misunderstanding. Of all the b2evolution contributors, Isaac is probably the least likely to be glib or mean in any way. I think he was just saying that sumary.php is one of the files that you can learn a lot from. It's true. I've learned more php from editing evoskins than I have in any other way. He was pointing out a good opportunity for learning rather than telling you that you should become an expert coder before asking more questions.


Form is loading...