1 (edited by slickplaid 2009-02-26 04:28)

Topic: jQuery and PunBB

I recently added jQuery to my forums for an extension I'm building and for some reason it's breaking the width of my forums and I'm at a loss trying to figure out what is causing it.

Everything displays fine in Chrome and Firefox, but it breaks in IE (go figure).

At first I thought it was a conflict with the common.js that is used on the forum but I've checked it both with and without that and the width problem still persists.

My site: http://hg.slickplaid.net/

I'm currently in the process of disabling the extensions one by one and hopefully I'll find the problem that way.

Could someone take a look and give me some suggestions on what is causing it?

Edit: I've disabled every single addon, one by one, and the error still persisted.
I'm going to disable the addon that's causing it and only add the jquery library to see what happens.

Edit: Disabled my addon and just added the library. It's definitely something with my extension. I'll post the code up here for it shortly. Until then, someone at least tell me the css value or something that is causing it so I can narrow my search in the extension. smile

Edit: Here's my diliemma: I've tried putting this code

<script type="text/javascript" src="<?php echo $ext_info['url'] ?>/js/jquery-1.3.2.min.js"></script>

in both the header and footer of the page and when it's in the extension, it causes the error. If I add it directly to the page either in the main.tpl or in the announcement section, it works fine.

Why is this?

Edit: Okay, I take it back... it only shows up now when you're logged in for some reason. The <script> code is now put in the main.tpl and not even in the extension.

Edit: I've removed all the css that I've added and it still shows up as messed up. It has to be the javascript (I think).

You can log in using "test" as the username and "testuser" as the password.

Edit: I've had to remove the offending javascript because users of IE can't log in due to the login and password fields being covered up.

I am willing to monetarily compensate whoever works with me to fix this error. My email is in my profile, slickpla \[at\] slickplaid.net

Re: jQuery and PunBB

It happens because of this code at the top of the page:

<div id="battle_bar">
    <div id="bb_status">
<span id="bb_ugroup"><strong>Visitor</strong></span>        <span id="bb_title">battlebar</span> <span id="bb_ver">v0.3.4</span>
    </div>
    <div id="bb_reports">
        <span><strong>Reports:</strong></span>
        <span class="na">Attack</span> | <span class="na">Defense</span> | <span class="na">Spy</span><br /><span id="bb_upload"><a href="http://hg.slickplaid.net/extensions/battlebar/upload/upload.php?KeepThis=true&TB_iframe=true&height=400&width=600" title="Image Uploader" class="thickbox">Upload Image</a></span><br />
    </div>
</div>

You should place it inside the tag "body".

3 (edited by slickplaid 2009-02-26 10:54)

Re: jQuery and PunBB

        <hook id="ft_end"><![CDATA[
        
if ($forum_user['is_guest'] == 0):        
?>
<div id="battle_bar">
    <div id="bb_status">
<?php 
    if ($forum_user['g_id'] == FORUM_ADMIN)
        echo '<span id="bb_admin"><strong>Administrator</strong></span>';
    else
        echo '<span id="bb_ugroup"><strong>'.$forum_user['g_title'].'</strong></span>';
?>
        <span id="bb_title">battlebar</span> <span id="bb_ver">v0.3.4</span>
    </div>
    <div id="bb_reports">
        <span><strong>Reports:</strong></span>
        <span class="na">Attack</span> | <span class="na">Defense</span> | <span class="na">Spy</span><br /><span id="bb_upload"><a href="http://hg.slickplaid.net/extensions/battlebar/upload/upload.php?KeepThis=true&TB_iframe=true&height=400&width=600" title="Image Uploader" class="thickbox">Upload Image</a></span><br />
    </div>
</div>

<?php endif; ?>


<?php
        ]]></hook>

putting it at the very end footer page hook puts it at the top of the page? Weird. big_smile

Let me try that out.

Edit:
Added it to ft_about_end instead and everything's fixed.

It didn't occur to me that the hook there would put it to the top of the page. I was scouring through the CSS and javascript when it was a simple html error. Also known as an ID10T error, I think?

Thanks.