Postponed (maintainer needs more info)
Project:
Usernode Guestbook
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
22 Oct 2007 at 19:00 UTC
Updated:
27 Aug 2008 at 00:21 UTC
hi guys,
is there a way to embed the comments to my custom profile page?
i use node_load to load fields of my usernode
anyway to show comments on my custom profile?
module_invoke or any possibilitie?
greets
Lausch
Comments
Comment #1
marcor commentedWhat do you mean by custom profile page?
Comment #2
Lausch commentedi mean by user_profile.tpl
print module_invoke('comment', 'nodeapi', $node, 'update index');show me the titles and comments but no template
i also tryd
print theme('comment_view', $node, module_invoke_all('comment', 'nodeapi', $node, 'update index'));then i see the template from comment.tpl
but comment-cid and content will not work / shown
greets
Lausch
Comment #3
marcor commentedThanks for your private message, that helped a lot!
Usually the usernode_guestbook is rendered inside a normal, untouched profile-page.
As I understood your local approach, you don't use this, because you load several nodes into into your custom styled user_profile.tpl.php
You can render the usernode's comment box if you use the function usernode_guestbook_box($account); where $account is the user object of the user whose profile page is to be displayed. Note: The API has changed, the function was called usernode_guestbook_usernode($account) until revision 1.2.
Please reopen this issue if you need further help on it.
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
mariusooms commentedSorry for reopening this, but what is the code I would use in my custom user_profile.tpl.php. Actually I would prefer to use it in a block if at all possible. This is what I posted in my template.php, is that correct to override the function?
Thanks for assisting,
Marius
Comment #6
mariusooms commentedI thought the following should work but it doesn't.
In template.php
In user_profile.tpl.php
print $account;I'm kinda guessing how these theme overrides work, so it's no surprise it's not working. I really need to show the comments on my custom profile page with the comment post box. This module is exactly what I'm looking for, but without a solution for my profile page, I'm doomed. Any further help please?
Comment #7
Lausch commentedprint $account huh?
use this my friend:
and if you want to add the usernode_guestbook into a custom node template use:
regards
Lausch
Comment #8
mariusooms commentedThanks a ton Lausch...I have to admit, much of this php is abracadabra to me. So I took your code and together with the following line I stuffed it in a block like so:
However that shows my comments on everybody's profile page, since I'm considered the current logged in user. What argument do I need to include to make it so it shows the users own comments?
Thanks in advance,
Marius
Comment #9
Lausch commentedjust use ->
for guestbook on the profile tpl
and
on a node tpl
not global $user
regards
Lausch
Comment #10
mariusooms commentedRight...I failed to explain that without that line it fails to load the usernode guestbook properly for the user and returns "anonymous's guestbook is currently deactivated." So I used some code from another block and now it works perfect. Thanks for pointing me in the right direction. This is the added code to activate the user from a block:
Comment #11
Lausch commentedok good! im happy that your snipped work...
but something...
you told me, you embed the guestbook on your custom profile template?
if you really use a custom profile tpl you have not use the function user_load()
$user is already defined.
try to print $user->uid bevor you use user_load and after, you have to get the same UID twice!
i think something is wrong in your template at another place.
your guestbook works ok, but just for your information, something seems wrong.
regards
Lausch
Comment #12
telefunken commentedi'm wondering what is the result!?
best regards
tf
Comment #13
telefunken commentedneed help for the guestbook_block
i can write a comment, but the lines below the inputfield are not working/not collapsible...