1

(27 replies, posted in General discussion)

Comic Sans? Really?

I'd try truncating the online table.

3

(5 replies, posted in PunBB 1.2 troubleshooting)

$max_posts = 2000;
$postnumber = array_pop($db->fetch_assoc($db->query('SELECT num_replies FROM '.$db->prefix.'topics')));
if($postnumber >= 2000 && intval($cur_topic['closed'])==0)
{
    $db->query('UPDATE '.$db->prefix.'topics SET closed=1 WHERE id=\''.$id.'\'');
    header('Location: '.$pun_config['o_base_url'].'/viewtopic.php?id='.$id);
}

Works now.

4

(5 replies, posted in PunBB 1.2 troubleshooting)

After line 105 on 'viewtopic.php':

$max_posts = 2000;
$postnumber = array_pop($db->fetch_assoc($db->query('SELECT num_replies FROM '.$db->prefix.'topics')));
if($number >= 2000 && intval($cur_topic['closed'])==0)
$db->query('UPDATE '.$db->prefix.'topics SET closed=1 WHERE id=\''.$cur_topic['forum_id'].'\'');

Note: Code not tested.

5

(5 replies, posted in PunBB 1.2 troubleshooting)

Limit posts in what way?

6

(2 replies, posted in Discussions)

Hypothetical code:

CSS:

.signature img{
max-height: 300px;
}

JavaScript: (e.target part might not work, idk if that's how the onload event works)

var sigs = document.getElementsByClassName('signature');
for(i=0; i<sigs.length; i++)
{
  var tmp = sigs[i].getElementsByTagName('img');
  for(a=0; a<tmp.length; a++)
    tmp[a].onload = function(e){
      if(e.target.width > 300)
        e.target.style.height = '300px';
    }
}

PHP: (regex might not work)

function punbb_parse_signatures( ... )
{
  ...
  $signature = preg_replace('/<img([^\/]+)\/>/i', '<img onload="if(this.height>300)this.style.height=\'300px\';" $i/>', $signature);
  ...
}

Note: code not tested.

It's the CSS margin.

If you put the banner in 'main.tpl', you'll have to do it again on 'admin.tpl'.

Link to site? I'd like to check the HTML/CSS.

10

(4 replies, posted in PunBB 1.3 extensions)

What he said.

Well, &#2026; doesn't really display an ellipsis in my browser.

But it does display an ellipsis?

That function is not returning anything.

Use this?

    return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';

That should add the " | ", if it's set in $lang_common (lang/English/common.php).

Show me your entire function. I'll fix whatever you're talking about.

Contact the developer.

16

(3 replies, posted in PunBB show off)

Looks (almost) completely white on my LCD screen.

Is this a mod?

http://punbb.informer.com/trac/browser/ … s.php#L320

setTimeout(function(){callGA(url)}, 1000);

20

(2 replies, posted in General discussion)

Flash sucks. If it's a video, use the <video> tag and tell everyone to fuck off or get a new browser.

/rant

It's $lang_common, not $lang_topic.

22

(4 replies, posted in PunBB 1.2 troubleshooting)

Open your database admin page (PHPMyAdmin or whatever you use) and see if the tables are still there.

Btw, that error shows that you deleted the Guest account.

These queries should fix that:

DELETE FROM `users` WHERE id=1;
INSERT INTO `users` (`id`, `group_id`, `username`, `password`, `email`, `use_avatar`, `email_setting`, `save_pass`, `notify_with_post`, `show_smilies`, `show_img`, `show_img_sig`, `show_avatars`, `show_sig`, `timezone`, `language`, `style`, `num_posts`, `registered`, `registration_ip`, `last_visit`) VALUES
(1, 3, 'Guest', 'Guest', 'Guest', 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 'English', 'Oxygen', 0, 0, '0.0.0.0', 0);
dolly wrote:

Why do you want to do a such thing?

Yeah. It's not practical at all.

24

(2 replies, posted in PunBB 1.3 troubleshooting)

On line 85 of 'header.php':

$forum_head['title'] = '<title>'.generate_crumbs(true).' (Powered by PunBB)</title>';

25

(2 replies, posted in PunBB 1.3 extensions)

As long as it has the right HREF, it should work.