Jump to content

Recommended Posts

That does sound like a great idea indeed. Ever think we'd have any validation issues? (May not even be a valid question - just popped into my head as I was thinking "raw import".)

Also, surely this would only apply to WP sites that are not URL-friendly? Or does Google also happen to index those horrid ?p={id} things anyway?

Share this post


Link to post
Share on other sites

I just looked a a single example Wordpress site, which happend to have the pretty url in the canonical tag. So google shouldn't know about the ugly ones as long as you're using only pretty urls.

Share this post


Link to post
Share on other sites

Well it's just that WP URL's often have the date in the URL and there are a few different format options. Of course this could be replicated in PW, but typically it isn't, so I was mostly wanting to redirect from the pretty WP format to the PW format.

Share this post


Link to post
Share on other sites

So, we'd be looking to redirect /2015/01/hello-world to /blog/hello-world, for example?

Would a simple call like this suffice:

$jumplinks = $modules->get('ProcessJumplinks');
$jumplinks->add('{year}/{month}/{path}','blog/{path}');

--

Side note: would you mind renaming this topic to "Module: Jumplinks" and moving it up to "Modules/Plugins"? (also, I think the tags should go...)

I just don't want to open up a new topic when I release the final.

  • Like 1

Share this post


Link to post
Share on other sites

So, we'd be looking to redirect /2015/01/hello-world to /blog/hello-world, for example?

Would a simple call like this suffice:

$jumplinks = $modules->get('ProcessJumplinks');
$jumplinks->add('{year}/{month}/{path}','blog/{path}');

--

Side note: would you mind renaming this topic to "Module: Jumplinks" and moving it up to "Modules/Plugins"? (also, I think the tags should go...)

I just don't want to open up a new topic when I release the final.

Actually, I think you are right. Although there might need to be a slight variation on that, depending on the WP source format.

I hadn't ever looked at the canonical link info, so knowing that is set up correctly, I guess we don't need to worry about those ID based links - guess there really isn't much to do afterall :)

PS the "k" man beat me to moving this thread! 

Share this post


Link to post
Share on other sites

Actually, I think you are right. Although there might need to be a slight variation on that, depending on the WP source format.

I hadn't ever looked at the canonical link info, so knowing that is set up correctly, I guess we don't need to worry about those ID based links - guess there really isn't much to do afterall :)

PS the "k" man beat me to moving this thread! 

There would indeed - you'd have to parse that out for each segment, and then send it off to Jumplinks.

Does the migrator automatically handle URI changes? (I may just be having a blonde moment here...)

Share this post


Link to post
Share on other sites
Does the migrator automatically handle URI changes? 

Sorry - not sure what you mean here - changes from when till when? Sorry, now I think I am the one having the blonde moment :)

Share this post


Link to post
Share on other sites

Sorry - not sure what you mean here - changes from when till when? Sorry, now I think I am the one having the blonde moment :)

Got confused because you asked for a feature, and with good reason, and then you said it's not needed any more. For some reason, or the other, I assumed that the migrator handles old/new URIs and redirects accordingly... (I haven't used the module, so I don't know it's feature-set.)

Or I'm missing something  :huh:

Share this post


Link to post
Share on other sites

First post cleaned up as documentation is [mostly] ready.

Module is now stable, from what I can tell, though v1 can only be released when PW 2.6 is released. (I'm assuming this is still a little while away... yes?)

  • Like 2

Share this post


Link to post
Share on other sites

Yeah, I did see that - just thought maybe someone could throw in a few hints. ;-)

Because the module is pretty much done, and ready for release (I've even just made a few screencasts which I'll upload in the morning), I'm now wondering (again) if I should make this compatible with 2.5. I guess I jumped over to the 2.6-requirement because I just love the new ModuleConfig. But, I'm sure there are quite a few people who won't be moving over to 2.6 immediately, and that would like to use Jumplinks. So I think I'll just do it.

  • Like 1

Share this post


Link to post
Share on other sites

I would probably keep this 2.6 only. Most use is when releasing new site, so probably most usage will be with latest and greatest ;)

Share this post


Link to post
Share on other sites

I would probably keep this 2.6 only. Most use is when releasing new site, so probably most usage will be with latest and greatest ;)

Indeed, though it's a bit late. Done already. Hehe! And it works with 2.6

_________

Last round of bug-hunting (help would be awesome) before I release v1 tomorrow morning.

  • Like 1

Share this post


Link to post
Share on other sites

@adrian - I have added an API method, I'm sure it will come in handy.

$this->modules->ProcessJumplinks->add(string $source, string $destination, string $start = '', string $end = '')

I think that the WP migrator module should check the permalink format being used (%year%/%monthnum%/%postname%/, for example) and convert it to the Jumplinks-equivalent ({year}/{month}/{name}/, in this case).

  • Like 3

Share this post


Link to post
Share on other sites

Some issues have popped up (regarding timestamps, paths in Windows, execute hyphens, etc) and, thanks to Dave's help in finding them, they have been fixed. Also rolled back to Beta (bumped to 1.0.2 - leaving the version in v1 state) in case any more anomalies pop up.

  • Like 1

Share this post


Link to post
Share on other sites

I'll need to look into this... not sure what's making it require PHP 5.5...

(Going to quickly test on an 5.4, and 5,3 to see what the problem could be.)

Share this post


Link to post
Share on other sites

Ah, it seems that empty() is the culprit here, requiring write access to its argument.

