Gossamer Forum
Home : Products : Others : Gossamer Community :

Community.pm bug (when using multivalue fields)

Quote Reply
Community.pm bug (when using multivalue fields)
When tags are displayed after login, all user related tags are available in plain format used. E.g. <%prof_gender%> It will display 0 or 1 instead of Male or Female.
It's got directly from database, instead to have first modified based on comm_users.def file data and form_values...

In Community::comm_auth_userpass function there is following code:
Quote:
my $user_rec = $DB->table('comm_users')->select( { comm_username => $username } )->fetchrow_hashref;
This is fine, but the input data should be modified based on comm_users.def file...

Alex, BTW: please allow not just the prof_* fields (modify based on comm_users.def file), but all, which has multi select values, like SELECT, RADIO, CHECKBOX, etc...
This would allow developers for example to create more sections on profile page, not just the profile section.
That's how I solved currently a hack on community.cgi... and I would like to be able to modify this hack into plugin, later when hooks will be available.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Feb 5, 2003, 6:02 PM
Quote Reply
Re: [webmaster33] Community.pm bug (when using multivalue fields) In reply to
Was there any success on this problem? I am trying to make a multi-select, but its just coming up as a normal dropdown :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Community.pm bug (when using multivalue fields) In reply to
I did not work with GCommunity since a long time, so I don't know if it was corrected in 1.0 or 1.0.1 version. As I remember I solved this problem by hacking the GComm code.

Soon I will work again with GCommunity in a custom plugin for GComm, so likely I will face this problem again.
Currently I have no time to check what solution I used earlier, but later (when I will start working on the plugin), I will post some info about my earlier used solution.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [Andy] Community.pm bug (when using multivalue fields) In reply to
I believe this was a bug that was fixed in 1.0.1 and was related to how not all the def data was not being passed to GT::SQL::Display::HTML. It should be working now and if it isn't, let me know.
Quote Reply
Re: [Aki] Community.pm bug (when using multivalue fields) In reply to
Thanks for the reply. I'm using 1.0.1 currently.

If you need access, please let me know (be warned I have modified a couple ofbits of code, to get it to work).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Community.pm bug (when using multivalue fields) In reply to
Hi Andy,

Thanks, you've found a bug. I need speak with Alex to find out what is best fixed but until then, I believe this quick update may hold you over.

Edit community/private/libs/GT/SQL/Display/HTML.pm and add the following bolded three lines to sub select.

Code:
$mult = qq!MULTIPLE SIZE="$self->{cols}->{$clean_name}->{form_size}"!;
}
elsif ($opts->{def}{form_type} eq 'MULTIPLE' and $opts->{def}{form_size}) {
$mult = qq!MULTIPLE SIZE="$opts->{def}{form_size}"!;
}

elsif (exists $opts->{multiple} and $opts->{multiple} > 1) {
$mult = qq!MULTIPLE SIZE="$opts->{multiple}"!;
}
elsif (exists $self->{cols}->{$clean_name} and $self->{cols}->{$clean_name}->{form_size}) {
$mult = qq!SIZE="$self->{cols}->{$clean_name}->{form_size}"!;
}

Cheers,
Aki