Results 1 to 9 of 9

Does anyone know the if condition code for showing birthdays between xx-xx-xxxx to xx-xx-xxx?

This is a discussion on Does anyone know the if condition code for showing birthdays between xx-xx-xxxx to xx-xx-xxx? within the General Discussion forums, part of the vBulletin SEO Discussion category; Hi vbseo , I need help with finding the if condition codes for showing birthdays between xx-xxx-xxxx to xx-xx-xxxx. I ...

  1. #1
    Senior Member profanitytalker's Avatar
    Real Name
    profanitytalker
    Join Date
    Sep 2007
    Posts
    113
    Liked
    1 times

    Does anyone know the if condition code for showing birthdays between xx-xx-xxxx to xx-xx-xxx?

    Hi vbseo,

    I need help with finding the if condition codes for showing birthdays between xx-xxx-xxxx to xx-xx-xxxx.

    I found these...

    PHP Code:
    <if condition="$bbuserinfo['birthday_search'] > '1980-01-01'">Too Young</if> 
    PHP Code:
    <if condition="$bbuserinfo['birthday_search'] < '1980-01-01'">Too Young</if> 
    It's close but not exactly what I'm looking for. I need one that ranges from "x date to x date." Does anyone know the code for this? Your help would be much appreciated.

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You can combine them to make an AND statement.

    PHP Code:
    <if condition="($bbuserinfo['birthday_search'] > '1980-01-01') AND ($bbuserinfo['birthday_search'] < '1990-01-01')">b-day is within 10 years allowed</if> 

  3. #3
    Senior Member profanitytalker's Avatar
    Real Name
    profanitytalker
    Join Date
    Sep 2007
    Posts
    113
    Liked
    1 times
    Thank you so much Brian! Much appreciated!

  4. #4
    Senior Member profanitytalker's Avatar
    Real Name
    profanitytalker
    Join Date
    Sep 2007
    Posts
    113
    Liked
    1 times
    Hey Brian,

    Can you help me code this...

    Code:
    <if condition="($bbuserinfo['birthday_search'] > '1946-01-01') AND ($bbuserinfo['birthday_search'] < '1964-01-01')">Baby Boomer</if>  
    
    <if condition="($bbuserinfo['birthday_search'] > '1965-01-01') AND ($bbuserinfo['birthday_search'] < '1976-01-01')">Generation X</if>  
    
    <if condition="($bbuserinfo['birthday_search'] > '1977-01-01') AND ($bbuserinfo['birthday_search'] < '1994-01-01')">Generation Y</if>

    How do I make it so that if their birthday is between those dates, it will show what generation they are and to everyone not just for the people between the given dates? I'm trying to add it to the postbit.

  5. #5
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You need to nest them in an un-pretty fashion

    Code:
    <if condition="($bbuserinfo['birthday_search'] > '1946-01-01') AND ($bbuserinfo['birthday_search'] < '1964-01-01')">Baby Boomer
    <else />
        <if condition="($bbuserinfo['birthday_search'] > '1965-01-01') AND ($bbuserinfo['birthday_search'] < '1976-01-01')">Generation X
        <else />
            <if condition="($bbuserinfo['birthday_search'] > '1977-01-01') AND ($bbuserinfo['birthday_search'] < '1994-01-01')">Generation Y
            <else />
            <!-- no gen -->
            </if>
        </if>
    </if>

  6. #6
    Senior Member profanitytalker's Avatar
    Real Name
    profanitytalker
    Join Date
    Sep 2007
    Posts
    113
    Liked
    1 times
    Thank you Brian for the reply.

    Though, not quite what I was looking for. I'm trying to make it so that it would show what generation they are to everyone in the forums. For instance, if one of the members is born 01-01-1946, it would show that they are a baby boomer in their postbit profile to everyone. Is this impossible to code?

  7. #7
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    bbuserinfo is the wrong variable. That is the Viewer's (current session) info. Try switching to post instead, as the $post array is what holds all the postbit info. I'm not sure if the birthday info is pulled there or not. You may need to code a plugin to add that field to the sql query.

  8. #8
    Senior Member profanitytalker's Avatar
    Real Name
    profanitytalker
    Join Date
    Sep 2007
    Posts
    113
    Liked
    1 times
    Yay!! Thank you so much Brian! It worked!!

    Check it out....

    [BabyBoomers] Boomers need to apologize to the world.

    Your help is truly appreciated!

  9. #9
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Cool

Similar Threads

  1. Replies: 1
    Last Post: 05-05-2010, 10:38 PM
  2. Page Titles showing html code
    By pcam in forum Troubleshooting
    Replies: 5
    Last Post: 12-21-2009, 10:11 AM
  3. Change /xxxx/index.php to /xxxx
    By Arkidas in forum URL Rewrite Settings
    Replies: 6
    Last Post: 10-08-2008, 12:16 AM
  4. Weird Code Showing???
    By LinkHunter in forum Bug Reporting
    Replies: 9
    Last Post: 03-11-2008, 02:31 AM
  5. Add rel=nofollow as option for birthdays
    By Lian in forum vBSEO Features Archive
    Replies: 3
    Last Post: 07-31-2006, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •