Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I will integrate Date module to SimpleAds module, but it's not going to be as a dependency. Meaning that you will have to install Date module before you install SimpleAds. Currently it's more easier to set Active/End dates by typing words "now" and expire, say "+1 week".
I can confirm that deleting and recreating the fields as Date data type is working well.
I think it will be fine to do this automatically if the user has the Date module activated at Simple Ad installation. The Date module is "standard" for drupal and gives you a lot of improvements than the simple textfield.
Using the date module would also fix the time/date handling, which is now not localised. I have to use mm/dd/yyyy hh:mm am/pm while my local format is dd/mm/yyyy hh:mm (24hr format).
I like the idea of using "+4 months" though, so a choice is probably the best way to go.
What's bugging me is when I want to use Views for showing active and current Simple Ads, it won't work. The problem is, if I have SimpleAd node, I can check "active" and set End date. But there is no use for setting the latter, cause I can't compare this field with "now" date in Views.
What's sad is that changing Text to Long Text field was achieveable, and changing date field to "normal" timestamp filed isn't :/
Comments
Comment #1
minnur CreditAttribution: minnur commentedI will integrate Date module to SimpleAds module, but it's not going to be as a dependency. Meaning that you will have to install Date module before you install SimpleAds. Currently it's more easier to set Active/End dates by typing words "now" and expire, say "+1 week".
Comment #2
dgastudio CreditAttribution: dgastudio commentedi'm agree with minnur. it's more easier manually set date.
but for datepicker integration, maybe it's better use http://jqueryui.com/demos/datepicker/#icon-trigger instead of Date module?
Comment #3
minnur CreditAttribution: minnur commented@xlyz, I haven't tried but I assume if you delete field_ad_start and filed_ad_end and recreate them as date fields, SimpleAds should still work.
Comment #4
minnur CreditAttribution: minnur commentedComment #5
minnur CreditAttribution: minnur commentedComment #6
eidoscomI can confirm that deleting and recreating the fields as Date data type is working well.
I think it will be fine to do this automatically if the user has the Date module activated at Simple Ad installation. The Date module is "standard" for drupal and gives you a lot of improvements than the simple textfield.
Anyway, thanks for the "God" module ;)
Comment #7
Dries ArnoldsUsing the date module would also fix the time/date handling, which is now not localised. I have to use mm/dd/yyyy hh:mm am/pm while my local format is dd/mm/yyyy hh:mm (24hr format).
I like the idea of using "+4 months" though, so a choice is probably the best way to go.
Comment #8
minnur CreditAttribution: minnur commentedCurrently I am working on a new version of Simpleads that uses Date field.
Comment #9
crystaldawn CreditAttribution: crystaldawn commentedWhat is the status of this? I'm really disappointed that "Text" was used for the datefield because I cant do something as simple as this:
Comment #10
tomrogHere is another possible duplicate of this issue:
https://www.drupal.org/node/2539650
What's bugging me is when I want to use Views for showing active and current Simple Ads, it won't work. The problem is, if I have SimpleAd node, I can check "active" and set End date. But there is no use for setting the latter, cause I can't compare this field with "now" date in Views.
What's sad is that changing Text to Long Text field was achieveable, and changing date field to "normal" timestamp filed isn't :/
Comment #11
levmyshkinAfter you replaced text fields with date fields, you need to remove changing date format in simpleads_node_presave():
Comment #12
minnur CreditAttribution: minnur as a volunteer commented