Redirect Page On Badge Granting

Don Von Alpha Dom
by Don Von Alpha Dom · 2 posts
12 years ago in My Badges Panel
Posted 12 years ago · Author
This code stops badge autogranting and instead when someone tries to get your badge, sends them to a page. Many devs are using this to redirect people to a product page where they promise to give you the badge if you buy their product.

Code
<script type="text/javascript">
$(document).ready(function() {
var myIMVUID = 25522141;   // this is mine, substitute your own
var productID = 13850517;  // used to redirect to a product page
var badgeNumbers = [1,2,3,4]; // if you only have one badge, use [1]
for (var i in badgeNumbers) {
   YAHOO.util.Event.removeListener('grant-badge-' + myIMVUID + '-' + badgeNumbers[i], 'click');
   YAHOO.util.Event.addListener('grant-badge-' + myIMVUID + '-' + badgeNumbers[i], 'click', function() {
      window.open("http://www.imvu.com/shop/product.php?products_id=" + productID, "_blank");
   });
}
});
</script>
Posted 4 years ago
thank you so much for this. I've been getting so sick and tired of people going and autogranting al of my badges. They steal my ideas and it gets very annoying because I put all of my hard work, time and effort into building and good badge for myself and to sell to others and for people to just go and steal that, is unreal. Thank you for this code i hope that it will help a lot with the problem that i'm having right now. All of these codes that you are mentioning are great codes and very useful and hopeful. Great work!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT