Search the Community
Showing results for tags 'published'.
Found 5 results
Lister Native Date Format
Robin S posted a topic in Modules/PluginsLister Native Date Format Allows the date format for "created", "modified" and "published" columns to be set within a Lister or Lister Pro instance. Why? Lister formats the "created", "modified" and "published" columns as relative time strings and doesn't provide an easy way to change this without writing code. Sometimes a value like "3 weeks ago" is not precise enough and you want to see an exact date/time in these columns, perhaps only temporarily before switching back to a relative date. Details An icon is added near the top right of the Lister that reveals a dropdown where you can select from a list date formats that you define in the module config. The Lister will remember your chosen date format the next time you visit the Lister. If you have Lister Pro installed then each Lister Pro instance will remember the date format previously set for that instance. Configuration In the "Date options" field in the module config, enter a list of date formats that are compatible with wireDate(), one format per line. The default date format used by Lister is "rel". You can also set a default date format for native fields which will apply to all Listers that haven't yet had a date format chosen from the dropdown. https://github.com/Toutouwai/ListerNativeDateFormat https://processwire.com/modules/lister-native-date-format/
Set published date
Martin Muzatko posted a topic in API & TemplatesHello! I searched a lot to find various solutions to the problem of setting a custom publish date. Which is a must if you do a redesign of a website and need to write import scripts. Since I can't re-use the database. I understand that there is no field to set the dates for created/modified/published manually, but this should be at least possible with the page API. So I tried to set the published date via API: $page->of(false); $page->published = 1486297829; $page->save(); Which did not work, whenever I ask for $page->published, I get the date back that was first set when publishing the page. So I researched a little more and found that the Page class stores the published date in $page->settings['settings']; (see Github) I also tried $page->set('published', 1486297829); but with no success. Is it possible that this has to be done via SQL? Why? Why can't I use the API? Or do I miss anything? Thank you a lot in advance!
Default Page Status created from API
Mirza posted a topic in API & TemplatesHi All, I have created a script which will create the pages and it should be unpublished. I have added the status as unpublished by default while first time saving the page as below. $hotelPage->hotel_website = $hotel['hotelWebsite']; // By default page created will be unpublished state $hotelPage->addStatus(Page::statusUnpublished); $hotelPage->save(); $hotelPage->setOutputFormatting(false); // Add hotel images only after setting output formatting to false $hotelPage->images->add($hotel['hotelImage']); $hotelPage->save(); On the same time, saving the hotel image as well and triggering the save method. But when I see the created page in the tree, Its shows unpublished but publish_date is not empty(date will be present as created, modified and published are all same) Now I don't understand why the date is getting filled into the publish field for a page? Please let me know if am doing something wrong.
Page "published" field in database - is it accessible?
BrendonKoz posted a topic in Getting StartedI am currently running the Processwire 3.x branch (specifically 3.0.36 at the moment) and am back-porting data from a previous website that was created back in 2010. In trying to provide seemingly accurate publication dates to the older articles that I'm manually porting, I was thinking of adding a `published` field to the pages. Upon closer inspection I found that all pages do indeed have a `published` field already (in this version of ProcessWire anyhow). I suspect it was added to core back when ProDrafts was created. I see that there's a module to handle the ability of providing this field to all pages. http://modules.processwire.com/modules/publish-date/ I'm not sure if this is necessary now though if all pages already have an associated `published` date field? Would a module need to be created to expose this database field to the admin side, or is there another way to do this? Would modifying this field cause any detrimental side-effects (I do own a ProDrafts dev license, though am not currently using it in this project).
'Published' date on 2.7 not working
alexcapes posted a topic in General SupportHi, I've just upgraded a site from 2.6.1 to 2.7 and have noticed that the 'published' date does not seem to be working on new content I publish. Under the settings tab the info looks like this: Published on [?] If I try to output the date anywhere it comes out as: 1970-01-01 01:00:00 Does anyone know why this may not be outputting correctly?