#21
Posted 26 July 2012 - 03:38 PM
I realized that this nice module can even be used with repeater to schedule not a whole page but just an element on a page since by means of repeater this element really is a page anyway.
but there is a hindrance to this idea. it's works nicely if I run the function RunSchedulePages by "Include & Bootstrap".
but it does not succeed if the function gets called by LazyCron. I guess the reason is, that "find" yields no hits, cause it is an admin page. If I am right, this may be a concern in other cases too.
So I ask you experts for help.
#23
Posted 27 July 2012 - 10:18 AM
$unpublished = wire("pages")->find("status=unpublished, publish_from<$time, include=all");
$published = wire("pages")->find("status=published, publish_until>0, include=all");
If you test it out, let us know. My only concern would be that "include=all" may override the "status=", but hopefully not. If it does, try instead to add "check_access=0" rather than the "include=all".
#24
Posted 28 July 2012 - 06:04 PM
ryan, I already found a hint from apeisa in another threat concerning include=all.
I ended up with
$published = wire("pages")->find("include=all, status=published");
foreach($published as $p) {
The conditions regarding publish_from and publish_until are not part of the find. They are handled in the foreach loop.
That solved my issue.
Thanks both of you.
#30
Posted 21 August 2012 - 03:58 PM
I just installed this locally to evaluate it. The datepicker only offers the option to set a date, but if I set the date, the datepicker input field is set to "08.08.2012 hh24:08:ss" … and I have a feeling this is not intended behaviour?
Hi!
I haven't seen this behaviour before. I just tested it and could not reproduce it.
For me the dates shows like on the attached screenshot.
Are you using WAMP/XAMPP locally or are you running a local linux server?
/Jasper
@ Jasper
i didn´t think that this is a local problem from the LAMP because I can reproduce the problem from yellowled on a server at a ISP.
I thought that the Problem that yellowled and I have is that we CHANGE under SETUP -> fields -> publish_from -> Details -- the "Time Output Format" from 14:20:30 to 14:20 !!
and so i get the SAME Error as yellowled have with the output "15.08.2012 hh24:08:ss"
I change the Time Output Format back to 14:20:30 an ALL works like a charme
Did you have any solution for this??
#31
Posted 24 August 2012 - 04:04 AM
From line 157: https://github.com/f...ges.module#L157
// Publish pages with a publish_until date > current date
if($p->publish_until > $time) {
$p->removeStatus(Page::statusUnpublished);
$p->save();
}
If you have unpublished page where you have set publish_from field, but left publish_until empty, then it won't get published. I think this is the most common scenario, so strange that this hasn't popped earlier. Easy fix though:
// Publish pages with a publish_until date > current date (and publish_until is set)
if ($p->publish_until > 0 && $p->publish_until <= $time) {
// We keep it unpublished, since publish until is set and valid
} else {
$p->removeStatus(Page::statusUnpublished);
$p->save();
}
I know that could be achieved with simple if instead of if else, but I think the logic is simpler to understand that way.
#33
Posted 24 August 2012 - 07:35 AM
#35
Posted 10 October 2012 - 03:30 PM
Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 6 in /x/xxxx/xxxx/xxxxx/wire/modules/Fieldtype/FieldtypeDatetime.module on line 175
Does this hook into the FieldtypeDatetime.module somehow?
I'm not sure what was going on there. I uninstalled/reinstalled both modules and the warning is gone.
#37
Posted 12 October 2012 - 08:34 AM
Gremlins I guess. All seems well now.
#38
Posted 24 October 2012 - 04:29 AM
Page saved, but not published. Change publish until setting if you want to publish this now.
I'm not sure, but shouldn't this problem go away if we could restrict afterSave() method to run only when saving page through admin?
#39
Posted 15 March 2013 - 10:21 AM
@formmailer: it's a bit late to say this, but thanks for making this module -- it has been very useful! ![]()
Also wanted to mention that we've been running this in current dev branch (future 2.3) on couple of sites for quite a while now without any problems, so I'm pretty confident you could already add 2.3 to "compatibility" field at modules page.
#40
Posted 15 March 2013 - 11:36 AM
It's great to hear that this module is useful.
I haven't had time to develop new sites or projects during the past few months, so I haven't been able to test the module in the development branch myself.
I am happy that it works there as well. Thank you for letting me know.
And thanks for the suggestion you submitted via Github, it has been merged now.
/Jasper
Also tagged with one or more of these keywords: Module
Community Support →
Modules/Plugins →
Inline EditorStarted by Sinmok, 10 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Module: Site indexerStarted by Alessio Dal Bianco, 08 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Form Builder - Form with more than 1 formbuilderfile inputStarted by theGC, 07 May 2013 |
|
|
||
Community Support →
General Support →
How can I set/get module-data from DB when not implementing ConfigurableModule?Started by horst, 14 Apr 2013 |
|
|
||
Community Support →
API & Templates →
Programmatically change page template in modulesStarted by boundaryfunctions, 11 Apr 2013 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













