I am using Views in D6 to create a page that lists the blogs (not blog entries; separate blogs) of all the users on my site.
The list includes the name assigned by the user to his/her blog. (I have added a field to Profile and made a simple hack to blog-page-user.tpl.php to insert that name.)
I want users to be able to click a link that will take them to the front page of each member's blog.
Again, I can add a field to Profile, but this time the value of that field needs to be populated programatically.
I think it should be very simple. When the user registers, a blog_url field is automatically created in Profile that reads (I think) $base_path + "/blog/" + $uid.
I'm not a programmer, but I hacked that value into function profile_form_profile of profile.module under case: blog_url. It's all just my best very unprofessional guess, but the relevant hack was
case 'internalurl':
$bp = $base_path; //declare a transient variable to hold the text;
$s = "blog/";
$longstring = $bp + $s + $uid;
//define the value of the variable as ($base_path) + t("/") + $uid).
//Then do the rest as in all the rest of the things as in the rest of these cases
//Make sure #default-value is the result of the new variable
$fields[$category][$field->name] = array('#type' => 'textfield',
read more
Add User blog URL to Profile
Drupal Modules