Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/28/2020 in all areas

  1. No, I don't think so. But you have 7-days post-purchase to change your mind and get a full refund.
    1 point
  2. Let's say you have Site A, Site B and Site C. Site A and Site B are ProcessWire sites whereas Site C runs on something else (Laravel, WP, some PHP forum, etc). You can use bootstrapping/include to access Site A whilst in Site A when in a CLI environment. You can also use bootstrapping to access Site A inside Site C. To access Site B inside Site A or vice versa, you use multi-instance approach. i.e. one ProcessWire inside another ProcessWire instance (site).
    1 point
  3. Hi @RyanJ, Please see this post and the one after for the resolution. I am still working on a proper solution. Sorry for the inconvenience.
    1 point
  4. Jumplinks is only designed to kick in when a URL 404s. Your best bet is you place the redirect in the template file that is used to display the /recipes/ page, eg: $session->redirect('/docs/!recipes/doku.php');
    1 point
  5. This is great. I have just added .trim() so that it picks up on href=" javascript:alert('');" too. if (element.attributes.href.trim().substring(0, 11).toLowerCase() === 'javascript:') { Thanks again. ?
    1 point
  6. To be fair I believe we're on the same page here, except for one detail: those modules — Seo Maestro and Markup Metadata — are actually two very different solutions. In fact what you're describing is exactly why we use Markup Metadata by default in our projects: there's no GUI, and a big part of the markup is based on globally defined values or values from (pre-existing) page fields. It's just a markup module for handling the repetitive task of rendering a standard set of metadata elements, correctly and consistently, from project to project. That being said, in my experience some people prefer a more complex approach, either because they actually need it or because they think they do — and if a client was specifically requesting feature set similar to that of Yoast, a solution such as Seo Maestro might be just what you need to convince them that they don't need to go with WordPress just for that ?
    1 point
  7. Same. I also tend to bundle these with fields for open graph metadata, option to override page title separately, and whatnot. You might want to check out module solutions if you haven't yet. Seo Maestro is a neat one, and MarkupMetadata is what we use for our web projects (though latter one doesn't provide a GUI for content editors, it's just for generating proper markup). My experience is similar: the content analyzing features of Yoast have never been particularly useful for me, in part because I've mostly worked on non-English sites where they don't seem to work so well. Also these reports seem to — at best — provide a rough estimate of how good your content might be, and (in my opinion) there are better tools for that. If your clients are often interested in doing "hardcore SEO", I'd definitely dig into external tools and see if there are some that you can recommend instead. Yoast has some nice features for working around WP's shortcomings, and I've found their "helper" tools (such as breadcrumb creation) pretty handy in the past. ProcessWire, on the other hand, makes things like breadcrumbs and canonical links trivial, and the structure is often so straightforward that you don't need to do a whole lot to make your site "SEO friendly". One thing to note is that Yoast actually does handle "modular pages" relatively well. Last I checked it required a separate plugin and only worked if your content was all visible in the editor, though. My understanding is that it just mashes it all together and then does its magic. Crude perhaps, but in many (if not most) cases this provides decent results ?
    1 point
  8. What do you mean by form output? Generelly, forms are used for input ? The first step is to determine which interactions you want to track. For example, you could track an event: ... whenever a form is successfully submitted. ... whenever a form is partially filled but then abandoned. ... each time somebody fills out an individual field (will result in many events). ... whenever somebody finishes an individual step of a multi-step form. Beyond that, you first need to determine what your client wants to know, in terms of specific metrics, interactions etc. Most of those you can do with simple event handlers reacting to form changes, inputs and button clicks. // find all formbuilder forms on the page const FormBuilderForms = Array.from(document.querySelectorAll('form.FormBuilder')); // track the submit button FormBuilderForms.forEach(form => form.addEventListener('submit', e => { // this assumes you're using gtag.js with transport mechanism 'beacon' gtag('event', 'form_submitted', {/** add additional information based on the form data */}); }); A bit more tricky is tracking submissions only after they've been validated server-side, since you can't catch that with JavaScript. However, after submitting a form you will usually show a success message or redirect to a dedicated thank you page, so you can just track those: // FormBuilder uses this ID for the submission message const FormBuilderSuccess = document.getElementById('FormBuilderSubmitted'); if (null !== FormBuilderSuccess) { gtag('event', 'form_submission_result', {/** track the name + result of this submission */}); } Does that answer your question? It's just a matter of determining what you want to track, and then adding appropriate event handlers with JavaScript.
    1 point
  9. @ngrmm Your solution looks good, since the mod operator is the fastest way to determine even/ odd in PHP, but I would loop only once. $even = ''; $odd = ''; foreach ($allPages as $k => $v) { if ($k % 2) { $even .= "<div>$v->title</div>"; } else { $odd .= "<div>$v->title</div>"; } } echo "<div class='items'>"; echo "<div class='odd'>"; echo $odd; echo "</div>"; echo "<div class='even'>"; echo $even; echo "</div>"; echo "</div>";
    1 point
  10. @ridgedale Add this function to blog.php from the _uikit.php file line no.537 echo ukPagination($posts); Your file blog.php should look like below: <?php namespace ProcessWire; // This is the template file for main /blog/ page that lists blog post summaries. // If there are more than 10 posts, it also paginates them. ?> <div id='content'> <?php echo ukHeading1(page()->title, 'divider'); // LIMIT POSTS TO SHOW PAGINATION $posts = page()->children('limit=2'); echo ukBlogPosts($posts); // ADD THIS CODE INTO blog.php from _uikit.php line => 537 echo ukPagination($posts); ?> </div> <aside id='sidebar'> <?php $categories = pages()->get('/categories/'); echo ukNav($categories->children, [ 'header' => $categories->title ]); ?> </aside>
    1 point
  11. Hi, installing a CKEditor plugin seems easy: - download, - extract to /site/modules/InputfieldCKEditor/plugins/[folder with the plugin name will sit here/] - on admin setup > fields > any field that works with CKEditor > tab Input > scroll down and you will see the new plugin waiting activation: Ooops, only shows the default extra plugins... What am I missing? Thanks EDIT: it was a simple permission problem. One should check and change the permissions of downloaded stuff...
    1 point
  12. You could FTP your files to an "uploads" directory and them import them to a field on a page using the API. For example, to add PDF files in /uploads/ to a field named "files" on the Home page... // function for adding files function addFiles($file_extension, $page_id, $files_field_name) { $files = glob( wire('config')->paths->root . "uploads/*.$file_extension" ); $p = wire('pages')->get($page_id); $p->of(false); foreach($files as $file) { $p->$files_field_name->add($file); } $p->save(); } // call the function with arguments to suit addFiles('pdf', 1, 'files'); Remember to delete the files from the uploads directory after each successful import.
    1 point
  13. Because it is maybe interesting for others I will answer a question I got in the personal messenger: Does the module have the capability to run from a standard cron job? Yes. The Backup is triggered by the hook function cronBackup() expecting a HookEvent as single argument, which is in fact not needed. If you want to trigger the backup from anywhere, just create a HookEvent object and call the cronBackup() function. Done. $event = new HookEvent; $modules->get('CronjobDatabaseBackup')->cronBackup($event);
    1 point
×
×
  • Create New...