Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Documentation (Work in Progress!) http://mediamanager.kongondo.com/ Still working on this but at least the basics to get you up and running are covered Getting started Adding media to Media Manager fields in ProcessWire pages Currently, site might not work properly on all devices :
  2. Might not be of use to you presently, but thought to draw your attention to this thread (yes, about horses) where @Martijn comes up with some good solutions .
  3. You subsequently found a brilliant solution for this, so thanks. Never used/tested the WP one. Maybe I should have a look. Do you mean in the Inputfield (what you see when editing a ProcessWire page with a Media Manager field) or in the Media Library itself? I ask because there are no tabs in the former. The settings for fields only affect individual fields and are not universally applied to the Media Library (the manager itself). But there was a bug in the former in the text being displayed in the Inputfield and I fixed that in MM version 002. I grappled with this (the first part of your statement) during development and settled for highlighting the title with a view to revisiting in the future. Will have a look again. As for the Edit and Crop buttons, I don't understand what you mean. Please clarify. Am not sure I follow. Are you talking about the Media Library or a Media Manager field - Inputfield? Media Manager displays a notice (success or failure notices) when you select media and click on 'Insert Media'. Are you not seeing this in your tests? As for closing the modal window, the idea is that one may want to insert more media from other Media Library pages not currently in view. Closing the window would mean they have to open the modal again in order to insert the other media. I have explained this in the (upcoming) documentation so as not to confuse users.
  4. Brilliant find! Thanks. I will need to make a couple of changes e.g. so that upload settings can be displayed and saved. There might be other minor changes needed as well. Will include this in version 003.
  5. That would require an in-memory sort. One way to do it (as we wait for @LostKobrakai's better answer ).... Create and populate a property 'distance' on the fly for each page in the PageArray then sort the array by that property. An example: // get a PageArray $res = $pages->find('template=basic-page, limit=15'); // assign distances to a property 'distance' created on the fly foreach ($res as $r) { $r->distance = rand(5, 100);// we assign some random distance just for testing } // testing output $out = ''; // sort #$res->sort('distance');// sort ascending $res->sort('-distance');// sort descending // confirm sorting worked $out .= '<ol>'; foreach ($res as $r) { $out .= '<li>' . $r->title . ': distance - ' . $r->distance . ' Miles</li>'; } $out .= '</ol>'; // it works! echo $out; You should get results similar to this: X-Small: distance - 84 Miles XX-Large: distance - 84 Miles Small: distance - 77 Miles US Open: distance - 75 Miles About Us: distance - 74 Miles Our Achievements: distance - 69 Miles Key Staff: distance - 65 Miles Who We Are: distance - 57 Miles X-Large: distance - 57 Miles Senior Management: distance - 51 Miles Medium: distance - 41 Miles Sizes: distance - 39 Miles Colours: distance - 25 Miles Large: distance - 10 Miles What We Do: distance - 9 Miles Useful reading: PageArray
  6. The error says PHP run out of memory (some tasks may still be in memory and still trying to run). Have a look at this thread (see @Nik's and @Diogo's posts especially) on how to optimize such tasks. What PW version are you using? Only asking to confirm what line #111 in the PageTraversal Class does. Sorry, I don't have a direct answer on how to resolve this.
  7. #1: Only Superusers can see the modules (listing) page #2: No (but I think you are referring to this? It (can auto-check but not auto-upgrade) - ProcessWire Upgrade
  8. @Loges, Thanks for purchasing Media Manager and giving me your feedback. I'll address each point you raise in a later post. Oh, and welcome to the forums
  9. Just don't click the upgrade button
  10. It's difficult to give a recommendation because: We don't know what your needs (for the form) are We don't know exactly what other 'modules and descriptions' you've looked at already. We might just refer you back to one of them We don't know what you mean by easiest We don't know what is a small, nice contact form (nice: are you talking about CSS here? small: number of fields?) We don't know how you wish to capture and store the form information (in a field, in some page?) OK, maybe it's just me who doesn't know these things . Your question is a bit vague. If possible tell us what exactly what you've already considered and what your needs are. Having said all that, any HTML form can be used as a ProcessWire form. You just need that and some template file and you are done
  11. Hi Martin, Thanks for your purchase. Glad you like the module. I almost exclusively use Admin Theme Reno (and will be recommending this to others) when using Media Manager - it gives you better real estate. It works just fine for me but I notice (and maybe this is the way it works for any linked page with child pages) I have to double click on the link to make it load Media Manager. The same goes for 'Pages', 'Setup' and 'Modules' links. There is an example in the README.txt. The Easter break and illness have meant I haven't been able to finish the official documentation (mediamanager.kongondo.com). The API is quite straightforward. Note that you will first need to create a field of type Media Manager, add that to your template(s), then add media in your Media Library to the field. I have added some examples in the first post of this thread. Current its tags only. I'll see if there's a way to make this better. Cheers, /k
  12. Maybe this thread could help? https://processwire.com/talk/topic/268-processwire-on-windows72008-server-with-iis-webserver/
  13. See Ryan's comments here: https://github.com/ryancramerdesign/ProcessWire/issues/432
  14. Since you asked for 'created' you can swap datefield in the example by @Alxndre' for created (we also have 'published')
  15. kongondo

    Simple navigation

    @note: optimised code above (use numChildren instead)
  16. kongondo

    Simple navigation

    The topics I linked to should be able to help you (@see my edited post above yours). The code at the first link is pretty straight forward and solid... Edit: If you don't want to use a function and you'll have no more than 2 levels, you could probably get way with this: <div class="collapse navbar-collapse navbar-right"> <ul class="nav navbar-nav menu navbar-right"> <?php $out = ''; $root = $pages->get("/"); $children = $root->children("limit=7"); $children->prepend($root); foreach($children as $child) { $out .= "<li><a href='{$child->url}'>{$child->title}</a></li>"; if($child->numChildren) {// @note: you could do some more checks here; foreach($child->children as $c) { $out .= "<ul>"; $out .= "<li><a href='{$c->url}'>{$c->title}</a></li>"; $out .= "</ul>"; } } } echo $out; ?> </ul> </div>
  17. kongondo

    Simple navigation

    By sub-pages you mean the children of each $child? Edit: I'm too lazy to write code at this time ..Have a look at this recursive navigation topics/posts: https://processwire.com/talk/topic/563-page-level-and-sub-navigation/?p=4490 https://processwire.com/talk/topic/110-recursive-navigation/ Even if you menu is simpler (say 2 levels deep only), it's probably still a good idea to use a function...you never know when you might need to change things...
  18. kongondo

    Simple navigation

    @Mijo, I have previously advised you to wrap up your code in code blocks. Otherwise it makes it hard to read (and maybe even get a response in some cases)
  19. I had a feeling you'd do that
  20. Maybe ask in the smarty forum. It's just a syntax error so clearly there's something it doesn't like, or you have a typo or a whitespace in there. Maybe you are supposed to be using set method or the new setMultiple() methods? I don't know, again just guessing. See if this helps:
  21. Hi @centaur78, Welcome to ProcessWire and the forums. Thanks for using MenuBuilder. The error is being thrown by TemplateEngineSmarty.module. I have not used that module before so I am guessing here. It probably doesn't like the single quotes. Try using double quotes, i.e.: {$options = array( "wrapper_list_type" => "ul", "list_type" => "li", "menu_css_class" => "type-1", "submenu_css_class" => "dropmenu", "current_class" => "active", "default_title" => 0, "include_children" => 4, "m_max_level" => 1, "current_class_level" => 1, )} You also seem to be missing semi-colons at the end of your PHP statements. Is that how Smarty works?
  22. What version of Blog are you using? I am also not sure what exactly you changed/didn't change (from your explanation above - where you talk about header.inc and _main.php) This error: says you have a variable called blog ($blog) in there somewhere (in blog-side-bar.inc). This one... says you the function formatDate cannot find a field called blog_date or that the field is empty (no date entered). Could you paste the contents of your blog-side-bar.inc below? By the way, the template files that come with Blog are there really for demonstration purposes. For instance, I hope don't have line #64 in the demo and other subsequent code in your implementation.
  23. Maybe it's getting late here but is that (rather general question) really about ProcessWire (on the web)?
  24. Have a look at this diagram https://processwire.com/talk/topic/12933-getting-field-name-in-the-loop/?p=117417 // this returns an object; either a Page object or PageArray object // depending on whether p_contact is a single or multiple page field (@see diagram in post I linked to) $contactId = $page->p_contact; // toString() method will return this object's ID (1234) or IDs if multiple page field (1234|3456|6889) echo $contactId; // no need for this. You already have an object $contact = $pages->get($contactId); echo $contact->title; // if p_contact is a single page field echo $page->p_contact->title; // OR $contact = $page->p_contact echo $contact->title; echo $contact->parent->title echo $contact->id; // echo whatever property // if p_contact is a multiple page field (i.e. returns a PageArray) foreach($page->p_contact as $c) echo $c->title; // OR foreach($page->p_contact as $c) echo $c->parent->title; // OR $contacts = $page->p_contact; foreach($contacts as $contact) echo $contact->title; // OR echo $contacts->first()->title; // OR echo $contacts->eq(3)->name; Good practice to always check if your page field returns something (i.e. that it is not empty) before outputting from it // single page field if($page->p_contact)// do stuff // OR if($page->p_contact && $page->p_contact->id > 0)// do stuff // OR for multiple page field if(count($page->p_contact))// do stuff
  25. Blog doesn't install FieldtypeComments. I'm not sure but I think it is auto-installed when you install ProcessWire. Glad you like it. Thanks!
×
×
  • Create New...