76

(10 replies, posted in General discussion)

tongue
it's really problem wink) our users whine like a puppies, coz we don't show them ips wink

hm.. even just using style u can make your icon beautiful ))
for exampe, i have

    BORDER-STYLE: double

And it looke better, than simply solid, i think

if u want change it to image, u need change viewforum.php
open it and find

<div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>

change it for your image
for exampe:

if ($icon_type=='icon inew ') {?><div class="your_class"><img src="/img/new.gif" /></div>
<?php}else{?><div class="your_class"><img src="/img/old.gif" /></div><?php}

It can be used not only for messengers, for user information in general
Open profile.php, find <?php echo $lang_profile['Profile view'] ?>
Under, you could find all fields..
change everthing you want
for example,

<dt><?php echo $lang_profile['Login'] ?>: </dt>
                            <dd><?php echo pun_htmlspecialchars($user['username']) ?></dd>
                        <?php if($user['realname'] != ''): ?>
                            <dt><?php echo $lang_profile['Realname'] ?>: </dt>
                            <dd><?php echo pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']) ?></dd>
                        <?php endif;
                        if($user['last_visit'] != '0'): ?>
                            <dt><?php echo $lang_profile['Last online'] ?>: </dt>
                            <dd><?php echo format_time($user['last_visit']) ?></dd>
                        <?php endif;
                        if ($url != $lang_profile['Unknown']): ?>
                            <dt><?php echo $lang_profile['Website'] ?>: </dt>
                            <dd><?php echo $url ?> </dd>
                        <?php endif; ?>
                            <dt><?php echo $lang_profile['Birthday'] ?>: </dt>
                            <dd><?php echo $birthday ?></dd>
                        <?php if($user['location'] !=''): ?>
                            <dt><?php echo $lang_profile['Location'] ?>: </dt>
                            <dd><?php echo $user['location'] ?></dd>
                        <?php endif; ?>
                            <?php if($user['workplace'] !=''): ?>
                            <dt><?php echo $lang_profile['Work Place'] ?>: </dt>
                            <dd><?php echo $user['workplace'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['jabber'] !=''): ?>
                            <dt><?php echo $lang_profile['Jabber'] ?>: </dt>
                            <dd><?php echo $user['jabber'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['icq'] !=''): ?>
                            <dt><?php echo $lang_profile['ICQ'] ?>: </dt>
                            <dd><?php echo $user['icq'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['locicq'] !=''): ?>
                            <dt><?php echo $lang_profile['Local ICQ'] ?>: </dt>
                            <dd><?php echo $user['locicq'] ?></dd>
                        <?php endif; ?>
......

etc...

i haven't enough time:(
can anybody write such mod? we need only count words, that searched many times

For example, let's make page with site history

Open admin_options.php

Find "$form['timeout_visit'] = intval($form['timeout_visit']);" (110 line roughly)
Add before it:

    if ($form['history_message'] != '')
        $form['history_message'] = pun_linebreaks($form['history_message']);
    else
    {
        $form['history_message'] = 'Enter your story here.';

        if ($form['history'] == '1')
            $form['history'] = '0';
    }

Now let's find (700 line roughly)

                                <tr>
                                    <th scope="row">Maintenance message</th>
                                    <td>
                                        <textarea name="form[maintenance_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea>
                                        <span>The message that will be displayed to users when the board is in maintenance mode. If left blank a default message will be used. This text will not be parsed like regular posts and thus may contain HTML.</span>
                                    </td>
                                </tr>

