26

(137 replies, posted in News)

Rickard: I love it -- the new look website and the forums as well (1.2).  Way to gooo!

Suggestion maybe - with the front page "comments" links - perhaps add a count to show how many replies were posted?  e.g.  comments (5)

mindlessoath: I use a similar news script on my site (www.shuttertalk.com), and it's slightly tedious, but I can't be bothered installing a full CMS when most of the functionality is already in punbb.  However, I do wish that I could change the dates of posts sometimes... smile

No worries!  Hope it's useful!

Ooops... yeah good idea... on the todo list. smile

Hi all, I was finding that tracking hits to the forums using my site's access logs and counter wasn't doing it for me --  I wanted to find out which forum members were accessing the site, and what percentage were guests and so forth.  Hence, this mod.

Demo here:
http://www.shuttertalk.com/forums/access.php

To install:

This mod creates a new database table, so <insert usual spiel about backing up blah bla>. 

1.  Create the access table using a db tool such as phpmyadmin.  Make sure you replace `punbb_prefix` below (including quotes) with the table prefix that you use.

CREATE TABLE `punbb_prefix`access (
  user_id int(10) unsigned NOT NULL default '0',
  request varchar(100) default NULL,
  ident varchar(200) NOT NULL default '',
  logged int(10) unsigned NOT NULL default '0'
) TYPE=HEAP;

2.  Modify the file includes/functions.php:

Find the following (~line 164):

    // Delete entries older than timeout_online seconds and any duplicates (start transaction)
    $db->query('DELETE FROM '.$db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online']).' OR ident=\''.addslashes($cookie['username']).'\' OR ident=\''.get_remote_address().'\'', PUN_TRANS_START) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error());

    // Add a new entry. username and user_id if logged in; ip and user_id=0 if not (end transaction)
    $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(\''.$user_id.'\', \''.$ident.'\', '.$now.')', PUN_TRANS_END) or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

Add after:

    // Update Access Log
    $daylength = 86400;
    $db->query('DELETE FROM '.$db->prefix.'access WHERE logged<'.($now-$daylength), PUN_TRANS_START) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error());
    $db->query('INSERT INTO '.$db->prefix.'access (user_id, ident, logged, request) VALUES(\''.$user_id.'\', \''.$ident.'\', '.$now.', \''.$_SERVER['REQUEST_URI'].'\')', PUN_TRANS_END) or error('Unable to insert into access list', __FILE__, __LINE__, $db->error());

3.  Drop the file access.php into your punbb directory.  Download it here


That's it!  To use it, just hit access.php and it will give you a listing of members and guests accesses in 15 minute intervals.  The 2nd table at the bottom also shows the last 100 actions performed by people.  Only 24 hours worth of data is retained in the tables.

