PDA

View Full Version : Top (10) Reputation Module



Acido
05-22-2004, 01:16 AM
2 templates
1 file

Put the top_rept.php file in the Modules folder
create 2 new templates : adv_portal_topreputation and top_rep with the content included in the aproriate txt files.

It give a module with the Top 10 users with more reputation

If you want change the amount of users to show in this module, simply change the LIMIT option in the php file:


$top_posters = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");

where LIMIT 10 is the number of userr to include in this query. Yo can change the number 10 for 5, 20, or wathelse that you want.

hpwilhelm
05-22-2004, 10:42 AM
Thank you wery much! :)

Our Sponsors
 

Polo
06-22-2004, 09:47 AM
can we see a screenshot?

hpwilhelm
06-22-2004, 11:01 AM
Mine is located here: http://www.lavkarbo.no/?side=rykte

Second module on the right; Titled: RyktebÝrsen. (It's Norwegian) :p

Our Sponsors
 

Polo
06-22-2004, 11:14 AM
there is only one module at the right...

mholtum
06-25-2004, 04:11 AM
where might I find this modules folder? I dont seem to have one..

BoNfiRe
06-25-2004, 05:18 AM
in your root/your forums folder/modules ;)

BTW nice hack think I may use this one :D

mholtum
06-25-2004, 10:38 AM
Ok, I must have been drunker than I thought last night. LOL

mholtum
06-25-2004, 11:31 AM
Installed and working. One problem. I have an image (dot) that appears on all my modules by default. Why is it not showing in this one?

Polo
06-25-2004, 04:23 PM
YOu need to add it using <img src=yourimage.gif> in the adv_portal_topreputation template

mholtum
06-26-2004, 03:38 AM
Thanks, that worked. I should have thought about that. But, I never had to do this with any of my other modules. Weird.. I changed from that default >> to the image in the settings and it has always done it automatically.. Hmmm

Polo
06-29-2004, 09:57 AM
Thanks, that worked. I should have thought about that. But, I never had to do this with any of my other modules. Weird.. I changed from that default >> to the image in the settings and it has always done it automatically.. Hmmm

i guess it has to do witht he way the created made this block.

hpwilhelm
06-30-2004, 08:38 AM
there is only one module at the right...
Obs... :o Members only, sorry, didnt think about that... :)

FleaBag
07-02-2004, 11:24 AM
A nice little addition, thanks for this. :)

mholtum
09-13-2004, 06:26 AM
Ok, I wasn't going to use the Reputation function and then decided to and reinstalled this Module. Works great, with on issue. It views perfectly in IE but in Mozilla the bullets display outside of the module? Any way to fix this?

mholtum
09-13-2004, 02:39 PM
I just noticed something. The module displays fine. (except in Mozilla) But, it you click a members name, it takes you to http://www.ravensrealm.net/member.php?u=53 when it should be http://www.ravensrealm.net/forum/member.php?u=53 How can I fix this?

corriewf
12-19-2004, 02:15 AM
Had the same problem.

Zorobz
12-21-2004, 06:29 AM
I just noticed something. The module displays fine. (except in Mozilla) But, it you click a members name, it takes you to http://www.ravensrealm.net/member.php?u=53 when it should be http://www.ravensrealm.net/forum/member.php?u=53 How can I fix this?

open style manager, than edit template named top_rep
this is the code in it:


<li><span class="smallfont"><a href="member.php?u=$top_rept[userid]">$top_rept[username]</a> ($top_rept[reputation]
)</span></li>


change it to:


<li><span class="smallfont"><a href="forum/member.php?u=$top_rept[userid]">$top_rept[username]</a> ($top_rept[reputation]
)</span></li>


thats it.

thenewstlucian
01-22-2005, 09:19 PM
can do I add the new templates?

gorp
01-28-2005, 08:21 PM
when I try to add this module I get the <li> bullets outside of the cmps box. On everyone else's pics I see them insode. Could someone post the rest of the instructions, after creating the templates, etc., as far as adding them in to a module, so I can make sure I am following the right steps?

Polo
01-31-2005, 12:02 PM
Your are probably using firefox to view it... try Internet Explorer and you will see that everything looks fine...

in the mean while I will still stick with firefox... :)

gorp
01-31-2005, 09:55 PM
Your are probably using firefox to view it... try Internet Explorer and you will see that everything looks fine...

in the mean while I will still stick with firefox... :) well, that suxx.. how can I have them appear in an array with commas in between instead?

PS- I do use firefox.. it is FAR superior to Internet Exploiter, IMO!

gorp
02-01-2005, 02:04 AM
Well- I got it to work in firefox, with no bullets outside the box, and for good measure I put it in a collapsible object! :)

