1

(4 replies, posted in PunBB 1.3 troubleshooting)

I've had to fix a few other problems before and after, but nothing specifically related to that piece of code in xml.php

2

(4 replies, posted in PunBB 1.3 troubleshooting)

I had a similar problem about a year ago. In my case, I just changed

$tokenized_hook = token_get_all('<?php '.$hook['content']);

to

('<?php '.$hook['content']);

So far, changing that one line in /FORUM_ROOT/include/xml.php hasn't caused any problems.

3

(4 replies, posted in PunBB 1.3 troubleshooting)

It works. Thank you!

4

(4 replies, posted in PunBB 1.3 troubleshooting)

Thank you for the response. I tried to place it inside of the "type" attribute but it had no effect. Is there a particular way that you would recommend adding it into the rest of the code?

5

(4 replies, posted in PunBB 1.3 troubleshooting)

I am in the process of modifying my PunBB installation to use <object> tags instead of <img> tags for more alternative content options and  for future compatibility. I am almost finished making the changes and while I have encountered a few a problems in the process, only one problem (that I know of) remains:

The "type" attribute in the <object> tag contains the mime type for the media used in the object.

For example, this is how the PHP would output the HTML for the http://www.w3.org/Icons/valid-css.png .png icon:

<object type="image/png" data="http://www.w3.org/Icons/valid-css.png" width="88" height="31">Valid CSS&#32;</object>

What I want the PHP to do is look for the data file (in this example, valid-css.png) and automatically fill in the mime type in the type attribute type="image/png"

Let's say that a forum user decided to embed a .gif image. How could I rewrite the following PHP (from ../include/parser.php) to automatically write type="image/gif" or write type="image/jpeg" for a .jpg?

Original:

if ($is_signature && $forum_user['show_img_sig'] != '0')
        $img_tag = '<img class="sigimage" src="'.$url.'" alt="'.forum_htmlencode($alt).'" />';
    else if (!$is_signature && $forum_user['show_img'] != '0')
        $img_tag = '<span class="postimg"><img src="'.$url.'" alt="'.forum_htmlencode($alt).'" /></span>';

My current modifications:

    if ($is_signature && $forum_user['show_img_sig'] != '0')
        $img_tag = '<object type="image/png" data="'.$url.'" class="sigimage">'.forum_htmlencode($alt).'</object>';
    else if (!$is_signature && $forum_user['show_img'] != '0')
        $img_tag = '<span class="postimg"><object type="image/png" data="'.$url.'">'.forum_htmlencode($alt).'</object></span>';

I replaced the file and everything works properly again. Thank you for the help.

For the most part, my PunBB installation has been working as intended. I recently noticed a problem when trying to change some settings in my Administration panel, under Settings. Whenever I try to change settings under Setup, Features, Announcements, E-mail, or Registration (my Censoring and Attachments settings pages seem to be properly functioning), after pressing the "Save Changes" button, I receive a blank page in my browser window. When I view the source of the document, the following is what it shows:

<?
/***********************************************************************

    Copyright (C) 2008-2009 PunBB

    PunBB is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
    by the Free Software Foundation; either version 2 of the License,
    or (at your option) any later version.

    PunBB is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
    MA  02111-1307  USA

***********************************************************************/

if (!defined('FORUM'))
    exit;

function pun_log_write_logfile( $str )
{
    global $forum_config;
    $hf = fopen($forum_config['o_pun_admin_path_log_file'], 'a+');

    if ($hf)
    {
        fwrite($hf, $str);
        fclose($hf);
    }
}

function record_log_file($action, $comment)
{
    global $forum_user;
    return '['.date('j-M-Y H:i:s').']'."\t[".$forum_user['id']."]\t".$forum_user['username']."\t".$action."\t".$comment."\n";
}

?>

It seems as if an entire PHP file has simply been inserted without being correctly processed. So far, this problem only seems to be affecting my settings.php file, and only when I attempt to actually change those settings. What might be causing this sort of response?

8

(3 replies, posted in PunBB 1.3 troubleshooting)

I appreciate your response.
When I checked it again moments ago, apparently, it had updated to the way I had intended it to be. Though I'm unsure why it took so long for the changes to take affect, I am happy with the resulting HTML output. Is there a place where PunBB users can submit changes to be looked at and considered for future versions?

9

(3 replies, posted in PunBB 1.3 troubleshooting)

I installed the antispam extension without any trouble. For most purposes, it works. However, I soon noticed that the included img tags in manifest.xml have empty alt attributes. When I tried to place text inside of them, it had no effects on the resulting pages. To be sure, I even saved the file as blank, but still, no changes took place. I'm so close to getting my installation to http://www.w3.org/WAI/WCAG1AA-Conformance level two accessibility conformance, but I still need the alt attribute to contain something.
Is there a file other than manifest.xml which I need to change?

10

(2 replies, posted in PunBB 1.3 troubleshooting)

Thank you for the link.

11

(2 replies, posted in PunBB 1.3 troubleshooting)

Hello, I recently installed PunBB 1.3.3 and everything seemed to be working (it even recognized pun_repository) fine until I tried to go to the extensions page on the administrative panel.  A message in large black text saying "Extensions available for install" is all that appears. I then tried to install PunBB 1.3.2 to see if the problem was just 1.3.3 but the same thing happened.
I've now reinstalled version 1.3.3 but the message still appears. Any ideas on what might be causing this?

    <div class="main-subhead">
        <h2 class="hn"><span>Extensions available for install</span></h2>
    </div>
    <div class="main-content main-extensions">

edit:

The above code is what appears when I "view source" the error page.

Here is the error message in my server logs:

PHP Fatal error:  Call to undefined function token_get_all() in /home/myaccountname/www/mydomain.net/forums/include/xml.php on line 199, referer: http://mydomain.net/forums/admin/settings.php?section=setup

I changed the account and domain name because the project is still in development.

edit #2:

When I changed line 199 of my xml.php file from

$tokenized_hook = token_get_all('<?php '.$hook['content']);

to

('<?php '.$hook['content']); 

the error message disappeared and the extensions page now works. Is there any danger in leaving

$tokenized_hook = token_get_all

out of the code?