If you want people other than MySQL users to be able to use this, you should use PunBB's database class.

Awesome! I feel safer already. smile

I wonder if the following could be modified for this purpose: http://wiki.punres.org/Find_related_top … le_posting

479

(6 replies, posted in PunBB 1.2 troubleshooting)

Shouldn't you be using "$pun_user['show_newsbox'] != '1'" on your news.php?

480

(18 replies, posted in PunBB 1.2 troubleshooting)

The dots are your fault. tongue

Without looking at the stylesheet, from what I can remember conr and conl both contain unordered lists. By changing to conz you stopped the style rules that get rid of the bullets from working.

Why did you change to conz? Does

#brdwelcome .conr, #brdwelcome .conl {
        float: left;
        text-align: left;
        width: 100%
        display: block;
}

not work?

Can you please enable debug mode and paste the error?

BlueOnTheRock wrote:

but I think PHP4 is better.

What makes PHP4 better?

kurdsonline wrote:

link dowanlod dasent wrking

It works for me. smile

Gosh, I need to remember to update this sometime.

a) You might want to describe what specific problem you are having
b) You might want to ask the author of the mod about it

485

(2 replies, posted in PunBB 1.2 discussion)

http://wiki.punres.org/Change_forum_width

Replace the query with the following:

// Print the categories and forums
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post_id, f.last_poster, t.subject FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id INNER JOIN topics AS t ON f.last_post_id=t.last_post_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 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Replace the $last_post conditional with the following:

    // If there is a last_post/last_poster.
    if ($cur_forum['last_post_id'] != '' && $pun_config['o_censoring'] == '1')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.censor_words(pun_htmlspecialchars($cur_forum['subject'])).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    elseif ($cur_forum['last_post_id'] != '' && $pun_config['o_censoring'] == '0')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.pun_htmlspecialchars($cur_forum['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    else
        $last_post = ' ';

Edit: I just realized that I forgot to add code to clip overly long topic subjects. I will do so soon.

The easiest way would be to add your header and footer into main.tpl.

488

(10 replies, posted in PunBB 1.2 discussion)

WeAreWriters wrote:
Smartys wrote:

Aha
Without a database there's nothing really to convert wink

lol so there's nothing I can do right?  Do I not get a database so that I dont convert away from SMF?

You can pay up and get your database from your host. wink

It's not SMF that doesn't want you to convert, it's the host that's making money off of ads it displays on your forums.

Moved to modifications.

http://wiki.punres.org/Last_post%27s_su … orum_index

Use fpouget's code. The whole thing can be done a little more simply, but it works.

490

(18 replies, posted in General discussion)

I have many of the same qualms with Digg as you sirena, although they have not managed to drive me away quite yet. hmm

491

(6 replies, posted in PunBB 1.2 troubleshooting)

Some of the info in the following topic and the topic linked to within it might help: http://punbb.org/forums/viewtopic.php?id=13590

492

(8 replies, posted in PunBB 1.2 troubleshooting)

That's the way it's intended to work. It's not actually "unread posts", but "new posts since last visit". It won't be marked read until you push the link to mark all topics as read or until your next visit.

I believe this might be helpful to you: http://punbb.org/forums/viewtopic.php?pid=54246#p54246

494

(18 replies, posted in PunBB 1.2 troubleshooting)

panachepad wrote:

Still, I have questions. I understand that the < and > signify the items punbb calls up to the board from the database via php. It's just like the { and } in phpbb. So I don't see why the information in <pun_status> won't just appear in the Menu box styled as the Menu box is styled.. And I don't understand how adding css that pertains to brdwelcome will affect the Menu box. The modification for Miniportal called for an additional style to be placed in the head of main.tpl which was

That's just the way CSS works, sorry. sad

Anyway, here's the deal: because style sheets are cascading, <pun_status> does inherit some styling from the menu box. The trouble is that <pun_status> also gets the styles applied to other elements, namely those with the classes "conr" and "conl". From what I can tell, it's the styles applied to precisely those classes that are causing your positioning problems, which is why I gave you the CSS that I did.

So please at least try out what I gave you, and we can work on it from there. smile To reiterate what Smartys said: anything you want applied all the time, regardless of the style the user has selected, put into base.css and anything that you want applied only to a specific style add to either style.css or style_cs.css.

495

(18 replies, posted in PunBB 1.2 troubleshooting)

Please see if this CSS helps:

#brdwelcome .conr {
    FLOAT: left;
    TEXT-ALIGN: left;
    WIDTH: 100%
    DISPLAY: block;
}

#brdwelcome  .conl {
    WIDTH: 100%;
    OVERFLOW: visible;
}

There's a good chance it won't totally work, but I think it's a start.

496

(18 replies, posted in PunBB 1.2 troubleshooting)

panachepad wrote:
pogenwurst wrote:

The footer links are in footer.php.

Is it really as simple as just taking the links and moving them somewhere else?

Yep, I've done it before. You might have to do a little editing, but nothing major.

panachepad wrote:
pogenwurst wrote:

You might have to edit header.php to add class="box" to the brdstatus DIV though.

I don't understand that. I don't see how editing a php file will help me style something. Isn't style in the css? And also I don't understand it because I'll be wanting to move this info out of the header once I get it properly styled in the block, won't I?

First of all, it doesn't matter whether or not it's in header.php, it matters where the tag is in main.tpl.

Anyway, I was suggesting something like this:

<div class="block">
        <h2><span>Menu</span></h2>
        <pun_status>
</div>

Thus you would edit header.php to assign the brdstatus DIV the box class so hopefully things would look right (hopefully). Style is in the CSS, but it depends heavily upon the selectors in the HTML, which is generated by the PHP files.

Alternatively, you could just look in header.php and cannibalize the <pun_status> code. Copy it, comment it out of header.php, paste it into a new file, edit it to your liking, and add it into you template via <pun_include>, as described in the docs.

If you continue to have trouble, please post your CSS and either a link or a screenshot.

Good luck! smile

I believe it's this:

$db->query('UPDATE '.$db->prefix.'users SET '.implode(',', $temp).' WHERE id='.$id) or error('Unable to update profile', __FILE__, __LINE__, $db->error());

498

(9 replies, posted in PunBB 1.2 troubleshooting)

If it's something you really think is important, then go ahead, but I think it will end up read here anyway. smile

499

(18 replies, posted in PunBB 1.2 troubleshooting)

The footer links are in footer.php.

You should try putting <pun_status> in a class="block" DIV like in the miniportal tutorial. You might have to edit header.php to add class="box" to the brdstatus DIV though.

500

(1 replies, posted in PunBB 1.2 troubleshooting)

You should be able to do a variation of Shaun Inman's method of alternation on index.php, like so:

        $alt = true;
        while ($user_data = $db->fetch_assoc($result))
        {
                $alt = !$alt;
                $user_title_field = get_title($user_data);

?>
                                <tr <?php if($alt) echo 'class="alt"' ?>>
                                        <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
                                        <td class="tc2"><?php echo $user_title_field ?></td>
<?php if ($show_post_count): ?>                                        <td class="tc3"><?php echo $user_data['num_posts'] ?></td>
<?php endif; ?>
                                        <td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>
                                </tr>
<?php

        }

Just replace the existing while loop in userlist.php. I haven't tested to see if it will work, but I believe it will.