Hello, and ughhhhh... here's the error:
I'm guessing - something is messed up with the nested single/double quotes.
Here's the function:
Code:
function some_function ($count=10, $exclude='user1,user2', $before='<li>', $nourl='www.boo.com', $after='</li>', $before_count='(', $after_count=')') {
global $wpdb, $posts;
$posts=$wpdb->get_results("SELECT u.*, p.*
, COUNT(*)AS CRNT
FROM $wpdb->posts p LEFT JOIN $wpdb->users u
ON u.ID = p.post_author
WHERE p.post_status = 'publish'
GROUP BY post_author
ORDER BY CRNT DESC");
$excludes=explode(',', $exclude);
$style1='margin-bottom:10px';
$style='width:200px; height:80px; clear:both; border-width:3px 3px 0 3px; border-color:#41525D; border-style: solid';
$style2='float:right; width:70%; text-align:right; font-size:9px;color:#fff;';
$style3='width:30%; float:left; font-size:9px; color:#fff;';
$style4='width:190px; background:#41525D; height:15px; padding:5px; border:3px solid #41525D;';
$authlink='http://www.skineart.com/art/author/';
$infolink='http://www.skineart.com/topcontributors';
$contributors='http://www.skineart.com/contributors';
$blank='_blank';
$follow='follow';
foreach($posts as $post) {
if (!in_array($post->display_name, $excludes)) {
if (check_not_null($post->user_url) && $post->user_url != 'http://' && check_not_null($post->user_avatar)){
$urle=$post->user_url;
echo "<a href='" .$urle. "' rel='".$follow."' target='".$blank."' title='" .$urle. "'><img src='" .$post->user_avatar. "' alt='" .$urle. "' /></a><a href='".$authlink.$post->user_nicename."'>$post->CRNT [+]</a>$post->display_name.$after;
} else {
$urle=$authlink.$post->post_author;
echo "<div style='".$style1."'><div style='".$style4."'><div style='".$style3."'><a href='".$authlink.$post->user_nicename."'>$post->CRNT [+]</a></div><div style='".$style2."'>$post->display_name</div></div></div>".$after;
}
if (++$ccount == $count) break;
}
}
echo "<a href='" .$infolink. "'>What's this?</a>";
echo "<br/><br/>";
echo "<a href='" .$contributors. "'>View full list of contributors</a>";
}
... and here's the line causing the error:
Please help!