Yeah, I just recreated it by setting the fid to a non existent forum.
2 2008-03-31 10:23
Topic: Bug in extern.php (4 replies, posted in PunBB 1.3 troubleshooting)
How's this for a crappy bug report. All I can say is:
PHP Notice: Undefined offset: 0 in removed/forum/extern.php on line 153
I can't even find the request and get variables that caused the notice.
3 2008-03-17 20:21
Re: [solved] Duplicate content problem & SOLUTION (14 replies, posted in PunBB 1.3 troubleshooting)
Can't you use pun_link or whatever it is to generate the link for the current page from the id, title, etc and then compare it to the request_uri?
4 2008-03-17 15:43
Re: [solved] Duplicate content problem & SOLUTION (14 replies, posted in PunBB 1.3 troubleshooting)
What about when fancy URLs are on and yet stuff is still accessible through links like viewtopic.php?id=1?
I think if a page works but it wasn't accessed using the current url scheme then it should 301 redirect to the same page but using the correct url. This will also prevent people losing rank if they ever turn fancy urls on or off and so on.
5 2008-03-05 23:22
Re: 404 redirect possible? (12 replies, posted in PunBB 1.3 troubleshooting)
Wouldn't this be easier by just putting some rewrite rules in htaccess rather than writing a whole plugin? Plus it should be a 301 redirect and not send any 404.
For example, some stuff to get started with redirecting phpbb to punbb (you need more rules for profiles etc):
RewriteEngine on
RewriteBase /forum #change this to your forum folder
RewriteCond %{QUERY_STRING} f=([0-9]*) [NC]
RewriteRule viewforum\.php viewforum\.php?id=%1 [R=301,L,NC]
RewriteCond %{QUERY_STRING} t=([0-9]*) [NC]
RewriteRule viewtopic\.php viewtopic\.php?id=%1 [R=301,L,NC]
Eventually search engines will follow the 301 redirects and update their search results as well, so you don't lose any pagerank or whatever it is these days.
EDIT: Here's some to get started with VB and maybe more examples will help you understand how it works as well:
RewriteEngine on
RewriteBase /forum #change this to your forum folder
RewriteCond %{QUERY_STRING} showforum=([0-9]*) [NC]
RewriteRule index\.php viewforum\.php?id=%1 [R=301,L,NC]
RewriteCond %{QUERY_STRING} showtopic=([0-9]*) [NC]
RewriteRule index\.php viewtopic\.php?id=%1 [R=301,L,NC]
6 2008-03-03 17:49
Re: Been messing around with extensions.... (7 replies, posted in PunBB 1.3 troubleshooting)
An extension could create its own hooks right though? Then you could extend an extension, which would be good for big ones like PMs etc.
It could do with an ability to set dependencies in the manifest.xml although your own install script could detect them.
7 2008-03-03 09:57
Re: [b] and [i] becoming <strong> and <em> (8 replies, posted in PunBB 1.3 troubleshooting)
<b>, <i> and <tt> are gone in XHTML 2.0.
b, i, s, etc really don't make sense if the point is to describe the document which is why they're deprecated.
8 2008-03-02 20:10
Re: Hook requests (151 replies, posted in PunBB 1.3 extensions)
There's a vf_table_header_after_num_views and vf_table_contents_after_num_views, why not some for before num_views?
Wouldn't all the columns (including headers) be much more malleable if they were stored in an ordered numbered array rather than as associative array?
9 2008-03-02 17:47
Re: Bug with <p> in BBCode (4 replies, posted in PunBB 1.3 troubleshooting)
And here's another one.
If you use uppercase BBCode like [url], when you click preview it will not work in the the preview area. However it will be a lowercase [url]in the textarea so clicking preview a second time works. There must be a strtolower() happening too late.
10 2008-03-02 17:43
Topic: Bug with <p> in BBCode (4 replies, posted in PunBB 1.3 troubleshooting)
A post like this with a double line space inside BBCode:
[color=orange]My first line
My second line[/color]
Will come out like:
<p><span style="color: orange">My first line
</p><p>My second line</span></p>
Which isn't valid.
11 2008-03-02 16:36
Re: [extension release] reCaptcha v0.1 (11 replies, posted in PunBB 1.3 troubleshooting)
I'm testing on localhost so I get this message when I go to the register page:
This reCAPTCHA key isn't authorized for the given domain. More info
Then if I actually click register I get this error:
Notice: Undefined index: recaptcha_challenge_field in C:\www\punbb-1.3-dev\register.php(108) : eval()'d code on line 7
Notice: Undefined index: recaptcha_response_field in C:\www\punbb-1.3-dev\register.php(108) : eval()'d code on line 7
I think the key not being authorized for the domain and the error message are probably related.
12 2008-03-02 12:16
Re: Bug? No pun_htmlencode on forum_desc in index.php (6 replies, posted in PunBB 1.3 troubleshooting)
I thought that might be the case. Is the plan some kind of warning or javascript popup or something?
13 2008-03-02 11:20
Re: Bug? No pun_htmlencode on forum_desc in index.php (6 replies, posted in PunBB 1.3 troubleshooting)
I thought I remembered something but I went back 3 pages looking for it
14 2008-03-02 11:07
Topic: Bug? No pun_htmlencode on forum_desc in index.php (6 replies, posted in PunBB 1.3 troubleshooting)
As the title says. Just put an & in the forum description and watch.
15 2008-03-01 09:52
Re: SEO stuff (1 replies, posted in PunBB 1.3 troubleshooting)
I don't think you made it clear in your post, but duplicate content will lose you marks in a search engines eyes which makes it a pretty important thing to sort out.
What I'd do is have one of the URLs 301 redirect to the desired one.
16 2008-03-01 09:45
Topic: How to make convert_to_utf8 way faster (1 replies, posted in PunBB 1.3 troubleshooting)
I was just working on my phpbb2 to punbb1.3 script and even with my tiny database (only about 38k posts) it would take a dump while trying to convert everything. In short it'd hit the 32MB limit pretty quickly. Now I could just up the limit but in some places you don't have that control and at what point do you stop upping it?
So ... I think these changes work but can someone please confirm against some proper non-UTF8 content?
Change these lines:
$str = preg_replace_callback('/&#([0-9]+);/', create_function('$s', 'return dcr2utf8($s[1]);'), $str);
$str = preg_replace_callback('/&#x([a-f0-9]+);/i', create_function('$s', 'return dcr2utf8(hexdec($s[1]));'), $str);
to:
$str = preg_replace_callback('/&#([0-9]+);/', 'callback1', $str);
$str = preg_replace_callback('/&#x([a-f0-9]+);/i', 'callback2', $str);
and add these two functions:
function callback1($matches) {
return dcr2utf8($matches[1]);
}
function callback2($matches) {
return dcr2utf8(hexdec($matches[1]));
}
And now I can convert my whole phpbb2 database in one go (no stupid page refreshing) in about 30 seconds without going over 1MB of memory.
create_function() creates an anonymous function, which of course it was doing 152,000 times for the posts table alone. Making a proper function for it makes things much better.