It's been possible in the past.
http://www.microsoft.com/technet/securi … 4-028.mspx
1 2008-08-31 08:56
Re: Can an Image Placed on a Forum Contain a Virus? (4 replies, posted in PunBB 1.2 discussion)
2 2008-03-26 22:05
Re: 3ix.org now cancelled my account.. (44 replies, posted in General discussion)
Welcome to life, enjoy your stay.
3 2008-03-25 16:40
Re: DownloadMod 1.1 (12 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Put the info in your forums' index (where the stats are):
#
#-------------[ 1. Open File ]----------------
#
~/index.php
#
#-------------[ 2. Find (line: ~156)]----
#
$stats['last_user'] = $db->fetch_assoc($result);
#
#-------------[ 3. Add After ]----------------
#
$result = $db->query('SELECT SUM(dl_total_bandwidth) FROM '.$db->prefix.'users') or error('Unable to fetch download bandwidth', __FILE__, __LINE__, $db->error());
$stats['total_downloaded'] = $db->result($result);
#
#-------------[ 4. Find (line: ~171)]----
#
</dl>
#
#-------------[ 5. Add Before ]---------------
#
<dd><?php echo 'Total Download Bandwidth: <strong>'.fsize($stats['total_downloaded']); ?></strong></dd>
Put the bandwidth usage for the user under his avatar in topics.
#
#-------------[ 1. Open File ]----------------
#
~/viewtopic.php
#
#-------------[ 2. 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());
#
#-------------[ 3. Replace With ]--------------
#
$result = $db->query('SELECT u.dl_total_bandwidth, 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());
#
#-------------[ 4. Find (line: ~321)]----
#
<dd class="postavatar"><?php echo $user_avatar ?></dd>
#
#-------------[ 5. Add After ]----------------
#
<dd class="usertitle"><strong>DLed: <?php echo pun_htmlspecialchars(fsize($cur_post['dl_total_bandwidth'])); ?></strong></dd>
Put the info in the userlist (with the ability to sort by bandwidth)
#
#-------------[ 1. Open File ]----------------
#
~/userlist.php
#
#-------------[ 2. Find (line: ~46)]----
#
$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by'];
#
#-------------[ 3. Replace With ]--------------
#
$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && $_GET['sort_by'] != 'dl_total_bandwidth' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by'];
#
#-------------[ 4. Find (line: ~88)]----
#
<option value="registered"<?php if ($sort_by == 'registered') echo ' selected="selected"' ?>><?php echo $lang_common['Registered'] ?></option>
#
#-------------[ 5. Add Before ]--------------
#
<option value="dl_total_bandwidth"<?php if ($sort_by == 'dl_total_bandwidth') echo ' selected="selected"' ?>>Downloaded</option>
#
#-------------[ 6. Find (line: ~151)]----
#
</tr>
#
#-------------[ 7. Add Before ]---------------
#
<th class="tcr" scope="col">Downloaded</th>
#
#-------------[ 8. Find (line: ~157)]----
#
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, 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>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
#
#-------------[ 9. Replace With ]--------------
#
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title, u.dl_total_bandwidth FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
* NOTE: , u.dl_total_bandwidth is added after g.g_user_title
#
#-------------[ 10. Find (line: ~171)]----
#
</tr>
#
#-------------[ 11. Add Before ]---------------
#
<td class="tcl"><?php echo fsize($user_data['dl_total_bandwidth']); ?></td>
4 2008-03-20 15:34
Re: DownloadMod 1.1 (12 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I don't feel like writing another 'readme' file.
There's the final output.
5 2008-03-20 12:06
Re: DownloadMod 1.1 (12 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Go for it.
6 2008-03-20 12:01
Re: DownloadMod 1.1 (12 replies, posted in PunBB 1.2 modifications, plugins and integrations)
View download bandwidth in userlist.
[1. FIND AT LINE ~150]
<?php endif; ?> <th class="tcr" scope="col"><?php echo $lang_common['Registered'] ?></th>
[2. ADD AFTER]
<th class="tcr" scope="col">Downloaded</th>
[3. FIND AT LINE ~157]
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, 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>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
[4. REPLACE WITH]
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title, u.dl_total_bandwidth FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
* NOTE: , u.dl_total_bandwidth is added after g.g_user_title
[5. FIND AT LINE ~170]
<td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>
[6. ADD AFTER]
<td class="tcl"><?php echo fsize($user_data['dl_total_bandwidth']); ?></td>
I might add a 'sort by total downloaded' option later.
7 2008-01-01 23:18
Re: Image Upload Mod & free image hosting (11 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Rename to *.7z. Xarchiver gave me the same error. Good thing I was already working with a Hex editor.
8 2007-12-22 13:12
Re: Download Mod (2 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Heh. I just added a directory indexer to my site, but this looks better.
I'll be trying it out later.
9 2007-12-18 06:29
Re: Image Upload Mod & free image hosting (11 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Neat, but I mostly use PNG files.
10 2007-12-05 15:36
Re: uploader plugin for adminsitrators and moderators (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I was going to write something similar to this later this month. Now, I need to do a little less work. Thanks!
11 2007-11-14 13:46
Re: Security question (12 replies, posted in PunBB 1.2 modifications, plugins and integrations)
That's call a CAPTCHA box. Check PunRes.
12 2007-10-12 11:09
Re: Korean pack? (1 replies, posted in General discussion)
http://punbb.org/downloads.php
Look under the languages.