The access.php code is pretty ugly at the moment (it does about 96 separate db queries for each 15 minute interval in the last 24 hours.  I'm sure someone could revise it down to just 1 query if they wanted to...

Please let me know if you have any suggestions / comments.

30

(99 replies, posted in Programming)

I've used these, and they seem pretty good:

1stPage 2000 from Evrsoft
AceHTML Freeware

Both have multiple tabs, syntax highlighting, spell checking, html tidy, validation tools, colour pickers and stuff like that.  Some limited project mgt functions as well, and sample script libraries.

31

(254 replies, posted in PunBB 1.2 discussion)

Oh crap... now comes the fun job of porting all my "mods" to 1.2... big_smile

Hm.. interesting - I've never seen photostack before, but it looks pretty neat.

Anyway, I was looking for a really simple script with minimal setup, fuss and configuration.  That's what fotopholder was - just ONE script which you drop into a directory of images and voila! smile

I like it because it does thumbnail generation on the fly and doesn't store any data files etc. (well it does have a thumbnail cache, but can be disabled)

33

(32 replies, posted in General discussion)

Name? Julian Tan
Where do you live?  Melbourne, Australia
Interests? Photography, geeky computer stuff
What do you do for a living? IT consultant, although I would rather be running my digital photography site (http://www.shuttertalk.com) full time.

34

(11 replies, posted in General discussion)

My favourite is actually "Aliens"... smile

Hi all,

If you're using this script, I found a beautiful little script which you can drop into the image directory, and it'll let you browse the images.  Just change the title in the script.

I've modified it slightly so that (1) it has paging (2) displays images in descending date order.

http://www.shuttertalk.com/fotopholder.zip

Demo here: http://www.shuttertalk.com/forums/image … /index.php

Hi guys, thanks for the compliments.  You can download my active topics mod version and recent topics here:
http://www.shuttertalk.com/at.zip

To include them, I use the following lines in index.php

echo '<table class="punspacer" cellspacing="1" cellpadding="4"><tr><td> </td></tr></table>';
echo '<table border="0">';
echo '<tr><td width="50%" valign="top">';
include('mod_recent_topics.php');
echo '</td><td width="50%" valign="top">';
include('mod_active_topics.php');
echo '</td></tr></table>';

Love the mod... however, can someone check whether it updates the num_replies on the topics table correctly?  I've had issues (using a old version perhaps) that doesn't, which stuffs up the paging....

Oh cool! smile

I'm getting this error though:

An error was encountered
Error: Unable to fetch group info.

I don't think there's a table called "groups" in the standard install...

39

(7 replies, posted in Feature requests)

I'm thinking possible features to implement could be --

* graphing (my gd/imagemagick skills aren't up to scratch though... maybe someone could help?)

* configurable periods etc.

* summary stats (e.g. top users, number of posts/viewtopics/searches etc.)

40

(7 replies, posted in Feature requests)

Ok cool... I got something rudimentary working in the form of tracking accesses to the forums.

http://www.shuttertalk.com/forums/access.php

It shows who's accessing the forums (users and guests) in 15 min intervals for the last 24 hours.  I can now tell how many of my guests/members actually visit and correlate that to who actually posts.  Whoa, lurkers galore! smile

Anyway, please let me know what you think!

41

(7 replies, posted in Feature requests)

Awesome!  Thanks! smile

42

(7 replies, posted in Feature requests)

I notice that there is an "online" table which stores the users/guests currently online.

Could you tell me which part of the code this table gets populated / cleaned up from?

I could probably modify the code there to log to a file...

43

(7 replies, posted in Feature requests)

Sure, but you don't necessarily know which IP address/host corresponds to which user...

It would be easier to implement an access log via punbb methinks...

44

(7 replies, posted in Feature requests)

Just wondering whether punbb natively logs accesses by forum members somewhere?  Just would like to find out how frequently people check in throughout the day...

I know there's the who's online list at the bottom, but that's only for a particular moment in time.

TIA
Jules

45

(11 replies, posted in PunBB 1.2 discussion)

Hi Maverick, my "mod only accepts image types.  Try it out on shuttertalk.com (register first though).

Cheers,
Jules

Glad you like it smile

Gizzmo wrote:

i thought that if the "posted" timestamp was made in that server timezone why do i have to change it if its bein pulled into the page in the same timezone. all you realy have to do is change time showed,acording to your timezone. so i think it will work fine, if anyone has things to say about this bug than tell me.

hm... it's all very confusing i know.  the posted timestamp is a unix epoch timestamp, which disregards server time or timezones.  it doesn't matter what timezone it is being posted in - if it is posted now, then the timestamp will always be the same.

I see a few places where the timezone diff needs to be applied:
- db queries to return records (because you want to return records relevant to the user's timezone
- in the array where you determine which day the posts fall in
- when you determine what date it currently is


What sort of errors were you getting , by the way?

Oh oops... I don't think anything changed in view... just the header and calendar.php

I must say that you've done an excellent job, Gizzmo, by the way.  All that date logic just confuses me completely! smile

Actually I downloaded 0.7, and it seems there are some bugs still...

in the header.php - the nextday and lastday at the bottom is buggered (explains why i was seeing problems with the first and last days of the month) - also switch the order around, so that you test day before month.

In calendar.php you need to add +diff in a couple of places to take into account timezone I believe...

I've uploaded some diff files and the changed files if you want them:
http://www.shuttertalk.com/gizzmo.zip

I hope it's fixed things... could people from different timezones please test out on my site: http://www.shuttertalk.com/forums/calendar.php to see if things are ok?