1 (edited by elbekko 2008-02-03 17:51)

Topic: [extension release] Easy Profile Fields v2.0

My first extension for 1.3 smile
Required some swearing, but I have a feeling it turned out fine.

Feel free to comment ^^

Download: http://www.punres.org/files.php?pid=255

EDIT: I'm specifically wondering about how well it works with pgSQL and SQLite.

Re: [extension release] Easy Profile Fields v2.0

Very nice...

Where is it?

Re: [extension release] Easy Profile Fields v2.0

Oh crap, the link tongue
Knew I forgot something.

Edited first post.

4

Re: [extension release] Easy Profile Fields v2.0

It seems you've got some typos in the install- and uninstall-source in the manifest.xml.
The table_exists() calls in install use the prefix "efp_", the create-statements then uses the prefix "epf_".
In uninstall it's always "efp_".

Re: [extension release] Easy Profile Fields v2.0

Indeed.

Released a new version (v2.0.1) which fixes those few typos, a few incompatibilities in the table creation, and also moves all files into the extension folder, which is apparently the recommended way to do things.

Re: [extension release] Easy Profile Fields v2.0

I got the following errors:

Notice: Undefined variable: base_url in C:\AppServ\www\punbb_1.3\include\common_admin.php(89) : eval()'d code on line 4

Warning: require(../lang/English/epf.php) [function.require]: failed to open stream: No such file or directory in C:\AppServ\www\punbb_1.3\include\common_admin.php(89) : eval()'d code on line 6

Fatal error: require() [function.require]: Failed opening required '../lang/English/epf.php' (include_path='.;C:\php5\pear') in C:\AppServ\www\punbb_1.3\include\common_admin.php(89) : eval()'d code on line 6

I also posted this on Punres.

Re: [extension release] Easy Profile Fields v2.0

Update to latest SVN?

Re: [extension release] Easy Profile Fields v2.0

I looked in my database and he did not install epf.entries :s

i will take a look at the latest SVN

Re: [extension release] Easy Profile Fields v2.0

That could be due to a typo I made in manifest.xml. I reuploaded it (didn't boost the version... 3 characters is hardly worth that IMO).

Re: [extension release] Easy Profile Fields v2.0

Warning: Unknown(../lang/English/epf.php): failed to open stream: No such file or directory in /homepages/40/d174088604/htdocs/hang/include/common_admin.php(90) : eval()'d code on line 6

Fatal error: (null)() [function.require]: Failed opening required '../lang/English/epf.php' (include_path='.:/usr/local/lib/php') in /homepages/40/d174088604/htdocs/hang/include/common_admin.php(90) : eval()'d code on line 6

Fresh from the svn install.

~James
FluxBB - Less is more

Re: [extension release] Easy Profile Fields v2.0

Oops, a path I forgot to convert.

Seriously, someone slap me tongue

Re: [extension release] Easy Profile Fields v2.0

v2.0.2 uploaded smile

Re: [extension release] Easy Profile Fields v2.0

Looks nice, + rep on how your trying smile

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

Re: [extension release] Easy Profile Fields v2.0

@elbekko
Will speak to you on MSN this evening.

Tried to put this on pundemo and it just makes admin pages crash. If it works for others im guessing maybe a confliction with another extension. hmm

Re: [extension release] Easy Profile Fields v2.0

when updating my signature I get this:

Notice: Undefined index: form in C:\AppServ\www\punbb_1.3\profile.php(1096) : eval()'d code on line 16

Warning: Invalid argument supplied for foreach() in C:\AppServ\www\punbb_1.3\profile.php(1096) : eval()'d code on line 16

I know it must be this extensions because I disabled the rest smile

Re: [extension release] Easy Profile Fields v2.0

Should be fixed in 2.0.3.

17

Re: [extension release] Easy Profile Fields v2.0

Users' EPF are not automatically changed whenever any value added/edited sad

Re: [extension release] Easy Profile Fields v2.0

That's an odd bug. Have you tried deleting cache_epf.php in the cache directory?

Re: [extension release] Easy Profile Fields v2.0

elbekko
Could you please add ability to show/hide fields in user info (in topic view)

It seems to me, I found a bug. If I use a checkbox and set flag on, I can't turn it then off. It happens because browser (FF 2.0.0.14) doesn't send field name, which is unflagged. And your script changes only fields, whose names it gets (in $_POST['form']['epf#'])


I saw this misprint:

return htmlspecialchars(($value == '1') ? $lang_epf['Yes'] : $lang_epf['Yes']);

Here:

$fid = round(str_replace('epf', '', $fid));

I think you should use intval function or regular expressions.

Re: [extension release] Easy Profile Fields v2.0

That first bit of code looks like a bug indeed. It should be

return htmlspecialchars(($value == '1') ? $lang_epf['Yes'] : $lang_epf['No']);

The second line works as it should, I don't see why it should be changed. Round() allows for larger numbers, not that it'll ever be needed, but it's there.

21 (edited by Boron1987 2008-11-30 21:44)

Re: [extension release] Easy Profile Fields v2.0

Hello, elbekko!

When I try to install your extension, I have this problem:

Notice: Undefined variable: db in /home/xxx/domains/xxx.xx/public_html/forum/admin/extensions.php(176) : eval()'d code on line 3

Fatal error: Call to a member function table_exists() on a non-object in /home/xxx/domains/xxx.xx/public_html/forum/admin/extensions.php(176) : eval()'d code on line 3

Can you help me resolve this problem?

Extension version: v2.0.3
PunBB version: 1.3.1

P.S. Thank you for attention! smile

Re: [extension release] Easy Profile Fields v2.0

Hi,
Same error as Boron1987 for the same version of punBB.
I'd really like this extension to customize the users fields. Could it be possible to have a fix ?
Thanks in advance !

Re: [extension release] Easy Profile Fields v2.0

Notice: Undefined variable: db in /admin/extensions.php(176) : eval()'d code on line 3

Fatal error: Call to a member function table_exists() on a non-object in /admin/extensions.php(176) : eval()'d code on line 3

+1

24

Re: [extension release] Easy Profile Fields v2.0

I strongly suggest you use the forum's query builder. That way, you don't have to worry about different database types.

Here's your install and uninstall part of your manifest.xml transformed to work with the query builder.

You should transform the rest of your queries, too.

Help: http://fluxbb.org/wiki/developing_extensions#databases

Re: [extension release] Easy Profile Fields v2.0

No news on this extension ? I'd really like to add custom fields...

I tried to modify the last version to fit with the 1.3.3 punbb release, but there is too much differences everywhere (DB table names, variables fields, hooks names...). Sadly I don't have the time and enough knownledge of the punbb code enough to finish it...