Jump to content

k07n

Members
  • Posts

    112
  • Joined

  • Last visited

Everything posted by k07n

  1. Nice image drag and drop feature! How can I make a thumbnail from image to use it with colorbox for example?
  2. Yeap, you right. I use 'straightDown' isotop layout in my project and only css animation, maybe thats why its works fine for me.
  3. I move $container.isotope('reLayout'); under IF, so isotope will rearrange hidden boxes.
  4. Hi! It's me again. $('.section:not("#index") h3').bind('click', function(){ var parent = $(this).parent('.cat'); if( parent.find('.descr:visible').length > 0 ) { parent.find('.descr').slideUp( animated ? speed : 0, function(){ $container.isotope('reLayout'); }); } else { parent.find('.descr').slideDown( animated ? speed : 0, function(){ $container.isotope('reLayout'); }); } }); There is no need to callback reLayout on slide. $('.section:not("#index") h3').bind('click', function(){ var parent = $(this).parent('.cat'); if( parent.find('.descr:visible').length > 0 ) { parent.find('.descr').slideUp( animated ? speed : 0 ); } else { parent.find('.descr').slideDown( animated ? speed : 0 ); } $container.isotope('reLayout'); }); This little change insanely increase speed.
  5. There are long pages in my project, and I'm tired to scroll up/down to save the page. So I've installed this module again and added this little fellow - "return false" "e.preventDefault()" to the function savePage in AdminHotKeys.js and browser doesn't fire "save dialog box" any more on Ctrl+S. if($('button[id*="submit"]').length > 0){ function savePage(e){ $('button[id*="submit"]').trigger('click'); e.preventDefault();}; $(document).bind('keydown', hkconf.hk_save, savePage); } Soma, thx again 4 the module. upd: fellow changed %)
  6. Thanks for the answer. There are alternatives, but whey are white and dark, figuratively speaking (WYSIWYG editors suitable only for text and Ace requires some html knowledge). But MarkItUp is the grey thing =) I can explain to content manager how to "bold" words in it and I can build more complicated output by myself. So I'm very glad what you don't forget about MarkItUp, will waiting for the suitable project for it %) Cheers!
  7. Hi, Ryan! How it's going with MarkItUp? Do you still want to resurrect it in pw2 or maybe it's already released, but I cant find it?
  8. Hi! I'm stuck again %) I have structure something like that: -Red --Circle --Square -Blue --Circle --Triangle ... I need to output "#parent-children" anchors (#red-circle, #red-square). Is it possible to output parent name? I've tried {parent},but this is url to parent. Or I need the Captain Hook to help?
  9. something like that ~150kb I used a standard font, made it smaller and in 2 columns, fix borders in some tables, it was a little overlined(dunno how it to say, lol). hope someone like it upd: docx
  10. maybe i'm wrong, but the only text in pdf is the word "cheatsheet" and all other is hi-res bmp. if you don't mind, you can send me your source and i'll try to convert it. ps: sorry for my English, as always =)
  11. Hi! Great module, thanks for it. I think it can help me to keep catalog up to date. But I need to generate page name from another field than Title (Many titles are similar, but "article number" field is unique). Is it possible somehow?
  12. Here you are: https://youtu.be/5djCKMi4sIE?t=25s
  13. Found little typo in main.js Here is the pull-request https://github.com/somatonic/ProcessWireCheatsheet/pull/1
  14. Can you tell us your case and what exactly you want from users? Maybe someone will give an advice how to organise this?
  15. Hi! Dumb question again here (% I have pages with different count of images. How can I output images with limit=3 for example?
  16. Each type of articles must have it's own template. "Render" makes output depending on different templates.
  17. After saving the page with template "custom_user" - new user will be created with name==page name. I don't test it. And I wonder what I'm doing at all in the conversation of people with 700+ posts =)) ... public function createTheUser($event) { if($this->page->template == 'custom_user'){ $newusername = $this->page->name; $newuser = $users->add($newusername); $newuser->pass = 'some password'; $newuser->save(); } } ...
  18. $users->add("name") Add new User with the given name and return it. http://processwire.com/api/cheatsheet/?filter=users But maybe i've misunderstood the problem.
  19. Hi, diogo. Which method is better to use? "Echoing" or "html outside php"?
  20. I'll ask here, think my question is similar. I want to add ID to pages's name in 1 template (exactly like on this forum "/3276-change-auto-bla-bla-etc/"). So I need to write a module with hooks for this or what? Please, push me to the right direction. upd: made it this way: <?php class PrefixToPagename extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'Add prefix (id) to the page name', 'version' => 100, 'summary' => 'Add prefix (id) to the page name', 'href' => '', 'singular' => true, 'autoload' => true, ); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // add a hook before the $pages->save, to add prefix if needed $this->pages->addHookBefore('save', $this, 'addPrefix'); } /** * Hooks into the pages->save method and sorts pages with a certain template based on certain criteria * */ public function addPrefix($event) { $page = $event->arguments[0]; // Only run if the page we just saved has the "vacancy" template if ($page->template == 'vacancy') { $oldname = explode ('-', $page->name); if ($oldname[0] != $page->id){ $page->name = $page->id . '-' . $page->name; } } } } thanks guys from this thread.
  21. Hi. Can you explain what this thing does: $page->body .= <<< _OUT .... _OUT And where can I read more about "<<<"?
  22. /wire/modules/Process/ProcessPageList/ProcessPageList.js function listChild(child) { //bla-bla-bla .attr('title', child.path) //bla-bla-bla change to something like: .attr('title', child.path + ' id' + child.id) it will show ID on tooltip. And the question =) How made this not by hacking "core"?
  23. I have played with selectors a little. My task is solved by $options = array('selector' => 'id|parent=1006|1003'); 1006 and 1003 - ids of "Want in menu 1|2" in my structure. So we can use multiple "parents" =)
  24. Thank you, Soma! I'll try to exclude pages by template.
×
×
  • Create New...