Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/24/2017 in all areas

  1. Released: http://modules.processwire.com/modules/jquery-ion-range-slider/ The built in rangeslider is good, but it is somewhat limited if you need really specific slider interfaces, like with pips and showing the value on the handles. There are many Jquery rangesliders, but one of the best and easiest to implement is the ion.rangeSlider. http://ionden.com/a/plugins/ion.rangeSlider/en.html This is a preview of the very simple module that basically allows you to enable the ion.Rangeslider on any text input, and then you type in your params into the textarea field (careful, you can break the page's javascrpt if you are not careful!) There are way too many options to really make this configurable, so the easiest way it to have a free text field where you enter any params. The params are just passed to the instance of the slider. Features of ion.Rangeslider: Skin support. (5 skins included and PSD for skin creation) Any number of sliders at one page without conflicts and big performance problems Two slider types single (1 slider) and double (2 sliders) Support of negative and fractional values Ability to set custom step and snap grid to step Support of custom values diapason Customisable grid of values Ability to disable UI elements (min and max, current value, grid) Postfixes and prefixes for your numbers ($20, 20 € etc.) Additional postfix for maximum value (eg. $0 — $100+) Ability to prettify large numbers (eg. 10000000 -> 10 000 000 or 10.000.000) Slider writes its value right into input value field. This makes it easy to use in any html form Any slider value can be set through input data-attribute (eg. data-min="10") Slider supports disable param. You can set it true to make slider inactive Slider supports external methods (update, reset and remove) to control it after creation For advanced users slider has callbacks (onStart, onChange, onFinish, onUpdate). Slider pastes all its params to callback first argument as object Slider supports date and time Screenshots comparing Inputfield Rangeslider (Soma) vs. JqueryIonRangeSlider... 1) basic range using currency ' Same with different skin Range of years Same with narrower column and different skin.. the module is functional and being used on 1 site, but some additional testing is needed...
    13 points
  2. This week we've got a demo setup of the admin theme framework that's been written about in the last two weeks of posts. Read all about it here and try it out from our demo site– https://processwire.com/blog/posts/demo-of-admin-theme-framework/
    8 points
  3. For our in-house printing house Leitz Medien we have build a small landing page to feature their qualifications. The website has as background multiple illustrations, which are sorted randomly on every page load. The layout uses Masonry and the paths of the illustrations are animated using vivus.js. You can access every modal under its own Url, which are added to the browser history using the replaceState method. www.leitzmedien.com Modules used: ProCache Markup Sitemap XML Email Obfuscation (EMO) Tracy Debugger Regards, Andreas
    6 points
  4. It's definitely easier https://processwire.com/blog/posts/pw-3.0.44-repeaters/
    4 points
  5. Ok, I think I got what you mean. Yes it will be reset to 0. Just forget what I said before. Instead of having $session->set('count', 0) in your template, set it in _init.php : if(!$config->ajax) $session->set('count', 0); So, if you refresh the page, the $session->count will be reset to 0, if the page is called by AJAX then $session->count is incremented.
    3 points
  6. the style would be easy to update; also i'm hoping to be able to enable fieldset close and also fieldset tab open/close so you can make some pretty extensive settings pages with this. the process page basically renders a standard pw form, using the json data you configure through the module interface; the whole setup is super clever, @pmarki nice job... also i'm hoping to have some prebuilt sets of fields that can be imported to get started with a lot of standard type settings; possible 'field setting profiles' like home business, corporation, education etc, and then it would populate with a lot of fields needed to configure and edit stuff like Schema..
    3 points
  7. Introducing Variations, an Input- and Fieldtype for product variations and their attributes. Product variations is a topic that has been coming up now and then, especially in the recent past. This module seeks to fill this gap. Though it's in its early stages of development, it is already functional and can be used as is. I decided to make an early announcement (modules development forum) in order to get early feedback from potential users. The module is an alternative take on how variations can be built for a product. Imagine the ubiquitous T-Shirt. The product could vary by ...Size, Colour, Material, etc...These variations could in turn have internal variations, i.e. attributes....so, Size [Small, Large], Colour [Red, Blue]...etc; you get the drift. The usual approaches to building variations have been either to use Multiple pages, Repeaters, Page Table, Table or Matrix (limited to 1x1 variations). In this module, we do it a bit differently. First, the variations occur not at the Field level (meaning all product pages would have the same variations and attributes for each template) but at the page level. Secondly, there are no multiple pages for each variation and/or attributes; a product is a single page. The variations and their attributes are defined by site editors at the page level. Once a variations configuration has been defined, it is applied to the page and all possible combinations are generated (i.e. the Red,Small,Cotton; Red,Large,Cotton, etc) in the Inputfield. There is no limit to the number of variations and attributes that can be defined, although you will be amazed at how quickly the combinations grow! Prices are entered for each combination when editing the page. Combinations without prices are not saved to the database. Please note that prices cannot themselves vary at the page-level. Meaning, you cannot have ONE variation configuration that has different price inputs per product in the same FieldtypeVariations field. The module ships with an API for outputting variation combinations in the frontend. Search, database and in-memory work as normal in the frontend. In the backend, DataTables provides a nice paginated, filterable table. Prices can be entered on any pages (of the table) without loss of data (meaning you can enter prices on page 1, scroll to page 10, enter more prices, filter or search the products table, enter more prices and finally save; no data will be lost). I still have a couple of ideas and plans pending but would love to hear from you, thanks. Below is a short video demo of the module in its current state. Things may/will change, both UI and features. Btw, the Fieldtype, although primarily targeted at commerce applications, is by no means limited to this. Other uses requiring combinations of whatever number of variables are very much within the remit of the module. Planned/Hoped for features Import/Export product variations and attributes (Excel, etc) Full integration with Padloper (I will have to discuss with @apeisa) SKU fields for each product variation Add/Remove extra subfields, e.g. multi-currency prices (currently there is only 1 input for each product variations' price) Product variation images? Etc... Please not this module is not related to this other planned module (but it may eventually). Sneak Peek Demo
    2 points
  8. Hi @j00st, do you mean something link the screenshot below?
    2 points
  9. Just to close this out, there turned out to be multiple, unrelated issues. The 404 on the front end was due to a coding error on my part. The upload issue on the back end was due to missing support for iconv and imagick. All sorted now.
    2 points
  10. Thanks for the info Mike. I've moved this to dev talk since the security issue pertains to a third-party software rather than ProcessWire itself.
    2 points
  11. $session->count = $session->count + 1
    2 points
  12. You'd create a Process module, which then triggers your custom function. Process modules are the modules, which render any information in the backend / show up as menu items in the navigation.
    2 points
  13. There's no way to answer that question. It depends on what one might find "noticable", what version of php is used, which database and version of it is used (mariadb != mysql) and in the and also on the hardware used. Yeah they're all loaded. But really fieldsets are probably the fieldtype with the smallest footprint anyways.
    2 points
  14. If you enable the pagefileSecure, requets to serve files from /site/assets/files are not delivered directly by the webserver but routed through ProcessWire, which does the permission checks. So it slows down the delivery of the files, because they are served by PHP. If you only need to secure specific files, you could also try the SecureFile module: http://modules.processwire.com/modules/fieldtype-secure-file/ It is an extension of a regular file field with the possibility to customize the storage location - here you would typically choose a folder outside the web root. Cheers
    2 points
  15. Often times, creating a side project is first and foremost scratching your own itch Or to start differently: Currently, I'm developing a site where I need CKeditor (and later jQueryUI Datepicker) outside of the admin, in frontend. I searched Google and the forums and found an approach to follow - but during the research the site laravel-recipes.com came into my mind (since I'm currently also looking into this framework). It's content consists of small, spot-on bits of information, for example: http://laravel-recipes.com/recipes/269 Just to think out loudly here, wouldn't it be nice to have a ProcessWire counterpart of such a site? processwire-recipes.com for example? Target group: Developers, from beginner to advanced Difference to these forums: Stripping the discussion part, concentrating on the info; and if done properly: bypassing the mediocre forum search, better tagging Difference to the official tutorial section: Focusing on not creating a whole site, but modular parts of it. Single solutions. For example: First child redirects (shameless plug, but this is the format of information pieces I'm having in mind) Difference to the API documentation: Situation-based ("I need this and that") instead of architecture-based Laravel.io (forum), laravel.com (official, and doc) and laravel-recipies.com possibly prove that these type of sites can coexist in a framework ecosystem, so I guess a recipes site would not cannibalize this forum here nor the doc section. A recipe site like this would live and die with its content, of course. I would be ready to share all the small pieces of information I encounter that would make a good "recipe". But that alone wouldn't be enough so this project won't survive without contribution of the community. What's your opinion on this? Yea or nay? Update: ...it just took, erm, nearly three months,... but here it is: https://processwire-recipes.com/
    1 point
  16. Hi all. For a while now been wondering how many would be interested in a backend and frontend shop catalogue built on top of PadLoper? I've previously spoken to @apeisa about this and his take is that there are no plans to develop PadLoper in this direction but he's happy to support such efforts. The gist of the backend shop catalogue is to provide one place (think ProcessModule) where you can manage your PadLoper products - add, edit, delete, track sales, etc without having to set up the underlying structure yourself. The frontend would be like a shop/webstore profile, a frontend cart basically, that's customisable. The shop would be 100% powered by PadLoper. This means that to use the 'shop catalogue' would require that PadLoper is installed. These are just loose ideas at the moment for a pro module. This might or might not see the light of day depending on feedback. Anyway, would love to hear thoughts, thanks.
    1 point
  17. Very nice made with cool effects. Thanks for mentioning Masonry and vivus, didnt know them yet.
    1 point
  18. Hello @Inxentas, you should include your files like this: <?php include("./inc/bku-block-footer.php"); ?> This should help. Found in this similar thread: Regards, Andreas
    1 point
  19. If you want an easier approach than creating a full process module (not that it's that hard), but you could create a custom AdminAction using this module: https://processwire.com/talk/topic/14921-admin-actions/ Note that it's very easy to hide all the other actions from the required role and add your new action to the flyout menu so they have quick access.
    1 point
  20. 1 point
  21. That is why in reality www stands for Welcome to the Wild West, and not for World Wide Web
    1 point
  22. Yeah, that would be the problem. If you use repeaters a lot, then I would highly recommend updating to the latest dev version of ProcessWire. There were a lot of great new repeater features introduced in 3.0.44 (http://processwire.com/blog/posts/pw-3.0.44-repeaters/) - we are now at 3.0.52. I do think the automated header from title was available before this, but would need to track down exactly when. 2.6.5 is REALLY old now
    1 point
  23. hi kathep, sure it is also usable in the frontend. but it is no click-click solution. the module just provides some helpers to define the columns like i showed in the example. to make the code more clear to read, write and maintain. you would just have to include the right scripts (i'm currently loading all the plugins via cdn) and you would be fine. maybe you would also have to do some styling. but all of that is - at least for now - not intended to be handled by my module. hope that answer helps you
    1 point
  24. Very nice! Do you think it is feasible to use this - or a future version - on the front end?
    1 point
  25. Cool idea . Yes; please file a feature request, thanks. No need for a hook. We can simply pass an option [which I'll create] to render(). However, this will not be as straightforward as it looks. What if that unlistable menu item has children, especially ones that are custom menus? We can't leave them parentless. They will have to be removed. Such a potential situation won't always be apparent at the editing stage; editors could unknowingly create a hierarchy that will break if the option to not list menu items is applied. Please file a request and I'll have a think.
    1 point
  26. It won't be possible to store the image with the same name twice because they are bot stored in the same folder in the filesystem. Why can't you download it from the images field?
    1 point
  27. Another filter added in v036: embediframe. Unlike other responsive embed setups this one uses two wrappers to allow setting custom width so the iframe won't necessarily fill the available horizontal space. There's also a protectemail filter available and the bodyclass filter was updated to include paginated pages too.
    1 point
  28. I do completely see where you're coming from. I've never professionally worked with Wordpress (I could not bring myself to support it) but have spent many hours with Drupal and Joomla. Many errors encountered of course, some bugs some of my making. But I don't recall an admin-breaking error in that time. However, you're right about the 2.7 and MySQL version (I am on latest). I don't know why I didn't update PW before continuing the project, so i did play my part in causing it. True. But two thing about open source systems that I have experienced are 1) that most users don't post in the forums, and 2) most issues for new users don't get enough attention. Probably every day each known CMS will have many users downloading and testing it. Small errors they might try and fix, but breaking errors will send them running. And most never stop at the forum to say 'hey, what happened?'. Those users are probably lost forever, and won't be supporters. I'm not saying everything should be done to cater for new users. But the competition is fierce. I believe right now gaining popularity as a CMS means recognising what designers / developers need to give to their clients, and that a system like PW needs to a client who will ask 'why not Wordpress?'. The answer has to be because 'for you' it's better. A broken admin destroys that argument in seconds. So I believe jumping on this was the right thing to do.
    1 point
  29. To make it visible in the backend? All in all this one should work /** * 1) add $config->pagefileSecure = true; in your config.php * 2) add this to your ready.php * 3) enable $page->password_protect in the backend and save the page * * if you do step 3 before 1 and 2 you need to save/view the page once to prevent access to the file * because Page::isPublic() is not triggered if you try to access the file directly * */ /** * if Page::isPublic() returns false a prefix (-) will be added to the name of the assets directory * the directory is not accessible directly anymore * */ wire()->addHookAfter('Page::isPublic', function($e) { $page = $e->object; if ($page->password_protect) { $e->return = false; } }); /** * ProcessPageView::sendFile() is called only if the file is not directly accessible * if this function is called AND the page is not public it passthru the protected file path (.htaccess) by default * therefore we need this hook too * */ wire()->addHookBefore('ProcessPageView::sendFile', function($e) { $page = $e->arguments[0]; if ($page->password_protect) throw new Wire404Exception('File not found'); });
    1 point
  30. Digging this from the grave, is this now easier to accomplish? Sometimes for mocking data with the few resources one might have it's useful to just repeat the same thing. Maybe add an icon to the repeater item toolbar through a hook. Came back to say I'm blind and crazy, I was already using latest dev -.- Time to make coffe
    1 point
  31. as far as I know (never used it so far) it works on newly created files only (so after enabling pagefileSecure) and changes file urls, think by adding a hyphen or something which I guess .htaccess blocks already..have a look at wire/config.php excerpt: /** * Secure page files? * * When, true, prevents http access to file assets of access protected pages. * * Set to true if you want files on non-public or unpublished pages to be * protected from direct URL access. * * When used, such files will be delivered at a URL that is protected from public access. * * @var bool * */ $config->pagefileSecure = false; /** * Prefix for secure page files * * One or more characters prefixed to the pathname of secured file dirs. * * If use of this feature originated with a pre-2.3 install, this may need to be * specified as "." rather than "-". * */ $config->pagefileSecurePathPrefix = '-'; to get it working you need to block access by guest role for those templates, have a read at https://processwire.com/talk/topic/5292-proctecting-files-from-non-logged-in-users/ might be of interest: https://processwire.com/talk/topic/15622-pagefilesecure-and-pageispublic-hook-not-working/
    1 point
  32. Glad BCE worked for you I am curious though what happened for you with Ryan's module. My local dev setup is definitely nothing special. A 2011 MacBook Pro with 8GB RAM and PHP 7.1 all setup via HomeBrew. I feel like something else must be amiss. I have never used MariaDB - I know it is supposed to be faster if anything and completely compatible with MySQL, but who knows?
    1 point
  33. The module does not allow for any Parsedown settings to be set in the module config, so you will have to copy the module to /site/modules/ and make changes there. If you use the Parsedown Extra flavour then you would edit line 70: $str = $extra->setUrlsLinked(false)->text($str); If you use the 'normal' flavour then do the same for line 62.
    1 point
  34. THX man, a worldfamous chocolate cake from vienna for you! Hero Member! Simple Contact Form - i do it tommorw, not so cool as the old version…
    1 point
  35. Also made small test with Ryan's module. Were added 9359 ( 3119 per minute) pages in 180s before timeout.
    1 point
  36. Here are some preview screenshots from my pimped out version of this module... 1) Added the placeholder and collapsed attributed to the fields editor: 2) allow export of the fields setup, as well as restore, so that you can take huge sets of fields and import them into a site. 3) ability to export/backup the settings values themselves, as well as restore them from backed up json. still need more testing, but so far these things help make this module more usable; also i changed the default global api variable to g_settings, to avoid the conflict with Lister Pro.
    1 point
  37. I just did a quick test with BCE using your test file and by the time it hit my 120 timeout, it had created 4898 pages, so 2449 pages per minute isn't too bad. Curious what you find at your end though.
    1 point
  38. So i think thats the problem when enabling pageFilesecure. The files suddenly cant be accessed even if published and should be accessible for a guest user cause the pages under admin are protected. Im not sure how MM works. But maybe giving guest access to MM templates in admin could solve that but not sure what the consequences are.
    1 point
  39. I might have answer to my own question. Posting for others who are new to PW. In Module->Configue->LanguageSupportPageNames, at the bottom there is a collapse select which I didn't initially see: Default language homepage URL is same as root URL? Choose Yes if you want the homepage of your default language to be served by the root URL / (recommended). Choose No if you want your root URL to perform a redirect to /name/ (where /name/ is the default language name of your homepage). Selecting No solved the issue as far as I can see
    1 point
  40. I completely understand your concerns regarding giving a client a product that you don't have faith in, but there should be no way a client can make this happen - they should not be given superuser access and therefore should not be able to install modules. I made exactly the same argument as you some time ago I just forced the same error in PW 3 (by deleting a language field in the pages table) and it now looks like this, with everything still accessible. I would definitely urge you to try PW 3 - there has been well over a year of development that's gone into this new major version. I think it is only fair that you judge PW based on this version - I hope you agree!
    1 point
  41. You can add a hook like this in your /site/init.php file: $this->wire()->addHookProperty('Page::courseData', null, function($event) { $sql = "SELECT * FROM ......"; $results = $this->wire('database')->query($sql); $event->return = $results->fetchAll(); }); And then in your template file you can call: $page->courseData You can also make of $event->object->name inside the hook to get the name of the page that the courseData property is called from so you can use that in your sql query. Of course you can get any other field from the page, like $event->object->myfieldname and use that in your query as well. Does that help?
    1 point
  42. Wow! So many responses so soon. This is an active community. Thanks first of all. Now some of you asked me to elaborate on the purpose. So let me try to be more specific. The data we use is drawn from the clients internal course managment database which we access as mysql-tables. Every day we display a limited selection of all courses (usually a window from today-10 days to today+1 year) on the website. Access to the courses on display is provided by one- or two level access path-Strings that can be defined for each course (i.e. languages->german) More than one access path may be defined to allow different ways of finding a path. (i.e. job->conflict AND communication->work-related). Each access path becomes a menu and submenu in the userinterface. In a previous implementation of this in Drupal 6 we did in fact import all course data into the Drupal data model and ran an update of this database whenever a new import was done. But with a system as flexible as pw I'd like to implement the real thing and hook database access. In short: Whenever PW receives a request for course "Dancing with the devil" a hooked call does all the queries of the external database (teh url tells me which data to retrieve) and returns all the desired field data to the calling procedure. So that as a result my $page-Object in the template is filled just like it would be if I rendered a normal page. Ideally the same would apply when generating then menues (I'd just return an array of menu items to render) or the page that lists all the courses that have a certain access path (languages->german).
    1 point
  43. "how to store it inside processwire" - I am not sure what you mean here - do you mean save the content to PW pages? You can query content from an external database and simply iterate over it and output in your template file. Here is the docs on $database: https://processwire.com/api/ref/database/ Here is a rough idea of what you can do. Obviously I am querying the PW "pages" table, but you can do this on any table in the database whether PW or not. You can see in the output that you can easily iterate through each row in the returned array and grab whatever array keys (db fields) you want.
    1 point
  44. Thanks for that kixe. Do you might to know where to find more about $database and WireDatabasePDO ?
    1 point
  45. I've been calling it a framework instead of a CMS. I find that's a great starting point to explain how much different it is from a CMS such as WordPress, how it makes zero assumptions and allows you to build whatever you want without having to hack the S#!7 out of it or depend on a bunch of plugins. And so far so good. Clients have been trusting my arguments and accepting PW. Agencies... not so much. They're like christians, and accept only the holy word of WordPress (or whatever they use). They also laugh at me when I say I don't use Bootstrap or CSS preprocessors. Apparently it's a flaw to know CSS enough to not need a crutch to make a responsive column based layout. I'm drifting. Sorry.
    1 point
  46. I've been using Digital Ocean along with https://serverpilot.io/ as an easy way to manage the server(s) - it's a great combo!
    1 point
  47. Hi tehandyb There is a rough translation between traditional terms and ProcessWire's, which is: Templates = tables Fields = columns Pages = rows Template files = controllers & views In ProcessWire, you would create the necessary fields for your content, add the to one or more templates (to define your "schema" in a way), and you create pages based on those templates. The page output is handled by it's template's file. The fields you add to the template can vary from integers to text input to map markers (and more). In your example, you would probably want to create templates for at least event and location. Users, roles and permissions already exist in PW, but you can extend these for your own needs if you have to. The key to linking pages together (individual users, locations and events) is the Page fieldtype. This allows you to create a field that can reference one or more other pages of a type of your choosing. Back to your example, I'm going to presume an event might have one location or none at all. First, create a location template with the basic fields you need. Create a section of your page tree to store them. If you don't want them to show up in lists or searches, set the parent to Hidden. Then, create a new field called location and add it to your event template. Configure it to list pages with a template of location and the parent page where they're stored in your tree. You can also choose what type of inputfield it will use - a Dropdown or PageListSelect might be appropriate depending on how many you have. When you have done that, creating or editing an event will allow you to choose a location from the list. In the event template file, you would access it like this: <p>This is the <?php echo $page->title ?> event.</p> <p>The venue is: <?php echo $page->location->title ?>.</p> I'd recommend reading some more documentation and this brilliant thread on categorising your content.
    1 point
  48. Don't understand the question exactly, but here are some nice docs: http://processwire.com/api/fieldtypes/repeaters/ Also repeater pages have a special template called "repeater_yourField". So theoretically you could also get repeater pages the following way: // Get last item sorted by created DESC $item = $pages->find("template=repeater_yourField,sort=-created,limit=1"); // Get first item sorted by created with an additional condition $item = $pages->find("template=repeater_yourField,sort=created,field|field2%=blub,limit=1");
    1 point
×
×
  • Create New...