add DESC in the query
1 2006-09-01 13:51
Re: Newest post first? (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
2 2006-09-01 01:18
Re: choose usergroup (4 replies, posted in Feature requests)
pun_admin defined as 1, pun_member as 4. if u define you_pun_account as 5, f.e., all comparing (such as $pun_user['g_id']<PUN_MEMBER) will be correct.. but u need to rewrite some comparing (like an $pun_user['g_id']==PUN_MEMBER).
3 2006-08-31 07:52
Re: 2 forums and same users? (6 replies, posted in PunBB 1.2 discussion)
seva wrote:Yes, it is possible, but u should to rewrite many queries.
not realy. punBB uses include/dblayer/ db backend files and queries go throught them (for example mysql.php). If you edit query function it will work. Here is my old hack:
..................
You can use strpos and not ereg in my case forum have ***_rk_ prefix and cms_rk_ is the "main forum"
It's a perversion And what if i run this query: 'INSERT INTO '.$db->prefix.'posts (message) VALUE (\'rk_groups\')'; ? So, it' a bad hack .. or mb i'm not correct?
4 2006-08-31 07:46
Re: Bot attack in punbb forum (16 replies, posted in PunBB 1.2 troubleshooting)
Yeah, but it isn't like that in the official one
It's a gentle hint to those people, how can edit this copyright
5 2006-08-31 07:44
Re: choose usergroup (4 replies, posted in Feature requests)
Yes, you can do this. Add new definition in /include/common.php, edit /profile.php, and /admin_groups.php
6 2006-08-30 17:35
Re: Bot attack in punbb forum (16 replies, posted in PunBB 1.2 troubleshooting)
Powered by PunBB
© Copyright 2002?2005 Rickard Andersson
2006, actually
7 2006-08-30 14:30
Re: 2 forums and same users? (6 replies, posted in PunBB 1.2 discussion)
Yes, it is possible, but u should to rewrite many queries.
8 2006-08-30 03:54
Re: Bot attack in punbb forum (16 replies, posted in PunBB 1.2 troubleshooting)
just put digits on an image and ask user for them. bot can'not see them
9 2006-08-29 17:31
Re: Bot attack in punbb forum (16 replies, posted in PunBB 1.2 troubleshooting)
Hi is a bot also, i think
10 2006-08-27 19:32
Re: How to stop the posts counter in some subforum? (5 replies, posted in Feature requests)
oh, yep, Gizzmo, u r right:)
11 2006-08-27 08:26
Re: when i add bans display "php no permission to access cache dir" (9 replies, posted in PunBB 1.2 troubleshooting)
and what the trouble so? set right attributes for dir /cache/
there is a file called cache_bans.php, where php write bans, so there should be access for writing...
open your root directory and execute 'chmod 777 cache' command f.e.
12 2006-08-27 08:15
Re: How to stop the posts counter in some subforum? (5 replies, posted in Feature requests)
yes, of coure
open post.php, find this code:
// If the posting user is logged in, increment his/her post count
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());
}
And replace it with:
// If the posting user is logged in, increment his/her post count
if (!$pun_user['is_guest'])
{
$low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
if (in_array($fid, '1,2,3'))
$db->query('UPDATE '.$low_prio.$db->prefix.'users SET last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
else
$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());
}
look at this: if (in_array($fid, '1,2,3'))
replace the array '1,2,3' with the numbers (id-s) of your flood-forums
p.s. am i right? >:)
13 2006-05-06 11:25
Re: Права модераторов (4 replies, posted in Archive)
???????? ???, ?????? ??????? ?????????? ????????. ????? ?? ???? ????? ???????? ?????? ???? ? ??????-??????? - ???? ?????? ?? ??????? ??? ?? ???????? admin_censoring.php, ??? ????? ??????? ??????? ????????? ?? group_id, ?.?. if ($pun_user['g_id'] == PUN_MOD) echo $lang_common['No permission']; ???????? ???, ???? ????????, ?.?. punbb ????? ?? ?????.
?????? ?? ????? ???? - ??? ???? ?????? ?? ????? ??????? ?????????? ??????, ??????? ?????????? ???????, ??????????? ? ??????? forum_id ? ?? ????????????? ????????? ?????? "Ban".
14 2006-05-06 11:22
Re: the birthday reminder (17 replies, posted in PunBB 1.2 modifications, plugins and integrations)
u need only one query, then read data and echo it in the board stats.. it's easy
15 2006-02-06 19:00
Re: форум hostel.nstu.ru (9 replies, posted in Archive)
vashe, Vilen, i ne govori )
z.i. eto za pun mojno ne s4itat' - iz napominaniya o pune ostalos' tolko samo slovo pun i neskolko funkciy)
16 2006-01-28 15:15
Re: Add attribute to users profile "sex" (19 replies, posted in PunBB 1.2 modifications, plugins and integrations)
it's easy
in viewtopic.php we filled such variables as $user_avatar and two arrays $user_info and $user_contacts.. if u wanna display user sex under the avatar u need put information in the beginning of $user_info. let's do it.
find this (abt lines 209-219)
if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
{
if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
}
else
$user_avatar = '';
and after add such code:
$user_info[] = '<dd>'.$cur_post['sex'];
then find
$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());
and replace it with
$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, u.sex, 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());
...or just add 'u.sex' somewhere in query
well.. done...
17 2005-12-31 10:46
Re: hostel.nstu.ru (8 replies, posted in PunBB 1.2 show off)
Hm.. We right it ourselfs..
18 2005-12-04 10:59
Re: Приватный форум (13 replies, posted in Archive)
??.. ?????.. ? ?????? ???????? && ?????? ?? ||
19 2005-12-04 10:58
Re: Приватный форум (13 replies, posted in Archive)
if ($pun_user['id'] < 100 || $pun_user['id'] > 200)
message($lang_common['No view']);
21 2005-11-07 18:06
Re: Redirecting in punBB (2 replies, posted in PunBB 1.2 discussion)
Hkm.... that's all ?
22 2005-11-07 17:07
Topic: Redirecting in punBB (2 replies, posted in PunBB 1.2 discussion)
What advantages?
23 2005-11-06 12:04
Re: How to make my own PunBB FOruM??? (3 replies, posted in Feature requests)
24 2005-11-05 10:14
Re: второй статус (10 replies, posted in Archive)
? ???? ?????? ????? ???? ???????: ???????? ???
25 2005-11-05 10:13
Re: Chat Mod (84 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Hm.. i've some problems with language... i'm from russia, as u can see, how i can set koi8-r charset ?