vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - vBExperience (https://vborg.vbsupport.ru/showthread.php?t=171014)

tafreeh 06-23-2008 03:00 AM

okay i need help...

In profile it says VB EXPERIECE
i need to change this to somthing else....
how would i do that

Ideal Web Tech 06-23-2008 07:10 AM

Found a bug in the code for counting the points for the pictures (albums).

The problem is in class_xperience.php


Your code that has the problem:
PHP Code:

        //Albumpictures
        
$albumfield="visible";
        if (
$this->field_exists('album''picturecount')) $albumfield="picturecount";

        if (
$DoDebug==1) echo "<br/>Albumpictures";
        if (
$vbulletin->options['xperience_points_pc'] > 0
        {    
            
$vmessagesq =$vbulletin->db->query_read("SELECT 
            
$albumfield
            FROM " 
TABLE_PREFIX "album
            WHERE userid="
.$user['userid']);
    
            if (
$vbulletin->db->num_rows($vmessagesq) > 0)
            {
                
$vmessages $vbulletin->db->fetch_array($vmessagesq);
                
$xperience['count_user_albumpictures'] = $vmessages['visible']*$vbulletin->options['xperience_points_pc'];
            } 
        } 


My corrected version:
PHP Code:

        //Albumpictures - Corrected code by Ideal Web Tech
        
$xperience['count_user_albumpictures'] = 0;
        
$albumfield="visible";
        if (
$this->field_exists('album''picturecount')) $albumfield="picturecount";

        if (
$DoDebug==1) echo "<br/>Albumpictures";
        if (
$vbulletin->options['xperience_points_pc'] > 0
        {    
            
$vmessagesq =$vbulletin->db->query_read("SELECT 
            
$albumfield
            FROM " 
TABLE_PREFIX "album
            WHERE userid="
.$user['userid']);
    
            while (
$vmessages $vbulletin->db->fetch_array($vmessagesq))
            {
                
$xperience['count_user_albumpictures'] += $vmessages['visible']*$vbulletin->options['xperience_points_pc'];
            } 
        } 

Your original code has a problem where it only tracks the last album of the users that was processed. This updated code will correctly process all albums a user has.

I am also looking into making this more efficient as well as making the stats update in real time to avoid the load that comes from updating and to avoid the delay from updating it.

Lord_of_Darknes 06-23-2008 08:54 AM

Quote:

Originally Posted by Jwoody (Post 1554486)
Have you followed the instructions and installed it (not just uploaded it...)

Yes I have.
I upload it it to my host, and into vbulletin, but nothing happen.
I'm totally nnew at thise I had a hard time installing vbulletin so some company did it for me.
Is there a way some one could help me?

Cheers.

hiepsi@ 06-23-2008 09:14 AM

refresh all page, press F5 to reload, it fix in left menu of admincp

Captain Tycoon 06-23-2008 12:04 PM

I have a problem trying to customize this. How would I be able to put the statistics from the "vBExperience" block in the profile page to the "Profile" block as shown in the screenshot:

From Here
https://vborg.vbsupport.ru/

To Here
https://vborg.vbsupport.ru/

When i copy the code from the "xperience_memberinfo" template to "memberinfo_block_mainprofile" it says "No Data Available"

Calash 06-23-2008 01:08 PM

Great mod. Going to play with the Custom Data soon, but I am having an issue with CMPS. The Online users block shows broken images where the awards should be. I see this from time to time, and all I need to do to fix it is add a / in the code, however I cannot find the template that deals with this part.

Is this added in the template or is it coded in the file?

Thanks

pooslokka 06-23-2008 06:08 PM

Is User Rankings Module is part of vbExperience ?
Coz, Not sure wheather it was exist before we install this vbExperience :D

callumbush 06-23-2008 09:24 PM

I have installed a new style and it has broken vbexperienced (and postthankyou hack).
In the position below the username where the vbexperienced stats normally show, the stats for my members are now showing as plain text.

Can anyone help? :)

username: test
password: test

Audentio 06-23-2008 10:40 PM

Its adding an extra </a> to each username on the forums...any idea for a fix?

Ideal Web Tech 06-24-2008 12:41 AM

Quote:

Originally Posted by Audentio (Post 1557266)
Its adding an extra </a> to each username on the forums...any idea for a fix?

I can confirm that the code for building the awards and attaching them to the musername leave the html structure invalid.

Here is a quick fix that I coded up that will fix the problem but it will also make the awards linked with the name for now. I chose to fix it in this method instead of just fixing the link building part of it because fixing it would leave us with a blank <a href="#"></a> tag or something similar.

Open plugin: vBExperience (username) in the fetch_musername hook

Replace its contents with
PHP Code:

//Corrected plugin to fix invalid html tag structure caused by the original plugin.  (Fixed by: Ideal Web Tech)
if ($vbulletin->options['xperience_use_awards']) 
{
            
    if (
$vbulletin->options['xperience_musername']==OR $vbulletin->options['xperience_musername']==2
    {
        require_once(
DIR '/includes/functions_xperience.php');
        
$awards GetAwards($user['xperience_awards']);
    }

    
//Added a check here so we don't do any processing when their is no awards for the user.
    
if ($awards!='')
    {    
        if (
$vbulletin->options['xperience_musername']==1
        {
        
            
$user['musername'].= $awards;
        }
        if (
$vbulletin->options['xperience_musername']==2
        {
            
$user['musername']=$awards.$user['musername'];
        }
    }




All times are GMT. The time now is 04:56 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.03034 seconds
  • Memory Usage 1,773KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)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