If you want people other than MySQL users to be able to use this, you should use PunBB's database class.
476 2006-10-28 17:52
Re: newsbot - post RSS news (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
477 2006-10-28 17:45
Re: The FF2 extension everyone should be using (7 replies, posted in General discussion)
Awesome! I feel safer already.
478 2006-10-27 02:14
Re: Similar Threads (7 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I wonder if the following could be modified for this purpose: http://wiki.punres.org/Find_related_top … le_posting
479 2006-10-26 21:54
Re: Checkbox (6 replies, posted in PunBB 1.2 troubleshooting)
Shouldn't you be using "$pun_user['show_newsbox'] != '1'" on your news.php?
480 2006-10-26 21:49
Re: Please Help with Miniportal Setup (18 replies, posted in PunBB 1.2 troubleshooting)
The dots are your fault.
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?
481 2006-10-26 21:49
Re: Last Topic instead of date on forum index page (5 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Can you please enable debug mode and paste the error?
482 2006-10-26 21:43
Re: [Release] AP Book Generator (11 replies, posted in PunBB 1.2 modifications, plugins and integrations)
but I think PHP4 is better.
What makes PHP4 better?
483 2006-10-26 21:43
Re: YouTube Video BBCode (32 replies, posted in PunBB 1.2 modifications, plugins and integrations)
link dowanlod dasent wrking
It works for me.
Gosh, I need to remember to update this sometime.
484 2006-10-26 21:41
Re: multi forum wont work (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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 2006-10-26 21:38
Re: CSS of PunBB (2 replies, posted in PunBB 1.2 discussion)
486 2006-10-26 00:33
Re: Last Topic instead of date on forum index page (5 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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.
487 2006-10-26 00:19
Re: Include Punbb in a page (5 replies, posted in PunBB 1.2 modifications, plugins and integrations)
The easiest way would be to add your header and footer into main.tpl.
488 2006-10-25 23:44
Re: Converting from SMF to PunBB? (10 replies, posted in PunBB 1.2 discussion)
Smartys wrote:Aha
Without a database there's nothing really to convertlol 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.
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.
489 2006-10-25 23:38
Re: Last Topic instead of date on forum index page (5 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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 2006-10-25 23:35
Re: Post your digg user (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.
491 2006-10-25 01:18
Re: Checkbox (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 2006-10-25 01:17
Re: Forums being marked as read (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.
493 2006-10-24 20:40
Re: Update Query in profile.php (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I believe this might be helpful to you: http://punbb.org/forums/viewtopic.php?pid=54246#p54246
494 2006-10-24 20:31
Re: Please Help with Miniportal Setup (18 replies, posted in PunBB 1.2 troubleshooting)
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.
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. 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 2006-10-24 01:53
Re: Please Help with Miniportal Setup (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 2006-10-24 00:06
Re: Please Help with Miniportal Setup (18 replies, posted in PunBB 1.2 troubleshooting)
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.
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!
497 2006-10-23 23:57
Re: Update Query in profile.php (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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 2006-10-23 19:24
Re: Return URL after login/logout (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.
499 2006-10-23 19:21
Re: Please Help with Miniportal Setup (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 2006-10-23 19:19
Re: Alternate User List Colors (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.