(2 replies, posted in PunBB 1.3 extensions)

That would be awesome, someone should make this an extension smile


(7 replies, posted in PunBB 1.3 additions)

SuperMAG wrote:

yea i know, thats why i said to post ads after XX number of posts, like if you have 15 posts you can make it after 5 posts.

Yeah that would be easy. Instead of doing

    if(($forum_page['item_count'] % 2) == 1){

Just replace the 2 with whatever you want.


(6 replies, posted in PunBB 1.3 bug reports)

This used to happen to me at first but it went away on its own. I use Windows so I know it doesn't have anything to do with OS.

You need to use the padding attribute in the CSS. Right now you have it at 0 0. I think it should be 5px 20px but I haven't actually checked. Just play around with it.


(98 replies, posted in PunBB 1.3 extensions)

ScottyDoo wrote:

Okay, I actually think I got it...I did NOT literally reinstall the extension, that made a huge difference smile


Great smile. Yeah sorry I couldn't explain better.


(98 replies, posted in PunBB 1.3 extensions)

ScottyDoo wrote:

Okay, I apparently am not getting this...editing code is not my strong suit.  I thought that I changed the lines like you mentioned but my result was no different than before.

Did you make sure to upload/reinstall the attachment extension and re-upload viewtopic.php after making those changes? Basically what I did was add my own custom defined hook into viewtopic.php where I wanted the code to be executed and changed the hook id in the manifest.xml to match the newly created hook from viewtopic.php.

Etoile wrote:

The problem is the space between the blue bar and the white frame, I need to remove it so that it will look clean. Everything I tried to remove this space blowed up the whole forum design! lol I need to work on it again, but I feel like I'm getting close.

In the CSS I gave you, remove margin: 10px 0; or change it to margin: 0 0 10px;

The margin attribute is what gives you room between the box area and the other boxes (the values are defined in order by: top, right, bottom, left). Alternatively you can just specify margin-top, margin-left, margin-right, margin-bottom separately if you need them.

If you are using the div box in more than one place use div class="extraInfo" and use .extraInfo in the css instead of #extraInfo. It is technically incorrect to use ids in more than one place on a page and that is what classes are for.

I'd recommend that you read up on a basic CSS guide to learn more about it (it really isn't that difficult).

This site: http://www.w3schools.com is a great resource for getting started.


(2 replies, posted in PunBB 1.3 bug reports)

I just noticed this too now that you mention it. I've disabled this extension until it gets fixed by its author.

You can do two things. First is to put the code right below the <!-- forum_about --> portion, before the </div> (which would use the about box to contain your code). The second thing you can do is create another div, something like this:

<div id="extraInfo"> <!-- code here --> </div>

With css defined for extraInfo:

    width: 100%;
    border: 1px solid #eee;
    background-color: #fafafa;
    padding: 0 10px;
    margin: 10px 0;

You can modify the CSS however you want to customize the appearance.

The way the forum design is setup it isn't possible to do this through CSS. There is simply nothing to differentiate each forum category from each other (this is an issue I have with PunBB). There is a category div ID but it only wraps around the forum links themselves not the actual name/title of the category for those links. With an extension/modding it would be possible though.

Go to include/template/main.tpl and modify that. Put your code below the portion you want it to be under, eg:

<div id="brd-about" class="gen-content">
    <!-- forum_about -->


(23 replies, posted in PunBB 1.3 extensions)

Etoile wrote:

@ Programming-Designs, I viewed your example, but it doen't load the picture like it does in the KeyDog Demo, the image is displayed directly without the lightbox animation effect, is there a way to fix it?

Yea the animation is pretty easy. Might add it later.


.brd #brd-announcement h1 {
background:#1f537b url(http://www.mysite.fr/forum/img/grad/gradi1blue.png) repeat-x;

This way the background only repeats horizontally and not vertically (thats what repeat-x means, before it was repeating both vertically and horizontally). The other option would to increase the height of the gradient image to be 30px or vice versa (changing 30px to whatever the height of the gradient image is).

Modify the CSS file oxygen_cs.css or whatever (pulled from his site):

