26

(25 replies, posted in Programming)

Depends on what kind of programming you want to do. If you want to do web-related stuff I suggest going to www.w3schools.com and learning some basic html/css/php then looking up functions at php.net to achieve what you want. If you're interested in desktop programming I recommend trying out .NET (you can get Visual Studio Express for free, just google it for the site). Using a .NET language is great for starting out for Windows-based programming as you can develop apps a lot faster than other languages and even make games that run on xbox 360 using XNA.

27

(40 replies, posted in PunBB 1.3 extensions)

Glad to see it's fixed. I had a temporary fix before (modified .js to use seo-friendly urls) but it didn't resolve the signature in quote issue. Works great smile

28

(61 replies, posted in PunBB 1.3 extensions)

Suggestion: It'd be cool if there was an option to allow non-admins/guests to see masked IP addresses (such as bots that are defined by ips/sub nets).

Also as suggested, it'd be nice to have the option to allow guests to see who is online/not.

Great extension btw smile

29

(2 replies, posted in Discussions)

That's good to know. I haven't done much modification of the tpl files but this could be useful for me later on smile

Sounds like a cool extension. I'll test it out once it is further developed smile

31

(16 replies, posted in PunBB 1.3 extensions)

Oh ok thanks for clearing that up. Will update to the new version and give it a try.

Edit: Tested it. Great mod I love it. Great for my programming forums smile

32

(16 replies, posted in PunBB 1.3 extensions)

I installed the extension but it isn't working for me for some reason. I tried some html within the code tag but it didn't color highlight it.

33

(61 replies, posted in PunBB 1.3 extensions)

Nice I'm using this now.

34

(8 replies, posted in PunBB 1.3 additions)

FrancisHeng wrote:

Oh the other question was. I want to change the main background of the forum to this http://www.strollerlife.com/images/StripePink.jpg.

But I can't seem to find where the background is using FireBug.

What can I do to successfully change the white background to the one I want?

You can add into the body{ } the background element, in the css file, like this:

body{
     background: url('/images/StripePink.jpg');
}

As for the text description and logo stuff I forgot what I did to hide it.

35

(22 replies, posted in PunBB 1.3 extensions)

^ Exactly. I should have just posted mine xD

36

(8 replies, posted in PunBB 1.3 additions)

If your serious about customization of the forums I suggest using Firebug (Firefox plugin): www.getfirebug.com

It will allow you to easily find the css attributes of elements that you hover over which can be very useful.

Example: Hovering over the top area I find it is called #brd-head. So editing the HTML directly with firebug I put:

<style type="text/css">
#brd-head{
    background-color: #ff0000;
}
</style>

That would turn the top blue area red. If I actually liked it that way I'd copy that code and paste it into /style/Oxygen/Oxygen_cs.css

Once you play around with the tool, you'll find making changes is really easy. I did my own forums this way.

As for the logo in your header area open up include/template/main.tpl and edit your logo to be below this (line 14):

<div id="brd-head" class="gen-content">
    <!-- forum_skip -->
    <!-- put logo here -->
</div>

37

(22 replies, posted in PunBB 1.3 extensions)

SuperMAG wrote:

mmm, where do i replace that

manifest.xml -- under line 51 (past where it says include). Replace the $online_query_today = array(); stuff with this:

$todays_users_diff = ($forum_user['timezone'] + ($forum_user['dst']-1)) * 3600;
$todays_users_now = time();

$query = array(
    'SELECT'    =>    'id, username',
    'FROM'        =>    'users',
    'WHERE'    =>    'last_visit>"'.strtotime(gmdate('M d Y', $todays_users_now + $todays_users_diff)).'" and group_id>0',
    'ORDER BY'    =>    'username'
);

Rename $query to $online_today_query and your done. Reinstall the plugin and it should work perfect.

38

(22 replies, posted in PunBB 1.3 extensions)

allineer wrote:

It seems like it will randomly shows up and then sometimes it doesn't show at all.

Garciat,

$todays_users_diff = ($forum_user['timezone'] + ($forum_user['dst']-1)) * 3600;
$todays_users_now = time();

$query = array(
    'SELECT'    =>    'id, username',
    'FROM'        =>    'users',
    'WHERE'    =>    'last_visit>"'.strtotime(gmdate('M d Y', $todays_users_now + $todays_users_diff)).'" and group_id>0',
    'ORDER BY'    =>    'username'
);

It works great! Thanks!

39

(22 replies, posted in PunBB 1.3 extensions)

For some strange reason I don't see the online today list after installing the plugin. It seems like it will randomly shows up and then sometimes it doesn't show at all.

40

(55 replies, posted in Supported extensions)

Slavok wrote:

When I go to say this url: http://forums.site.com/tag/7

I get the error:

Notice: Undefined index: has_posted in /home/.../.../site/search.php on line 313

41

(55 replies, posted in Supported extensions)

When I click one of the tags while viewing a topic I get an index error message on the search page for that tag.

42

(3 replies, posted in Programming)

The mistakes were pretty small. Both pages have an extra </div>. Find this <!-- end #content --> in your code and delete one of the </div> elements before it for both pages.

-- Programming-Designs.com

If you still need help just PM me.

44

(51 replies, posted in PunBB 1.3 extensions)

SuperMAG, I was looking for an extension that did this as well but couldn't find one. Instead of writing an extension (which would be my first for this version of PunBB) I modified the code a bit in index.php (after line 204):

Replace this:

        if ($cur_forum['last_post'] != '')
            $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.format_time($cur_forum['last_post']).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite></li>';
        else
            $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><strong>'.$lang_common['Never'].'</strong></li>';

With this:

        $lpid = intval($cur_forum['last_post_id']);
        $query2 = array(
        'SELECT'    => 't.subject',
        'FROM'        => 'topics AS t',
        'WHERE'        => 't.last_post_id='.$lpid
        );

        $result2 = $forum_db->query_build($query2) or error(__FILE__, __LINE__);
        $cur_topic = $forum_db->fetch_assoc($result2);
        
        if ($cur_forum['last_post'] != '')
            $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.$cur_topic['subject'].'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).' on '.format_time($cur_forum['last_post']).'</cite></li>';
        else
            $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><strong>'.$lang_common['Never'].'</strong></li>';

It's a bit messy/not optimized as I haven't created/messed with SQL queries involving joins in quite some time (line 68 of index.php).

If someone wants to provide the code necessary to include the subject from the topics table into the SQL query on line 68 that would be great.


Or, if someone wants to write an extension for it, here's some starting info:

Since the hook below is on line 211 (which is right after where the info is put together for # of topics/posts, and last post):

        ($hook = get_hook('in_normal_row_pre_display')) ? eval($hook) : null;

It would be possible to modify the variable forum_page['item_body']['info']['lastpost'] and re-order the time to be after the person's name (eg. "topic by name on date") and put the subject title where the date was (default = "date by name").

45

(5 replies, posted in Feature requests)

Adding to what KeyDog said, you will have to modify ~line 600/601 (inside the handle_url_tag function):

global $forum_user;

if ($forum_user['is_guest'] )
    return ' <span class="members-only">[Register/login to see link]</span>';
elseif ($bbcode)
    {
        if ($full_url == $link)
            return '[url]'.$link.'[/url]';
        else
            return '[url='.$full_url.']'.$link.'[/url]';
    }
    else
        return '<a href="'.$full_url.'">'.$link.'</a>';

46

(1 replies, posted in PunBB 1.3 extensions)

Sounds like a great debugging tool. I think once more and more extensions are made for PunBB it will be extremely useful.

slickplaid wrote:

I modified the extension some more to make it validate as XHTML 1.0 Strict and added a send button.

I'm currently working on getting an admin backend added onto it so you can set some options so until I finish that, the previous modifications I've done aren't included.Modified chatlite:ChatLite 0.6.0

Let me know if you find anything wrong with it as I'm still kind of a novice at this.

Last edited by slickplaid (2009-01-02 02:55:36)

Nice work!

Ok. I fixed it. The problem was using the old JavaScript code:

document.login.submit()

I modified it to document.getElementById('login').submit() and it fixed the problem. I uploaded the fixed version over the old zip file. Apparently when I tested it, somehow I was able to login with the old JS code in Firefox by pressing enter (though the login link didn't work), and I was totally unaware of the problem.

KeyDog wrote:

@programming-designs
can you test yourside aswell? (setting your google chrome or firefox to remember your password then log out and try and log in again)

I'm looking into it now.

50

(151 replies, posted in PunBB 1.3 extensions)

I'm requesting a hook for the attachment extension (and other extensions that would display info within posts), it should be located in viewtopic.php around line 499/500. Right now, using the attachment extension, attachments are displayed below the signature area which can be hard to locate (especially if you didn't know if it was there int he first place).

I posted about it here: http://punbb.informer.com/forums/post/123775/#p123775

I made my own hook identifier in that post to demonstrate what I'd like to see and provided an example. I don't know how you guys have the naming scheme setup for hooks though.