-
Posts
2,765 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
E-Commerce site with ProcessWire - Optimal approach?
Macrura replied to Neo's topic in General Support
true, but there can be some advantages to having a modular system; FC has an XML feed you can read back into PW and with some effort could have some level of integration; but i agree that padloper is likely the best option now for PW+EC. -
interesting to read about aliases for functions function getRendom() { getRandom(); } php 5.6+ use function getRandom as getRendom;
-
yes - drop in for sure... maybe a module at some point could be convenient, since i'm predicting i'll need this a lot.
-
that's looking good – when you get some stable CSS, post it back here... thanks for the autocomplete suggestion also!
-
@ajben - let me know how it works; I'm on the road till next week, but when i get back i'll be testing it more as well as trying to get the default CSS a bit more consistent with PW inputfields; Main thing to watch out for are js errors, as i haven't done extensive testing, and if there ends up being a js error it could break other functionality on the page edit. also, i haven't extensively tested it with multiple image fields on 1 page, and multiple tags on each image - i'm not sure how this plugin saves the tags, they may be comma separated which might not work with PW image tags; some changes to the tag-it plugin may be necessary as i'm not seeing an option for the tag delimiter... edit: found the plugin setting for the stored delimiter and also tested on multiple image fields, multiple tags and all appears to work so far; $(".Inputfield_images input[name^='tags_images_']").each(function() { $(this).tagit({ availableTags: ["kenburns", "mytag2", "mytag3"], singleFieldDelimiter: ' ' }); }); (will update example code above as well)
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Macrura replied to Nico Knoll's topic in Modules/Plugins
btw in the new dublin core spec you don't need to capitalize DC -
Here's a simple way to add autocomplete and 'tags' to your tags field, using admin custom files; you would first need to have admin custom files running and enabled for page edit. this example uses Tag-it! because it stores the tags in a way that seems to work with PW's field (note this is still proof of concept and being tested, but works so far); http://aehlke.github.io/tag-it/ 1.) add the tag-it.min.js to your admin custom files or paste it directly into your ProcessPageEdit.js file. 2.) paste in the CSS into your ProcessPageEdit.css file 3.) Initialize the tags after the plugin, in your ProcessPageEdit.js $(function(){ $(".Inputfield_images input[name^='tags_images_']").each(function() { $(this).tagit({ availableTags: ["kenburns", "test"], singleFieldDelimiter: ' ' }); }); }); you can set it up so that you initialize the field based on it's name and then set your tags with the availableTags option. the CSS needs to be adjusted to be compatible with the jqueryui settings used by PW admin; this is my current CSS, but needs some work still (though it works): ul.tagit { /* padding: 1px 5px; */ padding: 7px 5px; overflow: auto; margin-left: inherit; /* usually we don't want the regular ul margins. */ margin-right: inherit; border-top: 1px #ccc solid; } ul.tagit li { display: block; float: left; margin: 2px 5px 2px 0; } ul.tagit li.tagit-choice { position: relative; line-height: inherit; background: #BBCEF1 !important; } ul.tagit li span { color: black !important; } a.tagit-close { /* background: #eee; */ } input.tagit-hidden-field { display: none; } ul.tagit li.tagit-choice-read-only { padding: .2em .5em .2em .5em; } ul.tagit li.tagit-choice-editable { padding: .2em 18px .2em .5em; } ul.tagit li.tagit-new { /* padding: .25em 4px .25em 0; */ padding: 0; } ul.tagit li.tagit-choice a.tagit-label { cursor: pointer; text-decoration: none; } ul.tagit li.tagit-choice .tagit-close { cursor: pointer; position: absolute; right: .1em; top: 50%; margin-top: -8px; line-height: 17px; } /* used for some custom themes that don't need image icons */ ul.tagit li.tagit-choice .tagit-close .text-icon { display: none; } ul.tagit li.tagit-choice input { display: block; float: left; margin: 2px 5px 2px 0; } ul.tagit input[type="text"] { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border: none; margin: 0; padding: 0; width: inherit; background-color: inherit; outline: none; } there are a few other good tagging plugins for jquery and i've been gradually testing them and trying them out; but for simple needs, this example may be pretty workable. One other caveat - since the plugin initializes on the field and modifies the way it looks, it will trigger the changed field, and consequently ask you if you want to save the page, on exit, even if you didn't change any fields on the page... *plugin init edited to change the stored tag delimiter for PW image tags field
-
i don't see any benefit to using a function, you could just output the list in the normal way: <ul class="oi_smalldev_categories_list"> <?php $count = 1; foreach($categories as $category) { echo "<li class='cat-item cat-item-{$count}'>"; echo "<a href='{$category->url}' title='{$category->summary}'>{$category->title}</a>"; echo '</li>'; $count++; } ?> </ul>
-
only issue is i would want the file size to display like 2.97MB but it displays 3,044 kB using filesizeStr- should i use Adrian's proposed function? would be cool of you could pass some option to filesizeStr to show in MB
-
your categoriesList() function would need to echo the desired markup. that function will be completely dependent on your page tree structure, as well as what if any arguments you will allow to pass into the function.
-
Allow Page Numbers isn't 404'ing when content doesn't exist...
Macrura replied to a-ok's topic in General Support
that's a good point, though the sites i'm using infinite scroll on are not updated that often and are cached - i would think it a somewhat rare occurrence for a viewer to miss out on an item that was added between their page load and when they hit the trigger for the last page...- 15 replies
-
- pagination
- page numbers
-
(and 1 more)
Tagged with:
-
Allow Page Numbers isn't 404'ing when content doesn't exist...
Macrura replied to a-ok's topic in General Support
your infinite scroll will keep triggering unless you put a limit; plus, even if you stop the load after it detects no more items, you would still have to load that 404 page to find out, so then you wouldn't be able to show the "no more posts to load" message at the right time;- 15 replies
-
- pagination
- page numbers
-
(and 1 more)
Tagged with:
-
Allow Page Numbers isn't 404'ing when content doesn't exist...
Macrura replied to a-ok's topic in General Support
your isotope implementation should have the max pages set in a data attribute, e.g. <a href="#" data-pages="4" data-page="1" data-link="http://mysite.com/page2/">More Items...</a> this may or not be visible if you are triggering the load at reaching the end of the page; you would be able to reuse your pagination vars for the data-pages value (ceil items_per_page/total_items for example); your script needs to be smart enough not to ask for another page after it has loaded the last page, the data-page value gets updated each time you load the next page's results;- 15 replies
-
- pagination
- page numbers
-
(and 1 more)
Tagged with:
-
forklift can do some amazing things, multi-rename, browse archives etc; also the split screen each with unlimited tabs is great when working on huge projects where you need fast access to 10 different folders; and then you can save entire workspaces...
-
Yes - good find, that was the model i used for setting up the range filtering.. $.fn.dataTable.ext.search.push( function( settings, data, dataIndex ) { var distance = parseInt( $('#search_distance').val(), 10 ); var distmax = parseFloat( data[3] ) || 0; // use data for the distance column if( isNaN( distance ) || distance <= distmax ) { return true; } return false; } ); and i'm using the ion rangeslider, which after testing a few different ones seemed to work best
-
They are actually not using anything other than the stock Foxycart admin; Though i did setup Orderdesk and it looks great, but i don't think they ever used it. @BernhardB - thanks for checking it out! The filter is really dead simple.. 1.) jQuery Datatable with custom filters, using PW page IDs as data attributes on the cells, e.g. data-filter="1234" 2.) when you change any of the filters, there is an onchange trigger to redraw the table with the filter; 3.) change some numerical inputs to the sliders 4.) empty divs above the table, one for each filter type, and those are populated at the same time when the filters change
-
Quick note about this site, it's just been re-launched as a 'V2' after an additional 90 hrs of work on it... http://ohmspeaker.com/ mostly a lot of refactoring of code, finding better, more efficient ways of doing things, both in frontend and admin...I had about 2 years of good reading–the forum–between the initial launch and when the refactor started... Thanks to pro modules like Table and Lister Pro, the management interface is fast, and easy for the company management to maintain. With 4 separate product lines to manage (Speakers, Legacy Products, B-Stock and Home Theater), Lister pro has streamlined this–the agile ajax interface is truly unparalleled amongst ecommercce systems for adding and editing hundreds of products. The news system has been expanded and enhanced with xml feeds, category/tag/archive filters, author profile, and other enhancements. The product search was converted from a server side search to a completely Javascript based filter, using html5 pushstate, and graphical sliders. The category overview pages filter the products as opposed to being separate pages, reducing page loads. Product pages are more intuitive, with better veneer picker, and other javascript enhancements.
-
Forklift in combination with Sublime Text is pretty unbeatable for simple FTP and text editing. Also, I wouldn't rule out Coda, which is basically a text editor with most of the features of Transmit, all in 1 app..
-
No more create new page from page field after upgrade 2.6.13
Macrura replied to BFD Calendar's topic in General Support
@BFD Calendar - sounds like a possible bug; perhaps best course is to report it as an issue on github. -
yeah - that's the other piece of the puzzle... !
- 6 replies
-
- vanity url
- landing pages
-
(and 1 more)
Tagged with:
-
No more create new page from page field after upgrade 2.6.13
Macrura replied to BFD Calendar's topic in General Support
what happens if you re-create that same field as a copy on the same template - does it also not work? Are there any errors in the console? -
as long as the page URL is /page-title they should crawl that; you could also use a hook to make those pages live off the root as is explained in the CMS critic case study. that would take care of the URLs, because then the system would always rewrite those landing page URLS to the root versions i use this for landing pages: wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'landing-page') { // ensure that pages with template 'landing-page' live off the root $event->replace = true; $event->return = "/$page->name/"; } }); in the landing page itself i put this: // if someone tries to access this page at it's real location in the page tree, redirect to the fake URL: if(!$input->urlSegment1) { $session->redirect($page->url); }
- 6 replies
-
- vanity url
- landing pages
-
(and 1 more)
Tagged with:
-
you could do it multistage with add-> e.g. start with simple selectors of things that will match and then incrementally add more; or you could foreach through them and do more advanced checking on each item, but this will be pretty slow; or see if OR groups would work: $tmp = $pages->find("template=booking,bookingStartDate>=$frontStartDate,(bookingStartDate<=$frontEndDate, bookingEndDate<=$frontEndDate),bookingEndDate>=$frontStartDate"); https://processwire.com/api/selectors/#or-groups
-
it depends on if you are rendering the page off the root or redirecting; for a landing page you may as well render it using the URL segments technique; and you can manipulate your canonical URL to show the off-root URL
- 6 replies
-
- vanity url
- landing pages
-
(and 1 more)
Tagged with: