Jump to content

kongondo

PW-Moderators
  • Posts

    7,479
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by kongondo

  1. Thanks for this Ben! I was about to hit the comments but I see Ryan has already mentioned what I had in mind
  2. No it shouldn't matter. If you get stuck, t would be easier if we can see both code blocks
  3. Might be of use.. https://processwire.com/talk/topic/8343-access-page-and-pages-variables-from-inside-a-javascript-file/ https://processwire.com/talk/topic/5162-how-to-load-js-css-plugins-colorbox-cycle2/
  4. Hi Tony, Glad you find the module helpful. I have really been so busy I've not had a chance to update the docs, my bad. As the name of that option suggests 'post_small_image' will only work with truncated posts. What you want is its big brother, 'post_large_image' option set to 1. The default is 0 (meaning don't show the image), hence why you don't see your image in un-truncated posts. Until I get round to updating the docs, please have a look at the source code (not ideal, I know :-() for all available renderPosts() options (as well as other methods' options). For your particular question, these might also be of use: $options = array( // ** large/full post featured image ** 'post_large_image_width' => '',// no width manipulation of featured image if this is blank or 0 // no height manipulation if this is blank or 0. // Note, if size is true and both width and height > 0, we use size() instead 'post_large_image_height' => '', 'post_large_image_size' => false,// if 'size' = true AND both width and height > 0, this kicks in );
  5. Good forensics. If it's a WireUpload.php issue then you can put in a request with @Ryan to hear his thoughts? Meanwhile, you can always use a custom uploads handler in conjunction with the other methods that come with the module, e.g. getResponse() which calls the crucial validation methods.
  6. Update: Version 0.1.4 As per @cJonathan Lahijani suggestion, in ProcessMenuBuilder, I have moved the first tab 'Main' to become the third tab and renamed it to 'Settings'. I think it looks much nicer now, thanks @Jonathan. This is in dev branch only for now.
  7. Have a look at the second paragraph in this section in the README. I have just updated it now. By default, only 50 pages are returned if using AsmSelect or PageAutocomplete. Either use a custom selector or the 'PageListSelectMulitple' method to add pages to your menu. Let me know if this resolves your issue.
  8. OK, a bit OT.... I was finding it increasingly annoying writing README's for my modules in Markdown. It takes way too much time. I needed something that could convert HTML to markdown, the idea being to write in RTE, copy the source HTML and convert that to markdown. I briefly toyed with the idea of writing a personal module for this, then I found this thread which lead me to other things via Google. And now I've found it, a MS Word plugin for markdown, yeah!! Yes, I am not a fan of markdown and yes I like Word! ...a lot. Now I can type my README's and see the visual richness at the same time as I spell check, yeah! Writage (a Markdown plugin for MS Word. It uses Pandoc behind the scenes) Pandoc (brilliant universal converter) Other interesting stuff HTML To Markdown for PHP to-markdown </end OT>
  9. Maybe something like this first, then you use PW API after that?
  10. Does this: <div data-uk-filter="Bedroom,Gym,Basement" >...</div> ..come after your list? <li class="" data-uk-filter="Kitchen"><a href="#">Kitchen</a></li> <li class="" data-uk-filter="Bedroom"><a href="#">Bedroom</a></li> <li class="" data-uk-filter="Bathroom"><a href="#">Bathroom</a></li> <li class="" data-uk-filter="Sitting-Room"><a href="#">Sitting Room</a></li> In that case you already have all the tags you need in $duplicates (you could rename it to say, $uniqueTags, btw) and do something like: $commaTags = implode(', ', $uniqueTags); $out .= '<div data-uk-filter="' . $commaTags . '" >...</div>';// if continuing with the $out above echo $out; Btw..the other code by @LostKobrakai is a newish ProcessWire syntax in case it's getting you confused with the 'normal' PHP implode syntax
  11. Hi all, I've realised that in my first post I didn't clarify that Media Manager is going to be a commercial module. I have edited the first post.
  12. Last major feature has been implemented, so a couple of more testing and its ready. Done. See it action here.
  13. My excuse is that I needed it for Media Manager
  14. JqueryFileUpload This module is a ProcessWire implementation of the awesome Blueimp jQuery File Upload plugin. Server-side, the module provides a custom uploads' handler enabling you to perform various tasks with ease. The module is an interface of the feature-rich Ajax File Uploads widget provided by the jQuery File Upload plugin. The module is completely customisable and can be used both in the front- and backend (e.g. in a third-party module). Please read the README carefully and completely before using the module Release Status: Stable. Module Download: http://modules.processwire.com/modules/jquery-file-upload/ Issues tracker Project page: GitHub Security The module has been written with security in mind and makes no assumptions about any client-side validation. Instead, the module provides robust server-side validation of uploaded files. Server-side, no Ajax requests are honoured unless specifically set via configurable options server-side. This means that client-side requests to upload, delete and list files are not executed unless allowed server-side. By default, files are uploaded to a non-web-accessible (system) folder and files previously uploaded on the server are not sent back for display unless that setting is enabled. However, developers are still strongly advised to implement any other feasible measures to guard against malicious uploads, especially if allowing frontend uploading. For instance, developers can use native ProcessWire checks to limit access to the widget (e.g. only allowing uploads by registered/logged-in users). Demo A short video demo can be found here (and below )(CSS is WIP! ). In the backend, you can see it in action within the (upcoming) module Media Manager Features Fast Ajax uploads. Client and server-side validation. Client-side image resizing (highly configurable options). Beautiful touch-responsive image gallery preview. Audio and video previews pre-upload. Chunked and resumable file uploads (currently client-side only; server-side handling planned). Drag and drop support. Copy and paste support (Google Chrome only). Progress bars. Cross-domain uploads. Single or multiple uploads. Delete uploaded files. Documentation On GitHub. Have a look at the long list of available options. License Released under the MIT license @Credits: Sebastian Tschan @Thanks: Pete and BernhardB for the idea. Please test and provide feedback. Thanks!
  15. Was there a question in there? $out = "<ul>"; $duplicates = array(); foreach($page->images as $image){ // rather than count words, let's just explode each string into an array (even if only one word) $tagsArray = explode(' ', $image->tags); foreach ($tagsArray as $t) { if(in_array($t, $duplicates)) continue;// skip duplicate tags $out .= "<li class='' data-uk-filter='{$t}'>" . "<a href='#'>{$t}</a>" . "</li>"; $duplicates[] = $t; } } $out .= "</ul>"; echo $out;
  16. This is just to get you going...It is not a complete solution and will only work if there's only 1 tag per image...Otherwise, you need to capture each page's image's tag in an array (explode the tags string) and remove duplicates. Image tags are saved as a string of space separated tags. So, if there's more than one tag, you will get all of them in one line . Anyway, gotta run, so here goes... $duplicates = array(); foreach($page->images as $image){ if(in_array($image->tags, $duplicates)) continue;// skip duplicate tags echo" <li class='' data-uk-filter='{$image->tags}'> <a href='#'>{$image->tags}</a> </li> "; $duplicates[] = $image->tags; } echo"</ul>" ; Btw, why are you using a quote as a code block?
  17. Yeah...the question went unanswered for a whole 1 minute, which means you were either asleep or busy, ...just kidding...
  18. You need to get in in context $p = $pages->get(1040); $label = $p->fields->get('body', true); echo $label; // or if you are sure the page is there, a one-liner echo $pages->get(1040)->fields->get('body', true); Edit: I could have sworn @LostKobrakai was asleep . Beaten, again
  19. Update: Version 6 (on dev branch only for now) Changes Thanks to @BitPoet, on a paginated coordinates' table, clicking on a marker will, where necessary, bring its page into view --------------------------------- @BitPoet, thanks! Following your ideas, I did it like this: Server-side, add a data-row='n' to each marker specifying its row in the coordinates' table (same number you see on the markers ) In the pagination function (js) for each page, get the number of the first row and add that to a data-first-row='n' attribute for each respective span Created a function that, on clicking a marker, it finds the first span (#2 above) whose data-fist-row is greater than the marker's data-row. If found, our marker's page is the immediate previous page, so we click on that if it's not already in view (!class='active'). If span 'is out of bounds', it means we are on the last page so we click on that instead. If selector returned nothing, it means there's no pagination in place, so we do nothing. Demo
  20. Sourcetree (and I believe other clients) handle the folders for the branches for you behind the scenes. Using Sourcetree I have only 1 main project folder per project (with sub-folders and files inside, of course). I start off with a master branch which I then clone to become a 'dev' branch. My dev branch then becomes my 'working' branch. Every time I edit my files, I am working on the dev branch. When I am ready to share the code, I push the dev branch to 'origin' which in many cases is GitHub (but can be BitBucket as well). Sourcetree will ask which branches in the origin I am pushing to. I push local 'dev' to origin (i.e. remote) dev. When the code is stable enough, I merge dev to master. If I switch to master as the working branch, and edit my files, Sourcetree makes sure that my text editor is editing master files and not dev. So, it is important to ensure you have the correct branch set as the working branch. Earlier in the days I used to have separate folders for master and dev branches and it was just too tedious... I suggest you Google some intro to GitHub or Git. There's some nice resources out there Edit: Check out your repository settings RE linking your local and remote branches..
  21. I use source tree for all things GitHub...https://www.sourcetreeapp.com/
  22. Update: Version 5 (dev branch only) Changes Added pagination to coordinates' table (adaptation of this easy table pagination script) [@note: (i) selecting trash all will trash all rows whether in view or not: (ii) *clicking on a marker whose table 'page' is not in view will not bring that page into view. I need help with this] If using AsmSelect, made it so that selectable pages that are already markers (i.e. already in the coordinates' table) are greyed out and are un-selectable (similar to normal page field behaviour) [@note: the JS I am using may not work in some (older) broswers] * need help with this please, thanks. I've noticed that IE does not seem to understand element width() [only innerWidth()]. This results in very massing coordinates' values. I'll see if I'll sniff user agent to accommodate IE. My policy in respect to free modules is I don't bother with IE ) Screenshot
  23. Everything you need is in that example ...Constructing the menu manually is also a good option where there are only few items and the menu will not be changing
  24. Hi @bluellyr, Welcome to PW and the forums. Currently it's not possible but its something I think I can easily add to the module (no ETA though!). Meanwhile, you can try what @Webrocker did here or check if MarkupSimpleNavigation (a non-GUI menu builder) will enable what you are after.
×
×
  • Create New...