Storing User Info
1. If they have cookies turned on in their browser, you shouldn’t need to do anything for them. WordPress sets these in its cookie file the first time they comment on your site.
2. Get them to register and login before commenting, as this info can be passed to the comment form.
Sorry, should’ve explained it better.
I meant that it stores the information for the people, and it doesn’t displays “Welcome Kafkaesqui” and beside it a “Change” link for changing it and just message field/box.
Do you know what I mean?
I don’t know what you meant. I thought Kafkaesqui’s anwer already covered it.
“[I]t doesn’t displays “Welcome Kafkaesqui” and beside it a “Change” link for changing it and just message field/box.”
You can duplicate the functionality found in the default theme’s comments.php that would let you set up something like this for users who are logged in; there’s some testing that occurs on
$user_IDin that template. Beyond this I’m not sure about what you’re looking for.
Sorry for the late reply. I mean something like this.
What you show on the image is not a WP thing. It seems to be some kind of “chatting” plugin or whatever added.
First, you should have clarify that in your original post; secondly ask about it at its author’s site.
Moshu, it’s from K2. I didn’t ask Michael about this since he said that all WP related questions should go here?
I’ll see if I should mail him.
<?php if ( $user_ID ) : ?>
Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout »</a>
“Logged in as TedFox. Logout Â»”
I’m sure u can change the specifics as needed easily.
No need for plugins, but only works if person commenting is registered
Tedfox, I know that. But I needed something like this. So when people come the next time to post comments, it doesn’t show them the name, email, website fields since it’s already stored.
Thanks for the reply though. 🙂
bk, that’s pretty much what tedfox just showed.
As I noted above, the default theme’s comments.php does what you’re asking. Just copy the comment form element from that and modify to suit your needs (such as changing the text to say Welcome back …).
Yes, they would. It would have helped if you had specified this was not what you were after…
- The topic ‘Storing User Info’ is closed to new replies.