Rob
Forum Replies Created
-
Forum: Plugins
In reply to: Restrict conditions for something with mutliple add_actions?*desperate bump*
Is this perhaps a WordPress bug then? I don’t think many plugins use comment_post – certainly not to display anything.Forum: Plugins
In reply to: Restrict conditions for something with mutliple add_actions?I’m getting no results at all. It’s acting as though the plugin isn’t even there (and yes, I have made sure it’s activated!)
Forum: Plugins
In reply to: Restrict conditions for something with mutliple add_actions?Thanks again for the reply, and especially for spotting the bug with the comment id. Still doesn’t seem to be working though.
I’ve put the full source so far here: http://www.cunningtitle.co.uk/fadecomments.txt
Any idea what I’ve done wrong? I’m pretty new to PHP, and had hoped this would be a simple plugin!
Forum: Plugins
In reply to: Restrict conditions for something with mutliple add_actions?Thanks. I’ve tried to get this to work, but although this has removed the errors and doesn’t display the box all the time, it doesn’t seem to work, and nothing happens. I suspect something is wrong with this part of the code, but what?
add_action('comment_post', 'create_myvar');add_action('wp_footer', 'fade_comment');
function create_myvar() {
global $myvar;
$myvar = 1;
}function fade_comment() {
if ($myvar == 1) {
echo "<p id='commentsaved' class='fade'>Comment saved!
";
}
}Forum: Plugins
In reply to: Restrict conditions for something with mutliple add_actions?To put it another way, can I combine the following two actions:
add_action('comment_post', 'fade_comment');
add_action('wp_footer', 'fade_comment');
So that fade_comment is executed in the footer when a comment is posted.Forum: Plugins
In reply to: Recent posts news ticker/crawl implementationSorry to bring this topic up again, but I would be really interested to know how this was done. I’m trying to implement a similar thing for a site at the moment, and I can’t seem to find anything useful.