And enter after this:

                                <tr>
                                    <th scope="row">Use forum history</th>
                                    <td>
                                        <input type="radio" name="form[history]" value="1"<?php if ($pun_config['o_history'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong>   <input type="radio" name="form[history]" value="0"<?php if ($pun_config['o_history'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
                                        <span>When enabled, there will be History page.</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th scope="row">History</th>
                                    <td>
                                        <textarea name="form[history_message]" rows="10" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_history_message']) ?></textarea>
                                        <span>Here you can enter any information. This text will not be parsed like regular posts and thus may contain HTML.</span>
                                    </td>
                                </tr>

Well done, now open misc.php
Find first :     "require PUN_ROOT.'footer.php'; }"
After it add:

else if ($action == 'history')
{
    // Load the language file
    require PUN_ROOT.'lang/'.$pun_user['language'].'/common.php';

    $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Net history'];
    require PUN_ROOT.'header.php';

?>
<div class="block">
    <h2><span><?php echo $lang_common['Net history'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <p><?php echo $pun_config['o_history_message'] ?></p>
        </div>
    </div>
</div>
<?php
    require PUN_ROOT.'footer.php';
}

Ok.. now open lang/common.php and add

'Net history'     =>     'Net history',

Don't forget add extra fields to DB, gl
you'll can see your page  by url: http://yoursite.com/misc.php?action=history

Hmm... don't knock me if it's a bathos of stupidity

by the way, mb it would be better to use database?

1) for what? it's usefull... later you can put under username suck information, as icq, jabber, other messangers, ftp for example etc.
2) where? on what page? just put it in the <strong> tag, or add 2css smth like "font-weight: bold"

3)
find this:

<div class="linkst">
        <div class="inbox">
                <p class="pagelink conl"><?php echo $paging_links ?></p>
                <p class="postlink conr"><?php echo $post_link ?></p>
                <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
                <div class="clearer"></div>
        </div>
</div>

change it to:

<div class="linkst">
        <div class="inbox">
                <p class="pagelink conl"><?php echo $paging_links ?></p>
                <p class="postlink conr"><?php echo $post_link ?></p>
                <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><br /><li><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
                <div class="clearer"></div>
        </div>
</div>

84

(1 replies, posted in Archive)

???? ? ????? ??????? ????? "Report".. ????? ???????????? ???????\??????? wink

imho it's useless information for punbb wink) just <? echo '1373751515 visits' ?> wink)

same question.. for what?

for what we can see empty fields ? for what these (Unknow) ? no usefull information
for example, if we add this to the code...

<?php if($user['jabber'] !=''): ?>
   <dt><?php echo $lang_profile['Jabber'] ?>:</dt>
   <dd><?php echo $user['jabber'] ?></dd>
<?php endif; ?>

... when we'll view users profiles, there will be no empty fields..

p.s.
i'm newbie here, don't bit me %))

hm... by the way, we can use users sex in quote messages.. it sounds starnge, but in some languages there are diff. word for english 'wrote', dependent on man sex

Open profile.php
Find code like this:

                case 'personal':
                {
                        $form = extract_elements(array('realname', 'url', 'location'));

In the end of string put 'sex', now you have smth like this:

                case 'personal':
                {
                        $form = extract_elements(array('realname', 'url', 'location', 'sex'));

Ok..  now let's make form..
Find

<label><?php echo $lang_profile['Realname'] ?><br /><input type="text" name="form[realname]" value="<?php echo pun_htmlspecialchars($user['realname']) ?>" size="40" maxlength="40" /><br /></label>

Under this, add

                            <label><?php echo $lang_profile['Sex'] ?></label>
                            <select name="form[sex]">
                                <option value="male" <?php if ($user['sex'] == 'male') echo ' selected="selected"' ?>><?php echo $lang_profile['Male'] ?></option>
                                <option value="female"<?php if ($user['sex'] == 'female') echo ' selected="selected"' ?>><?php echo $lang_profile['Female'] ?></option>
                            </select>

Now find

<dt><?php echo $lang_profile['Realname'] ?>: </dt>
<dd><?php echo pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']) ?></dd>

Ann enter after it

<dt><?php echo $lang_profile['Sex'] ?>: </dt>
<dd><?php echo $user['sex'] ?></dd>

Now let's edit lang/%yourlang%/profile.php
Add there this

'Sex'       =>    'blablabla',
'Male'      =>    'blbqtqtqt',
'Female'  => ' btqqutu',

and don't forget create new field in you database
gl

hmmm... what's wrong? u can install this mod on 1.2.8 so as on 1.2.7

bozer, look at this:

Mod version:  2.0 Beta
##   Works on PunBB:  1.2.*

or mb i don't understand smth ?

there is functions.php especially for functions, for what put this code into viewtopic.php?