Page 1 of 1
Show Username without having it required
Posted: 06 Nov 2009, 21:37
by chaintrooper
Hello,
I did some searching in the forum but couldnt find the answer yet. I'm saying this, because I'm quite surprised that nooned had a similar problem. Well, whatever, I need help in this issue:
To get to my guestbook, users must be logged in. I want them to give a title and the content (so both are required), but when the massage is shown, I want the username to be visible. What I desire sounds pretty normal to me, but could not get it to work after I tried all kinds of config combinations.
Thanks in advice!

Re: Show Username without having it required
Posted: 06 Nov 2009, 22:05
by Jan
Hi, sorry I don't understand where you want to display the username. It is displayed in the messages:
see:
https://www.phoca.cz/demo/phoca-guestbook-demo
(there only guests can leave message so the guest is displaying, instead of guest the username is displayed there.
Jan
Re: Show Username without having it required
Posted: 06 Nov 2009, 22:38
by chaintrooper
Hi Jan,
and thanx for the quick answer. Let my try to explain once more. First of all, the area, where my guestbook is, can only be viewes by registered users. Which means, I have no guests, and they have nothing to do with my problem.
Let me make an example: A registered user logs in, clicks to the area, where he can leave massage. He enters a title and a content (but no name). So far so good. What I want now is, when the massage is displayed, I want it to include, this users username, eventhough he has never entered it.
I could solve this problem, by enabling the option "name required", but then it's field he can manipulate and write the name of some other user. I want the massage to show the authors username, without giving him the chance to delete or manipulate this.
Re: Show Username without having it required
Posted: 09 Nov 2009, 11:27
by chaintrooper
Come on guys! It can't be that difficult: I just want the guestbook take the name of the registered user automatically, so he can't manipulate it?!?!

Re: Show Username without having it required
Posted: 14 Nov 2009, 00:42
by codejunkie
Edit: A better and similar
solution is here. You still need to use the code snippet below.
For clarification only as I do not use this component.
You would like the component to fill in the current user's name for their comments they post. You do not want this field to be editable by the users.
You might try this edit on the
/front/views/phocaguestbook/tmpl/default.php file. Find this bit of code at about line 235, assuming you are using the 1.3.2 version of Phoca Guestbook
Code: Select all
<input type="text" name="pgusername"
Add this afterward. (Make sure to have a space around it.)
You probably also need to require user names for this to work. This is not tested.