I'll do the italian translation.
52 2008-02-05 07:15
Re: Ban message (5 replies, posted in PunBB 1.3 troubleshooting)
My guess is: in common.php, on lines 360 and 382 there's a message function for ban, they both end with a true flag, which is probably echoed and therefore shown as the number 1.
53 2008-01-19 07:03
Re: Forums moderators (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Sweet, thanks a lot both of you.
54 2008-01-18 23:27
Re: Forums moderators (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I have problem now.
I'm trying to put the query into a function
so I have
$fid = some number
$result = $db->query('SELECT moderators FROM '.$db->prefix.'forums WHERE id = '.$fid) or die();
if($db->num_rows($result))
{
while ($cur_forum = $db->fetch_assoc($result))
{
$mods_array = unserialize($cur_forum['moderators']);
$moderators = array();
while (list($mod_username) = @each($mods_array))
$moderators[] = pun_htmlspecialchars($mod_username);
$moderators = '<p>'.implode(', ', $moderators).'</p>'."\n";
}
echo $moderators;
}
And it works
but if I try to make it a function, like this:
function get_mods($fid)
{
$result = $db->query('SELECT moderators FROM '.$db->prefix.'forums WHERE id = '.$fid) or die();
if($db->num_rows($result))
{
while ($cur_forum = $db->fetch_assoc($result))
{
$mods_array = unserialize($cur_forum['moderators']);
$moderators = array();
while (list($mod_username) = @each($mods_array))
$moderators[] = pun_htmlspecialchars($mod_username);
$moderators = '<p>'.implode(', ', $moderators).'</p>'."\n";
}
echo $moderators;
}
}
get_mods("some number");
I get this error
Fatal error: Call to a member function query() on a non-object in... etc.
Any hint?
55 2008-01-18 22:34
Re: Forums moderators (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Thanks svl.
56 2008-01-18 22:15
Topic: Forums moderators (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
How are the moderators' IDs stored for each forum?
Let's say I want to retrieve the moderators for forum with ID 10, where should I look at?
TIA.
57 2008-01-18 21:07
Re: MySQL version poll (51 replies, posted in PunBB 1.2 discussion)
MySQL 5.0.44
58 2008-01-14 22:05
Re: PunBB 1.3 (Latest SVN) (42 replies, posted in PunBB 1.2 show off)
I'm simply amazed, can't wait to see the final product, kudos to the dev team.
59 2007-10-13 20:09
Re: Spambots attacking! (9 replies, posted in PunBB 1.2 troubleshooting)
Link us your forums then.
60 2007-10-06 10:55
Re: awww i need help im going crazy (4 replies, posted in PunBB 1.2 troubleshooting)
Seems like your MySQL server is down or you've put wrong credentials in your config.php, can you access the database with phpmyadmin?
61 2007-10-05 11:50
Re: Base forum url? (23 replies, posted in Programming)
Out of curiosity, why don't you leave it up to users since opening in new window/tab is pretty easy?
62 2007-10-05 08:26
Re: Bad HTTP_REFERER. (1 replies, posted in PunBB 1.2 troubleshooting)
Have a look here.
63 2007-10-04 21:15
Re: Base forum url? (23 replies, posted in Programming)
That breaks XHTML 1.1 strict validity, are you aware of that?
64 2007-10-04 08:42
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
Once again I recommend to do it through CSS, it will be just one line in your base.css file and it will avoid source code alteration, which is handy if you have to update your forum.
65 2007-10-03 20:06
Re: Date problem (6 replies, posted in PunBB 1.2 troubleshooting)
I believe there's a typo here
$thisdate = date('l, d F Y', $cur_topic['postet']);
Change to
$thisdate = date('l, d F Y', $cur_topic['posted']);
66 2007-10-03 07:37
Re: Date problem (6 replies, posted in PunBB 1.2 troubleshooting)
There's probably an error in your code, can you post it?
Also by generating days in norwegian you mean Måndag instead of Monday and so on?
67 2007-10-02 20:38
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
Actually, isn't there an admin option to disable reporting?
I believe there's only an option to decide how to report (internal, email or both).
68 2007-10-02 20:03
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
I'd still go for the CSS solution but it's just me.
69 2007-10-02 14:45
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
In that case you need to both hide the link and remove the report function from misc.php (between line 164 and 262).
70 2007-10-02 12:27
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
Exactly. Hiding through CSS or commenting out the code does the same, the function is still in but the CSS way is quicker.
71 2007-10-02 08:44
Re: Removing the report button (26 replies, posted in PunBB 1.2 troubleshooting)
At the end of your base.css stylesheet put this
ul li.postreport {display: none;}
72 2007-09-23 16:15
Re: Hide usergroup (7 replies, posted in PunBB 1.2 troubleshooting)
Right, so instead of
if($pun_user['g_id'] == 1)
Put this
if($pun_user['g_id'] == 1 || $pun_user['g_id'] == 2)
73 2007-09-23 08:46
Re: Hide usergroup (7 replies, posted in PunBB 1.2 troubleshooting)
Here's what I've done.
Note: line numbers might not match with the default userlist.php
Open userlist.php
line 67: <?php endif; ?> <label class="conl"><?php echo $lang_ul['User group']."\n" ?>
Change to
<?php endif;
if($pun_user['g_id'] == 1)
{
?>
<label class="conl"><?php echo $lang_ul['User group']."\n" ?>
Go to line 84: <br /></label>
Add after:
<?php
}
?>
This will show the usergroup dropdown menu to admins only.
Note: this will only hide the usergroup dropdown menu, it will be still possible to browse the usergroups by entering the query in the url but probably most of the users won't bother doing it.
74 2007-09-23 08:39
Re: User list menu item (8 replies, posted in PunBB 1.2 troubleshooting)
This thread should be locked or moved to Troubleshooting since it's not a bug.
75 2007-09-15 09:59
Re: Wrong count char '\t' in header.php (3 replies, posted in PunBB 1.2 bug reports)
Why is it wrong? check this page source between lines 48 an 58, the code is perfectly tabbed.