Cubepoint BuddyShare Modification
-
I have installed four following plug-ins.
1. Cubepoint
2. Cubepoint Buddyshare Integration
3. Buddypress
4. BuddyshareI can reward the points to the user if he/she posts or comments or any activity in the ‘Activity’ tab. Now, i want to reward user some points if he/she clicks on Facebook Share Button (The Facebook Image Icon). Please help me out. I have put some javascript/php code in ‘/wp-content/plugins/buddypress-share-it/buddy-share-it.php’.
I have added the function of PHP to the header, but how to add my javascript code?If i add:
<?php
echo ‘
<script language=javascript>
function addpts()
{
alert(“<? cp_alterPoints(cp_currentUser(), +8); ?>”);
}
</script>’;
.
..After that I have put the function on click event
…
echo ‘<li class=”bpsi”><img src=”‘ .$pluginpath . ‘/buddypress-share-it/img/’.$bpsi_iconsize.’px/Facebook.png” alt=”Share on Facebook”>‘;
?>But it is not working onclick, it doesnot wait for the ‘onclick’ event.
I want to know if i can add any PHP function in HTML onclick event.I would be very much thankful to you.
The topic ‘Cubepoint BuddyShare Modification’ is closed to new replies.