PDA

View Full Version : [Update] Habbo Badges on your site



Moh
29-03-2009, 12:28 PM
This thread is an update to this thread:
http://www.habboxforum.com/showthread.php?t=570172

A lot of Fansites have custom page headers & titles, which I couldn't make a template which would fit all the sites.

So I now made it so that you can change the headers of the categories to how ever you want them :)

You can find out how to do this, plus more by visiting the links below:

Integration & Information (http://habbcrazy.net/files/external/badges_howto.html)
Demo (http://habbcrazy.net/files/external/badges_demo.html)

Dentafrice
29-03-2009, 01:14 PM
This thread is an update to this thread:
http://www.habboxforum.com/showthread.php?t=570172

A lot of Fansites have custom page headers & titles, which I couldn't make a template which would fit all the sites.

So I now made it so that you can change the headers of the categories to how ever you want them :)

You can find out how to do this, plus more by visiting the links below:

Integration & Information (http://habbcrazy.net/files/external/badges_howto.html)
Demo (http://habbcrazy.net/files/external/badges_demo.html)
Why don't you just make it have ids and classes and then a user could just do..



<style type="text/css">
#badge_table {
width: 100%
}
</style>

<script type="text/javascript" src="http://sitetothing/blah.php"></script>

That way you don't have to do all of that. ;)

Moh
29-03-2009, 01:19 PM
Why don't you just make it have ids and classes and then a user could just do..



<style type="text/css">
#badge_table {
width: 100%
}
</style>

<script type="text/javascript" src="http://sitetothing/blah.php"></script>That way you don't have to do all of that. ;)
If everyone used tables on their sites then I would. But some people will use divs, headings etc..

kk.
29-03-2009, 01:25 PM
but surely they could just add #badge_table into the CSS and its all good?

Moh
29-03-2009, 01:47 PM
but surely they could just add #badge_table into the CSS and its all good?
That would mean they would have to set it all up again :(

Dentafrice
29-03-2009, 01:47 PM
If everyone used tables on their sites then I would. But some people will use divs, headings etc..
That doesn't matter though, you're returning it in tables.

And even if they did use divs, they could style them, themselves.. on their server.. no need for useless get variables and things like that for things that can easily be styled on the other side.

Moh
29-03-2009, 01:52 PM
That doesn't matter though, you're returning it in tables.

And even if they did use divs, they could style them, themselves.. on their server.. no need for useless get variables and things like that for things that can easily be styled on the other side.
What if they have 3 rows like we do:

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<td id="header-left" />
<td id="header-center">HabbCrazy Staff List</td>
<td id="header-right" />
</table>

Surely its easier for them to just set the HTML than work out how they could make it work for 3 or 1 rows?

Blob
29-03-2009, 06:30 PM
For more advanced people you should just return a load of badges names so they can style them / use them how they want. Or make an api that does that they can then download.

Edited by ReviewDude (Forum Moderator): Identical double-posts merged.

Dentafrice
29-03-2009, 06:38 PM
Or you can just return it all and let the users style it themselves, no need to get that complicated with it.

Dentafrice
29-03-2009, 06:48 PM
For more advanced people you should just return a load of badges names so they can style them / use them how they want. Or make an api that does that they can then download.
Why double post the same thing?

This isn't going to be that advanced people.. these are Habbo Fansite owners, not application developers, so why make an API? (plus.. you don't download an API, you download a library to communicate with it).

I don't see the point in returning the data so they can style them, because that's just doing the same thing as HabbCrazy's is doing, but doing the parsing on your server instead of theirs.

Blob
29-03-2009, 06:51 PM
Why double post the same thing?

This isn't going to be that advanced people.. these are Habbo Fansite owners, not application developers, so why make an API? (plus.. you don't download an API, you download a library to communicate with it).

I don't see the point in returning the data so they can style them, because that's just doing the same thing as HabbCrazy's is doing, but doing the parsing on your server instead of theirs.

I thought I didn't post it as my page was still open on the post, so I posted it.

Anyway, sorry for posting, I'll go back into hiding now like everyone else.

Dentafrice
29-03-2009, 06:53 PM
I thought I didn't post it as my page was still open on the post, so I posted it.

Anyway, sorry for posting, I'll go back into hiding now like everyone else.
No, can't you have a normal discussion?

Why would they need to create an elaborate API, for something that can so simply be styled by CSS?

Blob
29-03-2009, 06:56 PM
No, can't you have a normal discussion?

Why would they need to create an elaborate API, for something that can so simply be styled by CSS?

I didn't mean it as an API, I mean't it as a script that parses the page that just has the badge names on it, showing the website owner how to style it so they can edit it, so they can customize it how they want, e.g using lightbox on it to say what hotel its from or why the habbo got it.

Dentafrice
29-03-2009, 06:58 PM
True, but you also have to look at the fact that there is a lot of badges being returned and parsed through.

Blob
29-03-2009, 07:00 PM
You could copy a list of all the badges off the page and just do a cron job every 2 days / week or something and if the pages aren't the same, update it and save it to the same page, that way it doesn't parse it everytime you go on the badge. (You could also have an over ride option if you change styling or something)

Dentafrice
29-03-2009, 07:01 PM
You could copy a list of all the badges off the page and just do a cron job every 2 days / week or something and if the pages aren't the same, update it and save it to the same page, that way it doesn't parse it everytime you go on the badge. (You could also have an over ride option if you change styling or something)
But that's really using more resources then it's worth.

Plus in your idea, you'd have to then write what each badge was for, etc.

I just think right now, in it's current form (the way it is displayed) is the best, but things could be added to better style it via CSS instead of URL params.

Blob
29-03-2009, 07:10 PM
Its an idea for the future, it just puts the load of them and offers some alternative styling as well.

Or instead of the checking just update the page every week.

Or do it like this:

Have the main file in parts (badges.uk.txt) then the main file reads them and just puts them all together then do like for example:

Cron Jobs
Monday - Update UK/ES Badges (If there are new ones)
Tuesday - Update US/FI Badges (If there are new ones)
Wednesday - Update New/Unsorted Badges and Update General Badges (If there are new ones)
Thursday - Update Campaign/FR Badges (If there are new ones)
Friday - Update Achievements/IT Badges (If there are new ones)
Saturday - Update AU/NL Badges (If there are new ones)
Sunday - Update CA/SG/Other Badges (If there are new ones)

It would be alot of work to do, and you could just do a cron job for everyday that goes to a PHP file that sorts that work out, because then it takes load of your server for not doing them all at one time, and then it takes load of theirs cos they don't have to parse it everytime a user visits a page with that on, and habbo don't often release new badges every week anyway.

Want to hide these adverts? Register an account for free!