pmmueller wrote:
Rickard wrote:

Does it really output indexphp? Not index.php?

Yes ... So there seems to be something in that PHP_SELF variable that probably should not be there.

We captured packets with Ethereal and the packets contain the value 0x00 and not 0x2e, which would apparently be a proper DOT. Funnily enough Ethereal shows the wrong value as the right dot.

We currently have no explanation as to why PHP does this. But it at least explains why PHP_SELF fails the IF-statement in header.php and why "Show new post since last visit" in pubBB does not show up.

===
Temporary Solution
I am no programmer, but I figured that the following (unelegant and crude) patch will do. It checks if the strings "index" oder "search" appear in the variable and respectively replace it with the value it ought to have to begin with ("/forum" is just my path). I inserted it in header.php before line 171: 

if (strpos($_SERVER['PHP_SELF'], 'index')) {
  $_SERVER['PHP_SELF'] = "/forum/index.php";  
}    
if (strpos($_SERVER['PHP_SELF'], 'search')) {
  $_SERVER['PHP_SELF'] = "/forum/search.php";  
}

Any suggestions from PHP programmers as to make this statement more elegant are more than welcome.

===
Thank you everybody for your time and concern.

Smartys wrote:

By "this site" I mean forums.punbb.org
I mean that I get a 404, versus on your site it loads the page tongue

I see. And you are right wink
I'll check if I have some forgotten .htaccess lying around there somewhere. Maybe from trying to get friendly URLs on Nucleus or something ...

UPDATE
The forwarding was done by Apache ContentNegotiation Modul:
http://httpd.apache.org/docs/1.3/conten … ation.html

Is currently switched off, and now I get a proper 404, just as it should be.
Thanx for your observation.

Smartys wrote:

Mmm, it sounds like it's your webhost manipulating something
ie: I can go to http://groningen-info.de/forum/viewforum and get the viewforum page, whereas if I go there for this site I get a 404

Do you mean "from this site"?

I get "Ungültige Anfrage. Der Link dem Sie gefolgt sind ist ungültig oder veraltet." meaning "Invalid request. The link is not valid or outdated." no matter whether I enter it in the browser window or follow the link in your message.

So I do not really think there is some webhost manipulating going on.

Rickard wrote:

Does it really output indexphp? Not index.php?

Yes. In the browser window and in the source code.

But it gets even weirder: If I select the string, copied it and on pasting it, it stops after index, even if other text after the ending php was also copied. Like this:

PHP_SELF is /forum/index

Whereas in the source and on the page it definitely reads (I am wearing reading glasses):

PHP_SELF is /forum/indexphp

So there seems to be something invisible between index and php that stops it from being copied. Weird.
Any ideas?

UPDATE:
The above copying was done in Firefox and its source window. In the windows editor (view source in IE) there is a space between index and php and it can be copied:

PHP_SELF is /forum/index php

So there seems to be something in that PHP_SELF variable that probably should not be there.

Rickard, thanx for your quick reply.

Rickard wrote:

It would appear your PHP environment does not include the PHP_SELF variable. That's quite odd.

Step 1
I have checked my PHP environment (PHP version is 4.1.2.) with a file called phpinfo.php (including phpinfo()) and here are the results of the jury:

_SERVER["PHP_SELF"]    /forum/phpinfo.php

Forum is installed in subdirectory /forum/ and the filename seems to be available in the PHP_SELF environment variable.

Step 2
For debugging purposes I have added

echo "PHP_SELF variable is" . $_SERVER['PHP_SELF']

to the header.php and receive the following output:

PHP_SELF variable is /forum/indexphp

The DOT between file name and extension appears to be missing. Is that perhaps of significance?

Questions

- What is the purpose of this IF-statement? Security?

- What happens if I comment the IF (and the else) out?

On my forum (http://groningen-info.de/forum/) the two upper right links "Show new posts" and "Mark all as read" do not show up and in the source I only get <div class="clearer"></div> instead.

I have found out that this is decided in header.php (line 171 and following) with the following IF-statement:

if (in_array(basename($_SERVER['PHP_SELF']), array('index.php', 'search.php'))) ...

What is the purpose of this?
What are the consequences of commenting out the IF?
What else could I do see the two links?

hcgtv wrote:

have you tried Google Search?

You mean using Google on the site as search engine?
No, but that would limit the search result to pages that have been indexed by GoogleBot, wouldn't it?

Maybe a third party search engine like Atomz.com or Freefind.com would help. Does anybody know if they index dynamic pages with question-marks in the URL?

I am using Nucleus and PunBB at http://groningen-info.de/. Integration between the two is currently managed by the Nucleus plugin NP_PunBB Version 1.2.1.

For my visitors Nucleus and PunBB do not appear as two separate applications but as one website. Therefore, from a usability point of view, the search box should ideally return results from both databases, Nucleus AND PunBB.

Is that possible?
And if, how much work would that be?

(I also posted this on the Nucleus Supportforum)

PunBB 1.2 has a link in the footer titled "Show recent posts" that shows posts made within the last 24 hours. Is it possible to change that to say a week?

I have found line in search.php and changed 86400 to 604800. Is that sufficient? Or do I have to make any other changes? Is there a place in the admin area to change this time setting? May be that would be nice since the phrase "recent posts" does not specifically mean 24 hrs.

Thanx in advance (and to Rickard and Paul for this software ...)

cuteseal wrote:

To add a quick search to your forum header, modify your main.tpl file under include/template/

Thats exactly what I was looking for and I added the suggested changes to main.tpl. The search seems to work fine, except for one little thing:

- BBCode is not parsed correctly and shows up in the posts.

So instead of seeing a bold word I see the BBCode around it. Which looks funny.

Anybody any idea if that's a big thing to solve or just a little one?

To see what I mean, go to http://groningen-info.de/forum and type the word lasergames in the search box at the top right (or something else).

11

(5 replies, posted in PunBB 1.2 show off)

Since last week I am using punbb V1.2 as a forum on my site groningen-info.de. The site is in German and gives informaton about Groningen, a city in the north of the Netherlands.

As the Lithium color scheme has turned too dark for my liking, I adapted the color scheme to that of my site, changed bits in the language file and included a header in ../main.tpl. Other than that punBB is pretty standard out of the box. Have a look:

- punBB at groningen-info.de

The rest of the site is run by Nucleus.

@Kaboon
Are you still working on the Dutch language pack for V1.2?

I downloaded the RAR-archive above and pretty soon got
Warning: Undefined index: Online in /***/forum/viewtopic.php on line 209

Or is somebody else working on a Dutch language pack?

Connorhd wrote:

set cookie domain to $cookie_domain = '.wheresmeculture.com'; i think for all subdomains (not sure if it will work for no subdomain though)

i also had the login/logout problem with IE (not with Firefox and Opera) and your above quoted suggestion has solved it. in my case it also works for no subdomain. thanx.

Rickard wrote:

That explains it. 1.2 isn't finished yet.

It was just to let you know ...

Sorry if I was not clear, that sometimes comes from trying too hard ...

First line of my message should better be:

" Updated 1.1.5 to V1.2dev ... "
And likewise - the fresh install was V1.2dev not 1.1.5.

Updated 1.1.5 on localhost and everything seemed to work fine, but when I try to access the admin section I get an error:

Undefined index: status in admin_index.php on line 34

Deleting 1.1.5 and doing a fresh install did not solve the problem.

===

In admin_users.php on line 142 there is the following query:
SELECT id, username, email, title, num_posts, status, admin_note FROM '.$db->prefix.'users

In my database, table punbb_users does not have a field "users". May that be connected to the problem?