Its nice to greet your visitors with a personal message when they revisit your site. The following is a simple method I use to place a greeting in the comments form.
If the visitor has commented before and their info is “remembered”, then in this example their name will be displayed.
Open your comment_form
Welcome back <txp:php>echo pcs('name'); </txp:php>
Enter the above into your comment_form where you wish the greeting to be displayed. Edit as you see fit.
To prevent “Welcome back” from appearing for those who haven’t commented, use the following:
And if I want to replace any other text with this – is there any “else” option?
You should at least pass
pcs('name')
throughhtmlspecialchars
. If in doubt, it all can be done with etc_query plugin:Sorry, it should be