I am using guestbook 5.x-2.x-dev.
Tried to display it on user profile ( I am using Advanced profile kit 5.x-1.0-beta1) panel page. Successfully working when guestbook is enable. When a user disables his guestbook, " page not found" error message displayed along with distorted profile page.
I went through the node http://drupal.org/node/34484 .
<?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);
}
}
?>Where to use this code ? I don have a user-profile.tpl.php as I am having APK . Poor i am, please help.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | guestbook-DRUPAL-5--2.404.patch | 1.43 KB | sun |
Comments
Comment #1
sunI'm not sure how APK works, or worked in 5.x. Basically, Guestbook 5.x-2.x already provides a Panels content-type, which can be used in panels that have a user argument/context (without any custom code).
Above code looks like it could go into a template file in your theme, but I really have no idea.
Comment #2
michelleAs Sun said, use the panels content type that guestbook is providing.
Michelle
Comment #3
godfather1 commentedHi sun,
embedding code with template.php is not helping..
still trying to figure out...but no result.
Comment #4
sunYou should listen to Michelle.
Comment #5
godfather1 commentedHello Michelle,
I am able to add the panels content type that guestbook is providing to "user profile" and working fine when guestbook is enabled. My problem is when user disables his guestbook, "page not found" message is displayed along with the distorted profile layout. How to encounter this ?
sorry for the inconvenience
Comment #6
michelleOk, that I can't help with. The guestbook / panels integration needs to return either empty or a message that the guestbook is disabled, not a page not found, since it's not a page.
Michelle
Comment #7
sunPlease test attached patch and report back if it works for you.
Comment #8
sunMarking as duplicate of #356362: Compatibility with Panels 6.x
Comment #9
godfather1 commentedSorry for replying late. Was busy with some other works.
The above attached patch worked well and disabling gusestbook doesn't harm the site anymore.
Thank you very much.