PDA

View Full Version : Miscellaneous Hacks - Cyb - Members Mood


Valter
01-09-2009, 10:00 PM
Info:
This will show membership mood for current day. Members can vote for one of five options (mood 1-5) once a day. Total votes/average mood are shown in stats. Total votes are also shown in percents using graphical bar. Votes are automatically reseted every midnight. You can change time period in Scheduled Task Manager. You can enable adding of default vote automatically after reset. SuperAdmins can reset stats/votes manually and see log. You can ban usergroups and individual members from voting and seeing mood bar.


Installation:
1. Upload folder "cyb_vmood" to your forum root, then CHMOD "cyb_vmood_votes.csv" to "777".
2. Upload "cvm_reset.php" to \includes\cron folder.
3. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]


To set options:
Go to: AdminCP > vBulletin Options > Cyb - Members Mood


To put it on different page:
-You can have Mood bar shown on 2 pages
It's shown by default on forumhome (to disable it set option "Mood Box Placement" to "None")
To activate second location:
a) type location-name in "Additional Location" field
Explanation: When you open some vBulletin php file you'll see this at the top - "define('THIS_SCRIPT', 'XXX');"
XXX is location-name we need. It's usually the same as php filename (without extension, of course)
b) add "$cyb_vmood" to the template called on page where you wish to have stats shown


Versions:
v1.0 - Nov 27. 2006.
-Initial Release
v1.1 - Nov 30. 2006.
-Changed hack name to 'Cyb - Members Mood'
-Now only members can vote
-Now each member can vote only once a day (you can change time period in Scheduled Task Manager)
-Added two more options for voting, removed icons and changed options to numbers (1-5)
-If user has voted already then 'you've already voted...' message and vote info is shown instead of vote options
-Added option to view log in popup window (included info: time of voting, userid, userip, mood) - SuperAdmins only
-Added option to ban individual members from seeing Mood bar and voting
-Some small improvements in code
v1.2 - Dec 01. 2006.
-Fixed bug (stats wrong because of bug in vote status check code)
-Added Auto-Vote option (this will add default vote after stats are reseted)
-Added options to enable/disable Auto-Vote and define default mood
v1.3 - Dec 01. 2006.
-Fixed bug (wrong "your mood" info)
-Added username info to log
v1.4 - Jul 23. 2007.
-Logs enabled for cron job
-Improved way of reseting votes
-Security exploit fixed
v1.5 - May 03. 2008.
-Compatible with vBulletin 3.7
-Minor bugs fixed


Click INSTALL if you like this hack.

-=Leb=-
01-10-2009, 02:32 PM
nice hack, thank you.

Vaupell
01-21-2009, 08:14 PM
:up: installed :up: pretty cool..

only wish the bar was larger, and less text on the sides.

TheArve
01-21-2009, 09:31 PM
Thanks for this,, really appreciate ur time taken,

CHeers

thearve

gtrts
01-23-2009, 11:09 AM
very intresting

itsheinz
02-16-2009, 01:28 AM
This isnt working...

Amadeus Cho
02-20-2009, 10:08 AM
What's '777' ? and where is it ?

thanks

Amadeus Cho
02-20-2009, 12:55 PM
I get the following error:

