-
Posts
321 -
Joined
-
Last visited
-
Days Won
5
Everything posted by justb3a
-
@ngrmm It's never a good idea to override somehing in the core or in a third-party module because if you update it your changes are overritten again. I updated the module and added an option in module settings to set the limit. @Tacolombardi <?php $events = $modules->get('FacebookEvents')->getEvents(); ?> <ul> <?php foreach ($events as $event): ?> <li> <?=$event['name']?> <img src="<?=$event['cover']['source']?>" alt="<?=$event['name']?>" /> </li> <?php endforeach; ?> </ul>
-
Have a look at your caches table. Search for name=Module.FacebookEvents. Delete this row. Furthermore you could have a look at your modules table where class=FacebookEvents, column: data.
-
-
@iwontsignuphere ich kann übrigens keinen Tetris-Ohrwurm mehr haben ohne an dich zu denken ;)
-
I removed the date field label some days ago (@see Github issue). I didn't know that ProcessWire provides a way to skip the label. It's added to the develop branch, so it'll published with the next release!
-
This is not how arrays work. Each key can ony exist once. EmailAddMessage is overwritten three times. The field isn't visible by default, because I don't want to add inline styles. Just trigger the field in your .css file and add display:none; there.
-
The scf_website field must be there! Again: this field is used for spam protection. Please read the belonging documentation as described above, all necessary informations are there: If the fields does not match, you could have a look at your database. Table modules where class equals SimpleContactForm. Column data contains json, I guess the allFields value doesn't match anymore. Otherwise just reinstall the module and start with clean settings. To format the fields, you can pass options to adapt HTML structure as well as class names. Unfortunately not everything can be achieved using this. For really special needs you have to hook into the field render function. To get an overview of what's possible, have a look at the documentation: How to overwrite classes and markup.
-
@BFD Calendar Could you please explain what you did exactly? It doesn't matter whether the module is installed via ProcessWire Module Interface or via Github (unless you checkout develop branch). As the documentation says, the scf_website field is used as honey pot check to prevent spam. In module settings you could add any existing field or create new ones by entering the names (comma-separated). Per default no fields are added, because I do not know which fields you need Furthermore: please have a look at the log file. If the form cannot be submitted, the reason will be found there.
-
I fixed the typo, thanks for the hint. The translation string has been changed, some may need to translate it again! It started pretty simple (for private use only). Then I did the "mistake" to put it on Github . But if you don't need something special, I think/hope it's still pretty easy.
-
I tested 1), 2) and 3). They work all. If you want to use file_get_contents, you need to pass an URL returning the content. Otherwise the code won't be interpreted. Stackoverflow:
-
or 3) ob_start(); include('./mess.php'); $emailMessage = ob_get_clean(); $content .= $modules->get('SimpleContactForm')->render(array('emailMessage' => $emailMessage)); // mess.php <?php namespace ProcessWire; echo $page->title . ' test3 ' . $input->post->headline;
-
1) $emailMessage = $page->title . ' test'; $content .= $modules->get('SimpleContactForm')->render(array('emailMessage' => $emailMessage)); 2) include('./mess.php'); $content .= $modules->get('SimpleContactForm')->render(array('emailMessage' => $emailMessage)); // mess.php <?php namespace ProcessWire; $emailMessage = $page->title . ' test2 ' . $input->post->fieldname;
-
Using twig the following does work: {% set emailMessage %}{% include 'mails/recommend.twig' %}{% endset %} {% set options = { 'action': './#recommend', 'emailMessage': emailMessage } %} {{modules.get('SimpleContactForm').render(options)}} {# recommend.twig #} ... {{ estate.title }} {{ page.httpUrl }} {% if input.scf_salutation == 1 %}xx{% elseif input.scf_salutation == 2 %}xx{% else %}xx{% endif %} ... I thought using php should work the same.
-
Hi #1 Do not use the email message textarea in module settings, write your own using php and access the title as you 're used to. 0) $emailMessage = file_get_contens('https://url/to/message.php'); // or include partial etc. $modules->get('SimpleContactForm')->render($array('emailMessage' => $emailMessage)); #2 Just pass an action parameter as option: $modules->get('SimpleContactForm')->render($array('action' => './#anchor'));
-
The workflow is as follows: Enter Client ID and Secret Enter Page Name OR Page ID: If you enter the Page Name, make sure to copy it from the Facebook page url similar to `https://www.facebook.com/NameWithoutSpaces` => NameWithoutSpaces would be the Page Name Add `$events = $modules->get('FacebookEvents')->getEvents();` to a template and open the belonging page (frontend) Go back to module settings and check (reload before) if a page id has been added. If not, your page name could not be resolved. Now you should be able to receive events: $events = $modules->get('FacebookEvents')->getEvents(); echo "<ul>"; foreach ($events as $event) { echo "<li>{$event['name']}</li>"; } echo "</ul>"; $events is an array, so you have to use the following syntax: `$event['propertyName']`. I found a little bug and updated the module, so please make sure to get the latest version.
-
@maxf5 Please have a look at this post. Furthermore turning caching on could be complicated because the value of the hidden date field gets cached and this value is used for spam protection...
-
At the moment the endpoint just returns: id, name, timezone, start_time, end_time, description. But it's pretty easy to get the information about the place and cover. I updated the module to include it as well and updated the Graph Api Version to 2.9. `$modules->get('FacebookEvents')->getEvents()` returns now the following data: array(1) { [0]=> array(6) { ["id"]=> string(15) "123123123" ["name"]=> string(3) "xxx" ["timezone"]=> string(13) "Europe/Berlin" ["start_time"]=> string(24) "2017-06-23T16:00:00+0200" ["end_time"]=> string(24) "2017-06-23T18:30:00+0200" ["description"]=> string(3) "foo", ["place"]=> array(3) { ["name"]=> string(5) "Venue" ["location"]=> array(6) { ["city"]=> string(7) "Berlin" ["country"]=> string(7) "Germany" ["latitude"]=> float(xx.3321915) ["longitude"]=> float(xx.3735704) ["street"]=> string(17) "Street 14" ["zip"]=> string(5) "01234" } ["id"]=> string(15) "123123123" } ["cover"]=> array(4) { ["offset_x"]=> int(0) ["offset_y"]=> int(85) ["source"]=> string(148) "https://scontent.xx.fbcdn.net/v/t31.0-8/s720x720/..." ["id"]=> string(16) "123123123" } } } Having a quick look at the Graph API documentation, using the event ID one could send another request to get even more data. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api/reference/event/.
-
Little admin helper module: Using this module you can view all template cache settings at once. E.g. cache status, cache time (configurable). Furthermore it adds the functionality to clear the entire template cache or just the template cache for a given template. Note that this may cause a temporary delay for one or more requests while pages are re-cached. GitHub: https://github.com/justb3a/processwire-templatecacheoverview
- 1 reply
-
- 23
-
-
Please have a look at the readme file: You could pass this param using the ProcessWire way to handle translations: __('Send')
-
@Slav No template file needed. This is obsolete. Please read the following part of the documentation: How to overwrite classes and markup. You need to hook into the module and add your filter there. Have a look at the following documentation part: Add custom validation Hope this will be helpful, otherwise please let me know how to improve the documentation parts. Sorry, I have no time at the moment to answer more detailed .
-
@Victor
-
@Victor So far, there was no way to redirect to a specific URL. But I've considered to implement this feature from time to time. So: there is a new version including an option to specify a redirect page
-
The company which I'm working for develops apps, too. And for one of them we need a little notification system. Just a little endpoint which returns json. The app saves all notes which have been sent to the user. To be able to identify which message has already been shown, we need a global identifier. The workflow is as follows: Login PW Admin add a new page, the "id" field will be populated with a GUID fill in all other fields which should be sent an endpoint returns json, for example something like the following [ { "id":"936DA01F-9ABD-4D9D-80C7-02AF85C822A8", "url":"https:\/\/domain.com\/endpoint\/notice1\/", .. }, { "id":"A36DA01F-9ABD-4D9D-80C7-02AF85C822A8", "url":"https:\/\/domain.com\/endpoint\/notice2\/", .. } ] as you can see, for each note there's a "detail" page which will return the actual message if someone opens the app, it checks whether there are new notes and displays them
-
@bernhard: I've already posted my use case in the initial post. Could you please specify what do you want to know more about?
-
@Kemal I guess you have to hook into the form rendering and add AMP specific markup/tags.