PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-06-23 10:17:31

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Elektra Profile with Labels 1.0.1

Code:

##
##
##        Mod title:  Elektra Profile with Labels
##
##      Mod version:  1.0.1
##   Works on PunBB:  1.2.15
##     Release date:  2007-06-23
##           Author:  artoodetoo <master@1wd.ru>
##
##      Description:  This mod add new fields into user profile.
##                    There are 'gender', 'date of birth', 'interests' and 'about me'.
##                    Optionally user can hide year of birth, then nobody can know his|hir age.
##                    Users can declare their interests in comma-separated list.
##                    Anybody can quick search all users with the same interest.
##                    Furthermore, there is a new item in user profile menu: Preview.
##                    So, user can view his own profile as another users.
## 
##  --------------------------------
## 
##  This release fixes:
## 
##   - Firefox difficulties
##   - CSS validation
##   - support for PunBB 1.2.15
##

Download here

Offline

 

#2 2007-06-23 19:27:18

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

I've re-upload zip. There was some minor W3C validation isues. Now all right smile
Live test in http://master.1wd.ru/fileup101/
login as demo/demo

Last edited by artoodetoo (2007-06-23 19:55:54)

Offline

 

#3 2007-06-23 20:42:09

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Profile with Labels 1.0.1

It works perfectly now. totally awesome job you did here. big_smile

Offline

 

#4 2007-06-23 21:02:51

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Profile with Labels 1.0.1

There must be a bug with this mod. If I try to save my D.O.B which is 15 June 1967 it does not save it. It will save any other D.O.B I enter.

Edit: Actually, it does not save any year in the 60's. hmm...Maybe I am too old. big_smile

Last edited by crusader (2007-06-23 21:05:06)

Offline

 

#5 2007-06-24 05:42:19

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

smile you have happy birthday recently!

i know why!!! bithday (and any ohter date) in punbb stored as integer UNIXTIME. but "age of unix" started at 1970-01-01

... how about negative values? i have to test it...

EDIT:
http://master.1wd.ru/fileup101/profile. … 3&view
i see "Birthday: 1967-06-15"
so, 1960s stored well. where you have problems? may be it is mysql/php version dependent?

Last edited by artoodetoo (2007-06-24 05:51:30)

Offline

 

#6 2007-06-24 12:30:08

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Profile with Labels 1.0.1

I think you're right. It maybe my version of PHP which is version 4.3.1 and mySQL is version 3.23.49

btw: How did you get that image in the "About Me" area?

Last edited by crusader (2007-06-24 12:39:19)

Offline

 

#7 2007-06-24 21:33:06

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

How did you get that image in the "About Me" area?

you can use [ img ] tag in about me. you have to set "Image tag in signatures" on in Admin / Permissions

(really i use my custom ::thumb:: tag but [ img ] will work fine)

Offline

 

#8 2007-06-24 22:39:01

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Profile with Labels 1.0.1

I know the img tag will work (lol) but I was just curious about the mod you might have used to display it.

Offline

 

#9 2007-06-25 03:39:54

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

It's enough to have Elektra Profile to put photo into profile smile 

( By chance, I'm writing some File Upload mod. The link above is the testbed for it.
Custom tag ::thumb##:: is a part of F.U. Click on small picture to show  fullsize version.
again: http://master.1wd.ru/fileup101/profile. … 3&view )

Offline

 

#10 2007-07-04 19:42:53

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

http://ru2.php.net/manual/en/function.date.php

The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).

THAT IS WHY CRUSADER CANNOT VIEW 1960s SOMEWHERE (on Windows)

Code:

        $birthday = date($date_format, $user['birthday']);

I need substitution for date() function. May be somone will write it?

Offline

 

#11 2007-07-04 20:20:16

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Profile with Labels 1.0.1

quick fix of pure date function:

in readme.txt (or in modified profile.php) find

Code:

    if (!empty($user['birthday']))
    {
        $date_format = $pun_config['o_date_format'];
        if (!empty($user['hide_age'])) $date_format = trim(eregi_replace('[ \./-]?y+[ \./-]?', '', $date_format));
        $birthday = date($date_format, $user['birthday']);
    }
    else
        $birthday = $lang_profile['Unknown'];

replace with

Code:

    if (!empty($user['birthday']))
    {
        $arr = getdate($user['birthday']);
        $birthday = $arr['mday'] . '-' . substr($lang_profile['Birthday months'][$arr['mon']], 0, 3);
        if (empty($user['hide_age'])) 
            $birthday .= '-' . $arr['year'];
    }
    else
        $birthday = $lang_profile['Unknown'];

this will out birthday like
        15-Jun
or
        15-Jun-1967

Offline

 

#12 2007-09-13 15:42:27

tfd
Member
Registered: 2007-09-13
Posts: 10

Re: Elektra Profile with Labels 1.0.1

Thanks, awesome mod!


You know what would be really cool? If you could embed youtube videos etc in the same area as the pics. I renamed the "about me" to "my pics" so people will put all their pics and game pictures up (its sports site). Now if we could embed youtube, myspace etc videos and the songplayers like on myspace it would really give the posters something to fiddle around with, just like my space! they could easily change all  their videos and music

Last edited by tfd (2007-09-13 16:43:25)

Offline

 

#13 2008-09-06 20:11:51

Juvenaly
New member
Registered: 2008-09-05
Posts: 3

Re: Elektra Profile with Labels 1.0.1

I am not sure why and I am not sure if maybe there was something I did wrong, but I have added this mod to my forum and no matter what I do it does not save the info for me. Any ideas why?

Offline

 

#14 2008-09-07 07:01:50

poellche
Member
From: Germany
Registered: 2008-07-26
Posts: 18
Website

Re: Elektra Profile with Labels 1.0.1

Hi Juvenaly,

have you checked if the required fields are in the database scheme? Your description sounds like they are missing.
I guess there`s an install_mod.php which should be run to install the additional fields.

Greetings poellche

Offline

 

#15 2008-09-09 06:26:51

Juvenaly
New member
Registered: 2008-09-05
Posts: 3

Re: Elektra Profile with Labels 1.0.1

Poellche,

Thank you for your reply. It seems there were little bits of code that I attempted ot change by hand and missed a few feilds. Thanks again. I got it all figured out. smile

Juvenaly

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.