Jump to content
teppo

Version Control

Recommended Posts

@SteveB: I might've figured this out.

The problem is related to the way Spex sets up itself. It's a singular module and keeps track of the active page via a property called activePage, the value of which is defined the first time Spex is initiated. In this cases the first loaded page is the admin page for VersionControl. Spex sets that as the active page, and since it isn't meant for admin usage, this prevents some of the necessary methods from being triggered properly.

The quick and dirty fix is adding the following to your /site/templates/_init.php file, before any calls to Spex are made:

if (!$spex) {
    $spex = $modules->get('Spex');
    $spex->setActivePage($page);
}

This is based on some quick testing on a module I'm not familiar with, so please take your time testing this properly, but so far it does seem to work for me. Another approach would be detecting Spex in the ProcessVersionControl::executePreview method, but to be honest I don't like the idea of adding module-specific workarounds there. From my point of view this is not a problem of VersionControl, but rather related to the way Spex works.

Share this post


Link to post
Share on other sites
10 hours ago, teppo said:

@SteveB


if (!$spex) {
    $spex = $modules->get('Spex');
    $spex->setActivePage($page);
}

 From my point of view this is not a problem of VersionControl, but rather related to the way Spex works.

I agree it's not a VersionControl problem exactly but I'd like to find a way to use both of these useful modules.

Putting that code in Iinit.php made no difference. Putting it in the template file seemed a step in the right direction but then I found that apparently _init.php wasn't loaded at all. At least, calls to functions in a file I include from there failed (does not exist). Including _init.php from the template file gets us a bit closer but Spex does not appear to be fully working in this mashup and the layout is very incomplete.

The field based way of looking at changes (clock icon) is not working well with PageListSelectMultiple and I use a lot of those.

Thinking about a plan B.

Thanks

Share this post


Link to post
Share on other sites

Thanks for the update, @SteveB. Like I said, I've never really used Spex, but this change made the bundled example site work as expected. I'm curious about why _init.php wouldn't be loaded at all in your case and why it got loaded in my tests, but then again: it's not a huge surprise that a real-world use case doesn't behave exactly as a minimal example setup :)

If you could provide me with a stripped down setup that doesn't work as expected, I could test this further, but until then I'm probably not going to be of much help here.

Share this post


Link to post
Share on other sites
13 hours ago, SteveB said:

Putting that code in Iinit.php made no difference. Putting it in the template file seemed a step in the right direction but then I found that apparently _init.php wasn't loaded at all.

Taking another look at this after a cup of coffee. While I still have no idea what's going on in your site, here's another workaround you could try, though you'll first have to grab the latest version of ProcessVersionControl.module from GitHub. Then add the following to the beginning of the /site/templates/admin.php file:

$this->addHookBefore('ProcessVersionControl::executePreview', function(HookEvent $event) {
    wire('modules')->get('Spex')->setActivePage(null);
});

This resets the active page for Spex right before ProcessVersionControl renders it, which in turn should make Spex behave as expected in this situation. If this works, it's probably the cleanest you can get without modifying either Spex or ProcessVersionControl manually (neither of which I'd recommend doing).

Hope this helps.

  • Like 1

Share this post


Link to post
Share on other sites

Yes, that did it. The Spex layout is working, all the JS & CSS loads, etc. Must have been good coffee.

I ended up adding a line to set a variable so I can know in a template file that a preview is being rendered.

$this->addHookBefore('ProcessVersionControl::executePreview', function(HookEvent $event) {
    wire('modules')->get('Spex')->setActivePage(null);
    wire('modules')->get('Spex')->addTemplateVar('vcpvw', 1);
});

For this particular project where many of the pages being edited have lots of fields (24), I'm not entirely sure a visual preview is best but I've only just gotten it working so too soon to say.

