Forum Moderators: coopster
comment_author_link()and i want to pass the name to google so that someone can see how many times that name appears on the internet. For example, if search for the word test, this is the url:
I'd like to pass the author's name, not "comment_author_link".
Anyone have any ideas?
As I am new to this, should there maybe be a post statement sent to google?
the variable $author what does it contain? try to print it out IE
$author=comment_author_link();
print "$author";# see if its a string
print_r ($author);# see if its an array
If it contains what you are looking for (the authors name) then you can build on it, see what you get first
HTH
I put this block in.
<?php
$author=comment_author();
print "$author";# see if its a string
print_r ($author);# see if its an array
?>
I misposted earlier, it should be comment_author.
When the page displays, the name of the poster appears. but only if the $author=comment_author(); is not commented out.
Both the print statements display nothing.
Inside a PHP block:
<?php
echo '<a href="http://www.google.com/search?hl=en&q=';
comment_author();
echo '"> Search authors name via google</a>';
?>
Outside a PHP block:
<a href="http://www.google.com/search?hl=en&q=<?php comment_author(); ?>"> Search authors name via google</a>
See how popular
<?php
echo comment_author();
?> is on
<?php
echo '<a href="http://www.google.com/search?hl=en&q=';
comment_author();
echo '" target="_blank">Google</a>';
?>