Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/05/2021 in all areas

  1. For the front-end, I use the header meta cache directives to disable the browser cache during development. I can comment them out to test caching See this link for more info.
    2 points
  2. What kind of cache are you running? Template Cache ProCache WireCache In my opinion caching should be disabled during heavy development. Activate it for testing purposes only. ProCache and Template Cache are both capable of such kind of caching you described. Even custom WireCache if done right/wrong. So... yes, it's normal in most cases. For testing any development progress you should be logged into ProcessWire admin to have an active session - makes life much easier at least in the frontend.
    2 points
  3. Hi, I used matplotlib library from Python. Configuration is the default one so with only few lines you get the plots!
    2 points
  4. This approach would and will work in ProcessWire as well. There is a video showing how it could be done. It's quite old but most of it is still the same today. ProcessWire and some dialogues look different now but it might be a good starting point. Depending on the design, functionalities, dynamic data and some other things one approach might be slightly better than another but each and every will work. It's important to know which parts of the site need to be translated, where to store those details and who will be in charge for maintaining that. Think about footer content, navigation and small things like that... those could be tricky at first in a multilanguage scenario. There is a great intro to multilanguage as well which can be found here: https://processwire.com/docs/multi-language-support/ and of course the support forum for all kinds of questions. My workflow is almost the same. I build the website in a static way to see all the details and later on move everything into ProcessWire. Looking back to my first projects... they were exactly like your situation here. This part could be a tricky one as well depending on what's going on there. You might end up with some custom functions, maybe even a module but in most cases even this should be quite easy. Oh... welcome to the forum and the world of ProcessWire.
    2 points
  5. @ryan, thanks for the cool new InputfieldTextTags! Could the inputfield styling be tweaked slightly to bring it into line with other PW inputfields? 1. The input height is slightly shorter than the standard PW text and select inputs. It would be good if the height matched. 2. When used for single item selections it would be good if the font size was the same as standard text inputs and selects. For multiple item selections the font size should probably stay smaller because there is extra tag UI that has to fit inside the input. 3. When used for single item selections the dropdown caret icon is a different style and position than that used for existing selects and AsmSelects. 4. When used for single item selections the containing inputfield expands slightly when the tag dropdown is shown. 5. The border radius applied to the top left and right of input when the tag dropdown is shown is a change from the existing PW UI style. Small stuff I know but it all subtly feeds into the user's confidence in the system (sub-conscious thought: "With such attention to detail this is clearly a well-maintained and reliable product") Edit: some SCSS that could be a starting point... .InputfieldTextTags { .selectize-input { &.dropdown-active { border-radius:0; } } .selectize-control.single { .selectize-input { font-size:16px; height:40px; background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23354b60%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23354b60%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A"); background-repeat:no-repeat; background-position:100% 50%; padding:10px 10px 0; &:after { content:none; } } } }
    2 points
  6. Store, collect and update oembed data from external sources. This module uses the great PHP Library Essence by Félix Girault and adds some processwire magic. It is inspired by Ryan's example module FieldtypeEvents and the TextformatterOEmbed module by felixwahner. Thanks! Download & Install Github: https://github.com/neuerituale/FieldtypeOembed Modules directory: https://processwire.com/modules/fieldtype-oembed/ Composer: composer require nr/fieldtypeoembed
    1 point
  7. If you have the core ProcessPageClone module installed you can copy a page via Page List: But sometimes I don't want to hunt around through Page List to find the page I want to copy, and instead I have found the page via the admin search and have it open in Page Edit. So I used this hook in /site/ready.php to add a "Clone this page" button to the bottom of the Settings tab. // Add a clone button to the Settings tab of Page Edit if this page is allowed to be cloned $wire->addHookAfter('ProcessPageEdit::buildFormSettings', function(HookEvent $event) { $wrapper = $event->return; $modules = $event->wire()->modules; $page = $event->process->getPage(); /** @var ProcessPageClone $ppc */ $ppc = $modules->get('ProcessPageClone'); if($page && $ppc->hasPermission($page)) { /** @var InputfieldButton $f */ $f = $modules->get('InputfieldButton'); $f->value = 'Clone this page'; $f->href = $event->wire()->config->urls->admin . 'page/clone/?id=' . $page->id; $wrapper->add($f); } }); Maybe somebody else has this need and finds this useful.
    1 point
  8. This week we focus in on a new and unique Inputfield module added to the core that enables a lot of useful new input capabilities for tags, sortable multiple selection and custom user input. I introduced it in last week's forum post, but it was further improved this week and reached a point where I thought it would need some dedicated documentation, so this post dips into that and goes quite a bit more in-depth than last week’s. I never got around to bumping the version to 3.0.176 because the module wasn't quite done till Thursday (kept updating with improvements), but just in case there's any confusion about versions between last week and this week, I bumped it to 3.0.177 even though it contains what was originally intended for 3.0.176, plus more— https://processwire.com/blog/posts/pw-3.0.177/
    1 point
  9. I think this can actually be a good starting point overall. First, install a ProcessWire blank profile. If you do the file rename services.html -> site/templates/services.php, later you'll have to actually create the Template in ProcessWire, which automagically maps by name to a file by default. Say, template "services", matches to file "services.php". Actually if you add "services.php" to the site/templates folder and in the processwire interface try to create a new template, ProcessWire will suggest to create templates according to the existing files. After you do do this, you can go and recreate the pages in the page tree (assigning the right templates, to the right pages) you could end up with a "static" copy of your website. After this, you can think of adding the fields to the templates! This part involves a bit more, like installing the language modules, setting up the language fields, etc. But I could save that for later.
    1 point
  10. @fruid - the selector field is part of the PW core. You can limit the available fields with this setting "limitFields" => ["field_one","field_two"] Hope that helps.
    1 point
  11. I've opened a request issue for my idea above: https://github.com/processwire/processwire-requests/issues/400 If you like that idea please show your interest by giving it a thumb up, thank you ?
    1 point
  12. I've been itching to show this one off for ages.... JoinTheRez.com is the companion website to a science fiction podcast and comic which aims to help pre-teens build emotional resilence and mental well being. The story includes supportive themes and messages based on research by the University of Sussex CRESS Lab led by Professor Robin Banerjee, Professor of Kindness at the University of Sussex (no really). In the comic, which is set in the future, our heroes are able to contact young people in the current day using a mobile phone. We ran with this idea to create a phone interface for the site which enables users to undertake lots of different activities including games (Fart Cow Frisbee!) , puzzles, a podcast player, and even recording audio messages to send to the characters. There's a section for adults which includes lesson plans and teaching resources. We used PW to allow the client to manage various bits of content including messages, a news feed and the podcasts themselves. We created a bespoke module for an online Survey for the site as well building the code to handle distribution of the podcasts including the RSS feed and scheduled release of episodes - although in the end the podcast was picked up by GenZ / PRX in the states so they are handling the audio feed now. Notable modules we used were: ProCache (first time we've used it - works well) ProForms (for a contact form, we ended up building our own module for a more complex survey) Tracey Debugger (of course). It was a lot of work - I did have to spend much too long chosing the best fart noises for some of the games - but it was a lot of fun.
    1 point
  13. @kongondo Great module!!! Just have one question or maybe feature request: Is there a way to add a marker with a text (textfield and a title) only and without linking to a page? I have a project where there is no page to link to and there should be only a few annotations on an image. Thanks!
    1 point
  14. You are safe to skip this warning while you are sure you don't have a script that need to run longer than the limit (e.g. a custom cron job which in this case will fail silently). If you don't have lot of modules or your site's size isn't that "big" then you are again safe to ignore it. A small note about this specific warning coming from the FileCompiler.php to try to find out the culprit (imho, in your case, it come from a module) : Read on https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#file-compiler-updates Call to set_time_limit() in ProcessWire 3 : https://github.com/processwire/processwire/search?q=set_time_limit&type=Code
    1 point
  15. Sorry this is going to be vague but... I've hacked it to support floats in some projects. It's not too hard. Just had to look in the module's code where the fields are defined and it's relatively easy to find the INT and change it to float. You may have to do the same in the DB as well. Takes some fiddling. I wish I could be more specific, but after formatting my machine I'd have to go through a bunch of backups to find actual code.
    1 point
  16. echo file_get_contents("{$config->urls->assets}img/icons/ticket.svg") try this - the arrows are not complete and maybe wrap that into curly braces - and also you don't need the preceding slash! Oh, btw - you might like this? This is my placeSVG function which also strips the doctype and comments from svg files when embedded directly: it assumes the templates/ directory as the standard location, but you can add an optional other path ['path' = ...] - and then it concatenates the path with the first argument https://gist.github.com/blynx/d91d749e76c112f06a505a2d17dfdc2e PS: Are you frankfurt (ffm) based? ^^
    1 point
  17. No there isn't currently but I am not getting what your use case is. Why add it to a template if you are not going to use it? Maybe elaborate more. Btw, the recommendation is to use a file field to hold the image and not an image field since you'll have an image rendered twice when editing a page using the template...once in the image field and once more in ImageMarker..
    1 point
×
×
  • Create New...