Skip to:
Content
Pages
Categories
Search
Top
Bottom

time traveling should not be encouraged

  • @mtlkstn

    Member

    is there any way to only make certain years to appear, lets say from 1970 – 1999.
    http://i.imgur.com/zi9lf.jpg

    i don’t want time travelers in my site, you know…just to be safe.

    thanks guys! looking forward to a solution.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @djpaul

    Keymaster

    Heh. :p

    @mtlkstn

    Member

    is there any way to customize the date selector?
    come on Paul! (heh)

    @mtlkstn

    Member

    anyoonnnneeeeee….?

    @mattjh

    Member

    I’d be interested in a fix for this as well.

    @chouf1

    Participant

    Hello,

    the values you haveto tweak are hardcoded in bp-xprofile/bp-xprofile-template.php:639
    `for ( $i = 2037; $i > 1901; $i– ) {`
    Change 2037 and 1901 to what you want
    Note: defaut start year is 1901 + 1 year = 1902 in the output.

    @mtlkstn

    Member

    You, Sir, are a gentlemen and a scholar.

    it works, thank you!

    @rogercoathup

    Participant

    You’ll lose your amendments as soon as you upgrade BuddyPress – it’s not a good practice to be hacking core files.

    The safest way to address this one, would be to add a filter on: bp_get_the_profile_field_datebox

    In there, you’d have to do a bit of PHP string manipulation – replacing the option value parts for year in the HTML string, with the range that you want.

    It’s not straightforward, but it’ll work through a core upgrade.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘time traveling should not be encouraged’ is closed to new replies.
Skip to toolbar