Warning: file(http://www.*****.com/forum/cyb_vmood/cyb_vmood_votes.csv) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in [path]/misc.php(100) : eval()'d code on line 137

Warning: Invalid argument supplied for foreach() in [path]/misc.php(100) : eval()'d code on line 139

Warning: fopen(cyb_vmood/cyb_vmood_votes.csv) [function.fopen]: failed to open stream: No such file or directory in [path]/misc.php(100) : eval()'d code on line 151

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 152

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 153

Warning: fclose(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 154

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3254) in [path]/includes/functions.php on line 3087

Can anyone please help ?

Thanks

MV Blackie
02-20-2009, 02:44 PM
does anyone knows how to integrate this in vbadvanced ?

Merriweather
03-03-2009, 03:42 AM
How many queries does this add to the page load?

Valter
03-03-2009, 04:36 PM
None.

Jasem
03-23-2009, 01:30 PM
nice hack, thank you!

installed

dmknights
03-29-2009, 04:33 PM
nice mod

*Installed*

TPTP
05-20-2009, 10:07 AM
I get the following error:

I tried it for fun, and after verifying all permissions, I'm getting a similar but shorter error.

Not working on vB 3.8.2 / vBa 3.1.0 for me.

lm3a.net
05-20-2009, 11:05 AM
nice mod

thank u

DobieGillis?
05-20-2009, 04:34 PM
Installed, using VB 3.8.2. Flawless!

spaghie
08-22-2009, 02:24 PM
Marked as Installed. Looks great! Is it possible to remove the "Customize this page" message?

Keesa
08-28-2009, 07:52 AM
Can't make it work.

I get the following.
cyb_vmood/cyb_vmood_votes.csv) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in [path]/misc.php(100) : eval()'d code on line 641

Warning: Invalid argument supplied for foreach() in [path]/misc.php(100) : eval()'d code on line 643

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3277) in [path]/includes/functions.php on line 3087


:(

xyzmary2001
08-31-2009, 04:24 PM
I know, me 2. But if you will look on page 1 you can see that usually the errors are not taken into account for a response. Which means that I doubt we will ever get an answer for them - unfortunately this made me to uninstall the hack. The support is granted only in the specifications of the mod, not in reality.

SamirDarji
10-11-2009, 03:46 PM
Going to have to try this one. Great concept! Anyone tried it on 3.8.4?

chick
10-17-2009, 01:33 AM
yes works perfect on 3.8.4 pl1 great... if you are on a linux server cyb_vmood_votes.csv file needs 755 not 777

SamirDarji
10-17-2009, 02:57 AM
yes works perfect on 3.8.4 pl1 great... if you are on a linux server cyb_vmood_votes.csv file needs 755 not 777Thank you! I will definitely keep note of that. :)

K4GAP
01-25-2010, 07:03 PM
works great on 3.8.1

methos10
01-25-2010, 08:36 PM
Very nice mod installed and working great!!!!!

Makc666
05-07-2010, 07:57 AM
Can't make it work.

I get the following.


There is a little bug in this mod.

The problem part is:
$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
$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
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:
$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:
$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.

Jaber190
05-07-2010, 10:53 AM
thanks i like it .

Fivestones
06-07-2010, 11:18 PM
i am new to some of this can you tell me where CHMOD "cyb_vmood_votes.csv" to "777". is thanks ??? 5Stones

Fivestones
06-08-2010, 03:04 AM
I am trying to add the Cyb - Members Mood and it tells me to Upload folder "cyb_vmood" to your forum root, then CHMOD "cyb_vmood_votes.csv" to "777".

I up loader it t my sever on images but i dont know where to put the CHMOD "cyb_vmood_votes.csv" to "777".... I have it all added to my site but when i put my mood in it gives me this

Warning: fopen(cyb_vmood/cyb_vmood_votes.csv) [function.fopen]: failed to open stream: No such file or directory in [path]/misc.php(100) : eval()'d code on line 1904

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 1905

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 1906

Warning: fclose(): supplied argument is not a valid stream resource in [path]/misc.php(100) : eval()'d code on line 1907

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3277) in [path]/includes/functions.php on line 3103

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3277) in [path]/includes/functions.php on line 3108

can any one help me Thanks 5Stones

SamirDarji
06-08-2010, 04:41 PM
You'll have to use either an FTP client that allows you to change the permissions of a file or have shell access to the server and use the unix chmod command. Do google searches on these if they don't make sense and then post any further questions.

Fivestones
06-08-2010, 06:54 PM
thanks a lot for the reply ,,, i have Cute ftp and File Zilla FTP will they do what you are saying ? and how would i do it if they will ... do just change the folder name Thanks a lot 5Stones

Fivestones
06-15-2010, 05:35 PM
i added it but had to take it off i didnt know the way to change the one file...But ill learn then ill add it ..Thanks