Well, I mean something that a user can select themes from a dropdown box. In my case I am using the frontpage mod for punbBB so it would have to be something like a side panel. Hope you understand what I mean. I know that when XennoBB was around they had something similar so I figured that since the code they used was almost 100% punBB that it would be easy to implement.

Thanks

Can anyone tell me if there is a theme switcher plugin available for punBB? I've searched and can't seem to find anything in the forums.

Thanks in advance.
Bingiman

728

(33 replies, posted in PunBB 1.2 bug reports)

I re downloaded punBB and did a clean install but the problem still exist even without modifying any files.

Bingiman

729

(33 replies, posted in PunBB 1.2 bug reports)

Well, I am lost. I am using an original copy of profile.php and I still get the error. When I click on the HTML Validator in FF it tells me this:

error:

line 195 column 7 - Warning: missing </div>

in profile.php it appears to be around the second instance of:

<legend>User activity</legend>
                        <div class="infldset">

I also don't get this when I am logged in as admin, only as a user under "Essentials" all the others are fine, by that I mean # Personal, Messaging, Personality, Display and Privacy. I've tried and tried but have not had any success solving it.

Cheers!
Bingiman

730

(33 replies, posted in PunBB 1.2 bug reports)

Thanks for the help guys. big_smile

Bingiman

731

(33 replies, posted in PunBB 1.2 bug reports)

I think I found a solution to eliminate this issue.

in viewprofile.php

I changed this:

        if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
        {
            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '';

to this:

        if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
        {
            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '<img alt="" src="img/noimage.gif"></img>';

so even if the user does not select an avatar, one will be provided. If they do select one, then of course it overrides the default.

Bingiman

732

(33 replies, posted in PunBB 1.2 bug reports)

Ok, I pulled the error from the FF HTML Validator screen and this is what I get:

line 179 column 6 - Warning: trimming empty <dd>

and it refers to this line:

<dd class="postavatar"></dd>

I get this error when I am logged in *only* as a user who does not have an avatar. If I select an avatar, then the error is gone. This again is in the viewtopic.php file. Hope I explained it correctly now.

Bingiman

733

(33 replies, posted in PunBB 1.2 bug reports)

guardian34 wrote:
bingiman wrote:

Unfortunately I am running it on my local site so I can't provide you with a link.

How are you validating your pages?

I am using FireFox with the HTML Validator plugin.

btw: I sorted out the avatar issue. Silly mistake on my part.

734

(33 replies, posted in PunBB 1.2 bug reports)

Yes it is but for some reason I get those errors. I am also using the latest version of punBB. Unfortunately I am running it on my local site so I can't provide you with a link. Hopefully I can have the site in production by the middle of the week so I can show you what I mean.

Cheers!
Bingiman

735

(33 replies, posted in PunBB 1.2 bug reports)

Edit: On a different note, isn't this piece from viewtopic.php redundant?

        else
            $user_avatar = '';

Yes, I have 2 instances of it.

736

(33 replies, posted in PunBB 1.2 bug reports)

guardian34 wrote:
bingiman wrote:

I have also noticed that in viewtopic.php this line:

<dd class="postavatar"><?php echo $user_avatar ?></dd>

None of the other lines there have IDs? Can you provide any links for this?

I still seems to be getting w3c errors with the above. If I sue an ID then it shows up as being used twice. The problem is if a user does not use an avatar then it shows up as an error in TIDY HTML Validator. If I use the id and the user then uses and avatar I still get a problem. Maybe there should be some sort of if statement around that line. I am not a coder so I really wouldn't know what to put there but I do know it is a problem. I even get it on this site.

Bingiman

737

(33 replies, posted in PunBB 1.2 bug reports)

Actually I spent a little more time with it and figured out that this is the area that requires the closing DIV

                $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());

                while ($cur_group = $db->fetch_assoc($result))
                {
                    if ($cur_group['g_id'] == $user['g_id'] || ($cur_group['g_id'] == $pun_config['o_default_user_group'] && $user['g_id'] == ''))
                        echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
                    else
                        echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
                }

?>
                            </select>
                            <input class="button" type="submit" name="update_group_membership" value="<?php echo $lang_profile['Save'] ?>" />
                        </div>
                    </fieldset>
                </div>

should be:

                $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());

                while ($cur_group = $db->fetch_assoc($result))
                {
                    if ($cur_group['g_id'] == $user['g_id'] || ($cur_group['g_id'] == $pun_config['o_default_user_group'] && $user['g_id'] == ''))
                        echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
                    else
                        echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
                }

?>
                            </select>
                            <input class="button" type="submit" name="update_group_membership" value="<?php echo $lang_profile['Save'] ?>" />
                        </div>
                    </fieldset>
                </div></div>

I am 100% sure this time. Notice the last 2 divs after the last fieldset. The problem was this: If I am logged in as admin it worked fine but if I logged in as a user I then saw the problem with the missing closing div.

Bingiman

738

(33 replies, posted in PunBB 1.2 bug reports)

I have also noticed that in viewtopic.php this line:

<dd class="postavatar"><?php echo $user_avatar ?></dd>

requires an ID if the user has not selected an avatar, so I had to format it in this way to be W3C Compliant.

<dd id="avatar" class="postavatar"><?php echo $user_avatar ?></dd>

739

(33 replies, posted in PunBB 1.2 bug reports)

in profile.php there is a closing DIV missing.

There are 2 instances of this:

                        <legend><?php echo $lang_profile['User activity'] ?></legend>
                        <div class="infldset">

It should be:


                        <legend><?php echo $lang_profile['User activity'] ?></legend>
                        <div class="infldset"></div>

I am having a really strange problem. I uploaded my avatar to my site but when I post I can't see it. however, if I log in as someone else I can see my avatar in the post. Can anyone tell me why this is happening?

UPDATE: I figured out the problem.

Thanks
Bingiman