add DESC in the query

2

(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

(6 replies, posted in PunBB 1.2 discussion)

Riklaunim wrote:
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 tongue in my case forum have ***_rk_ prefix and cms_rk_ is the "main forum"

It's a perversion wink 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?

elbekko wrote:

Yeah, but it isn't like that in the official one

It's a gentle hint to those people, how can edit this copyright smile

5

(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

Powered by PunBB
© Copyright 2002?2005 Rickard Andersson

2006, actually wink

7

(6 replies, posted in PunBB 1.2 discussion)

Yes, it is possible, but u should to rewrite many queries.

just put digits on an image and ask user for them. bot can'not see them

Hi is a bot also, i think smile

oh, yep, Gizzmo, u r right:)

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.

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

(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".

u need only one query, then read data and echo it in the board stats.. it's easy

15

(9 replies, posted in Archive)

vashe, Vilen, i ne govori smile)
z.i. eto za pun mojno ne s4itat' - iz napominaniya o pune ostalos' tolko samo slovo pun i neskolko funkciy)

it's easy smile

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

(8 replies, posted in PunBB 1.2 show off)

Hm.. smile We right it ourselfs..

18

(13 replies, posted in Archive)

??.. ?????.. ? ?????? ???????? && ?????? ?? ||

19

(13 replies, posted in Archive)

if ($pun_user['id'] < 100 || $pun_user['id'] > 200)
message($lang_common['No view']);

20

(8 replies, posted in PunBB 1.2 show off)

[del]

21

(2 replies, posted in PunBB 1.2 discussion)

Hkm.... that's all ?

22

(2 replies, posted in PunBB 1.2 discussion)

What advantages?

http://www.mypunbb.com/

24

(10 replies, posted in Archive)

? ???? ?????? ????? ???? ???????: ???????? ??? wink

Hm.. i've some problems with language... i'm from russia, as u can see, how i can set koi8-r charset ?