Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Simply Love it. Great design, good typeface. (And, why customers don't update news sections...)
  2. Diogo started the coffee shop sounds. (not the dutch ones) And I must say it works for me. (He could let it rain to)
  3. Now it becomes clear... (that I didn't think of that before)... You're the best ! TNX
  4. Is there a reason for: $image = $p->image->find("name=$old_name")->first(); instead of: $image = $p->image->get($old_name); ?
  5. How do I retrieve the allowed templates when hooking on processPageAdd::getAllowedTemplates ? <?php class AllowedTemplates extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'AllowedTemplates', 'version' => 1, 'singular' => true, 'autoload' => true ); } public function init() { $this->addHookAfter('ProcessPageAdd::getAllowedTemplates', $this, "allowedTemplates"); } public function allowedTemplates($event) { $pid = wire("input")->parent_id; if(!(int)$pid) return; $parent = wire("pages")->get($pid); if(!$parent->id) return; // should be made dynamic, but I don't know how to retreive the templates array !!! $templates = wire('templates')->find("name=basic-page|sitemap"); $event->return = $templates; } }
  6. In 2.3.3 it looks like Textformatters are not applied over concat fields. Textformatters over other fields work. Oops, sorry: it was Page List Image Label what disabled the textformatter.
  7. lol, maybe you installed FieldsetSchrink.module to. That little module removes the padding border and margin from a fieldset. And you only see that it sepeates the fields, you're not seeing the fiedset. (ps, the more dummy you are the more you discover)
  8. The weird thing is : The map is registered in fields, but the table field_nameofthefield is not created. Running 2.3.2
  9. Looks like somethings went wrong after upload. Have you tried zipping the wire folder, upload it and unpack it on the server ?
  10. In the admin: Put pages in the /widgets/ folder, thats it.
  11. Could it be that the image is already created ? To force a recreate use $img->pimLoad("bright", true) I believe.
  12. Yep, admin uses the checks, but on API level the user & pass is created. There's no check in $u->pass("1234"); I tried it and $session->login("test", "1234"); and works as aspected
  13. It is exacly as Soma said if you use "$inputfield_pass = $modules->get("InputfieldPassword"); " <Soma quote>"1234" isn't a valid password if PW's password inputfield would validate it, but it's correctly saved and works. </Soma quote>
  14. The more you know the better it gets
  15. 404 on admin link? Sounds to me you changed the address of the admin. ( or there's some nasty proxy/browser cache going on ) ps, this profile is more a boiler plate (starting point) it's not much work to switch gumby for zurbs foundation. With a little bit effort you can make it work with twitter bootstrap. (It originates from a custom made gridsystem)
  16. Why not doing it with jQuery ? // ps don't know the actual markup, so selector will be different I think. $(".comment input[type=submit]").addClass("small radius"); Or you could move the comment module to ./site/modules/ and make the changes there. Nothing wrong with that aproach.
  17. $img->imLoad("bright_") should be $img->pimLoad("bright") I think. Don't know why the underscore. and you've a typo in the "pim" <blink>Horst wins !</blink>
  18. Aha, install MarkupCSScompress, will fix it. (is located in /site/modules.) An other option: delete the lines "<?=$modules->get('MarkupCSScompress')->render()?>" And copy/paste on that place the code below. foreach ($config->styles as $file) echo "<link rel='stylesheet' href='{$file}'>\n\t";
  19. Yep, see delegate-profile. (example site using widgets: ddb.nu) It uses "Widgets" for the sidebar (pages). Created widgets (pages in the "folder" widgets) will be rendered on the $page. It's a very basic profile, with 3 pages or so, and not many fields/templates. Every widget template has at least: - a template select ( Widget will be rendered on pages Pages using the selected template, multiple templates can be selected ) - a position to render (left column or right column) Rendering Widget: - On every $page you can disable the rendering of a widget. - If there are no widgets to render, the column will not be rendered. The width of the column is given back to the content column. Example: | 3columns | 5 columns | 4columns | <- normal Example: | 8 columns| 4columns | <- no left widgets to render Column widths: - You can set the column width with Soma's range Slider. (located in: /Widgets/) It's based on Gumbies 12 columns design. ( Zurb Foundation has almost the same class names ) It's using a delegate Approach. Important: - You need to install: FieldtypeRangeSlider and FieldtypeTemplates. (tnx Soma and Hani): Recommended install: -TextformatterGumbyList Beware, documentation is <blink>really outdated</blink> (shame on me). But the profile is 2 weeks old or something. It uses the gumby CSS framework. Cheers
  20. Hi Matthew, Soma & others Sorry to be that unclear and a half day to late with this post. I gonna try to explain the Fieldtype again, I was not clear enough. ( Explaining things is always difficult and even more when it's not in your native language ) I gave the fieldtype an other name: Fieldtype Import Pages. As it describes better what it should do. --- @MatthewSchenker, most things can handled easily from api. But the context (where to handle data) is very important. If you give an editor a page to edit*** and they can handle all the data there, then there's no confusion. In MODX evolution galleries are created from the front-end of the website not the back-end. As a result: Customers calling that they can't edit galleries, you explain where to do it and a year later, the same customer is calling again with the same question. *** example: /processwire/page/edit/?id=1047 --------------------------------------------------------------------------------------------------- Fieldtype Import Pages (Handeling Page imports) The settings for inputfields using this fieldtype make things more clear I hope: --- What should the Fieldtype do? import pages to a parent. (handeling page imports)What data should be saved to the current $page? No data, it should create pages under a parent page.What a "Fieldtype Import Pages" Fieldtype needs from it Inputfield: page array (pages to store) and a parent. What is the required output ( $page->name_of_the_field ) of the Inputfield using this Fieldtype: nothing, ( the Imported pages are the things you querie from template/api level )What output is possible for a Inputfield ( $page->name_of_the_field ) using this Fieldtype: whatever the developer wants to output. ( depending on the saved pages.)--- An Inputfield example: Inputfield querying the latests tweets containing the hash tag #processwire and creating a list of it. In the inputfield select the tweets you want to import to a parent. On saveReady*** , create a Pagearray of tweet pages. Then the Fieldtype kicks in and saves the tweets in the parent. *** (or what ever state it is possible to create a pagearray before the Fieldtype kicks in ) --- Other Inputfield example An inputfield using Wanze & Kongondo'z handsonetable creates a Pagearray and the Fieldtype wil store the pages.
  21. Tonight when i'm behind the laptop I will eplain an input field that can use this inputtype. Think explaining the inputfield explain the fieldtype to.
  22. FieldtypeMultipages I wish there was a Fieldtype that can store multiple pages in a predefined/conditional parent. The Fieldtype doesn't need to save data under the current Page. I think it has to return (after $page save), true when all pages are stored or a Pagearray with page(s) that failed to store. (or ids from success pages and ids from not saved pages ) What the Fieldtype need to know from the Inputfield. From Inputfield (getConfigInputfields) Parent ($page object)empty ( $page is assumed as parent ) selector ( use a selector to determen the parent ) id ( Id of the parent ) conditional (conditional the the template of the to be saved page)(parent from to the to-be-saved $page->template. example input:basic-page | 1047 ($Page with tpl basic-page will be stored in parent with ID 1047) gallery | /parent=$page/ *($page with tpl gallery will be saved under the current page) Required from Inputfield (@return Pagearray and a $parent) - Pagearray containing pages to be saved under Parent. - A parent ($pageobject) or conditional, so field type could figure out where to store The Inputfield should collect all Pages in a Pagearray and give it back to the Fieldtype. The fieldtype should then handle the saving of all pages in the parent. --- It could be used for: Inputfields like: Table. Store RSS/Atom entries to pages. What ever you want to be saved in a specified parent. --- I Post it here, cause I don't have the skills to create such fieldtype (relyable) & it should be that reliable that developers could build inputfields for this. --- Changed Title of the post
  23. Maybe something like this. <style> * { margin: 0; padding: 0; } ul { display: block; } li { position: relative; display: inline-block; text-align: center; } img { max-width: 80%; height: auto; } </style> ------------------------------------ $images = $page->images; $count = count($images); $width = 100 / $count $width = floor($width * 1000) / 1000; if($count) { echo "<ul>"; foreach($images as $image ) { echo "<li style='width: {$width}%;'><img src='{$image->url}' /></li>"; } echo "</ul>"; } Not tested. grr editor....( How the ... can Kongondo make posts like they are printed from a book )
  24. Alway s forget about that , nice one Soma.
  25. Check this field under ADMIN / SETUP / FIELDS / tab input [x] Allow new pages to be created from field
×
×
  • Create New...