Need help!! I seem stuck in many basic stuff

Events happening in the community are now at Drupal community events on www.drupal.org.
foodbo's picture

Hi there everyone,

Durpal does not seem to have a easy way to tune the basic stuff....

currently i am trying to:

  1. list all the countries from a drop down list, then list all the cities in another drop down list that based on the selected country.

  2. User search function (search by age)

  3. set the max / min number of chars for user name [found some work around solutions]

More details of what i am trying to do - http://groups.drupal.org/node/25393

Comments

I think the answer to your

dalin's picture

I think the answer to your questions is generally "contrib modules". The things that you describe are not things that every website will need, hence they're not in Drupal core.

  1. Actually this one is in core, see here:
    http://drupal.org/node/189995#comment-752597

  2. I assume that you are using the profile module in core? You have 2 options. Either install a contrib module that allows searching profile fields:
    http://drupal.org/project/profileplus
    Or switch to content profile that stores user profiles as nodes:
    http://drupal.org/project/content_profile
    With which you can then use CCK and all the wonderfulness that it brings:
    http://drupal.org/project/cck

  3. Can't figure out what you are trying to do. Sounds like you might want more complex profiles than what the core profile module provides. In that case, see the Content Profile and CCK modules, and Hierarchical Select:
    http://drupal.org/project/hierarchical_select

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Darn Markdown re-wrote my

dalin's picture

Darn Markdown re-wrote my numbers in order. Read the post above as 3. 2. 1. and not 1. 2. 3.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

thx dalin

foodbo's picture

Well, I did not want to copy and paste all the detail info from other forums, so wasn't too clear.

I have tried the “hierarchical select” module, it is not quite ready for drupal 6 yet, well at least it is not working with the “view” module properly, nor “content taxonomy field”, they have some patches but not quite ready for production I guess. So HS doesn't work well with CCK and Content profile in this case.

About the search function, I use View's exposed filter, I can search for most of the stuff, but how can you search for age? How do u store the age? As it changes every year? so far I don't store the age, just computes the age from the DateOfBirth when the profile load. Guess you can write your own query to convert the age into the date range, so how can u do that in view's exposed filter???

Yeah, the access rule is in the core but don't you think it is a bit user-unfriendly?? for example, to set the user name must be between 3-20 chars? Without import or export? Guess most of the websites must have some kind of retraction for user name??

e.g.
deny %
allow ___ (3)
allow ____
allow _____
allow ______
…..........
allow ____________________ (20)

Haven't tried this

rgucci's picture

but from Dave's link above, shouldn't this work as well?

deny username %____________________
deny username _
deny username __

1st rule denies over 20 chars, 2nd rule denies 1 char, 3rd rule denies 2 chars?

Russell JVM Gutierrez
Manager, Hong Kong Projects
flippingNORMALS
Web | Social Media | Mobile

Russell JVM Gutierrez

For Age you can use computed

dalin's picture

For Age you can use computed field:
http://drupal.org/project/computed_field

Sure max/min username length could be a lot easier. If there isn't already a module out there you could write one up with about 10 lines of code. But generally the fewer modules that you use the better. This technique uses a generalized tool that's already in core to get the results.

Why do you want to use Content Taxonomy Field with Hierarchical Select? (I never had much luck with Content Taxonomy Field). Wouldn't Hierarchical Select be all you need?

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

DrupalHK

Group categories

HKDUG Vocabulary

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: