PDA

View Full Version : Miscellaneous Hacks - Cyb - Members Mood


Valter
05-02-2008, 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.

H_A_R_R_Y
05-03-2008, 01:40 PM
Thanks Man

nice Work

crkgb
05-03-2008, 06:36 PM
I get this Warning: file() [function.file]: URL file-access is disabled in the server configuration in [path]/misc.php(97) : eval()'d code on line 564

Warning: file(testvb/cyb_vmood/cyb_vmood_votes.csv) [function.file]: failed to open stream: no suitable wrapper could be found in [path]/misc.php(97) : eval()'d code on line 564

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

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

Everything is chmoded properly according to the instructions

ArLinD
05-07-2008, 02:08 PM
Not working here :o

Bounce
05-07-2008, 04:53 PM
is it possible to change the 1,2,3,4,5 as users may not have any idea what the numbers relate too..

I suggest ....

1, Crappy had a totally rubbish day
2, Pretty poor :(
3,Doing ok I suppose.
4,Am great.
5,In dreamland and feeling on top of the world

:D

KanmaiseR
05-15-2008, 04:43 AM
thanks, installed..

lostguy
05-15-2008, 08:53 PM
then CHMOD "cyb_vmood_votes.csv" to "777".

I dont understand this Part..! CHMOD ? "777" I wonder where is that !!! Pretty confused .

Btw im using FTP program to upload to my forum root !

lg

Valter
05-15-2008, 08:57 PM
Change file permissions via ftp client:
http://support.discusware.com/center/resources/howto/chmod.html

lostguy
05-15-2008, 09:28 PM
K installed ! One more thing the VIEW LOG and RESET only for Admin right ?

lg

paramegsoft
05-15-2008, 10:08 PM
nice mod

thanks

lostguy
05-15-2008, 11:16 PM
This is sad cause it reset every 3 mins for me ! I try fix the time at (Task Manager) it didnt allow me SAVE it .

I endup OFF the Reset Automatically button at Help vBulletin Options ! If we put YES it will reset every 3 mins ..U shoulda set default to 24 hours :( .

digicom
05-16-2008, 09:31 AM
Thanks looks cool :up:

Makc666
07-15-2008, 11:45 AM
Fixed this one.

I think this was my problem with .htaccess
In other words the forum itself doesn't have access to forum's WWW part because its IP was blocked by .htaccess permissions.

Punished myself :eek:

SSJB_7
07-22-2008, 12:13 AM
comes to an error for me when i put 1 from 5 values:

Warning: fopen(cyb_vmood/cyb_vmood_votes.csv) [function.fopen]: failed to open stream: Permission denied in [path]/misc.php(97) : eval()'d code on line 2027

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

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

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

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

BucWiLd
07-22-2008, 12:37 AM
I get this

Everything is chmoded properly according to the instructions


i got this error as well. can you explain better how to install

cindy helmond
07-22-2008, 11:53 AM
nice one thx installed !!

CEO TaYloR?
08-09-2008, 08:51 PM
Very good mood. Thank you!

iamthebest22
08-13-2008, 05:12 AM
Ummm It's causing my CYb Chatbox to duplicate itself...