Recent Topics

1 May 02, 2006 07:18    

Hi, I'm using b2e in a multi-blogger environment, where each blogger has a single blog (I've set it up so that their Blog ID and User ID are the same, that makes my life easy).

What I want is on the all blogs page, for each item, to say, "posted at xxx time by xxx, author of ____ blog". I want the "____ blog" to link back to the blog of that author (in my case, there is only one). Because of my 1 author - 1 blog setup, I think I just need to know how to call the blog to which that post item belongs.

I tried putting some code in _main.php to fix this, but somethings a little wrong - would someone mind providing me with the little bit of code I need to do this? My primary goal is to provide an easy path to the author's blog from their posts on the allblogs page, but I'm fine with that link showing up on individual blogs as well (or I do think I have enough grasp of php now to only make it show up for allblogs :p ).

Much appreciated!

2 May 02, 2006 13:52

If you call up your blogs with http://domain.com/?blog=## then you can do something like this :-

<a href="<?php echo $baseurl.'/?blog='.$Item->Author->ID; ?>">Authors blog</a>

If you call up your blogs using sub domains or stubs then you need something similar to this :-


<?php
$auth_blog = Blog_get_by_ID( $Item->blog_ID);
echo '<a href="'.$auth_blog->siteurl.'">Authors blog</a>';
?>

¥

3 May 16, 2006 08:01

Thank you! Sorry for the delayed reply (computer died, sigh...) this was exactly what I needed. Much appreciated.


Form is loading...