1 (edited by flux7d 2008-11-02 14:10)

Topic: Please help with Attention Mod

After almost a week that my post wasn't answered @ punres I hope here I can get some help..
I've setted the mod correctly, checked it couple of times, but I get this "" before the table of the attention, I mean it shows this letters for some reason..

http://img396.imageshack.us/img396/1228/attentionuw6.th.jpghttp://img396.imageshack.us/images/thpix.gif

hope you can help me,
thank you wink

btw, I see punbb develops greatly i'm very happy with that, I will upgrade soon... now i'm with 1.2.20

2

Re: Please help with Attention Mod

OK. Please give your forum's url, then I can check whats wrong, and upload / paste code of the mod file.

Re: Please help with Attention Mod

Also what is the URL to the mod you are using from punres?

Re: Please help with Attention Mod

Well my will not qualify with the rules here tongue so I don't know if I should put an adress

here the link to the mod:
http://www.punres.org/desc.php?pid=387

I did exactly what the install readme said..

Re: Please help with Attention Mod

OK, what does your YOURFORUM\include\template\main.tpl look like?

I've used this mod with no problems in the past and this is what the relevant section of main.tpl looks like when I use it:
ETC ETC

<div id="punwrap">
<div id="pun<pun_page>" class="pun">
<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
        <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<pun_include "attention.php">
<pun_announcement>
<pun_main>
<pun_footer>

ETC ETC

And this is the contents of my PUNFORUM\include\user\attention.php, which displays without any issues:

<?php
if($pun_user['is_guest'])
{
?>
<div class="block">
    <div class="box">
        <div class="inbox"><p align="center"><b>Welcome Guest!</b> To post a message, please <a title="site registration link" href="register.php">register</a>! Registration is easy and free. If you have registered, please <a title="site login link" href="login.php">login</a>.</p>
        </div>
    </div>
</div>
<?php
}
?>

Another thought: make sure that you have uploaded (via FTP) any files you have modified  as ASCII text. What you are seeing might be some sort of binary artefact.

Re: Please help with Attention Mod

I'm using FlashFXP...
from youre code, my main.tpl looks fine, but I have a google syndicate ad, but that can cause the problem?

Re: Please help with Attention Mod

flux7d wrote:

I'm using FlashFXP...
from youre code, my main.tpl looks fine, but I have a google syndicate ad, but that can cause the problem?

With your FTP client, dig around in the settings and just make sure that *.php and *.tpl files are treated as ASCII format text files, and transferred that way when uploading/downloading, instead of as BINARY format files. Every FTP client handles these formats differently, but all will let you tell them how to do transfers properly. Transferring text files as binary, and vice versa, is usually bad.

The Google ad code shouldn't be a problem. Well, not normally.

Can you post the relevant section of your main.tpl that shows both the google code and also the attention.php?

Re: Please help with Attention Mod

main.tpl

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
</head>
<body>

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
            <pun_title>
            <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>



<div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-3806911217709370";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "000000";
google_color_bg = "FFFF66";
google_color_link = "CC0000";
google_color_text = "0066CC";
google_color_url = "80FF00";
google_ui_features = "rc:10";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><br>

<pun_include "attention.php">

<pun_announcement>

<pun_main>
<pun_footer>

</div>
</div>

</body>
</html>

attention.php

<?php

// Show login if not logged in
if($pun_user['is_guest'])
{
    if(!isset($focus_element) || (isset($focus_element) && !in_array('login', $focus_element)))
    {

    // Load the language files
    require PUN_ROOT.'lang/'.$pun_user['language'].'/common.php';
    require PUN_ROOT.'lang/'.$pun_user['language'].'/login.php';
?>
<div id="announce" class="block">
    <h2><span style="font-size:1.5em; color: #FF0000; font-weight: bold;">Attention</span></h2>
    <div class="box">

        <div class="inbox">
            <div><span style="font-size: 1.3em; color: #FF0000; font-weight: bold;">You have not registered yet and have limited access! Register now to be able to view the entire forum!</span></div>
        </div>
    </div>
</div>
<?php
    }
}
?>

Before this mod i've installed quite few which didn't give me any kind of this error, only after installing this mod I got this.. and I'm using notepad as an editor, which i'm using for years like that and it never gave me an error like that...

Re: Please help with Attention Mod

Hmm. That all looks OK.

However, consider this, which I got from Googling those characters you are seeing:

Yes, "" is the Byte Order Mark (BOM) of the Unicode Standard. Specifically it is the hex bytes EF BB BF, which form the UTF-8 representation of the BOM, misinterpreted as ISO 8859/1 text instead of UTF-8.

Probably what it means is that you are using a text editor that is saving files in UTF-8 with the BOM, when it should be saving without the BOM. It could be PHP files that have the BOM, in which case they'd appear as literal text on your page. Or it could be translated text you pasted into Joomla! edit windows.

The Unicode Consortium's FAQ on the Byte Order Mark is at http://www.unicode.org/faq/utf_bom.html#BOM

One of the suggestions for dealing with the problem Google turned up was:

ftp download the most likely php files you edited, open them in notepad, do a file save-as and be sure to set the encoding to ANSI (at the bottom of the save-as window), then upload the files back again.

Try that.

10

Re: Please help with Attention Mod

Weeww!! thank you very much big_smile