vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Activity Modification (https://vborg.vbsupport.ru/showthread.php?t=93831)

mahakala 07-27-2006 06:36 PM

sorry, still can't get it :(
i have 3 ranks: 1=Junior Member, 2=Member, 3=Senior Member
and the default group ranks (admin, mod, guest).

how can i set to only show a board to e.g. "senior members"? when i promote a user to level 2 and add the title to the secondary usergroup, i should have a usergroup "members", when i add 3rd level, i got "senior members" - is that right?!
so i need to set the ranks "member" and "senior member" as usergroup in vb with the special permissions?

-----------------------

when i now have a group "specialposter" and got them mentioned in "Override Level Ranks on a primary usergroup id basis", these groups aren't touched by the plugin?!
so maybe this is the reason, why the people of this group aren't updated by the plugin?

thanks?,
thomas

WetWired 07-28-2006 04:08 AM

I'm having a hard time understanding what you are asking. It should be noted that a user is only promoted when they log in after achieving the requirement.

To show a board only to senior members, you would go into the forum permissions, and click "Deny All" for that forum, then select your senior member usergroup under the forum, edit it, and select "use default usergroup permissions".

mahakala 07-28-2006 04:32 AM

it's ok, i got it.

by the way, as admin i can't see the stats in threadview "only for registered users"...

HomerJay 07-28-2006 11:49 AM

hi,

first of all: sorry, but my english is not the best, cause i am form germany

i have a question reffering to your activity-addon.

i want to have a statistic for the activity of my members...something like a top-ten. so i have to know, how the activity is calculated with the parameters out of the database.

can you please give me some hints, how i can do this? something like a formula for the activity-calculation would be great.

thank you very much!

greetings
Oli

HomerJay 07-30-2006 08:08 PM

please give me a hint. i searched the whole weekend for a solution...

i need a standalone-script, to calculate the activity-percentage...the formula seems to be:

Code:

$WWU002_activitypercent=intval($WWU002_activity/$GLOBALS['WWU002maxPoints']*100);
now i need to know, how to get the $GLOBALS['WWU002maxPoints']...i think, they are calculated every day..right?

thank you 4 help.

Oli

WetWired 08-01-2006 11:02 PM

The WWU002maxPoints is calculated in global_start at the beginning of each page. LiveWire wrote an addon that does what you are trying to do, which is to list the top 10 activity as it exists in the user table. It should be noted that activity only changes when it is viewed. This means that if a user gets to 100% activity, then goes away and noone views one of his posts or his profile, the database will leave him at 100% activity untill his post or profile is viewed. In reality, this is only an issue for users with low activity to start.

Logikos 08-02-2006 06:04 AM

I had that hack removed. I'm not really involved with making hacks anymore, but I think I did fix the activity view problem that WW was talking about. Anyway, if you want to show a list of top active users, then follow these instructions.

Create a new template. Name it activity with the following contents.
HTML Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
        <td class="tcat" width="100%">Top Active Users</td>

</tr>
</table>

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
        <td class="thead" align="left" nowrap="nowrap">User Name</td>
        <td class="thead" nowrap="nowrap">Activity</td>
        <td class="thead" nowrap="nowrap">Posts</td>
        <td class="thead" nowrap="nowrap">Join Date</td>
</tr>

$activity_bit

</table>

Create a new template. Name it activity_bit with the following contents.
HTML Code:

<tr>
        <td class="alt1Active" align="left" id="u5968">
                <div class="smallfont"><a href="member.php?u=$activity[userid]">$activity[username]</a></div>
                <div class="smallfont">$activity[usertitle]</div>
        </td>
        <td class="alt2" align="center"><div class="smallfont">$ActivityPercent</div></td>
        <td class="alt1" align="center">$activity[post]</td>
        <td class="alt2" align="center">$activity[joindate]</td>
</tr>

Upload the attached file to your forums directory and you should be all set. You can edit this hack anyway you wish.

WetWired 08-02-2006 06:42 PM

No, you never did fix that. Essentially, you have to re-calculate the activity for every user in order to fix it. You can skip members who haven't visited since the cuttoff, and you can cache the results so you only do it once a day. One of these days, I'll get arround to converting the old script I did for the hack version and prettying up some templates for it.

WetWired 08-03-2006 09:48 AM

Okay, I got the accurate top 10 script converted to 3.5, now I just need to give it some time on Zelaron, then I'll be ready to beta it.

MissKalunji 08-05-2006 12:22 PM

Quote:

Originally Posted by Firestar.chkn
This works with 3.6, yes. I'm running it over at www.prophecy.co.za/forums if you want to have a look


anyone else?

Hornstar 08-05-2006 09:24 PM

So is there a new one made for 3.6 but will be released shortly?

mahakala 08-05-2006 10:13 PM

Quote:

Originally Posted by MissKalunji
anyone else?

yes, 3.6 works with it

MissKalunji 08-05-2006 10:14 PM

Quote:

Originally Posted by mahakala
yes, 3.6 works with it

Thanks

rogersnm 08-06-2006 04:51 PM

How do you show the points achieved today thiung for all members instead of just the user who owns it?

WetWired 08-06-2006 08:07 PM

It's in the options panel. Find today's activity for all users

rogersnm 08-06-2006 08:14 PM

shows how much i look doesn't it.

/me installs

WetWired 08-08-2006 02:47 PM

lon·gev·i·ty ( P ) Pronunciation Key (ln-jv-t, lôn-)
n. pl. lon·gev·i·ties
Long duration or continuance, as in an occupation: had unusual longevity in the company; her longevity as a star.

da420 08-18-2006 12:54 AM

I installed this. Looks wonderful, but when Im online and have 20+ posts today it says I have visited but have not posted. Any suggestions would be appreciated. :)

