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)

WetWired 10-25-2005 04:41 PM

Quote:

Originally Posted by cdoyle
I'm not sure if I just missed it or maybe it's needed. But where the hack adds 'owner' under administrator, or it adds 'junior' under 'junior'. Is there anyway to have it not do that? just leave that part the default? Other then that I think this is a great hack!

You can remove the activity hack rankings by removing $WWU002_ranktext from your postbit templates.

Quote:

Is there any way I can move this below my reputation bar (under the instant message images)?
You can put it where you like. Just put the
Code:

  <table class="WWU002postbit" cellspacing="2" cellpadding="0">
    <tr>
      <td><img src="$stylevar[imgdir_misc]/activity/textactivity.gif" /></td>
      <td><img src="$stylevar[imgdir_misc]/activity/textlongevity.gif" /></td>
    </tr>
    <tr>
      <td title="$WWU002_activityinfo"><img src="$stylevar[imgdir_misc]/activity/activity$WWU002_activitylevel.gif" class="i" /></td>
      <td title="$WWU002_longevityinfo"><img src="$stylevar[imgdir_misc]/activity/long$WWU002_longevitylevel.gif" class="i" /></td>
    </tr>
    <tr>
      <td><img src="$stylevar[imgdir_misc]/activity/texttoday.gif" /></td>
      <td><img src="$stylevar[imgdir_misc]/activity/textposts.gif" /></td>
    </tr>
    <tr>
      <td title="$WWU002_todayinfo"><img src="$stylevar[imgdir_misc]/activity/today{$WWU002_todaylevel}_$WWU002_maxtodaylevel.gif" class="i" /></td>
      <td dir="ltr"><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[1].gif" class="il" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[2].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[3].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[4].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[5].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[6].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[7].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[8].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[9].gif" class="ir" /></td>
    </tr>
  </table>

part whereever you want it in the template.
Quote:

Also, what font did you use? I'd like to localize the text in the images.
The text is hand-drawn.


Regarding vBAdvanced, I don't use it, so I'll need your help in determining the source of the problem. First of all, enable debug mode on your forum, go to the page with the problem, and in the new drop down at the bottom of the page, tell me if you see any 'WWU002: Postbit for user X' messages and if the X is non-zero.

Flow Fusion 10-28-2005 11:20 AM

PHP Code:

in template MEMBERINFO



find
-----
                    
$vbphrase[join_date]: <strong>$userinfo[datejoined]</strong>
-----
below itinsert
-----
                    <
div>$vbphrase[WWU002_activity]: <strong>$WWU002_activitypercent%</strong></div

This isn't in my MEMBERINFO template. Other than that it's a great hack.

TJFweb 10-29-2005 01:47 PM

Wetwired:

This is a really great plugin.

I was just thinking - it would be really cool if I could get all of my user statistics into the same graphical format as shown in the postbit_legacy layout for the Activity Mod.

If it's not too much trouble, would you be able to tell me how to get other numerical values to show up in the graphical format as the Activity Mod does for the post count?

Being able to grab a numerical value from the user table and change it to graphical format like this does for post count would actually make a cool standalone addon too.

Thanks!!

007 10-30-2005 04:00 PM

What exactly does the Activity meter calculate? It looks like it goes up to 100%, but how does it work?

WetWired 10-31-2005 01:51 PM

Quote:

If it's not too much trouble, would you be able to tell me how to get other numerical values to show up in the graphical format as the Activity Mod does for the post count?
This is the code that the plugin uses to separate the post count into digits:
Code:

    //Separate out postcount
    $WWU002postcount=$WWU002user['posts'];
    if($WWU002postcount<1){
      $WWU002_postsd=array(1=>'s',2=>'s',3=>'s',4=>'s',5=>'s',6=>'s',7=>'s',8=>'s',9=>'0');
    }else{//($WWU002postcount<1)
      for($i=9;$i>0;$i--){
        $WWU002digit=$WWU002postcount%10;
        $WWU002postcount=floor($WWU002postcount/10);
        if(($WWU002digit==0)&&($WWU002postcount==0)){
          $WWU002_postsd[$i]='s';
        }else{//(($WWU002digit==0)&&($WWU002postcount==0))
          $WWU002_postsd[$i]=$WWU002digit;
        }//endif(($WWU002digit==0)&&($WWU002postcount==0))
      }//endfor($i=9;$i>0;$i++)
    }//endif($WWU002postcount<1)

First, it stores the value to process in a working variable so the original value is not corrupted, then it has a special case to display 0 for any value under 1 (because postcount shouldn't go negative, and the code doesn't have provisions for displaying negative numbers). After that, it works from least significant digit to most significant, by dividing the value by 10 and using the remainder as the digit for that place. If we've passed all the siginificant digits (because our working value is zero), then zero digits are converted to space padding.

You should be able to use the same code to separate out the digits for any value, just change the second line to assign $WWU002postcount to the new value to break down, and replace occurrances of $WWU002_postsd with a different variable to hold the digits.

Quote:

Originally Posted by 007
What exactly does the Activity meter calculate? It looks like it goes up to 100%, but how does it work?

From the opening post:
Visiting each day and posting the configured amount of times per day for the configured number of weeks will yeild 100% activity. Posts are checked individually for each day, so days cannot be skipped then spammed up afterwards. The weight of visiting for the day relative to posting is configurable. Weeks are weighted so the most recent has a bigger impact on the activity percent than the most distant.

For an in-depth explaination (this file is included with the mod):
https://vborg.vbsupport.ru/attachmen...chmentid=33478

TJFweb 11-01-2005 04:55 AM

Quote:

Originally Posted by WetWired
This is the code that the plugin uses to separate the post count into digits:
Code:

    //Separate out postcount
    $WWU002postcount=$WWU002user['posts'];
    if($WWU002postcount<1){
      $WWU002_postsd=array(1=>'s',2=>'s',3=>'s',4=>'s',5=>'s',6=>'s',7=>'s',8=>'s',9=>'0');
    }else{//($WWU002postcount<1)
      for($i=9;$i>0;$i--){
        $WWU002digit=$WWU002postcount%10;
        $WWU002postcount=floor($WWU002postcount/10);
        if(($WWU002digit==0)&&($WWU002postcount==0)){
          $WWU002_postsd[$i]='s';
        }else{//(($WWU002digit==0)&&($WWU002postcount==0))
          $WWU002_postsd[$i]=$WWU002digit;
        }//endif(($WWU002digit==0)&&($WWU002postcount==0))
      }//endfor($i=9;$i>0;$i++)
    }//endif($WWU002postcount<1)

First, it stores the value to process in a working variable so the original value is not corrupted, then it has a special case to display 0 for any value under 1 (because postcount shouldn't go negative, and the code doesn't have provisions for displaying negative numbers). After that, it works from least significant digit to most significant, by dividing the value by 10 and using the remainder as the digit for that place. If we've passed all the siginificant digits (because our working value is zero), then zero digits are converted to space padding.

You should be able to use the same code to separate out the digits for any value, just change the second line to assign $WWU002postcount to the new value to break down, and replace occurrances of $WWU002_postsd with a different variable to hold the digits.



From the opening post:
Visiting each day and posting the configured amount of times per day for the configured number of weeks will yeild 100% activity. Posts are checked individually for each day, so days cannot be skipped then spammed up afterwards. The weight of visiting for the day relative to posting is configurable. Weeks are weighted so the most recent has a bigger impact on the activity percent than the most distant.

For an in-depth explaination (this file is included with the mod):
https://vborg.vbsupport.ru/attachmen...chmentid=33478

Awesome... Thanks a lot for the code ;-)

