vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - vBExperience 4 (https://vborg.vbsupport.ru/showthread.php?t=245023)

Phalynx 02-14-2012 07:13 AM

This has been already addressed in 4.1.0
However, vBExperience was never vulnerable to SQL, just remote cross-site scripting (XSS). Thats a big difference.

Vowgaming 02-14-2012 10:13 AM

Hi was wondering if I could get a hand on modding the code slightly.

My users Love the Mod but have raised a concern with activity showing up as negative points when a few things get changed or deleted

Was hopping for some pointers on what file or where I need to edit to modify this.

I also have coded up a ventrilo add on if someone would like a look at the raw basic code im happy to post.

Phalynx 02-14-2012 11:00 AM

There is no real possibility to disallow negative points, as vBExperience always recalculates all points from beginning. But you could do something with the hooks to save the points before they are wiped and only save if its get higher...

Would be great to see what you have done with Ventrilo.

Vowgaming 02-14-2012 11:52 AM

Warning This code is very poor in some ways. I'm not a professional coder at all just hack and play till i get it working.

firstly you need to use this in conjunction with http://www.ventrilo.com/dlprod.php?id=201

PHP Code:

<?php

include "ventrilostatus.php";

include 
"ventriloinfo_ex1.php";
include 
"ventrilodisplay_ex1.php";
include 
"ventrilodisplay_ex2.php";

$filename '/home/vowgamin/public_html/vent/ventrilo_status';

$current_timestamp=mktime(date("H"), date("i"), 0date("m"), date("d"), date("Y"));


function 
toArray($data) {
    if (
is_object($data)) $data get_object_vars($data);
    return 
is_array($data) ? array_map(__FUNCTION__$data) : $data;
}

function 
myTruncate($string$limit$break="."$pad="...")
{
// return with no change if string is shorter than $limit
    
if(strlen($string) <= $limit) return $string;
// is $break present between $limit and the end of the string?
    
if(false !== ($breakpoint strpos($string$break$limit))) {
        if(
$breakpoint strlen($string) - 1) {
$string substr($string0$breakpoint);
        }
    }
return 
$string;
}

$stat = new CVentriloStatus;
$stat->m_cmdprog    "/home/vowgamin/public_html/vent/ventrilo_status";    // Adjust accordingly.
$stat->m_cmdcode    "2";                    // Detail mode.
$stat->m_cmdhost    "Vent server address";            // Assume ventrilo server on same machine.
$stat->m_cmdport    "port";                // Port to be statused.
$stat->m_cmdpass    "";                    // Status password if necessary.

$rc $stat->Request();


$data toArray($stat);

// This code truncates the user names removing anything after the _ key
$i=0;
while (list(
$key$val) = each($data[m_clientlist]))
  {
  
$users[$i][name]=myTruncate($val[m_name],1"_");
  
$users[$i][chan]=myTruncate($val[m_cid],1"_");
  
$i=$i+1;
  }

$i=0;
foreach (
$users as $value) {

// the following checks ventrilo channel name if it is not the parent channel get the parent channel name
foreach ($data[m_channellist] as $k => $v)
{
    if (
$users[$i][chan] == $v[m_cid])
    {
        if (
$v[m_pid] == 0)
        {
            
$users[$i][chananme]=$v[m_name];
        }
        else
        {
            
$chan2=$v[m_pid];
            foreach (
$data[m_channellist] as $j => $b)
            {
            if (
$chan2 == $b[m_cid]) $users[$i][chananme]=$b[m_name];
            }
        }
    }
}
    
$i=$i+1;
  }

// connect to the database and pull out all the data assigning it to the forum array for searching latter
$link mysql_connect('localhost''********''**********');
if (!
$link) {
    die(
'Could not connect: ' mysql_error());
}
mysql_select_db("vowgamin_Vbulletin"$link);
$query "SELECT * FROM user";
$result mysql_query($query) or die(mysql_error());
$i=0;
while(
$row mysql_fetch_array($result)){
$forum[$i]['username']=$row['username'];
$forum[$i]['xperience']=$row['xperience'];
$forum[$i]['userid']=$row['userid'];
$forum[$i]['usergroupid']=$row['usergroupid'];
    
    
$i=$i+1;
    }

$size0;
$size20;
$size sizeof($users); // set the size of the upcoming for loops
$size2 sizeof($forum);

// go through all users on the vent server looking for a case insensitive match
for ($h 0$h <= $size$h++)
{
  for (
$i 0$i <= $size2$i++)
    {
    if (
strcasecmp($users[$h]['name'], $forum[$i]['username']) == 0)
    {
      
$m[$h]['username'] =$forum[$i]['username'];
      
$m[$h]['xperience'] =$forum[$i]['xperience'];
      
$m[$h]['channame'] =$users[$h]['chananme'];
      
$m[$h]['userid'] =$forum[$i]['userid'];
      
$m[$h]['usergroupid'] =$forum[$i]['usergroupid'];
    }

    if (
$users[$h]['name']=="Match")
    {
        
$match=4// the multiplier for clan matches
        
$chan=$users[$h][chananme]; // record the channel name down where match bot is located
    
}
    }
}

$array=array_filter($m);

$size3sizeof($array);
for (
$j 0$j <= $size3$j++)
{
$points=3// default points per cron job
$message"Ventrilo Participation";
$experience $array[$j]['xperience'];
$userid $array[$j]['userid'];

// Check to see if the match bot is in the chanel and change message plus points
if ($array[$j][channame] == $chan)
{
   
$message="Ventrilo Clan Match Participation";
    
$points=5*$match;
}
// adjust points to 1 for users sitting in afk channel
if ($array[$j][channame] == "AFK")
{
    
$points=1;
    
$message="AFK user";
}
if (
$array[$j][channame] == "Members Lounge")
{
    
$points=2;
    
$message="Members Lounge Ventrilo";
}
if (
$array[$j][channame] == "Sulk Room")
{
    
$points=-20;
    
$message="Members Lounge Ventrilo";
}
// adjust points for boot camp users to stop them ranking up to quick
if ($array[$j]['usergroupid'] == "55")
{
    
$points=1;
    
$message="Boot Camp User";
}

// check to make sure a user exists then enter data into the database
if ($userid)
{
$query2 "INSERT INTO xperience_custompoints (userid, points_misc_custom, adminid, comment, dateline) VALUES ( $userid$points , 1, '$message', $current_timestamp)";
//echo $query2."<br />";

mysql_query($query2);
}
}
mysql_close($link);


You will need to add your own server and port for ventrilo setup and change the ***** to your details for the database.

I have also hard coded this for the names of our vent channels and have included a check to see if a user match bot is part of the channel if it is increase the points

This script is run by a cron job every 15 mins and it adds points to the custom point table. (This is becoming an issue as the table is getting quite large)

Vowgaming 02-14-2012 12:13 PM

Quote:

Originally Posted by Phalynx (Post 2299544)
There is no real possibility to disallow negative points, as vBExperience always recalculates all points from beginning. But you could do something with the hooks to save the points before they are wiped and only save if its get higher...

Would be great to see what you have done with Ventrilo.

As you can see from the Ventrillo post above I'm ok a getting things modded can you give me a tip on where to start with this. I have looked through most of the php scripts and hooks. was hopping to find a place just before it wrote the info into the database and check if <0 skip the sql write

Iron Star 02-16-2012 06:27 AM

Hi,

I installed it and GG! Very good script.

I got bugs on xperience.php page:

- link to member profiles aren't correct in "recent activity"
- the template doesn't close correctly and footer is broken

How can I correct that?

Thank a lot.

Vowgaming 02-18-2012 04:30 AM

Quote:

Originally Posted by Vowgaming (Post 2299536)
Hi was wondering if I could get a hand on modding the code slightly.

My users Love the Mod but have raised a concern with activity showing up as negative points when a few things get changed or deleted

Was hopping for some pointers on what file or where I need to edit to modify this.

Found it in class_xperience.php

find this code
PHP Code:

($hook vBulletinHook::fetch_hook('xperience_calcdata_stats')) ? eval($hook) : false;
    
        if (
count($xperience_old) > AND count($xperience_new) > 0)
        {
            foreach(
$xperience_old AS $fieldk => $fielde)
            {
                if (!
in_array($fieldk$fields_notallowed))
                {
                    if (
$xperience_new[$fieldk] > $fielde OR $xperience_new[$fieldk] < $fielde)
                    {
                        
$difference $xperience_new[$fieldk] - $fielde

and add this line at the end

PHP Code:

if ($difference "0"$difference ="0"

That way if some one receives experience less then 0 it will be recorded as 0

I hope this is correct please tell me if i need to change anything else

Iron Star 02-18-2012 07:56 AM

Quote:

Originally Posted by Iron Star (Post 2300156)
Hi,


- link to member profiles aren't correct in "recent activity"


Thank a lot.

I found the pb in xperience_activity_x_earn template:

replace "<a href="{1}">{2}</a> earns {3}" with "<a href="member.php?u={1}">{2}</a> earns {3}"

JonUrban 02-18-2012 10:39 AM

I installed this and it seems to be working fine. It took about a week to get everyone's "Experience" level icons up to speed. It was interesting to see it happen over the week.

One thing that would be nice is if it could somehow subtract points for those who don't login anymore or have left the forum. I noticed that some members who have not logged in for years have large experience scores because they used to post a lot. Removing points for inactivity would be something that I would think would be a good feature.

Other than that, this is a great mod.

bposner 02-18-2012 06:58 PM

Seems achievement icons are not displaying, everything else seem fine. Seen screen shot:

http://screencast.com/t/t1pBz5bm

tommyxv 02-22-2012 12:24 AM

Quote:

Originally Posted by Iron Star (Post 2300156)
Hi,

I installed it and GG! Very good script.

I got bugs on xperience.php page:

- link to member profiles aren't correct in "recent activity"
- the template doesn't close correctly and footer is broken

How can I correct that?

Thank a lot.

I also have a broken footer for the Insight Experience tab only. All styles including vb default. Running 4.1.10. Everything else works.

Any ideas??

tommyxv 02-22-2012 02:55 AM

Quote:

Originally Posted by tommyxv (Post 2302157)
I also have a broken footer for the Insight Experience tab only. All styles including vb default. Running 4.1.10. Everything else works.

Any ideas??


I found the problem. The xperience_insight template is missing a closing div.

Fix it here...

Code:

<div id="memberlist" class="block">
    <div class="blockfoot">
            {vb:raw xperience.version}
    </div>
</div>
</div>
{vb:raw footer}

</body>
</html>


tomshawk 02-22-2012 03:23 PM

Hello, Sorry to bother but quick question.

I'm having an addon made for this, related to an online game and trading items from within the game.

I dont want to force new users to do a ton of posting and what not to get started using this addon I am making, so.

Is there a way to manually boost users points when they first register, say give them 1000 points, or is it just a matter of upping their reputation in vbulletin?

Thanks for this awesome addon

tommyxv 02-22-2012 04:14 PM

Too many database errors on 4.1.10. I had to uninstall it. Followed the un-install readme to the T, yet I had a corrupted database after. Luckily I did a backup just before installing it. Only lost about 6 hrs.

It's very buggy.

1) The small 16x16 img doesn't remember itself in the drop-down if you go back to edit an award. If defaults back to the first choice in the menu.

2) There are a few 'Points for x' that are doubled in the list.

3) Recount didn't work at all. Neither did the 'Test' link. That returned a db error.

4) A few template problems. The missing tag i mentioned above being the biggest, and a few spacing issues with blockbody tag. (tested on vb default style)

I guess I will wait for a updated version for 4.1.10. Great mod, so I'll keep my eye on it.

halocommunity 02-22-2012 05:06 PM

Love this add-on! Installed easily on 4.1.8 and everything works great!

I have a question though, what is the difference between these two tables in the Statistics tab?
http://cl.ly/0m1a430U2X1t2b373M3K

I'm guessing it's a phrase issue, but even searching in the phrases doesn't tell me anything
http://cl.ly/0y2O271M0B2v3h1Q0l0i

Any ideas?

Nirjonadda 02-22-2012 05:44 PM

Its Not working for 4.1.10.when Installed database error. I got bugs on xperience page

sweetpotato 02-22-2012 06:05 PM

This love Mod seems no longer work with Vbulletin 4.1.10.
Looking forward for the update.

Dave84311 02-22-2012 07:38 PM

Where are the XCACHE settings for this plugin? Does vBulletin have to be using XCache for this to work? Or do you just have to have XCache installed and enabled for the website?

bposner 02-22-2012 08:46 PM

Quote:

Originally Posted by bposner (Post 2300946)
Seems achievement icons are not displaying, everything else seem fine. Seen screen shot:

http://screencast.com/t/t1pBz5bm


Any help with this, please?:cool:

tomshawk 02-23-2012 10:07 PM

Quote:

Originally Posted by tomshawk (Post 2302299)
Hello, Sorry to bother but quick question.

I'm having an addon made for this, related to an online game and trading items from within the game.

I dont want to force new users to do a ton of posting and what not to get started using this addon I am making, so.

Is there a way to manually boost users points when they first register, say give them 1000 points, or is it just a matter of upping their reputation in vbulletin?

Thanks for this awesome addon

Anybody know if this is possible? My addon is almost ready.

DS MrSinister 02-24-2012 12:21 AM

@tomshawk

I am sure you can do it by coding a plugin for it.. if you look at Experience: Points under --> settings --> vboptions in the admincp. Hopefully Phalynx will add this to one of the next release.

Hope this helps!

tommyxv 02-24-2012 12:48 AM

I went with Dragons point system instead. He has it working on his 4.1.10 site, and no DB error anywhere. I been testing it the lite version on my test site. Working smoothly. And no template problems. Going to get the pro version.

tomshawk 02-24-2012 04:12 AM

I was thinking something in Manage Custom points but it is limited to userid.

If I could do a group ID that would be awesome.

Any thoughts Phalynx?

sweetpotato 02-24-2012 04:43 AM

I still love this Mod so much. Please update for 4.1.10 Phalynx, or let us know when it will be.

Thanks for the nice Mod.

DS MrSinister 02-24-2012 05:03 AM

I know he working on verison 4.1.1 which should have a fix for vbookie plugin. hopefully it has some other fixs and stuff.

bposner 02-25-2012 04:43 PM

Still looking for suggestion about this issue: https://vborg.vbsupport.ru/showpost....postcount=2290

I've checked the directory and the icons are there and file permissions are correct.. ideas?

HHelp1 02-25-2012 10:23 PM

This mod is GREAT! but i have question that the Overal Active And Points are go up too fast. is there any way i can make it slower?

tomshawk 02-26-2012 02:07 AM

Quote:

Originally Posted by HHelp1 (Post 2303420)
This mod is GREAT! but i have question that the Overal Active And Points are go up too fast. is there any way i can make it slower?


I noticed this as well.

Add in the bigger board stats, thats what I did, dont forget to recount. ;)

They still add up but obviously it takes longer.

foreveryoung21 02-26-2012 03:59 AM

Why does this and the experience points differs? I want the point market system and the experience points to be the same, any help?

Phalynx 02-27-2012 10:38 AM

Quote:

Originally Posted by tomshawk (Post 2302299)
Hello, Sorry to bother but quick question.

I'm having an addon made for this, related to an online game and trading items from within the game.

I dont want to force new users to do a ton of posting and what not to get started using this addon I am making, so.

Is there a way to manually boost users points when they first register, say give them 1000 points, or is it just a matter of upping their reputation in vbulletin?

Thanks for this awesome addon

You can achieve this with an addon that is giving the points for each user once.


Quote:

Originally Posted by tommyxv (Post 2302313)
Too many database errors on 4.1.10. I had to uninstall it. Followed the un-install readme to the T, yet I had a corrupted database after. Luckily I did a backup just before installing it. Only lost about 6 hrs.

It's very buggy.

1) The small 16x16 img doesn't remember itself in the drop-down if you go back to edit an award. If defaults back to the first choice in the menu.

