Hi, I am user_profile.tpl for the profiles and I am stuck with integrating the user guestbook within the profile. I want the guestbook to be part of the users profile. I found some code searching the site here but it results in nothing. Any handy solution for Drupal 5.x available?

Best regards,

Mike

Comments

Muslim guy’s picture

http://drupal.org/node/165114#comment-267628

<?php
if (module_exists('guestbook')) {
  if(!$user->guestbook_status){  // guestbook_status seems to store 0 for enabled and 1 for disabled
     print module_invoke('guestbook', 'page', $user->uid);
  }
}
?>
LordEzek’s picture

Thanks a lot, it seems to break layout. What I need to know to avoid that is where and how to adjust the width of the embedded guestbook within the profile.

Also after singing the guestbook it jump directly to the guesbook page - it does not stay on the profile. Where can I change that?

Best regards,

Mike

Phillip Mc’s picture

There's a snippet here that validates: http://drupal.org/node/46976#comment-136424

if it works for you, can I recommend you add it to the Customising the User Profile section of the handbook...there's a lot of user profile related snippets there.

Drupal Handbook » Customization-Tutorials, HowTo and Snippets » PHPTemplate Theme Snippets

Phil

LordEzek’s picture

Well thank you and I know I used plenty of that stuff but not everything seems to work as it should or maybe I am just to dumb that's why I am asking in this forum, e.g. the buddies with pictures breaks the layout and their is no discribtion how to fix it same with the guestbook ... it is only a minor glitch compared with the buddylist problem but still it breaks the layout no matter if I use a div container or now - and I don't find anything how to customize the guestbook embedded within the profile or how to control the redirect if soemone signs the guestbook... or maybe I am just blind ^^