vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Galaga Hack v1 (https://vborg.vbsupport.ru/showthread.php?t=72214)

Zero Tolerance 11-25-2004 10:00 PM

Galaga Hack v1
 
This is an old hack, made for vb2 around 3 - 4 years ago, however a nice little addition that i and my members enjoy.

So what does it do?
Dependant on the user's post count, stars appear in the postbit under there username.

0 Posts = 1 Yellow Star
100 Posts = 2 Yellow Star
200 Posts = 3 Yellow Stars

Etc..

Upon getting 1000 posts you will go back to 1 star, but a new color instead of yellow.

The colors are in this order:
Yellow
Grey
Green
Blue
Red

Higher the color and amount of stars, higher the persons post count.

Any questions post below, i have attatched a screenshot as an example for you all :)

Enjoy,

- Zero Tolerance

Marky 11-26-2004 05:44 PM

Whoa, nice hack dude ^_^
Keep up the shweeeet work :)

[high]* Marky clicks install ^_^[/high]

SSJ 4 Goku 11-26-2004 05:46 PM

Looks good mod ZT im enjoying this *clicks install*

Koutaru 11-26-2004 07:02 PM

I've already done something similar to this with user ranks I believe.

HiDeo 11-26-2004 08:14 PM

Nice job !

Personally I use ranks ;)

Mephisteus 11-26-2004 08:22 PM

Isn't this a default vB3 feature using rank images?

Just wondering :)

Skyline_GT 11-26-2004 08:45 PM

nice hack:D

paulmjno 11-26-2004 10:04 PM

This is great. :) Now I can have 2 ranking systems. Installed.

paulmjno 11-26-2004 10:37 PM

Quote:

Yellow
Grey
Green
Blue
Red
Are you sure this order is correct?

paulmjno 11-26-2004 10:53 PM

A bug: some of my users dont have stars... and they have made well over 100 postings... most of them do, though...

Zero Tolerance 11-26-2004 11:11 PM

Quote:

Originally Posted by paulmjno
A bug: some of my users dont have stars... and they have made well over 100 postings... most of them do, though...

They must have atleast 100 or above posts before they get their first yellow star. :)

- Zero Tolerance

Kagen 11-26-2004 11:15 PM

can u edit it =/
so they can get it much earlier

paulmjno 11-26-2004 11:56 PM

Quote:

Originally Posted by Zero Tolerance
They must have atleast 100 or above posts before they get their first yellow star. :)

Yes, but they have made well over 100 postings... most have stars, but some (who are supposed to) don't...

For instance: one of my users has 2,010 posts... but has no stars.

twoseven 11-27-2004 12:02 AM

just change the math involved in the functions_showthread

paulmjno 11-27-2004 12:40 AM

Is it possible to have sets of stars? So, instead of it setting back to 1 star with a different colour... the different colour stars would go underneath the previous ones? It makes more sense... and people will understand it better... the more stars, the more posts...

TCattitude 11-27-2004 10:18 AM

And if instead of the stars, use the real galaga images?

(see attachment)

And like roman numbers, sum with them.

Examples:
If a user have 1 post, he got 1.gif
If a user have 5 post, he got 5.gif
If a user have 7 post, he got 5.gif and two 1.gif
If a user have 150 post, he got 100.gif and 50.gif
If a user have 1277 post, he got 1000.gif, 200.gif, 50.gif, two 10.gif, 5.gif and two 1.gif
etc.

So complicated?

I've seen it long time ago in a ubb board (perl version).
This look amazing and very entertained for the users.

Anyways... is just a suggestion :)

paulmjno 11-27-2004 05:32 PM

Hm, has anyone looked into that bug I reported?

oldfan 11-28-2004 02:01 AM

lol, I remember that ;)
Good ole ubb

Quote:

Originally Posted by TCattitude
And if instead of the stars, use the real galaga images?

(see attachment)

And like roman numbers, sum with them.

Examples:
If a user have 1 post, he got 1.gif
If a user have 5 post, he got 5.gif
If a user have 7 post, he got 5.gif and two 1.gif
If a user have 150 post, he got 100.gif and 50.gif
If a user have 1277 post, he got 1000.gif, 200.gif, 50.gif, two 10.gif, 5.gif and two 1.gif
etc.

So complicated?

I've seen it long time ago in a ubb board (perl version).
This look amazing and very entertained for the users.

Anyways... is just a suggestion :)


Deimos 11-28-2004 07:58 AM

Hmm, I can't seem to get the images to show up
I double checked the coding, it's all there, uploaded the file, added the entries to the template, yet it doesn't show up on anyone's postbit

djjeffa 11-28-2004 05:11 PM

djjeffa Installes

docvader 11-28-2004 10:37 PM

Nice hack. But I'm just curious, how do you add another level after RED (such, as Black)?. I've tried this:

// Limit The Stars
if($post['stars'] >= 50){
$post['stars'] = 50;
}

