Sorry, it was all my own mistake. I replaced the wrong database query as it was at the suggested line number by coincidence.

Thomas

I have upgraded the forum this morning to version 1.2.16 by replacing the corresponding lines in the affected files according to the hdiff page. Since then any new posts don't show up in the 'Last Post' field on the index page anymore (the field is just blank). It is OK on the viewforum page on the other hand.

P.S: if I use the old version of functions.php and make a new post, the 'Last Post' displays again (but not without making a new post), so it seems that the new version of function.php puts only NULL records into the database for the 'Last Post'.

Thomas

PhaxeNor wrote:

@ Thomas

Only removing the link from guest view won't stop them from accessing the user list or profile page..

You need an if ($pun_user['is_guest']) statement on both User List and Profile to make sure that they don't access the page.

Yes, that's obviously true, but actually preventing access to the userlist and profiles for guests is probably not the problem here. I for instance was primarily concerned about reducing the number of entry points for search engines and other spiders into the forum in order to reduce the amount of unnecessary traffic. And links are realistically the only way of getting into the forum. So with no links to the userlist or any profile on the index page, the only way to any topics is over the forum links (I have even forbidden the 'last post' links for the major search engines with a corresponding rewrite directive in an .htaccess files (which rejects requests with 'pid' in the query string)).
Besides, I have renamed some pages throughout (including userlist.php), in order to evade any attempts of looking for certain pages in the first place.

Thomas

There is a simpler solution: just don't write the userlist-link anymore for guests, i.e. in the function generate_navlinks() in functions.php replace


$links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';


by


if (!$pun_user['is_guest'])  {
$links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';
}



Furthermore I also removed the link to the profile of the newest user by removing


<dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>


from index.php (I also removed the corresponding database query somewhat above that line).


Thomas

5

(5 replies, posted in PunBB 1.2 troubleshooting)

Thanks a lot.

It occured to me that having the category id would actually be better for my purposes as I wouldn't have to change the script if I add a new forum. I reckon however this is not known in viewtopics.php without adding a new query to the database.

Thomas

6

(5 replies, posted in PunBB 1.2 troubleshooting)

I am having another problem now however in this context: is there a variable that I can use in viewtopics.php that gives me the forum id of the forum to which the particular topic belongs? I need this to make sure that I am doing the translation the right way around.

I tried both $fid and $forum_id (which are used in other parts of the forum code) but both variables appear to be unknown in viewtopics.php

Thomas

7

(5 replies, posted in PunBB 1.2 troubleshooting)

Smartys wrote:

Did you add http:// to the beginning of the URL?

Yes, I did in principle, but I found the error now: I applied urlencode to the whole url by mistake rather than to the query string only. So effectively, the http:// was missing after all. I have corrected this now and it works as it should.

Thanks,
Thomas

8

(5 replies, posted in PunBB 1.2 troubleshooting)

I have installed a bilingual forum, and because I want to give people the opportunity to read the posts of the opposite language as well, I have added a bit of code to viewtopic.php that puts out a link 'Translate this page' that should link to   the Google translation script (with the present forum page address appended as a query string). However, I always get my forum base url prefixed to the Google url. Any suggestions how to avoid this?

Thomas

I tried to find this feature in the admin section, but unsuccessfully: I wonder whether it is possible that I, as the administrator, receive an email notification about any post (or at least any new topic) that is made in PunBB. The point is that I don't expect my forum to be very busy for the time being, and I don't want to have to check it out on a daily basis and see whether any new posts are there in order to give a timely reply.

Thomas

Thomas2 wrote:

But anyway, I resolved the issue now by making further changes to the headers in header.php. Using

header ('Expires: 0');
header('Cache-Control: private, post-check=0, pre-check=0, max-age=0');
header('Pragma: no-cache');   

instead of the original headers, the problem has disappeared now.
I don't know yet for certain which of the changes I made is the crucial one ( because I don't have FTP access in the library, I have to make the changes at home, and then go to the library to check out the results), but I suppose it is the dropped Last-Modified header, as now there is no way to validate the page and thus no reason for the proxy server to store it in the first place (all other boards I checked out (e.g. phpBB) don't issue a Last-Modified header either by the way).

Thomas

Just an update on this: further tests by me have shown now that it was indeed the Last-Modified header that was responsible for the cache problem. Dropping it makes everything behave as it should.

Thomas

I noticed that the 'Subscribe to this topic' box  is unticked when I reply in a topic for which I am already subscribed, suggesting that I am not subscribed yet. This is somewhat confusing.

Thomas

This is not so much a PunBB bug as a CSS/browser bug, but I noticed that when I save a web page from my browser (in fact any browser it seems) as 'Web page complete', imported style sheets are not saved at all and the whole design thus falls apart when viewing the saved page in the browser.

I would therefore suggest that all style sheets are addressed separately in the HTML header. This should also make for a quicker loading as the browser does not have to connect back to the server again to get the imported style sheets.

Thomas

yemgi wrote:

could not <meta http-equiv="pragma" content="no-cache"> tell the proxy not to cache the page ?

Hardly, as only a web browser could see the HTML meta tags in the first place.



But anyway, I resolved the issue now by making further changes to the headers in header.php. Using

header ('Expires: 0');
header('Cache-Control: private, post-check=0, pre-check=0, max-age=0');
header('Pragma: no-cache');   

instead of the original headers, the problem has disappeared now.
I don't know yet for certain which of the changes I made is the crucial one ( because I don't have FTP access in the library, I have to make the changes at home, and then go to the library to check out the results), but I suppose it is the dropped Last-Modified header, as now there is no way to validate the page and thus no reason for the proxy server to store it in the first place (all other boards I checked out (e.g. phpBB) don't issue a Last-Modified header either by the way).

Thomas

I simply changed

header('Cache-Control: post-check=0, pre-check=0', false);

to

header('Cache-Control: private, post-check=0, pre-check=0', false);

in header.php.

I did not necessarily expect it to make any difference (and indeed it didn't) because normally one would expect the 'Expires' header used to prevent any caching regardless, but one can never be sure how some proxy servers are set up in this respect, and the missing 'private' directive was the only crucial difference when I compared the punBB header with that of other forums like phpBB (where the redirect problem does not occur).

Thomas

Hi,

I have installed PunBB a few days ago for my website and everything seemed to work OK from my own computer, but when I tested it from the public computers in my local library, I  noticed some problems with the page redirect after I logout from my session. After the redirect notice, the page still says 'you are logged in as...'  although I am actually logged out. From then on it gets really confusing, because when I subsequently log in as a different user for instance, I still get the message that I am logged in as the first user; only when I request a page that I haven't requested before (e.g. the search page) it gives the correct user name.
The problem exists by the way also for this particular forum, so it is not restricted to my installation.

Similar problems have been reported before in this forum, and it has been suggested that it has something to do with cookies, but to me it looks more like a cache problem. The point is that the local library network connects, as far as I am aware, over a proxy server to the internet, and it seems that pages are getting cached there that shouldn't be cached. I have therefore already additionally added a "Cache-Control: private" to the HTTP headers, but to no avail.

I personally could live with this behaviour, but I think for the unspecting user it is unacceptable, so any suggestions how to remedy this are appreciated (as otherwise I really like PunBB).

Other forums (e.g. phpBB) don't have this problem at all by the way, so this shows that it should be possible to make this properly work even in this particular case.


Thomas