.brd .main-head, .brd .main-foot {
background:#99A63C url(img/cat_bg.gif) repeat scroll 0 0;

Replace cat_bg.gif with your gradient pic.

Google "Firebug" -- it's a great extension for Firefox that makes it really easy to find these things.


(23 replies, posted in PunBB 1.3 extensions)

I wrote my own script to do the same thing: http://forums.programming-designs.com/t … op-thread/ (2nd post for example). But there's an issue with getting the light box to overlay the entire page in Opera (tried using a bunch of diff. methods to get full scroll height but it only gets viewport height).

The JS code is here: http://forums.programming-designs.com/i … gResize.js

If you could add the ability to display all post images in slimbox and also set a max width/height limit that would be great.


(2 replies, posted in PunBB 1.3 discussion)

Utchin wrote:

Agree. I dont like working with the CSS and markup too much though. neutral

Yeah it took me some time to really customize my theme because of how the CSS structure is setup. I personally wish they had grouped more of the elements into divs (or wrappers) that have unique ids/classes depending on the page (eg. wrapping the main-head, main-subhead, and category divs together in another div) . Some of the stuff I wanted to customize a specific way but was unable to because changing it in one location would change it in several others. I managed to use a selector in one or two instances though.


(28 replies, posted in PunBB 1.3 additions)

Great extension. I had modded my index.php to do this same thing but this is a lot better.


(13 replies, posted in PunBB 1.3 troubleshooting)

FaRe-Ed wrote:

echo file_get_contents('http://hakimct.freehostia.com/forum/extern.php');

and i got this error someone pls help neutral

Warning: file_get_contents(http://hakimct.freehostia.com/forum/extern.php) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/hakimct.freehostia.com/index.php on line 129

It's possible that the function has been disallowed by your server provider or maybe something to do with file permissions on extern.php


(13 replies, posted in PunBB 1.3 extensions)

Wow this extension is great! Props! smile


(2 replies, posted in PunBB 1.3 discussion)

^ Try using the "Pun Admin Manage Extensions Improved" extension. This will give you "reinstall" and "refresh hooks" options and the ability to manage multiple extensions at once.


(7 replies, posted in PunBB 1.3 additions)

SuperMAG wrote:

1- can you make it look like a post. just change the user details at the left to the admin one, and post the ads as a post.
2- can you make extension out of it.


1. I had actually started doing this mod by using the same style as a post but it didn't look right on my forums so I just made my own div instead (it was also easier).

2. Looking through the code I'm sure I could make an extension out of it (hooks in the right place). I haven't written an extension yet so I'd need to first setup a test environment for myself if I do plan on writing one and would probably take a day or so. Give me a few days and I'll consider it.


(7 replies, posted in PunBB 1.3 additions)

This requires some modification of viewtopic.php but is pretty straight-forward. For a demonstration you can see it here: http://forums.programming-designs.com/t … t-timeval/

I recommend before continuing to keep a copy of viewtopic.php in case you make a mistake or want to revert back.

If you want an ad after the first post and last post of each topic do the following:

Step 1. Find line 304:


After add:

    if($forum_page['item_count'] == 2){

Step 2. Then find ~line 552:

<?php endif; ?>        </div>


After add:


Step 3. Now at the top of the viewtopic.php (before everything else) add:

function loadAdModule()
    echo '<!--- Start here -->
<div class="admodule">           
    <!--- Ad code goes here -->

   <!--- End Ad code -->

<!--- End Here -->';

Step 4. In between the ad code comments is where you place your adsense/yahoo publisher network code. Just save viewtopic.php and re-upload. Make sure your ad code does not have any backslashes (\) or single quotes ('). If you have backslashes add an additional slash (eg. \\). If you have single quotes use double quotes instead (eg. "). Otherwise you will probably get some syntax errors.

Step 5. In your default/current theme's css file you will need to add the following (you can customize it how you want):

    margin: 5px 10px;
    text-align: center;
    padding: auto;
    border: 1px solid #eee;    
    background-color: #fafafa;

All done!

Alternative: Now if you want ads between EVERY post just replace step 1's code with this:

    if(($forum_page['item_count'] % 2) == 1){

And then make sure to skip step 2 (as that adds it after the last post which is unnecessary).

Seems to work fine for me.


(1 replies, posted in Discussions)

For the forum software, it is free (at least PunBB is), but for hosting a forums you may have to pay money some money unless you want a sub-par hosting service that is free but has limitations.

I sent you a private message with more details.


(7 replies, posted in Fun)

good 1 xD