Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/29/2013 in all areas

  1. This is a very simple module that I put together for @Zahari Majini from a PM request. It allows you to enter a URL to a YouTube or Vimeo video in a specified field and when you save the page, it will grab thumbnails for the video and add them to a specified images field. Check the module configuration options for: the field(s) to search for videos name of the video images field which thumbnail(s) you want grabbed whether to grab the first available or all available thumbnails based on those that you list As always, an feedback for improvements is very welcome! Modules Directory: http://modules.processwire.com/modules/process-get-video-thumbs/ Github: https://github.com/adrianbj/GetVideoThumbs
    2 points
  2. A quick tutorial how to create file downloads using pages You will be able to create a new page using template "PDF" (or any you setup), upload a pdf file. You then can select this page using page fields, or links in Wysiwyg. The url will be to the page and NOT the file itself. This will allow to keep a readable permanent unique url (as you define it), unlike /site/assets/files/1239/download-1.pdf, and you'll be able to update/replace the uploaded file without worring about its filename. Further more the file will also have an id, the one of the page where it lives. Clicking those links will download or open the file (when target="_blank") like it would be a real file on server with a path like /downloads/project/yourfile.pdf. You'll be also able to use the "view" action directly in the page list tree to view the file. Further more you'll be able to esaily track downloads simply by adding a counter integer field to the template and increase it every time the page is viewed. Since the file is basicly a page. This all works very well and requires only minimal setup, no modules and best of it it works in the same way for multi-language fields: Just create the language alternative fields like "pdf, pdf_de, pdf_es" and it will work without modifying any code! Still with me? ok PW setup Download folder: Create a template "folder" or "download-folder" with only a title needed. Create pages in the root like /downloads/project/ using this template. Setup the template for the pdf files 1. Create a new template in PW. Name it pdf 2. Goto template -> URLs tab and set the URL end with slash to no. (So we can have /path/myfile.pdf as the URL) 3. Create a new custom file field, name it pdf. Set its maximal count to 1 under -> Details tab. 4. Add the pdf field created to the pdf template. Easy. 5. Create a new "pdf" page using the pdf template under a download folder you created earlier. 6. Give it the title and in the name field add ".pdf" to the end (could also leave as is) Template PHP file for the pdf files 1. Create the template file pdf.php in your /site/templates folder 2. add the following code: <?php // pdf.php if($page->pdf){ wireSendFile($page->pdf->filename); } Done. To see the options you have with PW's wireSendFile() you can also overwrite defaults <?php // pdf.php if($page->pdf){ $options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => false, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); wireSendFile($page->pdf->filename, $options); } Simple and powerful isn't it? Try it out. Some thoughts advanced Create as many file types as you like. It might also be possible to use one "filedownload" template that isn't restricted to one field type but evaluate it when being output using $page->file->ext, or save the file extension to the page name after uploading using a hook. One last thing. You can add other meta fields or preview images to the template and use those to create lists or detail pages. It's all open to goodness. Again all without "coding" and third-party modules. Further more you can use the excellent TemplateDecorator to add icons per template and have a nice pdf icon for those pages. This as a base one could also easily create a simple admin page for mass uploading files in a simple manner, and create the pages for the files automaticly. ImagesManager work in the same way. Cheers
    2 points
  3. Started a new module for creating <tables> from repeater fields. Feel free to grab it from github, do with it what you want. It only works for simple text based fields inside a repeater. To use it: $table = $modules->get("RepeaterTable"); // initialize $table->thead = true; // (bool) true/false, default = true, will render <th> $table->indent = 3; // (mixed) false/int, where int is the level of indentation, default: false $table = $table->render($page->repeater); // repeaterfield called repeater <!-- output --> <table class="table-repeater"> <thead> <tr> <th class="col-1">Fieldlabel field 1</th> <th class="col-2">Fieldlabel field 2</th> <th class="col-3">Fieldlabel field 3</th> </tr> </thead> <tbody> <tr class="row-1"> <td class="col-1">data for field 1, first repeater item</td> <td class="col-2">data for field 2, first repeater item</td> <td class="col-3">data for field 3, first repeater item</td> </tr> <tr class="row-2"> <td class="col-1">data for field 1, second repeater item</td> <td class="col-2">data for field 2, second repeater item</td> <td class="col-3">data for field 3, second repeater item</td> </tr> </tbody> </table> For the HTML purist, I have added source code indentation where you can set how many tabs you wish to append before each element. Please let me know if I should add this to the modules directory ? Does someone have a good name for this ?
    2 points
  4. @adrian Thanks for your help! You were right about the creatPath method, I was able to solve my problem Thanks ryan. I solved it by making wireMkdir recursive with the additional argument. In the PagefilesManager class I did the following updates: // Change _createPath() to support recursive directories protected function _createPath($path) { if(is_dir($path)) return true; return wireMkdir($path, true); } // Add new method static public function makeCustomPath(Page $page) { // Examples: ID=1780, path = /site/assets/files/17/80/ // ID=19814, path = /site/assets/files/19/81/4/ // ID=205478, path = /site/assets/files/20/54/78/ $tmpPath = ''; $digits = str_split("{$page->id}"); foreach ($digits as $k => $digit) { $tmpPath .= $digit; if (($k+1) % 2 == 0) $tmpPath .= '/'; } if (substr($tmpPath, -1) != '/') $tmpPath .= '/'; return $tmpPath; } // Custom path needs to be set in the _path() and url() methods static public function _path(Page $page) { //... //$publicPath = $path . ((int) $page->id) . '/'; $tmpPath = self::makeCustomPath($page); $publicPath = $path . $tmpPath; //... } public function url() { //return $this->config->urls->files . $this->page->id . '/'; return $this->config->urls->files . self::makeCustomPath($this->page); } Should be able to test this with many data soon, I'll report back here for those interested.
    2 points
  5. Do you guys think it makes sense to bring LanguageFieldTabs into the core? So far I haven't come across a multi-language site install where I wouldn't want it, so starting to wish it was just there by default.
    2 points
  6. Hi everyone, This new video fieldtype extends FieldtypeFile. Video is available via: $page->video_field->url Module automatically creates a poster image of the video on upload and makes this available via: $page->video_field->poster Shows the duration of the video on the title bar, next to the filesize Stores VTT files for subtitles accessed via: $page->video_field->subtitles Formats a transcript from the subtitles, accessed via: $page->video_field->transcript Users can easily upload videos and enter VTT files. The following code is used in the template file. <video src='{$page->video_field->eq(1)->url}' poster='{$page->video_field->eq(1)->poster}' width='720' height='408' ><track kind='subtitles' src='{$page->video_field->eq(1)->subtitles}' srclang='en' /></video> Additional Settings You can additionally set a few different options in the field's Input tab: Number of poster images to generate - if you change from the default of 1, the editing user will be able to select which image they want to use for the poster image Copy poster image to dedicated image field - not necessary but gives you more options of interacting with the poster image(s) Field that you want poster images copied into - only relevant if the option above is checked Try it out (NB: the code is rough - it works, but needs cleaning up. Github: https://github.com/adrianbj/FieldtypeVideo NB: Requirements The module requires ffmpeg and ffmpeg-php, although I can make the latter optional fairly easily. I don't have any requirement checking implemented yet, so if you don't have these, you'll get php errors. Possible future enhancements Ability to specify what frame is used for the poster - either by number, and/or by offering several options to choose from Done! Push poster image to a dedicated image field Done, although could be improved Field for pasting in or uploading closed captions Done, but need to look into multi-language options etc Support for uploading multiple formats of the same video (mp4, webm, etc) and/or automated video format conversion My biggest concern, is how useful this will be to people - how many hosts actually have ffmpeg setup? Do any have ffmpeg-php? Anyone have any ideas for features they'd like to see?
    1 point
  7. Hi everyone! With Batcher you can batch-edit and create Pages in the Pw Admin. If you install this module, you get a new Page "Batcher" under Setup. Modules page: http://modules.processwire.com/modules/process-batcher/ Github: https://github.com/wanze/ProcessBatcher Editing How does it work? Search your pages with a selector. You can check if you want to include also hidden/unpublished pages with the filters. Select the pages you want to execute an action (the action only gets executed on "checked" pages). Select the action and if necessary, additional data like the new parent or the new template. Execute. Supported actions: Publish/Unpublish Pages Hide/Unhide Pages Lock/Unlock Pages Trash Pages Delete Pages Change Parent Change Template Batcher does the following permission checkings for the current user: Don't display pages that are not editable Remove Actions if the user doesn't have the permissions (page-delete, page-move, page-template, page-lock) Important notes: When changing a template, data in fields of the old template which are not assigned to the new template gets deleted. When changing the parent, the template of the new parent must accept the pages template as children. This is a setting in the template under "family". Creating How does it work? Select a parent where your new pages will be added as children Add as many pages as you want by clicking "add Page" Click "Create Pages" You must enter a title and choose a template. The name is optional: If left empty, Pw will generate this for you. Includes permission checking and Family template restrictions. This means in detail: The selected parent must accept children and their template The pages template must accept the parents template User needs the permission to add children to the selected parents template User needs the permission to create Pages for the chosen Template Batch-creating tips The chosen template and the statuses are always cloned from the last row. So if you need to add 30 pages with the same template, define it first and the click "add Page" - it'll make your life easier ;-) You can drag & drop the table rows should you want to change the order. The dragging looks ugly but it works. For the lazy dogs and keybord hackers among us, you can add a new row by pressing "ctrl+n". This works (at least in firefox) only if no input has focus. After adding a new row, the title input gets the focus. By pressing 3 times tab you arrive at the published-checkbox, here the short-cut works. Restrict Batcher for a user to only allow editing or creating Create permissions "batcher-edit" and/or "batcher-add". As soon those exists, the module checks if the current user has the permissions. If you only need batch creating, check out the following module by Soma: http://processwire.com/talk/topic/2138-process-tools-create-pages-wip/ Cheers
    1 point
  8. Thanks to Ryan, I've managed to knock my next module into usable shape. The URL Shortener adds a link shortening feature to ProcessWire, so you can host your own short URL service from a PW site now. You can create as many bins for short links as you need & the module sets up an example bin when you install it. Each bin is a PW page that uses the LinkShortenerHome template. This template allows you to set the length of the shortened links that will reside in it. Shortened links are simply child pages that automatically use the LinkShortener template. As these links are normal PW pages you can manipulate them from the admin page tree just like any other page. Anytime you create a new short-link page in any of your bins, it will automatically be named with a random string that is not already in use in that bin. You get the chance to review this short string before adding the full URL and saving the page. Once the page is saved any visit to the short link's URL will be redirected to the full URL.
    1 point
  9. Hi folks, as announced yesterday, I just published my new Template Twig Replace module on github. The module lets you write Twig templates directly, making calls like $page->twig('my_template.twig') in an otherwise empty php template unnecessary. It also seamlessly integrates with my other module Template Data Providers that can be found here and here. Be sure to consult the README.md for further information. Please leave your comments, opinions, and suggestions here in this forum or at github and I'll try to answer as quick as possible. Honorable mentions go to porl and his Template Twig module for inspiring this little piece of code. Regards, Marco
    1 point
  10. Hi all, I just released my first module on github called Template Data Providers. This module lets you create simple data provider classes for templates and chunks (a.k.a. partials, blocks, includes, ...) to gather and prepare data for templates and/or handling form data and other actions outside of the templates ("separation of concerns"). But even if you've installed the module the usage of the new functionality is merely optional. You may define your simple templates and chunks as usuals, adding custom classes (PageDataProvider for pages/templates, ChunkDataProvider for chunks) for more complex data handling on demand. I provided detailed instructions in the README.md and encourage you to read it for further information. Just some sample code here: Defining a data provider for a home template: class HomePage extends \nw\DataProviders\PageDataProvider { public function populate() { $this->foo = 'bar'; // definevariable $foo to use within the page's template $this->page->foo = 'baz'; // provides page member $page->foo to use within the page's template } } Calling a chunk from within a template: $page->renderChunk('path/to/primary-navigation.php'); // relative to site/templates/ Calling a chunk providing contextual data: $news = $pages->get('template=news'); foreach ($news as $newsItem) { $page->renderChunk('path/to/news-item.php', $newsItem); // additional arguments provided will be avaiable within the chunk in a closed scope } Defining an example chunk data provider: class ExampleChunk extends \nw\DataProviders\ChunkDataProvider { public function setContext(array $context = array()) { // store first context argument in $this->foo $this->foo = isset($context[0]) ? $context[0] : null; // store second context argument in $this->bar if instance of \Page $this->bar = null; if (isset($context[1]) && $context[1] instanceof \Page) { $this->bar = $context[1]; } } public function populate() { $this->foo = 'bar'; // provides variable $foo to use within the chunk } } Please leave your questions, remarks, error reports here in the forum or at github and I'll try to answer as soon as possible. This module is a preparation for another module coming soon. This will be an alternative Twig template engine module that will interact with Template Data Providers or could be used as stonde-alone module. Regards from Hanover/Germany, Marco
    1 point
  11. http://www.michael-wessel.de/ - the website of a german IT service provider - is now powered by processwire. By the way: Some of the most recent work of the agency i work for is and (most likely) will be done using processwire. Me and my colleagues (some of them are registered here, also ) are pretty excited about it's speed, simplicity, community, ease of use and last but not least: the awesome API. So: Expect some more examples (as well as plugins and admin-themes) to come! Best regards Felix
    1 point
  12. @MatthewSchenker: Thanks a lot. We were searching for a CMS/CMF that completely fits our needs for quite a long time. We used to have our own, properitary CMS but quit developing it for several reasons. Afterwards we were using the usual suspects (Typo3, Wordpress, ModX...) but never were really satisfied with each of them. I think we finally found what we were looking for and will be happy contributing stuff to the community (in fact we've already started to ). @NoDice: If it inspires you that's propably the best thing that can happen. Thanks a lot!
    1 point
  13. Now available in the modules directory: http://modules.processwire.com/modules/admin-template-columns/
    1 point
  14. Coding with Cassius right now. Even the constants are dancing
    1 point
  15. Thinking about how you would use a person#s free-text search string (assuming you wanted to) like this: You would be wanting to look out for words like "born" first, and then look for a 4 digit number. More complex is this: as you would then have to look for both "born" and "died" and then the year, but that's not too difficult. Worse still is this nightmarish example: Nobody is likely to type that in, but your key words there would be birthday, born, died and posion with a date being harder to pull out depending on locality of the person searching (for example, I could have typed "October 1 1981" instead, so you would need some sort of regex to catch the most common of those if you wanted to). Once you have your result from that query though, you could weight (or just categories) the results by people who were born or died on that day, people that have birthdays on that day and people that were poisoned on that day. And now I'm getting a headache thinking about it all But I definitely think that if you allow search strings like this then matching against key search phrases (born, birth, birthday, died, dead, death, murdered etc) and then looking for some form of date is the way to go to work out what the user actually wants. I think you might give up at the point someone types "Who was born or died between October 1 1990 and 22 November 1990 and who was poisoned on 3 February 1700..." etc etc - more than one date might get tricky, but it feels like the best way to approach it is to assume people won't type in anything ridiculous as those who do will be in the minority (hopefully!) At any rate, I think you're going to have some fun (and headaches) with your search algorithm!
    1 point
  16. It sounds like you might be getting hung up on how to structure each entry - my advice would always be to treat people and categories separately where you need to place a person in more than one category. For example, all of your people would go under /people/ with a template called "person" and each category stored in a tree like /categories/deaths/, /categories/deaths/suicide/, /categories/deaths/murders/ with template called "category". That way you could create a Page field called "categories" (Page List Multi Select like this would be favourite: http://processwire.com/videos/page-fieldtype/ ) and add it to the "person" template so that you can tag multiple categories against the same person. This way, you can do some searches like this: $people = $pages->find('template=person, category=suicide|poison'); That will return a PageArray of all people who match categories of suicide or poison. You could also do some weighting of results so that the more categories they match the higher they come in the results, but I think your biggest hurdle will be turning your human-readable search string into something useful. Once you've done that though, you're simply matching the keywords against categories in ProcessWire and the rest is relatively easy Something like this as a quick example: <?php foreach ($people as $person) { echo "<h1>$person->title</h1>"; // Their name echo "Died of: "; echo "<ul>"; foreach ($person->categories->find('parent.name=deaths') as $death) { // Searching under a parent page name of deaths within this person's categories will return how they died - quite lengthy for some historical figures! echo "<li>$death->title</li>"; } echo "</ul>"; } Of course, you could have a whole separate categorisation system for deaths rather than lumping things together under categories like this, but since you're likely to have a great many categories and everything you would search for in this system is a means of categorisation I thought I'd do the example above.
    1 point
  17. Yes, it is possible of course. It would look more or less like this: foreach($pages->find("template=person") as $p){ $timeAgo = date("Y") - $p->year; echo "<p><span>{$timeAgo}</span> YEARS AGO - on {$p->weekday} {$p->day} {$p->month} {$p->year}</p>"; echo "<p>(+) {$p->occupation} {$p->lastname} originally {$p->original} aka {$p->alias}, is born in {$p->city}, {$p->country}.</p>"; } Dealing with dates in your case won't be easy because you can't use unix timestamps (starts in 1970). That's why I chose to have all the details from the date in different fields. There might be better ways to deal with this of course. You can also import the database by exporting the database to csv and importing it to PW. This module is great for that http://modules.processwire.com/modules/import-pages-csv/. You will have to plan carefully and build all the structure in PW before.
    1 point
  18. Hi, Since the previous logs showed that the unpublished pages have a publish_until date set to 1970-01-01 01:00:00 which actually is a Unix timestamp 0. Could you please try something for me? Please change line 180 from: if($p->publish_until <= $currenttime) { into if($p->publish_until <= $currenttime AND $p->publish_until > 1) { This would prevent the module from unpublishing pages with the 0 (1970-01-01 01:00:00) value set in the publish until field and should resolve the issue (although it isn't a pretty solution. ) Let me know if it works. If it does, I'll push a new version to Github. /Jasper
    1 point
  19. I've updated Spex to include support for "slots" and image preloading. Check out the details below: https://github.com/jdart/Spex#slot--hasslot https://github.com/jdart/Spex#addimage I'd also like to add that there are equivalent procedural helpers available that don't require the $spex variable: https://github.com/jdart/Spex#procedural-helpers
    1 point
  20. Ryan I just pushed a change to the inputMapMarker.js file on github that solves this problem. Added this inside the InputFieldMarker function: // added by diogo to solve the problem of maps not rendering correctly in hidden elements // trigger a resize on the map when either the tab button or the toggle field bar are pressed $(document).ready(function() { // get the tab element where this map is integrated $tab = $('#_' + $(map.b).closest('.InputfieldFieldsetTabOpen').attr('id')); // get the inputfield where this map is integrated and add the tab to the stack $inputFields = $(map.b).closest('.Inputfield').find('.InputfieldStateToggle').add($tab); $inputFields.on('click',function(){ // give it time to open window.setTimeout(function(){ google.maps.event.trigger(map,'resize'); }, 200); }); }); I had to put it inside the function, to have the "map" variable in scope. I'm not sure how we could move it outside the function if you don't like it that way. Also, the 200 value on the setTimeout works for me (it works above 120 but I set it to 200 to be on the safe side), but we can decide on a safer value depending on other's tests.
    1 point
  21. Wanze, Adrian is right with the _createPath() function he linked to. It maybe that you could solve it entirely simply by making it recursive, as he suggested. Actually, it might be good to just have the wireMkdir() function support creating a path rather than just a single directory... lets update that one in the core instead. The wireRmdir() already supports a $recursive argument to it, so wireMkdir() should too.
    1 point
  22. Those are the ID of the pages. My guess is that you chose a field that doesn't exist on the selectable pages as the pages identifier for the dropdown. Go to that field settings, and under the input tab change the "Label field" setting.
    1 point
  23. @FuturShoc: wire function (wire('api-var-name')) is needed outside PW template context where $sanitizer, $pages etc. API variables won't be defined. This is briefly explained in API docs too. Most commonly this affects functions, modules (where $this->pages etc. are also available) and bootstrapped scripts. There's probably something about that internal server error in your log files (PW and/or Apache) so you definitely should check those first.
    1 point
  24. Hi celfred, You could easily add the checkbox field to the page yourself. Create a new field called: "disable_comments". Choose checkbox as the fieldtype. Add this field to the required template. In your template have some code like this: if($page->disable_comments !== 1){ echo $page->comments->render() . $page->comments->renderForm(); } That should be close to what you need!
    1 point
  25. Back again, I have implemented support for subtitles (v3 on Github), although I think the route I have gone will be problematic for multi-language versions. I am trying to keep all fields for each video as components of the video field itself. I think this is useful as it allows: $page->videos->eq(n)->url; $page->videos->eq(n)->poster; $page->videos->eq(n)->subtitles; etc, if the field is set to support more than one file. However, it does reduce the flexibility because the field_video DB table has these matching fields: data, poster, subtitles. I guess add other subtitle languages would require the addition of another field for each language - eg subtitles_xxxx corresponding to the ID of the language. Maybe this is simple to achieve - I'll investigate, but if anyone has any quick tips, that would be great. Also, not sure what you think about storing the subtitles primarily in a DB field and then writing to the file system. My reasoning came from the ability to index this information for searching the video content. I am also thinking of having an automated option for outputting a transcript of the video from the subtitles text, available from: Automated transcript generation from the SRT file is now available (v4) and can be accessed using: $page->videos->eq(n)->transcript; Any thoughts?
    1 point
  26. Wouldn't this work for translating strings in the template file? <label for="myField"><?= __('Field Title') ?></label>
    1 point
  27. Ok, continuing the monologue: I helped myself, simply generating ANY new userAuthSalt. After that I used Ryans explanation to reset admin and user passwords: http://processwire.com/talk/topic/1736-forgot-backend-password-how-do-you-reset/?p=16163 Logins and everything else works fine now.
    1 point
  28. Ok, A new version has been pushed to GitHub. This takes care of the first two enhancements mentioned in the first post There are a few new options in the field's Input tab: Number of poster images to generate Images will be captured at intervals from throughout the video. This determines how many will be created. The user can choose which one is available to templates via $page->video_field_name->poster NB - if you change this to more than one (default), I would recommend also checking: "Display thumbnails in page editor?" to keep things looking manageable. Copy poster image to dedicated image field? This will create a copy of the poster images in an image field of your choice. NB This is not necessary for accessing the image. Name of the field that you want to have the poster image copied into This is only relevant if you have the checkbox above checked. Lots more to do, but thought you might like to see the next iteration. I am not sure on some of the behavior regarding copying all created thumbs to an images field (if selected). It might be better to just copy the one selected by the user. Code is still a bit of a mess - want to get features created first, then will clean up.
    1 point
  29. Will upload it to modules directory next week when I'm back home
    1 point
  30. I'm by far not an expert at this. But it seems to me that memory limit should at least double your 90Mb. Next to that max_input_time is way to less if you asked me. Our internet connection is not that great. It would take 12 minutes (720 seconds) for us to upload 90Mb if there's no interuption
    1 point
  31. SOLVED !!! My class (AbstractController) that provides the hook method (___render()) is located in a namespace (nw\Controllers\AbstractController). So hooking into this method requires a fully qualified class name: $this->addHookBefore('nw\Controllers\AbstractController::render', $this, 'doStuff');
    1 point
  32. I've managed to "fix" it by putting the following rule in the main .htaccess file at the root level: RewriteRule ^calendar/(.*)/$ calendar/event.php?id=$1 [L] This correctly rewrites to www.mysite.com/calendar/30 (or whatever id number), and does not seem to interfere with Processwire directives. I'm posting this in case it helps someone in the same situation.
    1 point
  33. Hi Marty, You can use the parent selector: parent=/path/to/my_parent/
    1 point
  34. Git is really nice once we grasp it. I'm fairly new with github too, but it's quite easy to use . So I created the repository(people can use it to get the last version): https://github.com/underk/pw_french P.S: Oui je parle francais, d'ailleurs je vais t'envoyer un MP sur ce forum à propos du répertoire.
    1 point
  35. Hi all, New changes / features under the hood, check it out! http://modules.processwire.com/modules/indexer/
    1 point
  36. Actually, I believe it should be 'name' rather than 'title: $images = $page->images->sort("name"); //OR $images = $page->images->find('sort=name'); //OR, by the way, sort descending by name $images = $page->images->find('sort=-name'); //OR, by the way, sort descending by name $images = $page->images->sort("-name"); Tested Btw, you can also sort by other properties, including description, height, width, size (see to be different from "filesize"?), etc. See a list here
    1 point
  37. This is my first website using process wire. Design was not done by me though. It was old existing website with simple design. just integrated static site to processwire. www.tourntrek.com/demo
    1 point
  38. Thanks for all your responses and apologies for not being super clear. An example would be useful, agreed. So here goes... Let's say I want to create a group of fields which would compromise an article - headline, body, image - and I want to be able to insert this article "chunk" into any given template. A repeater would do the job here, except in this instance I don't want the user to be able to add more than one article (which is what a repeater does best). A repeater is so close to doing exactly what I want, I just wondered whether there was a way to limit the iterations to 1 (like you can with an image field). This would basically solve the problem. I believe adamsprujit has understood what I want and what Ryan is building does sound good, but repeaters are already so close! Pete: the reasons I want to do this with a repeater-like field rather than simply adding the fields one-by-one to templates are: (1) As adamsprujit says: it makes outputting in the template neat, (2) It makes adding the fields to the template quicker, and, (3) It means you don't have to create lots of fields... Say you already have a headline field - essentially a basic text field - and you're already using it in a template, you can re-use it in the same template if it's in a repeater. You don't have to go and make another field - eg, article_headline - to use for the article. I hope that clarifies things. Any thoughts?!
    1 point
  39. Like the site! It'd be nice if the vertical scrolling photos paused on hover. Also I clicked one at went here where PW threw out an error. Guessing you know about config.php $config->debug = true; ...saved me totally recently when I made a site live and the obscure public-facing error changed into a clear message about a Module needing a PHP resource my hoster didn't have. Congrats on the site!
    1 point
  40. Hey guys, another green website from the processwire beginners based near munich. This website is our first REAL PW project - and (for us) one of the biggest sites we‘ve ever built. And actually the first one with a CMS/framework that we did totally on our own. So, don‘t be too negative - but don‘t be too positive either. http://www.roha-gmbh.de There are still many things that are not perfect yet, but since we started to design this website in 2011, it really was time to get it "into the wild" now! Many furniture manufacturers still haven‘t sent their best product images, so that is why there are still some lowres images in there. The project chapter needs some work on the photos as well, but that time will come... The site is not responsive yet, because it wasn‘t our main goal in 2011 - so we only wanted to get it working on tablets and phones, but without any special mobile styles. This will come, but that may take a while. The modules we used: - formbuilder - procache - redirects - versioncontrol - sitemapxml I‘m totally glad I found processwire a few months ago, because at first we planned to get that site done with pure static html. Which would not be TOO nice with about 80 html pages and many, many images (about 400). Finally a few "thank you"s to ryan, soma, diogo (for creating processwire and your help in this lovely forum) and to mademyday (for posting this on twitter, which made me read about processwire). Comments are welcome! Of course!
    1 point
  41. Hi ssmith and welcome to the forums. How are you creating the dropdown menu? Are you using Soma's navigation module? Are all the children still published and not hidden? Did you by chance change their template to one that is excluded in the selector that grabs the items for the menu. Lots of possible reasons. If none of the above helps, could you post the selector you are using and also the outputted list that is being used to create the menu as well as the any relevant css classes that might be hiding the children.
    1 point
  42. Ryan, last commits solve my problems also! Thanks!
    1 point
  43. I found it pretty logical (but not common). It divides two groups. Not intended to use between each element. If you want divider between each nav element, then just style it.
    1 point
  44. Hi Emmanuel and welcome to PW. PW does not control the frontend code at all, you have complete flexibility to write the output exactly as you need, including the adding of form labels. As an example, there are different ways to do this, but if you are using PW's built-in method for generating forms, you can do something like: $f->name = "myField"; $form->label = __("Field Title"); Obviously you need to build the other elements of the form, but you get the idea. You can of course use normal HTML: <label for="myField">Field Title</label> The advantage to the first approach is that the label can be made translatable using PW's language support. You can use Bootstrap, or any other framework you wish. Ryan has recently developed a Zurb Foundation profile for PW, but it is not too difficult to use any of the other frameworks. http://modules.processwire.com/modules/foundation-site-profile/ http://processwire.com/talk/topic/2411-bootwire-basic-twitter-bootstrap-profile/ http://processwire.com/talk/topic/3832-release-unsemantic-site-profile/ PW supports multilanguage: http://processwire.com/api/multi-language-support/ You can always access the database directly. It is a standard MySQL database so you can view it easily with something like PHPMyAdmin. You can also of course query it directly using SQL statements, but in most cases using PW's API and selectors is much easier. Hope that helps get you on your way to CMS nirvana
    1 point
  45. Hm, I guess the horizontal scrollbar appears because of the borders from the input fields. There is one way of correcting the box-model that I actually enjoy using, especially for working with percentages http://www.paulirish.com/2012/box-sizing-border-box-ftw/ /* apply a natural box layout model to all elements */ *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } That small snippet in the top of main.css would fix the problem, and allow to use overflow:auto
    1 point
  46. Great addition Pete, thanks. Already using it. It should be in the modules directory.
    1 point
  47. I personally think that the way that the current ProcessWire admin functions is exactly how it should continue to function, I'm not a fan of the always available page tree (or any kinda of extra clutter really), I've rarely had a client I was confident could understand/effectively utilize such a feature anyway. I get fewer calls about "CMS confusion" with processwire than I ever have before with ANY platform (yes, even WordPress). Though developing a new admin theme that may make itself more conducive to the addition of such major features would be great, if doable?(I'm not master programmer so I have no idea) I really think this simplicity is key in a default shipping product. Also making the default theme clean/minimal would also potentially make small visual changes easier for developers. My concerns about the theme don't come from a function stand point as I think some of the ideas floating around in these forums serve more to solve developer issues than client issues, and in the end our primary concern, particularly for the default theme, needs to be client experience. My concern is that honestly I was one of these superficial types that overlooked PW because the admin wasn't "cool" or "slick" enough for my tastes. There was probably a 3-4 month period between when I first discovered PW and watched the intro video to when I ended up back here out of my continued search for a "custom post type/custom content" CMS. This second time I took a peek around in the forums to realize that PW supported admin themes, I was in. Between Futura Remix and at the time a preview post for Ergo I knew I could be happy with the look of PW. But obviously not perfectly happy as I was still motivated to go on to make a few of my own (one particular motivator was the use of Jquery ui and its awful awful icons). And frankly in general jqueryui is a bit ugly and very dated looking (though I can understand the concern of moving away from it, seeing as how much code would need to be rewritten). The point before being that there is a very real risk of loosing out on new users because of this (just look at the CMS "Craft" which recently got tons of attention in a bunch of webdev blogs and yet has no single feature that processwire doesn't except it has a gorgeous admin interface, AND you have to PAY for almost all the other good features!). I think one thing that happens is people can't so quickly understand how amazing, flexible, straightforward, powerful and generally beneficial the PW API is, but what they can understand immediately, is whether or not the CMS admin panel is cool, clean, slick, simple, sexy.... whatever. And I think PW falls short here, its not terrible, but its nothing exciting. There are certainly plenty of CMS' to draw inspiration from though: Symphony CMS, Kirby admin panel plugin, Craft, Statamic, Anchor CMS... I'm sure there are more. I think the most effective place to put effort for now it a simplified cleaner rewrite that better supports 3rd party admin themes, no more specificity battles (there should be no need for the use of "!important" in the default theme, or at least very little). This combined with the ability to have "Admin Theme settings" and a per user admin theme selection could really fix most of the concerns floating around (at least I think so...). I really think something that takes the colors from the new processwire.com and a bit of inspiration maybe from others could really nail it. Oh and, I really think switching to an icon font would be smart..... and ditching jqueryui.... I'll stop here... phew.
    1 point
  48. kickstarter There are several developers here that contribute a lot, working for fun and sharing knowledge giving us wonderful modules. But next to the respect they get, it would be nice we pay for the Cola & Pizza's they need while programming. ( Can hungry programmers code to ? ) For me as individual I won't/can't pay a decent price for good software, but with 10 members things change. Say: If an developer needs $750,- before starting the write. (I'ts only €56,-- per person, not reached, money back ) Then: Every person who paid, can download the finished module. After 3 months: The module becomes normal opensource, available for everyone. Maybe Ryan can choose some privileged developers that are capable of building quality modules. What do you think ?
    1 point
×
×
  • Create New...