This next observation may or may not have to do with the fact that I have not turned on Version Control for any of the image fields (I have a different kind of image archive for that) and I'm using PageImageAssistant (a.k.a. Pia). I noticed that in the template where I'd normally show a thumbnail from a page chosen in a page field, The value for $page->myField->image in the preview is not  the full data. Kind of makes sense, this is for a page that is not currently selected but was selected at the time the preview is representing. I get the image basename and I can work with that.

As I'm testing now I had a weird thing happen where I changed a page field (multiple values, checkboxes) and the change showed up in previews for earlier revisions. In fairness, this is a test page in my local dev server. I'll make some brand new content and try again. (a misunderstanding)

I made a minor change (@619) so that in the editor clock icon only shows up on fields with more than one version. Otherwise, there's nothing to look at.

    protected function renderHTML(array $data) {

        $markup = "";
        foreach ($data as $field => $field_data) {
            $diff = " diff";
            if ($this->diff_disabled) $diff = "";
            if ($diff && wire('fields')->get($field)->type instanceof FieldtypeFile) $diff = "";
            $revision = count($field_data) ? " data-revision='{$field_data[0]['revision']}'" : "";
            $markup .= "<div class='field-revisions$diff' data-field='$field'$revision>";
            //if (count($field_data)) {
            if (count($field_data) > 1) {
                $markup .= "<ul class='ui-widget-content'>";

Thanks for taking an interest and solving my Spex problem.

Share this post


Link to post
Share on other sites

Thought I'd mention this here too. Both VersionControl.module and ProcessVersionControl.module have been updated to version 1.1.0:

  • VersionControl 1.1.0 includes new public method getHistory($page) for fetching the full history of a specific page as an array (supports pagination and filters, arguments can be checked from the code). The primary goal here was to separate the core logic of the module from display stuff.
  • ProcessVersionControl 1.1.0 greatly improves the diff output for Page fields. Instead of IDs and string diff it will now use actual labels and custom diff logic. This not only looks better, but also makes more sense than comparing a list of numbers and displaying the smallest possible change set between them :)

page-diff.png

The Page field update was thanks to this pull request, though it ended up being a bit more complicated than that: https://github.com/teppokoivula/VersionControl/pull/2

  • Like 12

Share this post


Link to post
Share on other sites

Looks like a great module, however, I got an error on a multilanguage install " Missing required GET param pages_id ".  Using PW 3.029.

Share this post


Link to post
Share on other sites
On 8/10/2016 at 2:34 PM, tpr said:

Looks like a great module, however, I got an error on a multilanguage install " Missing required GET param pages_id ".  Using PW 3.029.

Thanks for reporting this, @tpr. Any suggestions for reproducing this issue would be welcome, though – when and where did this happen, what were you doing then, does it happen consistently or just sometimes, etc.

So far everything seems to be working just fine for me. Installed a fresh multi-language site and using the latest version from GitHub (3.0.29 with some off-version fixes).

Share this post


Link to post
Share on other sites

I've tried to disable modules and also tried it on another site which is non-multilanguage and almost a fresh install, and I got the same error. They are PW 3.028 & 29. They are on different servers, both of them running PHP 7.

I installed the module by entering "VersionControl" on the Install module page and Download. After that I enabled one template and one field, that's all. When I load a page in the admin of this template, the error appears.

Share this post


Link to post
Share on other sites

@teppo

Update: it appears to be PHP 7. If I downgrade to 5.6.22 the clock icons appear on the fields.

  • Like 1

Share this post


Link to post
Share on other sites
8 minutes ago, tpr said:

Update: it appears to be PHP 7. If I downgrade to 5.6.22 the clock icons appear on the fields.

Thanks! I don't have an environment with PHP7 at the moment, so might have to set one up later, but for the time being it would be cool if you could check your browsers dev tools (net panel) for me :)

Once you open the admin page, there should be an AJAX request for an URL like this:

http://www.example.com/processwire/setup/version-control/page?pages_id=1031&settings%5Bempty%5D=true&settings%5Brender%5D=HTML

Are you seeing this there? Is it returning status code "200 OK" or something else?

Share this post


Link to post
Share on other sites
20 minutes ago, teppo said:

I don't have an environment with PHP7 at the moment

That's not true anymore :)

As for the ajax request: yes, it's 200, and returns the error I wrote above.

Share this post


Link to post
Share on other sites

@tpr: thanks. With your test environment this was easy to reproduce and I've just pushed a fix to GitHub :)

To be honest I'm not entirely sure why this was broken in the first place, but it has something to do with the way isset() implementation has changed in PHP 7.0.6. Found a bunch GitHub issues related to other frameworks where this has also caused issues. Ditching isset() works in this case, since nothing that evaluates to false should be a valid value here anyway.

@ryan: doing isset($this->input->get->pages_id) in a Process module resulted in "false" in PHP 7, even though $this->input->get->pages_id returns a value ('1234' or something along those lines). Unless I'm mistaken here, this might be something that the core should account for. Seems to be related to https://bugs.php.net/bug.php?id=72117.

  • Like 3

Share this post


Link to post
Share on other sites

Thanks! 

Would it be possible to show the version control icon only for fields that are actually enabled? Now they appear on all fields and that seems a bit misleading to me (why's there the icon if it does nothing?).

  • Like 1

Share this post


Link to post
Share on other sites
On 8/13/2016 at 9:44 PM, tpr said:

Would it be possible to show the version control icon only for fields that are actually enabled? Now they appear on all fields and that seems a bit misleading to me (why's there the icon if it does nothing?).

This should've already been the case, but in certain situations things weren't working as expected. The icons were displayed if there was at least one row of data in the database for that page and field combination, and a bug in building the base dataset often resulted in *all* fields for enabled templates (and not just the enabled ones) having that one row of data.

I pushed a fix for the config issue a while ago and I've just pushed another fix that skips non-enabled fields even if there is data for them. Still need to make some updates to the automatic data (re)generation part, but for now things should appear normal :)

  • Like 2

Share this post


Link to post
Share on other sites

Thanks. I noticed that there are fewer icons after updating the module a few days ago. Now I feel less stupid that I haven't asked to fix something that is not there :)

Share this post


Link to post
Share on other sites

I might found a bug:

On a multilanguage CKEditor field, if I try to restore a revision, always the last language tabs' value is restored (not sure if this is true, I have only 2 languages).

Furthermore, the loading span doesn't go away, I had to set display: none to see the results. Or does it remain there to avoid manual editing? If not, I would use display: not or perhaps pointer-events: none to enable clicking. Now I can't even switch language tabs.

Maybe only setting a lower opacity (with pointer-events: disabled) and using :after pseudo to add the loader animation would do. This could be achieved simply by toggling a class on the element. I can help you with this if you need.

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, tpr said:

I might found a bug:

On a multilanguage CKEditor field, if I try to restore a revision, always the last language tabs' value is restored (not sure if this is true, I have only 2 languages).

Furthermore, the loading span doesn't go away, I had to set display: none to see the results. Or does it remain there to avoid manual editing? If not, I would use display: not or perhaps pointer-events: none to enable clicking. Now I can't even switch language tabs.

Maybe only setting a lower opacity (with pointer-events: disabled) and using :after pseudo to add the loader animation would do. This could be achieved simply by toggling a class on the element. I can help you with this if you need.

Thanks. Currently working on some pending fixes, but I'll take a closer look at these soon :)

  • Like 2

Share this post


Link to post
Share on other sites

@tpr: finally found time to take a closer look at the language tabs issue. So far there appear to be two issues behind the scenes:

  • VersionControl stores all language values in the form of "data[language-id]", but the field name for the default language is actually just "data". I'm pretty sure this used to work at one point, so perhaps it was a core change somewhere between 2.4 and 2.6 (have to setup a test site with earlier version to make sure).
  • When built-in language tabs are enabled, CKEditor instances are not loaded before a specific tab is opened. This is a bit of a problem, since I can't set a value of a CKEditor instance unless it's already there.

This requires a bit of testing, but I'll try to get these sorted out soon.

  • Like 2

Share this post


Link to post
Share on other sites

I dont know why, but when I try to install this module I have an 500 error and the Process Version Control doesnt install.. The two other module are installed but not de Process Version Control.

I run the Processwire 3.0.35. Any idea?

Thank you

 

 

Share this post


Link to post
Share on other sites

Either I'm missing something or the module is not working properly in version 3.0.33 devns.

I installed it, configured my basic page to be included and sure enough started seeing page edits appear listed on the history tab, even identifying the changed fields correctly. However, preview always shows the current version and revert has no effect.

Share this post


Link to post
Share on other sites

Today I made the update for VersionControl from version 1.2.7 to version 1.2.8 using the ProcessWireUpgrade module.

My test site runs PW core version 3.0.52. 

After the update the site was producing the following error which I found in the error log file:

Compile Error: Cannot redeclare class VersionControl (line 18 of /home/chr/ac-test-pw/site/assets/cache/FileCompiler/site/modules/PageSnapshot/VersionControl.module)

I noticed that there are now two folders containing the file "VersionControl.module": "VersionControl" and "PageSnapshot"

After removing the folder "PageSnapshot" with the old version of "VersionControl.module", everything seems to work properly again.

It actually appears that installing the module using "Modules > New > Add module from URL ..." will install it in the folder /site/modules/PageSnapshot where as the "ProcessWire Upgrade" module will create a new folder /site/modules/VersionControl which is the recommended folder for the installation of the module according to the module page http://modules.processwire.com/modules/version-control/

  • Like 1

Share this post


Link to post
Share on other sites

Hi @teppo, I recently started using this great module.

Tracy is picking up some error notices when opening a page containing a Repeater in Page Edit.

PHP Notice: Trying to get property of non-object in ...\VersionControl\ProcessVersionControl.module:658

This seems to be due to the field names ($field) containing a "_repeater1234" suffix so wire('fields')->get($field) does not find a match and returns null.

  • Like 1

Share this post


Link to post
Share on other sites

Hi.

I was wondering if it is possible use some of the version control data on the frontend? I tried to use this code:

$versioncontrol = new VersionControl();
$limit = 25;
$start = 0;
$page->template->enabled_templates = true;
$data = $versioncontrol->getHistory($page, $start, $limit);

However, it will not register the template as enabled, even though the template is enabled for version control.

What I am trying to do is get the dates for a specific field every time it has been modified.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By BitPoet
      Here's a little text formatter module that redirects all external links found in a textarea (e.g. for hit counting) to a given URL.
      TextformatterExternalRedirect
      GitHub repo
      As TextFormatters do, this module modifies the contents of the textarea (HTML) at rendering time. It prepends the given URL to the link address for external links (http and https), optionally makes sure that the link is opened in a new window and allows you to add css classes to such links.
      All options can be configured in the module's configuration settings.
      Usage:
      Download the zip archive and extract it to site/modules, the rename the top folder to TextformatterExternalRedirect Go to the backend and select "Modules" -> "Refresh", then click "Install" for "External Link Redirect" Click "Settings" and configure the module
      Go into the field configuration for the field(s) you want this formatter to apply to and add it from the dropdown
      Done, now any external links in the configured fields will have the configured settings applied Feel free to leave feedback and post and questions you have here.
       
    • By teppo
      Hey folks!
      Took a couple of late nights, but managed to turn this old gist of mine into a proper module. The name is SearchEngine, and currently it provides support for indexing page contents (into a hidden textarea field created automatically), and also includes a helper feature ("Finder") for querying said contents. No fancy features like stemming here yet, but something along those lines might be added later if it seems useful (and if I find a decent implementation to integrate).
      Though the API and selector engine make it really easy to create site search pages, I pretty much always end up duplicating the same features from site to site. Also – since it takes a bit of extra time – it's tempting to skip over some accessibility related things, and leave features like text highlighting out. Overall I think it makes sense to bundle all that into a module, which can then be reused over and over again 🙂
      Note: markup generation is not yet built into the module, which is why the examples below use PageArray::render() method to produce a simple list of results. This will be added later on, as a part of the same module or a separate Markup module. There's also no fancy JS API or anything like that (yet).
      This is an early release, so be kind – I got the find feature working last night (or perhaps this morning), and some final tweaks and updates were made just an hour ago 😅
      GitHub repository: https://github.com/teppokoivula/SearchEngine Modules directory: https://modules.processwire.com/modules/search-engine/ Demo: https://wireframe-framework.com/search/ Usage
      Install SearchEngine module. Note: the module will automatically create an index field install time, so be sure to define a custom field (via site config) before installation if you don't want it to be called "search_index". You can change the field name later as well, but you'll have to update the "index_field" option in site config or module settings (in Admin) after renaming it.
      Add the site search index field to templates you want to make searchable. Use selectors to query values in site search index. Note: you can use any operator for your selectors, you will likely find the '=' and '%=' operators most useful here. You can read more about selector operators from ProcessWire's documentation.
      Options
      By default the module will create a search index field called 'search_index' and store values from Page fields title, headline, summary, and body to said index field when a page is saved. You can modify this behaviour (field name and/or indexed page fields) either via the Module config screen in the PocessWire Admin, or by defining $config->SearchEngine array in your site config file or other applicable location:
      $config->SearchEngine = [ 'index_field' => 'search_index', 'indexed_fields' => [ 'title', 'headline', 'summary', 'body', ], 'prefixes' => [ 'link' => 'link:', ], 'find_args' => [ 'limit' => 25, 'sort' => 'sort', 'operator' => '%=', 'query_param' => null, 'selector_extra' => '', ], ]; You can access the search index field just like any other ProcessWire field with selectors:
      if ($q = $sanitizer->selectorValue($input->get->q)) { $results = $pages->find('search_index%=' . $query_string . ', limit=25'); echo $results->render(); echo $results->renderPager(); } Alternatively you can delegate the find operation to the SearchEngine module as well:
      $query = $modules->get('SearchEngine')->find($input->get->q); echo $query->resultsString; // alias for $query->results->render() echo $query->pager; // alias for $query->results->renderPager() Requirements
      ProcessWire >= 3.0.112 PHP >= 7.1.0 Note: later versions of the module may require Composer, or alternatively some additional features may require installing via Composer. This is still under consideration – so far there's nothing here that would really depend on it, but advanced features like stemming most likely would.
      Installing
      It's the usual thing: download or clone the SearchEngine directory into your /site/modules/ directory and install via Admin. Alternatively you can install SearchEngine with Composer by executing composer require teppokoivula/search-engine in your site directory.
    • By teppo
      MarkupMenu is a markup module for generating menu trees. When provided a root page as a starting point, it generates a navigation tree (by default as a HTML "<ul>" element wrapped by a "<nav>" element) from that point onwards. If you've also provided it with current (active) page, the menu will be rendered accordingly, with current item highlighted and items rendered up to that item and its children (unless you disable the "collapsed" option, in which case the full page tree will be rendered instead).
      Modules directory: https://modules.processwire.com/modules/markup-menu/ GitHub repository: https://github.com/teppokoivula/MarkupMenu Usage
      As a markup module, MarkupMenu is intended for front-end use, but you can of course use it in a module as well. Typically you'll only need the render() method, which takes an array of options as its only argument:
      echo $modules->get('MarkupMenu')->render([ 'root_page' => $pages->get(1), 'current_page' => $page, ]); Note: if you omit root_page, site root page is used by default. If you omit current_page, the menu will be rendered, but current (active) page won't be highlighted etc.
      A slightly more complex example, based on what I'm using on one of my own sites to render a (single-level) top menu:
      echo $modules->get('MarkupMenu')->render([ 'current_page' => $page, 'templates' => [ 'nav' => '<nav class="{classes} menu--{menu_class_modifier}" aria-label="{aria_label}">%s</nav>', 'item_current' => '<a class="menu__item menu__item--current" href="{item.url}" tabindex="0" aria-label="Current page: {item.title}">{item.title}</a>', ], 'placeholders' => [ 'menu_class_modifier' => 'top', 'aria_label' => 'Main navigation', ], 'include' => [ 'root_page' => true, ], 'exclude' => [ 'level_greater_than' => 1, ], ]); Note: some things you see above may not be entirely sensible, such as the use of {menu_class_modifier} and {aria_label} placeholders. On the actual site the "nav" template is defined in site config, so I can define just these parts on a case-by-case basis while actual nav markup is maintained in one place.
      Please check out the README file for available render options. I'd very much prefer not to keep this list up to date in multiple places. Basically there are settings for defining "templates" for different parts of the menu (list, item, etc.), include array for defining rules for including in the menu and exclude array for the opposite effect, classes and placeholders arrays for overriding default classes and injecting custom placeholders, etc. 🙂
      MarkupMenu vs. MarkupSimpleNavigation
      TL;DR: this is another take on the same concept. There are many similarities, but also some differences – especially when it comes to the supported options and syntax. If you're currently using MarkupSimpleNavigation then there's probably no reason to switch over.
      I'd be surprised if someone didn't draw lines between this module and Soma's awesome MarkupSimpleNavigation. Simply put I've been using MSN (...) for years, and it's been great – but there are some issues with it, particularly in the markup generation area, and it also does some things in a way that doesn't quite work for me – the xtemplates thing being one of these. In some ways less about features, and more about style, I guess 🙂
      Anyhow, in MarkupMenu I've tried to correct those little hiccups, modernise the default markup, and allow for more flexibility with placeholder variables and additional / different options. MarkupMenu was built for ProcessWire 3.0.112+ and with PHP 7.1+ in mind, it's installable with Composer, and I have a few additional ideas (such as conditional placeholders) still on my todo list.
      One more small(ish) difference is that MarkupMenu supports overriding default options via $config->MarkupMenu. I find myself redefining the default markup for every site, which until now meant that each site had a wrapper function for MarkupSimpleNavigation (to avoid code / config repetition), and this way I've been able to leave that out 🙂
      Requirements
      ProcessWire >= 3.0.112 PHP >= 7.1.0 If you're working on an earlier version of ProcessWire or PHP, use MarkupSimpleNavigation instead.
    • By teppo
      Hey folks!
      I'm happy to finally introduce a project I've been working on for quite a while now: it's called Wireframe, and it is an output framework for ProcessWire.
      Note that I'm posting this in the module development area, maily because this project is still in rather early stage. I've built a couple of sites with it myself, and parts of the codebase have been powering some pretty big and complex sites for many years now, but this should still be considered a soft launch 🙂
      --
      Long story short, Wireframe is a module that provides the "backbone" for building sites (and apps) with ProcessWire using an MVC (or perhaps MVVM – one of those three or four letter abbreviations anyway) inspired methodology. You could say that it's an output strategy, but I prefer the term "output framework" since in my mind the word "strategy" means something less tangible. A way of doing things, rather than a tool that actually does things.
      Wireframe (the module) provides a basic implementation for some familiar MVC concepts, such as Controllers and a View layer – the latter of which consists of layouts, partials, and template-specific views. There's no "model" layer, since in this context ProcessWire is the model. As a module Wireframe is actually quite simple – not even nearly the biggest one I've built – but there's still quite a bit of stuff to "get", so I've put together a demo & documentation site for it at https://wireframe-framework.com/.
      In addition to the core module, I'm also working on a couple of site profiles based on it. My current idea is actually to keep the module very light-weight, and implement most of the "opinionated" stuff in site profiles and/or companion modules. For an example MarkupMenu (which I released a while ago) was developed as one of those "companion modules" when I needed a menu module to use on the site profiles.
      Currently there are two public site profiles based on Wireframe:
      site-wireframe-docs is the demo&docs site mentioned above, just with placeholder content replaced with placeholder content. It's not a particularly complex site, but I believe it's still a pretty nice way to dig into the Wireframe module. site-wireframe-boilerplate is a boilerplate (or starter) site profile based on the docs site. This is still very much a work in progress, but essentially I'm trying to build a flexible yet full-featured starter profile you can just grab and start building upon. There will be a proper build process for resources, it will include most of the basic features one tends to need from site to site, etc. --
      Requirements and getting started:
      Wireframe can be installed just like any ProcessWire module. Just clone or download it to your site/modules/ directory and install. It doesn't, though, do a whole lot of stuff on itself – please check out the documentation site for a step-by-step guide on setting up the directory structure, adding the "bootstrap file", etc. You may find it easier to install one of the site profiles mentioned above, but note that this process involves the use of Composer. In the case of the site profiles you can install ProcessWire as usual and download or clone the site profile directory into your setup, but after that you should run "composer install" to get all the dependencies – including the Wireframe module – in place. Hard requirements for Wireframe are ProcessWire 3.0.112 and PHP 7.1+. The codebase is authored with current PHP versions in mind, and while running it on 7.0 may be possible, anything below that definitely won't work. A feature I added just today to the Wireframe module is that in case ProcessWire has write access to your site/templates/ directory, you can use the module settings screen to create the expected directories automatically. Currently that's all, and the module won't – for an example – create Controllers or layouts for you, so you should check out the site profiles for examples on these. (I'm probably going to include some additional helper features in the near future.)
      --
      This project is loosely based on an earlier project called pw-mvc, i.e. the main concepts (such as Controllers and the View layer) are very similar. That being said, Wireframe is a major upgrade in terms of both functionality and architecture: namespaces and autoloader support are now baked in, the codebase requires PHP 7, Controllers are classes extending \Wireframe\Controller (instead of regular "flat" PHP files), implementation based on a module instead of a collection of drop-in files, etc.
      While Wireframe is indeed still in a relatively early stage (0.3.0 was launched today, in case version numbers matter) for the most part I'm happy with the way it works, and likely won't change it too drastically anytime soon – so feel free to give it a try, and if you do, please let me know how it went. I will continue building upon this project, and I am also constantly working on various side projects, such as the site profiles and a few unannounced helper modules.
      I should probably add that while Wireframe is not hard to use, it is more geared towards those interested in "software development" type methodology. With future updates to the module, the site profiles, and the docs I hope to lower the learning curve, but certain level of "developer focus" will remain. Although of course the optimal outcome would be if I could use this project to lure more folks towards that end of the spectrum... 🙂
      --
      Please let me know what you think – and thanks in advance!
    • By Robin S
      After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand...
      Autocomplete Module Class Name
      Provides class name autocomplete suggestions for the "Add Module From Directory" and "Add Module From URL" fields at Modules > New.
      Requires ProcessWire >= v3.0.16.
      Screencast

      Installation
      Install the Autocomplete Module Class Name module.
      Configuration
      Add Module From Directory
      Choose the type of autocomplete suggestions list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. Add Module From URL
      If you want to see autocomplete suggestions for the "Add Module From URL" field then enter them in the following format:
      [autocomplete suggestion] > [module ZIP url]
      Example: RepeaterImages > https://github.com/Toutouwai/RepeaterImages/archive/master.zip Awesomplete options
      The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the autocomplete suggestion item and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information.  
      https://github.com/Toutouwai/AutocompleteModuleClassName
      https://modules.processwire.com/modules/autocomplete-module-class-name/
×
×
  • Create New...