Recently Browsing 0 members
No registered users viewing this page.
this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
Minimum Required Facebook App configuration:
on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version (has been tested up to v3.3), add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "https://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost Note: Facebook SDK for PHP is utilized.
Selector. Where now between start date and end date or now bigger than start date and end date is emptyBy Elchin
I want select pages where now between date and end_date or now bigger than date and end_date is empty.
I have five tried variants:
$start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("foo=(date<$start,date_end=''),bar=(date<$start,date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date<$start,(date_end='',date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end=''|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("!date_end|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end>=$start|!date_end,date<$start,sort=-date,limit=12"); All this variants not worked for me and returned zero results.
I have a question that i can't find a way to solve.
I have following function in _uikit.php
$date = $page->get('date|createdStr'); $dateModified = $page->get('datemodified'); But I need to output the $date in to different formats.
My further function looks like this
// return the blog post article markup return " <div> <article class='uk-article blog-post $class'> <meta property='name' content='$page->title'> <meta property='author' typeof='Person' content='Arra Lifte Harmanschlag'> <meta property='dateModified' content='$dateModified'> <meta property='datePublished' content='$date'> <meta class='uk-margin-remove-adjacent' property='articleSection' content='News'> <div property='image' typeof='ImageObject'> $featuredBlogPostImage </div> $heading <ul class='mt25 uk-margin-remove-bottom uk-subnav uk-subnav-divider'> <li class='uk-article-meta'> <time datetime='$date'>$byline</time> </li> </ul> <div class='mt25' property='text'> $body </div> </article> </div> "; Now I need to output the meta property in this format 2019-03-02CET05:23:00 and then a normal date format that is displayed on the Homepage with 2. März 2019 without time.
Can anybody help me?
Thanks in advance.
By Eunico Cornelius
I am trying to get the strftime format from the function convertDateFormat(). However, the output has $ signs in it which i cannot use in strftime.(example of conversion : $d/$m/%Y what strftime actually uses: %d/%m/%Y). Am I in the wrong here or is there some way to format strftime? Thank you in advance :).
I'm creating a multilingual blog for a client. I'm using Multi-language fields, and it's working great. Essentially, there are two versions of each article: one in English and one in Spanish.
Now, I've created a Datetime field with a "Date/time picker" so that they can add a publication date (no time) to their blog entries. I want the month part of the date to be displayed in whatever language the article is being displayed in. Let's take the following example:
1) "Un artículo de ejemplo", accessible via example.com/un-articulo-de-ejemplo/
2) "A sample article", accessible via example.com/en/a-sample-article/
In this example, for article number 1 I want the date to be "12 ene 2017", and for article number 2 I want it to be "12 jan 2017". In other words, the same format for both languages, but localised. And for some reason, I seem unable to do so and dates are always displayed in English.
Here's the code I'm using to display the date field:
<?= $post->publication_date; ?> How can I get this to work? Thanks.