2) There are a few 'Points for x' that are doubled in the list.

3) Recount didn't work at all. Neither did the 'Test' link. That returned a db error.

4) A few template problems. The missing tag i mentioned above being the biggest, and a few spacing issues with blockbody tag. (tested on vb default style)

I guess I will wait for a updated version for 4.1.10. Great mod, so I'll keep my eye on it.

Quote:

Originally Posted by sweetpotato (Post 2302376)
This love Mod seems no longer work with Vbulletin 4.1.10.
Looking forward for the update.


vBExperience 4.1.0 is NOT compatible with vBulletin 4.1.10/4.1.11
Working currently on a compatible version that will fix known errors like sql errors / compatibility, missing end tag and the unclosed div.


Quote:

Originally Posted by halocommunity (Post 2302341)
Love this add-on! Installed easily on 4.1.8 and everything works great!

I have a question though, what is the difference between these two tables in the Statistics tab?
http://cl.ly/0m1a430U2X1t2b373M3K

I'm guessing it's a phrase issue, but even searching in the phrases doesn't tell me anything
http://cl.ly/0y2O271M0B2v3h1Q0l0i

Any ideas?

"Points for x" is NOT doubled. One is the points for each posts, the other is the category that includes all post related points (incl. posts self).

Phalynx 02-27-2012 10:41 AM

