0815

Du musst dich anmelden um Beiträge und Themen zu erstellen. Einloggen · Registrieren

Custom Message to Returning Visitors

We can greet returning commentators with a custom message by extracting their information from the comment cookie left on their machine. Place the following code into the desired location in your theme and customize the message and markup to whatever you wish:

<?php if(isset($_COOKIE['comment_author_'.COOKIEHASH])) {
	$lastCommenter = $_COOKIE['comment_author_'.COOKIEHASH];

	echo "Welcome Back ". $lastCommenter ."!";

	} else {

	echo "Welcome, Guest!";
} ?>

Source: ifohdesigns (404 link removed 2012/09/14)




0