Jump to content

WireCodex

Members
  • Posts

    406
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by WireCodex

  1. some time ago I has an idea to mix some modules and codes that we have in our modules "eco-system" to do something similar.. soon I'll post here my idea
  2. Good luck with that!
  3. something interesting to make the backend faster without modifying everything: https://m.signalvnoise.com/stimulus-1-0-a-modest-javascript-framework-for-the-html-you-already-have-f04307009130 code: https://github.com/turbolinks/turbolinks https://github.com/stimulusjs/stimulus
  4. in the jquery function you can use this: $("# dc-container").html("loaded:" + pageData + "(by jquery ajax)"); instead of document.getElementById("dc-container").innerHTML = 'loaded:' + pageData + '(by jquery ajax)'; to be consistent if you already use the library
  5. @bernhard Incredible results! Can you summarize which option you used finally?
  6. try this https://modules.processwire.com/modules/template-decorator/
  7. ..but maybe you tell to us.. ..
  8. but @heldercervantes has not said any lie there .. you know any security issue? .. If not, then PW is the safest until proven otherwise
  9. In BS4 (in BS3 too) you can on/off the inclusion of any component (javascripts or styles) in your project, it's not mandatory to download and use the whole framework http://getbootstrap.com/docs/4.0/getting-started/webpack/ https://getbootstrap.com/docs/3.3/customize/ if you know how to work with SASS you can create your own grid system in your stylesheet using the SASS mixins without include the BS library http://getbootstrap.com/docs/4.0/layout/grid/#sass-mixins
  10. https://modules.processwire.com/modules/process-google-analytics/
  11. You can use this: https://github.com/miguel-perez/smoothState.js Demos: https://rawgit.com/miguel-perez/smoothState.js/master/demos/sidebar/index.html https://rawgit.com/miguel-perez/smoothState.js/master/demos/csstricks/index.html you don't need to do anything complex on your PW website
  12. maybe using hooks and url segments you can throw a 404 if someone visit /admin (trying to guess) but show the login form if they visit /admin/123PIN with a secret PIN for editors..
  13. Check this website, maybe it can help in your ideas https://processwire.com/about/sites/list/ohm-speakers/
  14. you can use https://processwire.com/docs/tutorials/how-to-use-url-segments/ you will get page/a-z instead of page/?sort=az ..using this segments you can search, filter, sort the pages results and update too the "sort box" (select, radio buttons, tabs, any) by this value
  15. .InputfieldHeader { padding: 10px 10px 10px 20px; } .InputfieldStateCollapsed > .InputfieldHeader { padding-bottom: 10px; } remember that the minimum size for an element in a touch device should be 44 pixels, these padding values are the minimum values that you must use in the processwire header to comply with that rule..
  16. try this https://modules.processwire.com/modules/process-data-import/ ..although it's old and still in alpha version, I use it this week in PW 3.0.84 importing products from amazon feeds and it works perfect. Very simple to use, it has a built-in cron job, accepts xml, json and csv and allows easy mappings between the source data and the template fields.. or maybe you can fork the module and customize it for you.. check
  17. ..but in case you fork the module, you might want to consider this code editor: https://microsoft.github.io/monaco-editor/index.html https://zengenti.com/en-gb/blog/authors/richard-saunders/from-code-mirror-to-monaco.aspx is the code editor that powers VS Code
  18. for that situations I have used https://icecoder.net/ it installs very easily on the website and works perfect.
  19. if the size in bytes of the images is not a problem, you can resize it with css. It seems to be a situation with the php image library when generate the new image, perhaps use a color space, a gamma correction or a color depth different
  20. https://auth0.com/blog/converting-your-web-app-to-mobile/
  21. I can't disable that in my chrome console because I use it in my own css during development, maybe the pw styles should be compiled without the option of source map files enabled if it's the case that those files are not going to be included in the distribution
  22. yes, all the time.. the installation did not include the source map for less/css files.. It's not a big problem, but the constant notifications bother
  23. Take a look at this, maybe can be adapted to build the form configuration with a graphical UI: https://formbuilder.online/ here a test page for different actions and get the config in different formats (use the Save button): https://kevinchappell.github.io/formBuilder/
  24. https://github.com/apeisa/PaymentStripe https://github.com/apeisa/PaymentPaypal https://github.com/apeisa/PaymentModule https://github.com/apeisa/PaymentInvoice
  25. This was tested and works... _func.php function toc( $heading, $content ) { $heading = str_replace( ',', ' ', $heading ); $heading = explode( ' ', $heading ); foreach ( $heading as $k => $v )$heading[ $k ] = trim( $v ); $heading = implode( '|', $heading ); $anchors = array(); if ( preg_match_all( '{<(' . $heading . ')[^>]*>(.+?)</\1>}i', $content, $matches ) ) { foreach ( $matches[ 1 ] as $key => $tag ) { $text = $matches[ 2 ][ $key ]; $anchor = wire('sanitizer')->pageName($text, true); $anchors[ $anchor ] = $text; $full = $matches[ 0 ][ $key ]; $content = str_replace( $full, "<a name='$anchor' href='#'></a>$full", $content ); } } if ( count( $anchors ) ) { $toc = "<ul class='article-toc'>"; $url= wire('page')->url; foreach ( $anchors as $anchor => $text ) { $toc .= "<li><a href='$url#$anchor'>$text</a></li>"; } $toc .= "</ul>"; return array( $toc, $content ); } else { return null; } } article.php (example template file) <?php $out = toc("h2 h3 h4",$page->body); ?> <div class="page"> <div class="main"> <?=$out[1]?> </div> <div class="sidebar"> <h3>Table of Contents</h3> <?=$out[0]?> </div> </div> the previous published function was updated because we need to use wire() in _func.php
×
×
  • Create New...