![]() |
1 Attachment(s)
Here is the code I use for stars on v2. It gives one color stars to admins/super mods and another color for everyone else. If you want to give different stars to regular moderators than you will have to insert the ismoderator() function which is going to increase the queries on showthread. Just rename it to stars.php, put it in your forums/admin directory. Open up functions.php and put
include('stars.php'); after // sorts through all the stuff to return the postbit template This is a very simple hack but it is all I need for my forum. The next version of vB (the next full version, not beta) will have a more comprehensive stars function. Oh yeah and put $stars in the postbit template where you want the stars. |
next version...
that brings back memories... but seriously, is that vb2.0 final or vb2.x sort of thing? ie a couple of weeks away or a few months away? |
i think stars should be included automatically in the 2.0 package, so you do not have to hack them...
it is a somewhat irritating feature not to have. (if they already are plz dont flame me because I have not upgraded yet to find out for myself) |
v2.x sort of thing...
|
????
Parse error: parse error in stars.php on line 3 |
maybe changing <? php to <?php might help?
|
yes that was the prob ;-) thx mate
|
Freddie, talk to John about getting this into 2.0 Final release. I know that there is a lot to do, but as you demonstrated, It is a very simple addition that could be revised and beefed up in the future.
But this also brings up the karma hack... Which will VB use? Stars or karma? |
karma?
|
Or both? ranks are only based on posts while Karma is based on other's ratings of yourself.
|
stars should be standard, karma a hack. why stars are pretty simple and configurable everyone uses them the same way, karma is pretty complicated and is going to have to be different on pretty much most sites. Stars are what we want to start with (or little baby aliens in my case.. they are responsible for the longest (and scariest) thread on my forum!)
|
How about a stars hack that gives a star for every certain # posts, rather than specifying each nuber. I would like to give a star for every 50 posts.
|
well then just specify it at 50,100,150,200,250,300,350 etc !!!
|
Yes, but I dont want to have 50 lines of code specifying each step, seems like it should be easy to have it do it on its own with and just specifying one integer.
Instead of 50, star 100, star star 150, star star star 200, star star star star do (totalposts/50)xstar Seems pretty simple from what I see here, wish I could write it myself. |
And if someone had 1000 posts are they going to have 20 stars?
|
no but in my old board there where 8 stars +
first in silver and then in gold when you have 8 gold stars then it stays there thats enough i think on big boards it is good but when you have an little you can make it smaller |
1 Attachment(s)
This one gives a star for every 50 posts up to a maximum of 8, edit the variables at the top to change that behavior.
|
Yes freddie, they would, but your reminded me that they would need to break every 10 or so.
I admit this probably wouldn't work for every one, I have a small board, where I would like to give stars often for the fun of it, plus with breaks there is a lot of room for those little things so 100 stars wouldn't bother the board. As a joke I give about 100 stars to people temporarily, http://www.thzclan.com/forums/showth...3?threadid=214 No need to debate, just thought it would be easier to specify one number than every step you want a star. :) *edit Ooops, posted while I posted, thanks Freddie |
1 Attachment(s)
This one gives a star for every 50 posts and keeps on giving them but inserts <br> after every 10 stars. Again edit the top variables to change the 50/10 settings.
|
Thanks again, I really apprieciate that you guys can write this stuff. I can only pick out the basics.:)
|
Stars hack should be standard in vB 2.0 my users LOVE it on our UBB. But It shouldnt go, every 50. More like,
|
Quote:
Edit: I figured out i can just add an elseif and set the mods stars that way. |
Im getting a weird problem with this hack. I just get like 50 lines of the stars.php repeating at the top of my pages?
|
1 Attachment(s)
Quote:
Here's what I changed my code to (in order to have different color stars based on posts.) |
If you need to make mods have seperate stars just do this:
Code:
if ($post[usergroupid]==5 || $post[usergroupid]==6) Code:
if ($post[usergroupid]==5 || $post[usergroupid]==6) Code:
if ($post[usergroupid]==15) I hope this helps. I have 2% PHP knowledge, but that's how i got it to work. |
Moderator-specified stars still aren't being shown. The stars of Moderators are still based on their post count, as if they were regular members.
|
Make sure that your usergroupid for mods is correct. Mine is 15, so i put 15, but my friends' is 36. Try that.
|
The userid isn't 36. How can I find out which number mine is?
Another problem is, on some posts, the post-based stars are added to my admin stars. How can I prevent that? |
In your CP, go to where you edit the user groups. When you highlight one the link should have something that includes &usergroupid=xxxx. Use that.
And for the rest, i'm not sure what your file looks like or what exactly you're trying to do, so i can't help ya there. |
1 Attachment(s)
Okay, I found my moderator's ID is 7. But it's still adding post-based stars at the end of the mod or admin stars.
Here's my file: |
1 Attachment(s)
Ok, i found your problem. I fixed it for you, and it should work now. You just specified $stars as the admin stars, mod stars, and as the stars based on posts.
Try it, then let me know if it worked. |
AHHH! I have tried everything, I still get like 50 lines of text repleating whats in stars.php at the top of my threads? Whats wrong?!?
|
I'm not sure, are you missing <? or ?> ?
|
Thanks a lot. It works now.
|
Well I fixed my last problem. Now Im getting Parse error: parse error in /***/stars.php on line 3 and this is my stars.php
Code:
<?php Thanks! snyx |
i was wondering how to put just ordinary stars as admin and mod
we having some problem to get it to work could somone help please |
I've just upgraded to beta3, and I've lost my stars.
Sniff sniff. Can someone please help me find them? |
Is anyone else having this problem, and can we integrate this into a future version of vB?
|
You lost your stars? I think you just forgot that you need to include stars.php in showthread.php.
|
Good call gekko.
Thanks! |
All times are GMT. The time now is 04:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|