-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
so far it is not affecting existing accounts.
-
Kraken: Drop Jumbo with Astro Navbar. Conversion to ProcessWire
Macrura replied to Christophe's topic in General Support
there are some examples of custom functions to generate specific menus; maybe this could provide some ideas: https://processwire.com/talk/topic/9033-mega-menu/?p=87201 -
are you using the api to generate your form, or manually coding it?
-
right, that's good to know (nevermind my dumb question)... i guess MSN changes the $page context, even though you set the variable outside of the options...in other words $page when in options means the menu item page, not the page being viewed;
-
Repeater won't save repeater items added programmatically
Macrura replied to efiguerola's topic in API & Templates
Wouldn't you need to save the repeater like this? $channel->save('tvChannelGrid'); // Save the repeater. that's how i usually save fields; not sure if you would need to save the page after that. -
since that app was made, PW has grown a lot, and now you could probably achieve a lot of those views in the stock admin, e.g. using lister, page tables etc..
-
@Peter Knight - won't $myimage always be the icon for the current page? $myimage = $page->images->getTag('icon')->width(50)->url; or does the $page context change inside the MSN loop? ... curious about your solution
-
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.