Quote:

Originally Posted by HHelp1 (Post 2303420)
This mod is GREAT! but i have question that the Overal Active And Points are go up too fast. is there any way i can make it slower?

Quote:

Originally Posted by tomshawk (Post 2303448)
I noticed this as well.

Add in the bigger board stats, thats what I did, dont forget to recount. ;)

They still add up but obviously it takes longer.

Correctly, simply install another / higher level xml.

Quote:

Originally Posted by foreveryoung21 (Post 2303461)
Why does this and the experience points differs? I want the point market system and the experience points to be the same, any help?

You need to tell the market to use vBExperience points.

comunidadmh 02-27-2012 01:42 PM

Hello :)

Someone knows why I throw this error when I want to see the statistics?

Code:

Database error in vBulletin 4.1.10:

Invalid SQL:
SELECT
                                u.userid, u.username, s.points_user AS cnt_count
                                FROM xperience_stats AS s
                                INNER JOIN user AS u ON u.userid = s.userid
                                WHERE s.points_user <> 0
                                ORDER BY s.points_user DESC, s.points_xperience DESC
                                LIMIT;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
Error Number  : 1064
Request Date  : Monday, February 27th 2012 @ 11:45:38 AM
Error Date    : Monday, February 27th 2012 @ 11:45:38 AM
Script        : http://www.comunidadmh.com/xperience.php?go=stats
Referrer      : http://www.comunidadmh.com/xperience.php?go=awards
IP Address    : 201.213.162.143
Username      : Gaucha
Classname    : vB_Database
MySQL Version : 5.1.52


HHelp1 02-27-2012 02:54 PM

Quote:

Originally Posted by Phalynx (Post 2303839)
Correctly, simply install another / higher level xml.



You need to tell the market to use vBExperience points.

May you please tell me how may i find it? I cant find it. Please help me another / higher level xml.

DS MrSinister 02-27-2012 03:39 PM

@HHelp1

Look into the folder it makes after unzipping the file. you will see a folder called extras in that folder you will see a folder call levels. choose one of those.

vBExperience410_20111216_GOLD ---> extras ---> levels.

Hope this helps.

owning_y0u 02-27-2012 07:07 PM

Quote:

Originally Posted by owning_y0u (Post 2293561)
small question: is it possible that i can allow 1 certain member to add awards and such.
Without adding that user to the administrator group?

any solution for this?

Phalynx 02-27-2012 07:56 PM

Quote:

Originally Posted by comunidadmh (Post 2303873)
Hello :)

Someone knows why I throw this error when I want to see the statistics?

Code:

Database error in vBulletin 4.1.10:

Invalid SQL:
SELECT
                                u.userid, u.username, s.points_user AS cnt_count
                                FROM xperience_stats AS s
                                INNER JOIN user AS u ON u.userid = s.userid
                                WHERE s.points_user <> 0
                                ORDER BY s.points_user DESC, s.points_xperience DESC
                                LIMIT;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
Error Number  : 1064
Request Date  : Monday, February 27th 2012 @ 11:45:38 AM
Error Date    : Monday, February 27th 2012 @ 11:45:38 AM
Script        : http://www.comunidadmh.com/xperience.php?go=stats
Referrer      : http://www.comunidadmh.com/xperience.php?go=awards
IP Address    : 201.213.162.143
Username      : Gaucha
Classname    : vB_Database
MySQL Version : 5.1.52


It seems the setting for the Top x has been set to a null value. Please check this in Settings, Experience: Stats, Top x and set a value higher than 0.

Quote:

Originally Posted by owning_y0u (Post 2303974)
any solution for this?

Unfortunately not.

tomshawk 02-27-2012 11:41 PM

Quote:

Originally Posted by Phalynx (Post 2303838)
You can achieve this with an addon that is giving the points for each user once.

Could you give me an idea of how to create this addon you mention.

The software already has the ability to give an individual points, but.

I'm looking at hundreds of users at once, or just make it so users in a particular usergroup automatically get a one time boost.

Thanks

comunidadmh 02-28-2012 12:47 AM

Quote:

Originally Posted by Phalynx (Post 2303989)
It seems the setting for the Top x has been set to a null value. Please check this in Settings, Experience: Stats, Top x and set a value higher than 0.


Unfortunately not.

GOOOOOOOOOOOOOOOD :D !!!!!

TY :) !

Phalynx 02-28-2012 02:35 PM

I did now an update to vBulletin 4.1.10 and tested vBExperience. Luckily (?) there are no errors. So if someone has SQL errors or other related to 4.1.10 can post them here to get them fixed before I release vBExperience 4.1.1

Phalynx 02-28-2012 02:36 PM

Quote:

Originally Posted by tomshawk (Post 2304044)
Could you give me an idea of how to create this addon you mention.

The software already has the ability to give an individual points, but.

I'm looking at hundreds of users at once, or just make it so users in a particular usergroup automatically get a one time boost.

Thanks

You need to use the CDP plugin interface, see ZIP\extras\CDP Custom Data Provider for examples.


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