Quote:
Originally Posted by BirdOPrey5
Sorry swapping out images would likely involve editing the Ajax JavaScript and that is not something I am familiar with.
|
Thank you for the response.
I intend to go about this a different way
If possible, please review this:
PHP Code:
<!--Post Thanks Button-->
<!--Post Thanks Button-->
<a href="post_thanks.php?$session[sessionurl]do=post_thanks_add&p=$post[postid]&securitytoken=$bbuserinfo[securitytoken]" id="post_thanks_button_$post[postid]"
<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_give($post[postid],
<if condition="$vboptions[post_groan_integrate]">true<else />false</if>);"</if>
<if condition="$display_thanks_image == 'none'">style="display:none"</if> rel="nofollow">
<img src="$stylevar[imgdir_button]/post_like.png" alt="Like This Post" align="center" border="0" /></a>
<if condition="$bbuserinfo['usergroupid'] == 6 AND $post['show_thanks_remove_option']"></if>
<if condition="$post['show_thanks_remove_option']">
<a href="post_thanks.php?do=post_thanks_remove_user&p=$post[postid]"
<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_remove_user($post[postid],
<if condition="$vboptions['post_groan_integrate']">true<else />false</if>);"</if>
<if condition="$display_thanks_image == ''">style="display:none"</if> rel="nofollow">
<img src="$stylevar[imgdir_button]/post_liked.png" alt="Unlike This Post" align="center" border="0" /></a>
</if>
<!--/Post Thanks Button-->
In testing this out, I've managed to get the images to display correctly to an extent. When you click the image, the image disappears, but the other image doesn't display until you refresh the page. When you refresh the page it looks fine again. Now, if you click "unlike this post", ajax refreshes immediately and you now have two images in the bar next to permalink (like and liked.png respectively) until you refresh the page.
I assume this is what you meant by the ajax function?
--------------- Added [DATE]1335397299[/DATE] at [TIME]1335397299[/TIME] ---------------
And apologies in advance, no matter what I do, copy/paste doesn't fully translate.