Now all I need to do is try to get it to work with another variable I have. Unfortunately I don't know why a hook can't use a specific variable when it can be called when placed in the postbit. This isn't to do with the Activity Mod (at most it's an adaptation of a feature of the Activity Mod) so I made a post here instead: https://vborg.vbsupport.ru/showthread.php?t=99795

Lor20 11-02-2005 11:57 AM

First of all - great hack :)- looks really nice with the images and its pretty usefull. Secondly i have a problem - the titles dont seem to update. I installed the hack over 24 hours ago so theoretically ppl with the needed activity should have been updated today and moved in the higher category.
Code:

if($vbulletin->userinfo['userid']){
..... everything till here seems to work fine, the visitlog table looks fine and so do the fields in the user table other than the "rank"
      $WWU002userid=$vbulletin->userinfo['userid'];
      $WWU002activityPoints=eval($WWU002activityUpdate);
      //memberlevel 1 to memberlevel 2
      if(($vbulletin->userinfo['wwu002memberlevel']<2)&&($WWU002activityPoints>=($WWU002maxPoints*($vbulletin->options['WWU002level2THold']/100)))){
        devdebug('WWU002: promoted user '.$vbulletin->userinfo['userid'].' to level 2');
        $vbulletin->userinfo['wwu002memberlevel']=2;
        $db->query_write('UPDATE '.TABLE_PREFIX.'user SET wwu002memberlevel="2",wwu002fullmemberdate="'.$WWU002startOfDay.'" WHERE userid="'.$vbulletin->userinfo['userid'].'"');
        $vbulletin->userinfo['wwu002fullmemberdate']=$WWU002startOfDay;
      }//endif(($vbulletin->userinfo['wwu002memberlevel']<2)&&($WWU002activityPoints>=($WWU002maxPoints*($vbulletin->options['WWU002level2THold']/100))))

Any Ideas on the matter would be apreciated :). I could just make a cronjob and run that every hour to update them but I figure thre is something wrong if it doesnt work for me.
If i see it correctly members who once got promoted keep their rank for the rest of the time? Is it possible to make that limited so you get dropped down a level again once ur activity drops below the point of where it had to be to get promoted?-again - I could do that with a cronjob but I'm just wondering if it's something other people would like to see.)

Thanks again,
Lor20

hawksisdead 11-02-2005 04:23 PM

I was just wondering what I would need to edit to move the 4 bars around in the postbit. I want them lined up underneath Rep Power, but instead they are over to the left. What template edits do I need to make to get them lined up?

WetWired 11-02-2005 09:20 PM

Quote:

Originally Posted by Lor20
First of all - great hack :)- looks really nice with the images and its pretty usefull. Secondly i have a problem - the titles dont seem to update. I installed the hack over 24 hours ago so theoretically ppl with the needed activity should have been updated today and moved in the higher category.
Any Ideas on the matter would be apreciated :). I could just make a cronjob and run that every hour to update them but I figure thre is something wrong if it doesnt work for me.
If i see it correctly members who once got promoted keep their rank for the rest of the time? Is it possible to make that limited so you get dropped down a level again once ur activity drops below the point of where it had to be to get promoted?-again - I could do that with a cronjob but I'm just wondering if it's something other people would like to see.)

Thanks again,
Lor20

The titles are only updated when the user visits; this minimizes overhead.

Quote:

I was just wondering what I would need to edit to move the 4 bars around in the postbit. I want them lined up underneath Rep Power, but instead they are over to the left. What template edits do I need to make to get them lined up?
https://vborg.vbsupport.ru/showpost.php?p=804589

Lor20 11-03-2005 06:37 AM

I know it is supposed to update when the user visits, it is not doing that for me though. I have users who have an activity of over 60% and are still on level 1 (while the barriers are set at 25% and 65%). ALL my users are on level one even though about 100 or so of them were online in the last day and had enough activity to be "promoted".
Lor20


All times are GMT. The time now is 06:35 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.01464 seconds
  • Memory Usage 1,795KB
  • 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
  • (4)bbcode_code_printable
  • (1)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)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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