1

(4 replies, posted in PunBB 1.2 discussion)

can i ask, what is the point in that? so you can use your google ads and hope for some income?

Seems very pointless

Scrubz

2

(3 replies, posted in PunBB 1.2 troubleshooting)

Hi,
You would have to modify the "todays visitors" mod in a similar way to what you did to add the color to th online groups.

I currently dont have tiem to show you what to do so ill leave it for a more senior member to explain.

Scrubz

hm, the fact its not even bring up an error suggests the files arnt there - but the fact that the page isnt a 404 error suggests otherwise. ... are you sure they are uploaded into the root folder?

Scrubz

have you uploaded the lottery.php, donate.php and bank.php?

I dont think that they are included in the latest version of Cash Mod - but if you download the version before you can copy the lottery.php, bank.php and donate.php into the latest folder and upload them

Scrubz

Lottery is simple enough, goto the lottery page and click buy ticket, when you buy ticket you either win or lose, simple as that, the money paid to buy a ticket goes into the pot, if the pot isnt won then the money keeps growing each time som1 buy a ticket and fails to win.

the donate also simple enough, when your on the donate page you type in the user you ant to donate to and enter the amount you wish to donate.

If you cant see a link to these pages its because the last edits are missed off on the readme (at least i think so) but it can be overcome easily by adding menu items with the URL: www.your-domain.com/lottery.php or www.your-domain.com/donate.php - where "your-domain" is your website.

Scrubz

No, they are waiting for 1.3, there would be no real point in making it for 1.2.** when 1.3 is just not far from release.

Scrubz

the mod does work yes, but the last edit does nothing as it is.

im not 100% sure but isnt the cash supposed to eb shown under your other details such as post count etc?

I just get the feeling its missing some

ive worked around it, but im just saying..

Scrubz

On your latest readme it seems to be cut off half way through the edits that need to be done ...

And on the 2 older versions the readme is scrambled ... Could you repost the full readme

This is the readme i see:

##
##
##        Mod title:  Cash Mod 1.1.0 
##
##      Mod version:  1.2.0 
##   Works on PunBB:  1.2.10 
##     Release date:  10-01-05 
##           Author:  Apache Kof (Pandark) + Gary(13579) Schilling
##
##      Description:  This mod is the Cash Mod 1.0.1 made by Gary(13579) Schilling + a localisation of its made by Apache Kof (Pandark).
##                     This mod gives people "cash" for their posts, and is a start towards the RPG mod that Connorhd wants made.
##                     Nearly everything is configurable..
##
##       Affects DB:  Yes 
##
##   Affected files:  post.php 
##                    viewtopic.php 
##
##            Notes:  Thanks to Connorhd for the inspiration (if you call yelling at me for 2 weeks on IRC inspiration :P) and the money..
##                      Thanks to Mediator for the awesome Auto Read-me program.
##                      And most of all, thanks to Rickard for PunBB :D 
##
##     Generated By:  Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##


#
#---------[ 1. UPLOAD ]---------------------------------------------------
#

install_mod.php to ./
donate.php to ./
bank.php to ./
lottery.php to ./
AP_Cash_Mod.php to ./plugins/
English/cash.php to ./lang/English/

#
#---------[ 2. RUN ]---------------------------------------------------
#

install_mod.php

#
#---------[ 3. DELETE ]---------------------------------------------------
#

install_mod.php



#
#---------[ 4. OPEN ]---------------------------------------------------
#

viewtopic.php

#
#---------[ 5. FIND (line:186) ]---------------------------------------------------
#

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());


#
#---------[ 6. REPLACE WITH ]---------------------------------------------------
#

$result = $db->query('SELECT u.cm_cash, u.cm_bank, u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

#
#---------[ 7. FIND (line:235) ]---------------------------------------------------
#

                $user_info[] = '<dd>'.$lang_common['Posts'].': '.$cur_post['num_posts'];

#
#---------[ 8. AFTER, ADD ]---------------------------------------------------
#

            $user_info[] = '<dd>'.ucwords($pun_config['cm_cur_name']).': '.number_format($cur_post['cm_cash']);
            if ($pun_config['cm_bank'] == 1)
                $user_info[] = '<dd>'.$lang_common['Bank'].': '.number_format($cur_post['cm_bank']);


#
#---------[ 9. SAVE/UPLOAD ]---------------------------------------------------
#

viewtopic.php

#
#---------[ 10. OPEN ]---------------------------------------------------
#

post.php

#
#---------[ 11. FIND (line:39) ]---------------------------------------------------
#

// Fetch some info about the topic and/or the forum
if ($tid)
    $result = $db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.subject, t.closed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$tid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());


#
#---------[ 12. REPLACE WITH ]---------------------------------------------------
#

// Fetch some info about the topic and/or the forum
if ($tid)
    $result = $db->query('SELECT f.cm_cpp, f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.subject, t.closed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$tid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT f.cm_cpt, f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());



#
#---------[ 13. FIND (line:317) ]---------------------------------------------------
#

        if (!$pun_user['is_guest'])
        {
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
        }

        redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);


#
#---------[ 14. REPLACE WITH ]---------------------------------------------------
#

        if (!$pun_user['is_guest'])
        {
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
            // Update the user's cash..
            if ($tid) {
                $db->query('UPDATE '.$low_prio.$db->prefix.'users SET cm_cash=cm_cash+'.$cur_posting['cm_cpp'].' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
                redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect'].'<br />You have gained '.$cur_posting['cm_cpp'].' '.$pun_config['cm_cur_name'].'.');
            } else if($fid) {
                $db->query('UPDATE '.$low_prio.$db->prefix.'users SET cm_cash=cm_cash+'.$cur_posting['cm_cpt'].' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
                redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect'].'<br />You have gained '.$cur_posting['cm_cpt'].' '.$pun_config['cm_cur_name'].'.');
            }
        } else
                redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);


#
#---------[ 15. SAVE/UPLOAD ]---------------------------------------------------
#

post.php


#
#---------[ 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>'.$lang_common['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>'.$lang_common['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";

#
#---------[ 23. SAVE/UPLOAD ]---------------------------------------------------
#

profile.php

#
#---------[ 24. OPEN ]---------------------------------------------------
#

lang/English/common.php

#
#---------[ 25. FIND (line:698) ]---------------------------------------------------
#

'Show new posts'        =>    'Show new posts since last visit',
'Mark all as read'        =>    'Mark all topics as read',
'Link separator'        =>    '',    // The text that separates links in the navigator

#
#---------[ 26. AFTER, ADD ]---------------------------------------------------
#

// Cash Mod
'Bank'                =>    'Bank',
'Lottery'                =>    'Lottery',
'Donate'                =>    'Donate',