Re: Cash Mod 1.0.0
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/mastilan/public_html/forum/include/functions.php on line 1004
An error was encountered
Error: Unable to update config.I get this error
Please don't post this twice, I can read fine...
I'm not sure why this is happening. It looks like a problem with the including the cache files again...
Disable gzip and tell me the results.
I was sort of playing around with the mysql data... well I didn't ruin anything But I noticed that in the bank tab I added there was interest saying "290382309423E-6" interest waiting... so I thought that was sort of weird Going to the sql data I see that the default number is something huuuugggeeee... so I change it... so something smaller... like 2
Now the interest is about .0000000032823 >__>
What's up with this? What should I change the default value back to?
You must have changed the cm_interest.
This value doesn't hold the amount of interest you will be getting, but rather the last time that user received interest.
Get a timestamp of the machine you are running PunBB on (make a new PHP file and put <?PHP echo time(); ?> in it), then set the feild to that.
Tell me if this doesn't work.
Ok...a few issues I've noticed:
1) Perhaps auto-refill the lottery pot? Or even disable it while an announcement is made so that someone will see it to refill it.
On that note....2) Announcement of lottery winner. This needs to be dome in some form so that someone will see that its been won. Hiding it away in the plugin system to never be found again isn't too helpful.
3) Bugish thing: When someone wins, the place under plugin where the value of the pot should be is grammatically incorrect. It says something like "User is pot win the user win pot has been won" or something of this sort.
4) Better layout for lottery, bank, and donate. They're a bit crowded.
Cheers!
1) Auto refil? The point is people put money in the pot, then someone can win what other people put in it..
2) There is a setting in the plugin to show the last winner of the lottery everytime someone loses.
3) "User is pot win the user win pot has been won".... Umm... WTF?
4) They're crowded 'cause my HTML skills suck
If someone else feels up to making it look nicer, it would be appreciated a lot
No ... I want the files need to be changed ... some as viewtopic.php etc.
Read the file readme.txt
Just an update. 1.0.1 has been released.
It's a small release, so it doesn't get a topic of it's own. All that was changed was the ability to edit the amount of cash/bank that a user has. In my rush to get it out, I forgot that to add it.
If you installed 1.0.0, follow the instructions below to add this function.
#
#---------[ 16. OPEN ]---------------------------------------------------
#
profile.php
#
#---------[ 17. FIND (line:698) ]---------------------------------------------------
#
// We only allow administrators to update the post count
if ($pun_user['g_id'] == PUN_ADMIN)
$form['num_posts'] = intval($_POST['num_posts']);
#
#---------[ 18. REPLACE WITH ]---------------------------------------------------
#
// We only allow administrators to update the post count
if ($pun_user['g_id'] == PUN_ADMIN) {
$form['num_posts'] = intval($_POST['num_posts']);
$form['cm_cash'] = intval($_POST['cm_cash']);
$form['cm_bank'] = intval($_POST['cm_bank']);
}
#
#---------[ 19. FIND (line:~888) ]---------------------------------------------------
#
$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
#
#---------[ 20. REPLACE WITH ]---------------------------------------------------
#
$result = $db->query('SELECT u.cm_cash, u.cm_bank, u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
#
#---------[ 21. FIND (line:~1057) ]---------------------------------------------------
#
if ($pun_user['g_id'] == PUN_ADMIN)
$posts_field = '<label>'.$lang_common['Posts'].'<br /><input type="text" name="num_posts" value="'.$user['num_posts'].'" size="8" maxlength="8" /><br /></label><p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
else if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
$posts_field = '<p>'.$lang_common['Posts'].': '.$user['num_posts'].' - <a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
else
$posts_field = '<p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
#
#---------[ 22. REPLACE WITH ]---------------------------------------------------
#
if ($pun_user['g_id'] == PUN_ADMIN) {
$posts_field = '<label>'.$lang_common['Posts'].'<br /><input type="text" name="num_posts" value="'.$user['num_posts'].'" size="8" maxlength="8" /><br /></label><p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
$posts_field .= '<label>'.ucwords($pun_config['cm_cur_name']).'<br /><input type="text" name="cm_cash" value="'.$user['cm_cash'].'" size="8" maxlength="8" /><br /></label>'."\n";
$posts_field .= ($pun_config['cm_bank'] == 1) ? '<label>Bank<br /><input type="text" name="cm_bank" value="'.$user['cm_bank'].'" size="8" maxlength="8" /><br /></label>'."\n" : '';
} else if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST) {
$posts_field = '<p>'.$lang_common['Posts'].': '.$user['num_posts'].' - <a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
$posts_field .= '<p>'.ucwords($pun_config['cm_cur_name']).': '.$user['cm_cash'].'</p>'."\n";
$posts_field .= ($pun_config['cm_bank'] == 1) ? '<p>Bank: '.$user['cm_bank'].'</p>'."\n" : '';
} else
$posts_field = '<p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
#
#---------[ 15. SAVE/UPLOAD ]---------------------------------------------------
#
profile.php
The line numbers will probably be off a bit...
$theQuestion = (2*b) || !(2*b);