Leaderboard
Popular Content
Showing content with the highest reputation on 09/23/2012 in all areas
-
Few days ago I've posted sneak preview of new admin template (it didn't have name then), so I've managed to squeeze some time to finish it and here it is... Ergo Admin Template DOWNLOAD https://github.com/nvidoni/ergo USAGE 1. Create folder named "templates-admin" under /site/ folder 2. Copy all files (including folders) into newly created folder 3. ProcessWire will load the new admin template automatically EXTRA If you would like to use custom TinyMCE theme created for this template, follow this steps: 1. Download TinyMCE Ergo theme from https://github.com/n...ni/ergo-tinymce 2. Copy "ergo" folder to /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins/ folder 3. Open /site/templates-admin/default.php and change in line 86 "default" to "ergo" If you find any errors please post them here so I can commit them accordingly. EDIT 1. Changes have been made according to diogo's and Soma's posts.2 points
-
Thanks, it was my pleasure. And a bit pain as well, but mostly pleasure.2 points
-
Nik this is now merged into the dev branch. All seems to work well in my testing so far. Thanks for your work in upgrading this functionality. https://github.com/ryancramerdesign/ProcessWire/commit/ed28b1b3b2a8e69e3200072bd8293f4a0c5916172 points
-
This module creates a page in the ProcessWire admin where you can test selectors and browse page data and properties without editing a template file or a bootstrapped script. Given selector string is used as is to find pages - only limit is added, if given. Errors are catched and displayed so anything can be tested. Pages found with a valid selector are listed (id, title) with links to the page. I was thinking this would be useful for someone new to ProcessWire, but it turns out I'm using it myself all the time. Maybe someone else finds it useful as well. Module can be downloaded here: https://github.com/n...essSelectorTest Modules directory: http://modules.processwire.com/modules/process-selector-test/ Features Edit selector string and display results (and possible errors as reported by ProcessWire) Explore properties and data of matching pages in a tree viewLanguage aware: multi-language and language-alternate fields supported Repeater fields and values Images and their variations on disk More data is loaded on-demand as the tree is traversed deeper Quick links to edit/view pages, edit templates and run new selectors (select pages with the same template or children of a page) Page statuses visualized like in default admin theme Add pagination Screenshots1 point
-
1 point
-
Gazley, try the attached. I got your message with the attachment and looks good, but since I already had unimplemented classes in there meant for this purpose (just hadn't gotten around to it), figured I should use them instead. So I used some of what you sent me and also added a couple of new ones to differentiate page numbers from next/prev buttons. All these should now work: // previously present, but not implemented. Now implemented. 'firstItemClass' => 'MarkupPagerNavFirst', // newly added: applied to the first LI with a number in it 'firstNumberItemClass' => 'MarkupPagerNavFirstNum', // previously present, but not implemented. Now implemented. 'lastItemClass' => 'MarkupPagerNavLast', // newly added: applied to the last LI with a number in it 'lastNumberItemClass' => 'MarkupPagerNavLastNum', Let me know if this covers what you were needing? This is now posted in the dev branch. But you can also just replace your MarkupPagerNav.module with the attached if you prefer. MarkupPagerNav.module1 point
-
A recent post on PageArray find() made me try and fix a couple of things discovered there (and in some earlier posts, I think). What I came up with is a few modifications to WireArray class (base class for PageArrays): sort() accepts multiple fields to sort by. Fields can be given as a comma separated string "-modified, title" or an array of strings array("-modified", "title") find() supports start=n and multiple sort=field selectors some optimizations for sorting and limiting even quite big arrays without losing performance in certain conditions The new implementation seems to give same results as the old one where applicable (given only one field to sort by and no start selector for find()), but more tests are definitely needed. I've tested this on a site with more than 15000 pages and find()'ing 3000 of them at once for sorting/finding with the API calls. Performance is about the same as it was before. Even giving more than one field to sort by doesn't make it noticeably slower if limit is being used as well (those optimizations actually work). The replacement for wire/core/Array.php is attached if anyone's interested in trying it out. Array.php I tried some different methods of sorting as well, but just to find out Ryan had a good reason for all the little things I couldn't get a hold of at first . PHP sorting methods being unstable must have turned much of my hair gray in the last couple of days... While testing this I found out that sorting by a field with empty values at some records would act differently when done at initial $pages->find() (database query that is) compared to $aPageArray->find(). While this isn't affected by the WireArray code, I may dig deeper into it later. Giving sort=random works as it did before, but the code doesn't handle the situation it's not the only sort field given. Left a TODO-note in the comments on this (and the missing trackChange() call as well). @ryan: I will try to make a pull request as well just for the fun of it (being new to git). Do whatever you like with the code if you see any potential in it. You may want to rename function stableSort() and its last argument to something else at least. I know I'm not too happy with them.1 point
-
@Matijn - FYI, I have made a change in the MarkupPagerNav module that removes empty class definitions and forwarded this onto Ryan for his consideration.1 point
-
My 'expertise' is kind of outta left-field, as I'm completely self-taught. So there's probably a ton of things I'm accustomed to doing that aren't really good practices, but hopefully I'll bring a different perspective to the table. It does seem like the overarching goals/methodology is similar - that is, to make tools that maximize flexibility and then build more specific things out of those tools, rather than build a different tool for every job. I used to explain Versa to people like a Video Arcade vs. an NES with a bunch of cartridges. The Arcade has a bunch of games (processes) and each have their own self-contained box. Each box is doing different variations of the same thing (adding, editing, displaying, sorting, deleting, etc.). The NES has one box & one screen, with different cartridges that specify the game. Rather than duplicating the processes for each different thing you have, you build core functions that handle all the processes, and that vastly streamlines the work and makes each client's backend completely customizable. If you're interested Ryan I'd love to give you a rundown of Versa over skype or something - lots of similarities between the two systems, both structurally and from a UI perspective.1 point
-
Here's one way that you could do that from your module's getModuleConfigInputfields function: public static function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); $name = 'my_page_select'; if(!isset($data[$name])) $data[$name] = 0; $f = wire('modules')->get('InputfieldPageListSelect'); $f->attr('name', $name); $f->attr('value', $data[$name]); $inputfields->add($f); return $inputfields; }1 point
-
Yes you can add "div" to the theme_advanced_blockformats. But then you can set a div, but not have paragraphs or headers inside. But what you could do is create tinymce html templates, you can select and insert. In this template you can have something like: <div class="errorbox"> <h3>Heading3</h3> <p>Text Paragraph</p> </div> It will insert this code, and you can then simply edit the content. To setup templates you add the button "template" and the plugin "template". Also add ,div[class] to the valid elements config string. Then in the Additional TinyMCE settings you add this on a new line: template_external_list_url: /site/tinymce/body_templates.php Then you create a folder /site/tinymce/ and create a body_templates.php (could also be a static .js) this will server as a proxy to add templates. So a list with js array. You should have a structure like on the screenshot. Then in the body_templates.php have this code: <?php include($_SERVER['DOCUMENT_ROOT']."/index.php"); ?> var tinyMCETemplateList = [ // Name, URL, Description ["Table Simple", "<?php echo wire("config")->urls->root; ?>site/tinymce/templates/body_template1.html", "A simple table."], ["Error Box", "<?php echo wire("config")->urls->root; ?>site/tinymce/templates/message_template.html", "Error Box."] ]; Now you can select the template via the template button in TinyMCE.1 point