Have pushed the fix to the repo. Works on 5.4 now. (As for 5.3, I don't know yet, but it could well just be fine.)

  • Like 2

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
      As threatened in Ryan's announcement for 3.0.139, I built a little module for sliding toggles as a replacement for checkboxes. Styling of the input is CSS3 only (with all the usual caveats about older browsers), no JS necessary, and may still be a bit "rough around the edges", so to speak, since I didn't have much time for testing on different devices or brushing things up enough so I'd feel comfortable pushing it to the module directory. But here's the link to the GitHub repo for now:
      InputfieldSlideToggle
      Fieldtype and Inputfield that implements smartphone-style toggles as replacement for checkbox inputs. The visualization is CSS-only, no additional JS necessary.
      Status
      Still very alpha, use with caution!
      Features / Field Settings
      Size
      You can render the toggles in four different sizes: small, medium, large and extra large.
      Off Color
      Currently, "unchecked" toggles can be displayed either in grey (default) or red.
      On Color
      "Checked" toggles can be rendered in one of these colors: blue (default), black, green, grey, orange or red.
      Screenshots

      Some examples with checkbox label


      View all Size and Color Combinations
      Small toggles Medium toggles Big toggles Extra big toggles  









    • By Orkun
      Hi Guys
      I needed to add extended functionalities for the InputfieldDatetime Module (module is from processwire version 2.7.3) because of a Request of Customer.
      So I duplicated the module and placed it under /site/modules/.
      I have added 3 new Settings to the InputfieldDatetime Module.
      1. Day Restriction - Restrict different days based on weekdays selection (e.g. saturday, sunday) - WORKING

       
      2. Time Slots - Define Time slots based on custom Integer Value (max is 60 for 1 hour) - WORKING

       
      3. Time Range Rules per Weekday - Define a minTime and MaxTime per Weekday (e.g. Opening Hours of a Restaurant) - NOT WORKING PROPERLY

       
      The Problem
      Time Slots and Day Restriction working fine so far. But the Time Range Rules per Weekday doesn't work right.
      What should happen is, that when you click on a date, it should update the minTime and maxTime of the Time Select.
      But the change on the select only happens if you select a date 2 times or when you select a date 1 time and then close the datepicker and reopen it again.
      The time select doesn't get change when you select a date 1 time and don't close the picker.
      Here is the whole extended InputfieldDatetime Module.
      The Files that I have changed:
      InputfieldDatetime.module InputfieldDatetime.js jquery-ui-timepicker-addon.js (https://trentrichardson.com/examples/timepicker/) - updated it to the newest version, because minTime and maxTime Option was only available in the new version  
      Thats the Part of the JS that is not working correctly:
      if(datetimerules && datetimerules.length){ options.onSelect = function(date, inst) { var day = $(this).datetimepicker("getDate").getDay(); day = day.toString(); var mintime = $(this).attr('data-weekday'+day+'-mintime'); var maxtime = $(this).attr('data-weekday'+day+'-maxtime'); console.log("weekday: "+day); console.log("minTime: "+mintime); console.log("maxTime: "+maxtime); var optionsAll = $(this).datetimepicker( "option", "all" ); optionsAll.minTime = mintime; optionsAll.maxTime = maxtime; $(this).datetimepicker('destroy'); $(this).datetimepicker(optionsAll); $(this).datetimepicker('refresh'); //$.datepicker._selectDate($(this).attr("id"),date); //$.datepicker._base_getDateDatepicker(); // var inst = $.datepicker._getInst($(this)); // $.datepicker._updateDatepicker(inst); /*$(this).datetimepicker('destroy'); InputfieldDatetimeDatepicker($(this), mintime, maxtime); $(this).datetimepicker('refresh'); */ // $(this).datetimepicker('option', {minTime: mintime, maxTime: maxtime}); } } Can you have a look and find out what the Problem is?
      InputfieldDatetime.zip
       
      Kind Regards
      Orkun
    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By apeisa
      Update 31.7.2019: AdminBar is now maintained by @teppo. Modules directory entry has been updated, as well as the "grab the code" link below.
      ***
      Latest screencast: http://www.screencas...73-ab3ba1fea30c
      Grab the code: https://github.com/teppokoivula/AdminBar
      ***
      I put this Adminbar thingy (from here: http://processwire.c...topic,50.0.html) to modules section and to it's own topic.
      I recorded quick and messy screencast (really, my first screencast ever) to show what I have made so far. You can see it from here: http://www.screencas...18-1bc0d49841b4
      When the modal goes off, I click on the "dark side". I make it so fast on screencast, so it might seem a little bit confusing. Current way is, that you can edit, go back to see the site (without saving anything), continue editing and save. After that you still have the edit window, but if you click "dark side" after saving, then the whole page will be reloaded and you see new edits live.
      I am not sure if that is best way: there are some strengths in this thinking, but it is probably better that after saving there shouldn't be a possibility to continue editing. It might confuse because then if you make edits, click on dark side -> *page refresh* -> You lose your edits.
      ***
      When I get my "starting module" from Ryan, I will turn this into real module. Now I had to make some little tweaks to ProcessPageEdit.module (to keep modal after form submits). These probably won't hurt anything:
      if($this->redirectUrl) $this->session->redirect($this->redirectUrl); if(!empty($_GET['modal'])) $this->session->redirect("./?id={$this->page->id}&modal=true"); // NEW LINE else $this->session->redirect("./?id={$this->page->id}");   and...
      if(!empty($_GET['modal'])) { $form->attr('action', './?id=' . $this->id . '&modal=true'); } else { $form->attr('action', './?id=' . $this->id); // OLD LINE }  
×
×
  • Create New...