Thanks in advance.

EDIT: LOL NEvermind. It works. Nice hack!

FatalBreeze 08-18-2006 09:00 AM

hi, first of all thanks for the hack! its great,
but i've came across a problem:
look at the attached image, the Activity Maintenance was placed in the wrong place, but the actual problem is when i change the setting of "Set Start of Board" for example, it gives me an ok response (as if it really changed it) but when i enter the script again, it seems that the setting was not changed.

Nachtfalke 08-20-2006 10:11 AM

Hi @ll,

at first i would like to thank WW for this beautyful hack. I love it, it was a snap to install, works fluently in a heavily modded vb 3.6 gold testboard and simply looks awesome. I had to modify it a little to suit my needs, since I am not a pixelator, I had to change the images headlines to normal text. I included a screenie from the postbit_legacy to proove it (I modified this template a lot, the big button simply expands or collapses the detailed infos, screenie shows of course the expanded look).
Also the top ten activity addon works fine, I even managed to integrate it with my vbadvanced CMPS system, see the other screenshot.
But there is one little issue i have with the acp: the cpnav is missing some text. Looks like a phrase or so is not found. Could anybody help me out with that? See attached screenshot #3
Thanks again for codng such a nice addon. And thanks to all the people out there who make my day with hacks and stuff for my beloved VB. Could modding a vb become addictive after some time? :D

rogersnm 08-20-2006 10:15 AM

There isn't a cpnav file..

Nachtfalke 08-20-2006 10:40 AM

I know that there isn't a cpnav xml, so the navigation must be built somewhere in a plug in. But I could not find this either ...

bashy 08-20-2006 11:11 AM

Quote:

Originally Posted by Nachtfalke
Could modding a vb become addictive after some time? :D

ha ha ha ha h...

Ya think?
I am most probably the worst

rogersnm 08-20-2006 11:39 AM

well it's name is "activity modification" and it's location is: "admin_index_navigation" you can just disable it because it should work..

rogersnm 08-20-2006 11:47 AM

Ok this should work a treat, disable the above plugin and then upload the attached xml file to /includes/xml and then it should work :)

Nachtfalke 08-20-2006 12:59 PM

...not quite! I followed your instructions and uploaded the new file. After that I logged out off the acp, cleared all cookies and logged back in again. But the new CP_nav doesn't show up. And because of disabling the plugin, the old one doesn't either (as expected)

rogersnm 08-20-2006 01:31 PM

hmm, i tested it on mine so i can't see why it shouldn't work..

WetWired 08-21-2006 04:29 PM

I will investigate the failed start of board problem, and the CP nav issue. Is the CP nav issue only with 3.6?

MissKalunji 08-22-2006 04:15 AM

seems tobe working fine so far on 3.6.0

Nachtfalke 08-22-2006 05:03 AM

Quote:

Originally Posted by WetWired
I will investigate the failed start of board problem, and the CP nav issue. Is the CP nav issue only with 3.6?

Don't know. I didn't install that on my 3.5.4 Board ...

MissKalunji 08-22-2006 08:59 PM

Quote:

Originally Posted by WetWired
I will investigate the failed start of board problem, and the CP nav issue. Is the CP nav issue only with 3.6?

