In an MU install, how do I call a users blog? Is there a code snippet that will call a users blog from any page on the site?
I was trying to do it with this:
- The topic ‘Blog Call’ is closed to new replies.
If you want the actual front end templates rendered, then that’s quite complicated. Your function above would just return a link to the blog. What are you trying to do?
I am trying to enable it so a user on any blog (on the MU platform) & or page on the site can return back to their blog with one clickable link in the sidebar or header.
Any ideas on how best to accomplish this?
This MAY work for you.
Not a coder so it probably could be cleaned up !
@valuser that is fantastic. If you can accomplish that you can’t sell yourself short, maybe you’re more of a programmer than you think.
Got one last request – I need it to point to a directory, for instance:
any ideas on how to complete that?
I don’t quite follow.As far as i can recall i had tested this on multisite & on multisite/multinetwork.
The code (i think) gets all blogs of the user but “breaks” or stops at the first which is the users main blog.
Thus the eventual `$link = $user_blog->siteurl;’
returns the site url of the primary blog of the user .
So on multisite subdirectories it would return http://mydomain.com/theblogaddressofcurrentuser/
or on multisite subdomain it would return http://theblogaddressofcurrentuser.mydomain.com/
so Famous, if the setup was subdirectories and your blog (sub)address was famous, you would go to http://mydomain.com/famous/
If the setup was subdomains and your blog (sub)address was famous, you would go to http://famous.mydomain.com/
I probably worded that a little difficult. What I meant was that it works great. I just want it to point to a page as it hits the blog.
So for instance:
late here. so off the top of my head you will have to mess with `$var = “<a href='$link'`
you have to add /page1.php (that is of course if page1.php is the same for all user blogs) to `’$link’` it could be `’$link./page1.php’` or ` ‘$link’.’/page1.php’`
mess around with it as i will tomorrow but this is where lack of formal training shows up. A coder reading this would do it in a flash. The dot in .php could be messing it up. Hopefully an angel coder will see this post, smile and make it beautiful!