use this for your adv_portal_topreputation template:

<!-- START: $mods[title] Module -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('rep_module')">
<img id="collapseimg_rep_module" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
</a>
<strong>
<span class="smallfont">$vba_options[portal_blockbullet] $mods[title]</span>
</strong>
</td>
</tr>
</thead>
<tbody id="collapseobj_re_module" style="$vbcollapse[collapseobj_rep_module]">
<tr>
<td class="alt1" align="center" colspan="2">
<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr class="alt1">
<td width="100%"><span class="smallfont">$top_stats[top_rep]
</span></td>
</td>
</table>
<br />
</td>
</tr>
</tbody>
</table>
<br />
<!-- END: $mods[title] Module -->Thanks again to Acido for this great module!

sully02
03-28-2005, 12:27 PM
I made some changes to this one much like I did the Top 10 posters module Acido made (As far as the template) and will put them up here. I have one question... This module shows the reputation value of users who have turned their reputation "off". Is there a way to set it, like the memberlist, so that it won't show users who have turned off their reputation?

With that, my revised templates:

adv_portal_topreputation template:

<table cellpadding="6" cellspacing="$stylevar[cellspacing]" border="0" class="tborder" width="100%">
<tr>
<td class="tcat" colspan="2"><span class="smallfont"><b>$vba_options[portal_blockbullet]
Most Reputable Posters</a></b></span></td>
</tr>
$top_stats[top_rep]
</table>

<br />

top_rep template:

<tr class="alt1">
<td><span class="smallfont"><a href="/forums/member.php?u=$top_rept[userid]">$top_rept[username]</a></span></td>
<td><span class="smallfont">[$top_rept[reputation]]</span></td>
</tr>

guttormson
03-29-2005, 06:12 PM
2 templates
1 file

Put the top_rept.php file in the Modules folder
create 2 new templates : adv_portal_topreputation and top_rep with the content included in the aproriate txt files.

It give a module with the Top 10 users with more reputation

If you want change the amount of users to show in this module, simply change the LIMIT option in the php file:


$top_posters = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");

where LIMIT 10 is the number of userr to include in this query. Yo can change the number 10 for 5, 20, or wathelse that you want.This is a great hack!

I would love to add a module just below this one that features the 10 WORST reputations. Is there such a hack?

SaN-DeeP
03-30-2005, 04:31 AM
sounds like a good hack, I will have a look into this.
Thanks.

guttormson
03-30-2005, 01:01 PM
sounds like a good hack, I will have a look into this.
Thanks.
Sweet! I hope you come up with something!

Vevina
04-05-2005, 10:21 AM
Can someone help me plz .. module showing up but get a blank box

ive added the 2 templates

Module Title: Most Reputable Posters
File to Include: top_rept.php
Active: yes
Templates Used: topreputation,top_rep

Not sure what ive done wrong :(

Vevina
04-05-2005, 10:53 AM
hehe ive sorted it out ;)

Nice hack

guttormson
04-14-2005, 03:23 PM
Has anyone figured out a way to come up with a 10 WORST reputations block yet?

Polo
04-14-2005, 03:28 PM
Has anyone figured out a way to come up with a 10 WORST reputations block yet?
it shouldnt be that hard... just change:


$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");

to


$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation ASC LIMIT 10");

in the top_rept.php file...

hope that works, let me know how it goes...

LEAD_WEIGHT
04-14-2005, 07:16 PM
http://www.vbadvanced.com/forum/showthread.php?t=1542&highlight=G180

I fiddle around with Polo work and came up with the same with adjustments to Acido job and got this :D

My under constrution site
http://www.theundergroundsource.com/?styleid=2


But I think mine still needs tune up, could someone ckeck to see why it does not show members Rep or is that I miss something in my Admin c/panel :confused:

Got it to work now, just played with where it needed to read :rolleyes:

guttormson
04-14-2005, 07:44 PM
it shouldnt be that hard... just change:


$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");

to


$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation ASC LIMIT 10");

in the top_rept.php file...

hope that works, let me know how it goes...Thanks for the tip.... and I am sure your tip would work but that would change my top reputations block to a bottom reputations blocks. I want to KEEP my top reputations block and add a bottom reputations block. So I think there is a bit more hacking to be done on the files and templates.... but its a bit over my head. :)

LEAD_WEIGHT
04-15-2005, 07:27 AM
http://www.vbadvanced.com/forum/showpost.php?p=41354&postcount=32

I thought I made the right adjustments but still get no members showing but had them showing when I first install it then when I deleted and change the Title it did not show members Rep anymore :confused:

Edit
Just fix the problem it is working great now :p


adv_portal_topreputation
<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" class="tborder" width="100%">
<tr>

<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('top_rept')"><img id="collapseimg_top_rept" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_G180_top_posters.gif" alt="" border="0" /></a><span class="smallfont"><strong>$vba_options[portal_blockbullet] <a href="$vboptions/memberlist.php?&order=desc&sort=posts&pp=30&page=0">Top $number Reputation</a></strong></span>
</td>

</tr>
<tbody id="collapseobj_top_rept" style="$collapseobj_top_rept">
<tr class="alt1">
<td width="100%"><span class="smallfont">$top_stats[top_rep]
</span></td>
</tr>
</tbody>
<!-- Following is a a small little copyright that will show a small © in the footer of this module, if you like this module and would like for me to develop more, please leave it. IMPORTANT: only guests will see this small © , members, registered users and subscribed members will not. Support our work and leave the ©. Thank you.
-->

<if condition="$bbuserinfo[usergroupid] == 1">
<tr class="alt1"><td align=right><span class="smallfont"><a href=http://www.theundergroundsource.com target=_blank>©</a></span></td>
</tr>
</if>
</table>
<br>


[B]adv_portal_top_rep
<span class="smallfont">
<img src=http://www.theundergroundsource.com/forums/images/modules/arrow.png>
<a href="member.php?u=$top_rept[userid]">$top_rept[username]</a>
($top_rept[reputation])</span><br>


top_rept
<?php

//Number of Most Reputable Posters Listed in Module
$number = 10;


//Do not edit beyond this line if you do not know what you are doing

$collapseobj_top_rept = $vbcollapse['collapseobj_top_rept'];
$collapseimg_top_rept = $vbcollapse['collapseimg_top_rept'];

$top_stats = array();

$top_rep = $DB_site->
query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY posts DESC LIMIT $number");

while($top_rept = $DB_site->fetch_array($top_rep))
{
eval('$top_stats[\'top_rep\'] .= "' . fetch_template('adv_portal_top_rep') . '";');
}
unset($top_rept);
$DB_site->free_result($top_rep);
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_topreputation') . '";');

guttormson
04-27-2005, 04:06 PM
Anyone come up with a bottom reputations module yet?

(A module that you could use in addition to TOP Reputations)

Polo
04-27-2005, 05:02 PM
guttomrmson... just change the file name of the block, upload it and setup a whole new block in the cmps.. make the changes I told you and you should be ready to go...

guttormson
04-28-2005, 12:24 PM
guttomrmson... just change the file name of the block, upload it and setup a whole new block in the cmps.. make the changes I told you and you should be ready to go...
OK... I see what you mean.... I will try that tonight. Thank you.

Polo
04-28-2005, 03:32 PM
Your welcome :)

guttormson
04-28-2005, 04:05 PM
Your welcome :)I did it and it works perfectly!

One other change you must make is to the php file. You must tell it to look for the adv_portal_bottomreputation template.

Thanks for the help.

brianstevz
04-28-2005, 11:08 PM
Worked great! Easy to install and I had it up in 3 minutes.

Raze
05-06-2005, 01:30 PM
Great hack! Installed!

Anyway to create an additional module that displays top ten users ordered by rep power?

:-)

sully02
05-12-2005, 07:21 PM
Has anybody here figured out how to hide members who have disabled their reputation? I've got some in the top 10 whose reputations are turned off in their user CP.

LEAD_WEIGHT
05-12-2005, 11:04 PM
Has anybody here figured out how to hide members who have disabled their reputation? I've got some in the top 10 whose reputations are turned off in their user CP.

Goto vbulletin.org :)

ugr|dual
05-17-2005, 08:02 AM
more input please. is there a special hack?

otoh could the query of this module be modified to ignore users who have reputation off?

sully02
05-19-2005, 09:44 PM
more input please. is there a special hack?

otoh could the query of this module be modified to ignore users who have reputation off?
The latter is what I am hoping for. I have a member who shows up on the top 10 of my list, but they have their reputation disabled. I've tried looking for the code that shows/hides reputation, but to no avail.

bi11i
08-26-2005, 11:16 PM
I'd like to use this with v3.5, but I keep getting this error on my main page after install:


Fatal error: Call to a member function query() on a non-object in e:\wwwroot\opiophile.org\modules\top_rept.php on line 7 any ideas?

Line 7 reads:
$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 15");
any ideas?

2 templates
1 file

Put the top_rept.php file in the Modules folder
create 2 new templates : adv_portal_topreputation and top_rep with the content included in the aproriate txt files.

It give a module with the Top 10 users with more reputation

If you want change the amount of users to show in this module, simply change the LIMIT option in the php file:


$top_posters = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");

where LIMIT 10 is the number of userr to include in this query. Yo can change the number 10 for 5, 20, or wathelse that you want.