// Get level
if($post['stars'] >= 50){
$post['starsc']=$post['stars'] -50;
$post['s_ext']="black";
if($post['stars'] >= 40){
$post['starsc']=$post['stars'] -40;
$post['s_ext']="red";

But, obviously, it conflicts. Any suggestions?? I have some high posters..

bigcurt 11-30-2004 01:49 AM

Ok, Can I ask a question? How hard would it be to take out the stars and replace them with little keys? I have a site called www.keyhunt.com so I think it would fit :) Please help me.

Thanks
Big Curt

docvader 11-30-2004 04:29 AM

Change the gifs that reside in the /your forum/images/galaga directory. They're really small, you have to zoom in on them in Photoshop. Keep the names the same though, so you don't have to rewrite code.

bigcurt 12-01-2004 02:28 AM

For some reason the stars only show up to eachother. Can I make the stars visible to EVERYONE..like Everyone gets to see eachothers.

Snow 12-01-2004 11:41 AM

Quote:

Originally Posted by paulmjno
Yes, but they have made well over 100 postings... most have stars, but some (who are supposed to) don't...

For instance: one of my users has 2,010 posts... but has no stars.

I've got this same problem, users that have between 1000-1099 and 2000-2099 posts don't have a star, does anyone know how to fix this?

bigcurt 12-01-2004 10:47 PM

I have the SAME problem. :(

paulmjno 12-03-2004 05:01 PM

I really hope this gets fixed. I don't want to uninstall this.

docvader 12-05-2004 06:13 AM

I have the same problem. Once someone hits 1001, the stars disappear. They come back, red, once you get into the thousands (I have 7900 posts, and have 9 red stars).

The math is kind of wrong here. Anyone have any ideas???

docvader 12-05-2004 06:35 AM

The math is not correct for some reason. You will get one grey star for people that go over a thousand posts, if you use "-9" instead of "-10" in the php file. I'll have to play with this for a bit...

paulmjno 12-05-2004 12:30 PM

Quote:

Originally Posted by docvader
The math is not correct for some reason. You will get one grey star for people that go over a thousand posts, if you use "-9" instead of "-10" in the php file. I'll have to play with this for a bit...

I look forward to your findings...hope you can fix it.

Snow 12-12-2004 08:28 AM

Quote:

Originally Posted by paulmjno
I look forward to your findings...hope you can fix it.

same here..... does anyone have a solution yet :(

paulmjno 12-12-2004 09:12 PM

Quote:

Originally Posted by Snow
same here..... does anyone have a solution yet :(

Solution: use Stars Hack.

Galaga would be great, if it worked.

Snow 12-13-2004 07:55 AM

Quote:

Originally Posted by paulmjno
Solution: use Stars Hack.

Galaga would be great, if it worked.

Thanks :)

Rambo 01-13-2005 01:17 PM

Great hack,

Installed without any problems.

Good Stoof!

Zero Tolerance 01-13-2005 01:48 PM

The modification has been updated, it now works as it was intended too, sorry for any inconveniance.

- Zero Tolerance

yoyoyoyo 02-18-2005 07:28 PM

thanks ZT- it works great now!

4number8 04-02-2005 08:22 PM

Nice work and thanks, works a treat!

Ala21 05-02-2005 11:04 PM

I am getting the following problem: yellow stars work, but if a user reaches 1000 posts or more, stars don't change color and they go back to 1 yellow star and stick with it.

So basically if you have 1000, 2000, 5000, or 9000 posts you only have 1 yellow star, they don't change color, they don't increase amount, nothing. If you have less than 1000 posts then yellow stars increase.

This is the code i am using which is the one you specified in the install file:

Code:

        // ++++++++++++++++++++++++++++++++++++++++++
        // vB Galaga Hack - Created By Zero Tolerance

                $post['stars']=intval(str_replace(",","",$post['posts'])/100);

                // Limit The Stars
                if($post['stars'] >= 50){
                $post['stars'] = 49;
                }

                // Get level
                if($post['stars'] >= 40){
                $post['starsc']=$post['stars'] -39;
                $post['s_ext']="red";
                } elseif($post['stars'] >= 30){
                $post['starsc']=$post['stars'] -29;
                $post['s_ext']="blue";
                } elseif($post['stars'] >= 20){
                $post['starsc']=$post['stars'] -19;
                $post['s_ext']="green";
                } elseif($post['stars'] >= 10){
                $post['starsc']=$post['stars'] -9;
                $post['s_ext']="grey";
                } else {
                $post['starsc']=$post['stars'] + 1;
                $post['s_ext']="yellow";
                }

                $post['stars_display']="";

                for($iCount=0;$iCount<($post['starsc']);$iCount++){
                $post['stars_display'].="<img src='images/galaga/s_{$post['s_ext']}.gif'>";
                }

        // vB Galaga Hack - Created By Zero Tolerance
        // ++++++++++++++++++++++++++++++++++++++++++


Any help would be greatly appreciated :)

Thank you

Ala21 05-04-2005 12:44 PM

Anyone?

Zero Tolerance 05-04-2005 01:23 PM

Let's say you had 2000 posts, which would be: 2,000, the script first strips comma's, leaving: 2000

Next this number is divided by 100, leaving: 20
Using the if/else statement, the final outcome is:
$post['starsc'] equals 1
$post['s_ext'] equals green
So you have 1 green star.

I can't see the problem, i'm using the exact same code on my vb forum (3.0.7), and it's working as it should, perhaps something else you installed which collides with this?

- Zero Tolerance


All times are GMT. The time now is 12:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01757 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete