Quote:
Originally Posted by Schnee
Can't make it work.
I get the following.
|
There is a little bug in this mod.
The problem part is:
PHP Code:
$ccsv_data = fopen("cyb_vmood/cyb_vmood_votes.csv", "r");
$csv_read = fgets($ccsv_data);
$line_pos = strpos($csv_read,'_Mood:');
$cvm_starttime = substr($csv_read,5,$line_pos);
$cvm_starttime = vbdate('d-m, H:i', $cvm_starttime);
fclose($csv_data);
If we look more attentevly we will see that the first variable is:
$ccsv_data
PHP Code:
$ccsv_data = fopen("cyb_vmood/cyb_vmood_votes.csv", "r");
$csv_read = fgets($ccsv_data);
But at the end the other variable is used:
$csv_data
PHP Code:
fclose($csv_data);
I really don't know why
$ccsv_data is used.
It can be a misprint or it can be done specially.
If it was a missprint then the fix is:
PHP Code:
$csv_data = fopen("cyb_vmood/cyb_vmood_votes.csv", "r");
$csv_read = fgets($csv_data);
$line_pos = strpos($csv_read,'_Mood:');
$cvm_starttime = substr($csv_read,5,$line_pos);
$cvm_starttime = vbdate('d-m, H:i', $cvm_starttime);
fclose($csv_data);
If it was done specially then the fix is:
PHP Code:
$ccsv_data = fopen("cyb_vmood/cyb_vmood_votes.csv", "r");
$csv_read = fgets($ccsv_data);
$line_pos = strpos($csv_read,'_Mood:');
$cvm_starttime = substr($csv_read,5,$line_pos);
$cvm_starttime = vbdate('d-m, H:i', $cvm_starttime);
fclose($ccsv_data);
For myself I chose the first fix.