is that normal that this mod adds 10 queries?

edit : never mind the inferno warning was adding 20 queries go figure!

WetWired 08-22-2006 09:37 PM

It is normal for this mod to add a lot of queries at the start of the day, and for it to quickly taper off.
Quote:

Technical
This hack adds 1 query to showthread for each user who posts in that page (or only 1 for the logged in user by configuration). In addition, the first time a member's post or profile is accessed during a day (GMT), 3 queries are performed to find that user's activity. By configuration, 1 query may be added to each page load to find the logged in user's "activity today". By configuration, 1 query may be added to each member profile view to find that member's "activity today".
There are several options that start off which add queries when turned on. They should all explain the query impact in the description.

In the default configuration, it is possible for this mod to add no queries when viewing a thread. This happens when posts for all of the posters on the displayed page have been previously viewed during the day, and none of those posters are the active user. On the other hand, if you view a thread page (of 25 posts), where each post is by a different user and noone has been viewing the board today, you could get 25x3=75 queries the first time you view the thread (but if you refresh it would drop to zero, because the activity is stored for each user from the first page load).

Activity is per user, not per post, so the typical senario is that after the configured "midnight" for the mod, people are viewing threads and the people that post a lot get their activity calculated and stored, using a lot of queries. After that, pages probably get 6 or 9 queries added as people view posts by less-frequent posters. Eventally, virtually all of the active users will have their activity already calculated and stored, and the mod will be adding only the single query to calculate the logged-in user's activity today in threads they posted in. Note that this is one of the reasons for the configurable day cycle: if you place the mod's midnight at the time where you have the lowest usage, not only will the day cycles seem more natural to the users, but the load spike after midnight will be placed where it won't matter as much.

I have made every effort to minimize SQL server load caused by this mod. Not only is activity stored for future page loads, but it is also stored for future posts on the same page, for example. It would be possible for me to do only 3 big queries every page load, but those 3 queries would create a larger and ongoing load than the way that I do it.

IncredibleHawk 08-23-2006 01:58 AM

Awsome Awsome

Nachtfalke 08-23-2006 01:59 AM

I guess I figured out, how you can show the activitytstat.php addon as a correct location in Who is online. By adding two mini-plugins and a phrase, the WOL-List will show the right location. Maybe this could be added to the package, if it is good enough. I do not claim any credits, since this bases on a tutorial I found on vbhacks-germany.com (thank you Andreas ;) ). Okay, here we go:

1. Add a new phrase, name it activity_toplist and give it the value of "Toplist" or "Statistic" or whatever you desire.

2. We now need the first plugin to introduce the addon to our vbulletin system. Select "add plugin", in the dialog select the product "Activity modification" and the hook "online_location_process". Add the following code to it:
PHP Code:

if ($filename == 'activitystat.php')
{
    
$userinfo['activity'] = 'activitystat';


3. It's time to tell the WOL what to do, so we add the next plugin. Select "add plugin", in the dialog select the product "Activity modification" and the hook "online_location_unknown". Now add the code:
PHP Code:

if ($userinfo['activity'] == 'activitystat'

    
$handled true
    
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], $vbphrase['activity_toplist']); 
    
$userinfo['where'] = '<a href="activitystat.php?'.$vbulletin->session->vars['sessionurl_q'].'">'.$vbphrase['activity_toplist'].'</a>';
 


4. All done. The next time somene visits the activitystats.php, it will be shown correctly in the who is online list.

By the way, this system is working of course for every other installed hack that is not shown correctly. Hope that helps someone out.

MissKalunji 08-25-2006 04:15 AM

thx wetwired

Muellmann 08-27-2006 05:50 PM

I very like this Hack and it works fine for me with 3.60 Gold.
Thank you for your Efforts to code such Things, I know that's
not easy Work. :cool:

MissKalunji 08-27-2006 08:51 PM

Quote:

Originally Posted by Muellmann
I very like this Hack and it works fine for me with 3.60 Gold.
Thank you for your Efforts to code such Things, I know that's
not easy Work. :cool:

i second that

jcodemasters 08-31-2006 05:35 PM

thank you for this script. i am wondering if one has tested this script on VB 3.6.0 thanks

rogersnm 08-31-2006 05:40 PM

yup, works fine for me :)

jcodemasters 08-31-2006 06:00 PM

thanks rogersnm i will test it now..


All times are GMT. The time now is 12:41 AM.

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.01617 seconds
  • Memory Usage 1,847KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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