Jump to content

hunterchristy

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hunterchristy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so here's what i've got right now. and it's not working. i'm doing this in views in drupal, and i have "field_releasedate_value_1" spitting out a unix string. and i can, for instance, say "print $release" and it will print said string. AND i can print $today and get a string. BUT trying to print $unix isnt working, nor is trying to compare the two. <?php $today = date(U); $release = $fields['field_releasedate_value_1']->content; $unix = date("U", strtotime($release)); $soon = 'COMING SOON!'; $space = ' '; if ($unix > $today) { print $space; print $soon; } else { print $space; } ?> can someone kick me in the right direction?
  2. ahhh. you're correct, i should have been more specific. technically, i want the SITE's date. this is for a drupal site and after a bunch of searching and searching and searching, i found they specify this: 'tz_handling' => 'site' for the site's date. i'm still working on it. once i THINK i'm onto something, i'll post my noob code for ya'll to have a chuckle at.
  3. so i'm working on a band website. they have a discography page. for each album, they input a release date. they have a new record coming out in a few months. it got me thinking, that if i could compare the local date to the user input date, before it comes out, i could print "coming soon," until it comes out, and then "out now!" for a period of a few weeks after the release. i have a very basic understanding of how this would work, but i can't figure out how to call the local date. does anyone know?
  4. i'm using drupal views to create a grid view of photos (a gallery). the max number of columns is 4, the max rows is 2. so essentially, i have 8 photos total, 4 on each row. i've got it styled to fit the confined space in the div layer. but, for example, when there are less than 4 photos, the php only generates 1 row, with that number of columns. i'm thinking if i can set up a "if the number of rows is less than 2, still set up that second row" and "if the number of columns is less than 4, still set up those extra columns" argument, it will display as if place-holder images are there, right? any help would be greatly appreciated!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.