Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/05/2015 in all areas

  1. Hi Guys, Here's another website from us. It is some months old, but I was waiting for all the content to be in place before showing. http://davinci-porto.pt/ This is a frames workshop and art gallery in the main art neighbourhood from Porto. the content is in Portuguese, sorry Exceptionally in this site, there was no intervention from Erika, so the design is mine.
    5 points
  2. Quickly toggle your checkboxes with extra action buttons via AJAX. The module adds functionality to InputfieldCheckbox so you can toggle the checkbox fields in the extra action buttons intruduced in ProcessWire 2.6.5 via AJAX. Github Page Download Link Requirements This module works only for ProcessWire versions later than 2.6.5. How to Install 1. Copy the files to /site/modules/ProcessQuickToggle/ 2. In your admin, go to Modules > Refresh for new modules. 3. Click the "Install" button next to "Process Quick Toggle". Usage Go to any checkbox field you want to enable quick toggle feature for. Setup > Fields > my_checkbox_field. There in the Input tab you should see an Enable Quick Toggle field. After you check it you will see some fields that you can fill based on your needs. Then save the field. Now there should be an extra button for every page that has this field in the Pages tree. Features Supports template contexts. Supports core FontAwesome icons. Any kind of feedback is appreciated.
    5 points
  3. Hey guys, this may be interesting to join http://alistapart.com/blog/post/cms-event August 25, via Google Hangouts. Of course they will try to sell Craft and EE, as usual, but might still be good.
    4 points
  4. I would advice against repeaters. This would definitely become a performance issue in the long run. What @Martijn suggested sounds like a possible solution too, though that would require creating a lot of pages. Depends on how popular your site is, but this sounds like another scalability issue to me, and at the very least it would create unnecessary load on your server. Table field from the (commercial) ProFields module bundle would be a great fit for this task. It creates a database table of its own, which would make sense here. Another option would be a new module that does pretty much the same, though that would be more complicated to set up. Unless there's something I'm completely missing here, I would actually suggest a completely different route. What you're doing here is trying to recreate a subset of what Piwik and Google Analytics already do extremely well. That doesn't make any sense to me at all. Set up Google Analytics and let it handle collecting data. If there's a need to pull the data to your site and display it there (instead of within GA GUI), use Process Google Analytics or query the data via GA API. There are PHP libraries available for doing that, so it's not that much of a hassle really.
    3 points
  5. $list = $page->siblings("content_type!=6"); $list->getPrev($page); $list->getNext($page);
    3 points
  6. Hi Eze, you have to first select a sub-forum and then you should see a "New Topic" button in the top right.
    2 points
  7. I should probably add Page List Permissions after Antti adds User Groups. They're separate modules, after all, and User Groups doesn't really require Page List Permissions -- it has it's own UI for managing permissions via Page Edit.
    2 points
  8. Nevermind. Pilot error. Move along. Nothing to see here.
    2 points
  9. Short answer: Yes Attached is a revised version of the module I posted here: https://processwire.com/talk/topic/8406-set-multiple-templates-role-access/?p=81711 This new version adds support for changing "View" access and includes the Guest role (the original version didn't have these options). I haven't tested all scenarios thoroughly with this new version, but hopefully it works as expected. Once installed, go to Setup > Template Setup Batcher PS Don't forget the SHIFT+Click trick for selecting all 50 templates. ProcessTemplateSetupBatcher.module
    2 points
  10. Admin Page Tree Multiple Sorting ClassName: ProcessPageListMultipleSorting Extend the ordinary sort of children of a template in the admin page tree with multiple properties. For each template, you can define your own rule. Write each template (template-name) in a row, followed by a colon and then the additional field names for sorting. Example: All children of the template "blog" to be sorted in descending order according to the date of creation, then descending by modification date, and then by title. Type: blog: -created, -modified, title Installation Copy the files for this module to /site/modules/ProcessPageListMultipleSorting/ In admin: Modules > Check for new modules. Install Module "Admin Page Tree Multible Sorting". Alternative in ProcessWire 2.4+ Login to ProcessWire backend and go to Modules Click tab "New" and enter Module Class Name: "ProcessPageListMultipleSorting" Click "Download and Install" Compatibility I have currently tested the module only under PW 2.6+, but think that it works on older versions too. Maybe someone can give a feedback. Download PW-Repo: http://modules.processwire.com/modules/process-page-list-multiple-sorting/ GitHub: https://github.com/FlipZoomMedia/Processwire-ProcessPageListMultipleSorting I hope someone can use the module. Have fun and best regards, David
    1 point
  11. Needed to show someone how to quickly setup some settings for various things in a simple text area: could be used for slider settings, site settings, etc; What it does: gives you a matching variable for each key of each line... 1.) setup a textarea field for the settings ; i'm calling it settings_ta 2.) add delimited settings, 1 per line; i use a pipe (|) delimiter; example: address|some info here facebook|https://www.facebook.com twitter|https://twitter.com phone|(999) 999-9999 3.) in your _init.php, get the settings - replace the page number and the name of your settings field: $settings_ta = $pages->get(1644)->settings_ta; $settings_lines = explode(PHP_EOL, $settings_ta); foreach($settings_lines as $settings_row) { $settings_pair = explode('|', $settings_row); ${trim($settings_pair[0])} = trim($settings_pair[1]); } more condensed version, for those of you who like brevity... foreach(explode(PHP_EOL, $pages->get(1644)->settings_ta) as $settings_row) { $settings_pair = explode('|', $settings_row); ${trim($settings_pair[0])} = trim($settings_pair[1]); } now you can do this in your templates: echo $address; echo $facebook; echo $twitter; echo $phone; Edit: made the code simpler....; 2nd edit - added trim to support using ace editor with tabs Addendum: as an added convenience, you could use the Ace text editor module which would give you a monospaced text field and the ability to use tabs for your settings, which could be more readable and easier to edit. The code has been updated to support this by trimming the exploded strings prior to generating the variable/value. address | some info here facebook | http://www.facebook.com twitter | http://twitter.com phone | (999) 999-9999
    1 point
  12. Hi All, I am gladly posting my first site profile. Blue-VR Site Profile for ProcessWire Summary A site profile for corporate or personal website. Profile can be used with ProcessWire open source CMS/CMF version 2.3+. The front-end uses the Bootstrap 3.1 css framework for to get the responsiveness and mobile friendliness. Front-end Demo - bluevr.webcreate.lk Back-end Demo mode - bluevr-webcreate.lk/processwire (The username 'admin' and password 'bluevr2') Overall features * HTML5 & CSS3 + ({less}) * Build with bootstrap 3.1 * SEO Friendly * Clean & modern design * Responsive markup * Contact form and google map locations with multiple google markers * Testimonials using bxSlider * AIOM supports (Just install the module no need to touch the code) How to install Please take a copy of the latest ProcessWire (Replace the install, modules and templates directories with those in this profile, as shown below: - /site-default/install/ - /site-default/modules/ - /site-default/templates/ Make sure you do following steps as well 1. Add `tinymce` directory into /site-defaut. 2. Add the following two lines to your `/site/config.php` file: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Download Github: https://github.com/gayanvirajith/BlueVrSiteProfile/ Credits I would like to thanks Ryan for giving us great CMS/CMF and modules. Hani AbuGhazaleh for a great module of Fieldtype: Select (AKA Drop Down) David Karich for providing such a nice module AIOM+. *** Please note that the site profile is still on testing stage. Thanks ------------------------------------------------------------------------ Edit: install instructions. Edit: Add credits Edit: Update live demo url Edit: Update back-end demo mode details
    1 point
  13. Very nice!... Just FYI: credit in bottom right corner (Made by ED...) remains cutoff despite browser window size
    1 point
  14. @quickjeff - have you considered making a sitemap manually - then you would have api control over what it spits out: http://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/
    1 point
  15. it's a good question - i thought there was (maybe i'm imagining it) some setting where you could tell it what to do with trashed items, e.g. trashed items are deleted, or left there; ran into a situation yesterday where we wanted to move a child item from one parent to another, but even moving it just allowed it to be on 2 page tables, because the 1st page table remembered the id, and didn't account for the fact that the item was no longer a child of the page table.. ended up being easiest to trash the page and then move it out of the trash to the new parent; but i could see there being a need in future to be able to elegantly move pagetable items around without too much hacking...
    1 point
  16. Adrian, sorry for the late reply. Thank you very much for the module. It solved my problem for once and will hopefully teach me to do that stuff myself Thanks, thomas
    1 point
  17. I think I fixed the Maximum Execution Time Error by fixing an unclosed comment tag within a CSS file. At least on my local machine it's working, should work live, too but haven't tested it yet.. And I ran into an issue with JS minification "Error JSMin: unterminated byte.." Fixed it by renaming already minified files to NAME.min.js, seems to work for now Why isn't AIOM clearing cached files when creating new once, like replacing them. I had quite a long expiration time and had sometimes over 80 cached files in cache..? Maybe my fault^^
    1 point
  18. Hello everyone!! How does one go about creating a new thread/topic on this forum?
    1 point
  19. 1 point
  20. I like the idea. I have been looking for proper way to version control PW sites recently, and have not ended with a clear decision for myself. Of course "it depends on a project". But we can come up with a tutorial helping make the choices. What to version in git I never tried initialising a git repo in templates folder, as Ryan suggested here. Custom modules and now site/ready.php should go to version control, as well as config.php. For me the choiсe is either to version the whole installation or only the /site folder. As I usually modify the .htaccess I am leaning to the former. The next thing is what to ignore. Some think you should ignore /wire, some think it is worth having it in the repo. If we could (I mean If I knew how to) install the needed version of PW core as a dependency via composer or include it in a similar way automatically after deployment / git checkout, it would be better to leave /wire off. But for simplicity it could be better not to exclude it as it is quite small. That definately should be excluded is some part of site/assets. If the site is a big one, excluding site/assets/files is a must. But for a small near to static it is probably worthless. You should probably ignore these almost every time not to mess with constantly changing data: site/assets/cache site/assets/sessions site/assets/logs I found no reason not to include all modules to the VCS. Deployment Speaking about deployment, I do not like the idea to deploy every time I commit (which seems to be the case if using git-hooks, if I am getting it right). There are other ways for deployment with git, but I an intrigued by doing it with something like this or this (both are capistrano-like deployment tools in php). Anyway, I do not seem to find a way to easily deploy database changes. Maybe in the case of semi-static sites it is possible to dump a database and restore in with git-hooks (or to include a sql dump from sites/assets/backup/database to the revision and manually restore it), but it probably will never work with subscription sites and rich-content sites managed by clients. The only way to keep track of changes made to the database via PW GUI (admin) I came up with is keeping a journal. I made a folder where I include subfolders related to git commits with JSON export files for fields, templates and forms, which should be imported. Pages are just described in .txt as I know of no way to export them to something like JSON. It would be awesome to have something like the things discussed here available not to do it manually. Hope it is somehow useful. I would be delighted to hear how others do it, as I am certainly only an amateur in all this stuff.
    1 point
  21. Sorry, that didn't fix it. Try reducing the zeros here: header .main-nav:before { width: 1000%; }
    1 point
  22. Nice! One glitch on win phone: overflow-x should be set hidden, pages have large blank space on the right.
    1 point
  23. 1 suggestion: For every view store a page in a folder page called stats (or whatever). The page to store has a pagefield (single) to store the viewed page based on the ID posted with Javascript. For the date you could used a dedicated field or just use the title/name of the page.
    1 point
  24. I was going to answer, but Teppo did before. Good I still would like to say that all you're questions had quite obvious answers and that you asked them in a quite rough way, in the context of being the one that's using an excellent free tool, asking these questions to the one that provides this tool to you for free (repetition intended) and takes the time to give such complete explanations to every question that comes up. Anyway, if you're worried about guests, just make sure your editors are the first guests after saving a page, by telling them to do it.
    1 point
  25. Some best practices in the Docs or Tutorials section about keeping processwire installations version controlled, could be helpful. So, what's the best way to handle modules and templates. Submodules, subtrees or just one bloating site-repository. Also deployment, with git-hooks (or whatever to recommend), could be mentioned there. Any thoughts on this?
    1 point
  26. German language files for PW dev are now on new/other repo: https://github.com/Manfred62/pw-lang-de-dev. Only updated or additional files in this repo. Install the german language pack for PW master. Then add/replace with the dev files.
    1 point
  27. A better approach would be to do this: RewriteCond %{HTTP_HOST} ^example\.com RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] So, only force the prefix if we're accessing http://example.com/.
    1 point
  28. Turn on config advanced mode, create template and select fieldgroup from another templates fieldgroup to share the fields but have a new template.
    1 point
  29. <?php // An object is always equal to true in php. // For a PageArray do check for the number of elements. // For a Page one would check for the id. if ($page->blog_category->count()){ echo"Posted under: "; foreach($page->blog_category as $cat){ echo"<a href=\"{$cat->url}\">{$cat->title}</a></li> "; } } // Else do nothing. Not even loop though an empty array @Mike Rockett When using the new wire api function than do it the right way: echo "Posted under: " . $page->blog_category->implode(", ", function($cat) { return "<a href=\"{$cat->url}\">{$cat->title}</a>"; });
    1 point
  30. Just noticed your answer by accident, don't know why I didn't see it earlier. I like your idea, but I don't know if this wouldn't be confusing. You're not actually selecting posts, but rather tags, which are used in posts. $pages->find("template=posts, tags=:selected"); That's why I thought a new function could be more appropriate for this, but maybe there can be descriptive enough syntax found to be used by Pages::find. Edit: Looking at it a bit a tad longer it doesn't look as strange anymore. But thinking about the usage, would it be possible to also filter the results of such a query, like getting only tags which are categorized as "tech"? I imagine it somewhat like the sub-selectors.
    1 point
  31. They now are offering to install PW from the admin interface of your webspace: https://twitter.com/domainfactory/status/603131328826101760 (Fun fact: Almost all of our PW installations run there as we usually recommend DF as our preferred hosting company)
    1 point
  32. Another German article about PW. This time by a huge hoster (300.000+ users): https://www.df.eu/blog/2015/05/11/processwire-ein-cms-mit-besonderer-flexibilitaet/
    1 point
  33. @adrian - yes, i love that YAML thing; and as I see it there are maybe 4-5 good ways to do settings, depending on the site and the scenario; I usually use a profields table, and have 2 columns, and do a similar code as above to get the $vars, and i'm using this for a lot of things like slider settings, site settings, settings for javascript plugins etc.. where i need to have a ton of settings without much effort... For some things that are mission critical I make fields, especially if the setting can use a color picker, rangeslider, or select. the delimited textarea is good for beginners who maybe don't have profields, and who need a quick easy way to have some editable settings in the b/e.. and there should be an easy way to use the YAML field to do this; i guess i should try it and do another tutorial for using that for settings...
    1 point
  34. Hi! Look for Custom Editor JS Styles Set in the field configuration and enter a path for .js file. In this file you can define your custom styles like this: CKEDITOR.stylesSet.add('mystyles', [ // Block-level styles { name: 'Heading 1', element: 'h1'}, { name: 'Heading 2', element: 'h2'}, { name: 'Heading 3', element: 'h3'}, { name: 'Introduction', element: 'p', attributes: { 'class': 'introduction'} }, // Inline styles { name: 'Link button', element: 'a', attributes: { 'class': 'button' } }, { name: 'Highlight', element: 'span', attributes: { 'class': 'highlight' } }, // Object styles { name: 'Stretch', element: 'img', attributes: { 'class': 'stretch' } }, ]); Also make sure you have Styles toolbar item enabled.
    1 point
  35. In case anyone is interested in trying out some of the things I was talking about in previous posts here, the latest dev branch has a field import/export function. You'll see it in the lower right corner of Setup > Fields. It enables you to copy and paste any fields across any PW installations. Locally, I also have this working for templates (with fieldgroups), though that part needs a little more work so it's not yet committed. I also have fields, templates and fieldgroups mirroring every change to JSON files, as an option that can be enabled for those that want to version these things with Git and what not. That part also isn't yet committed to dev, but will be soon. However, I figured the copy/paste function probably had the largest use potential. It makes migrating field changes (or creation of new fields) quite a simple task. Next up on the commits will be the same thing for templates (with fieldgroups). (note I didn't take these screenshots together, so they aren't referencing the same fields).
    1 point
  36. Table Use this for tabular data, like rate tables or other things that you might typically represent in a spreadsheet. Use it for situations where you don't need the full-blown flexibility of repeaters, as it's technically more efficient with far less overhead than repeaters. Something like the Events Fieldtype could be very easily re-created via a Table field, but the potential uses are far broader. But for the most part, think tabular data when it comes to the Table field. Multipliers This is good for when you need a range of values (whether text, textarea, numbers, dates, etc.). If you are using repeaters with just one field in them, you might be a lot better off with a Multiplier. Like the Table field, Multipliers are very efficient and low overhead relative to something like Repeaters. Use Multipliers when you need to repeat a single input multiple times, optionally with a min and max number of inputs. Lets say you are building an employee directory, and each employee has between 1 and 3 email addresses. Rather than using 3 separate email fields, you would use 1 multiplier field and specify min=1 and max=3. Repeaters These are infinitely flexible in terms of what they represent, but each row of values is technically a page in the system. As a result, with the flexibility comes significant overhead. This is really only an issue when the quantity of repeater items gets high, or when you have lots (thousands) of pages using repeaters. I recommend repeaters for setting up things like homepage carousels. For example, if you go to the Villas of Distinction homepage, there are 3 separate repeaters in use on that page, each holding a photo, title, description, link. The client can have as many items in each of those sections as they want. Currently it looks like the first repeater as 6 items, the 2nd has 2, and the 3rd has 6. The possibilities of what can be represented with repeaters is endless, but look for potential alternatives when dealing with large quantities (whether large quantities of repeater items, or large quantities of pages using repeaters). PageTable This is one of the ProFields that is available for free (thanks to Avoine sponsorship) on the ProcessWire dev branch. Meaning, it'll be available for everyone to use as part of the core in ProcessWire 2.5. And you can use it now if you don't mind running the dev branch. PageTable has all the flexibility of repeaters, but with lower overhead from the admin/input perspective. Rather than trying to bundle all the inputs on one screen, PageTable shows you a table of items and you click on the item to edit it in a modal window. This enables it to be a lot more efficient from the admin UI perspective. It's also more flexible than repeaters are in terms of where you store your items. PageTable lets you choose where they should live, whether as children of the page being edited, or as children of some other parent page you designate. They might be a little more work to setup than repeaters, but I think that most situations where you need the flexibility of repeaters may be better served by PageTable. PageTable still can't compete with the speed and efficiency of Table or Multiplier, but consider using PageTable anywhere that you might have used Repeaters before. Repeaters and PageTable are fundamentally different from the admin UI/input perspective, so you'd want to compare them yourself to see what suits your individual input needs better. PageTable involves more clicking to create and edit items, making Repeaters potentially faster for entering data rapidly. But PageTable will scale much further in the admin UI than Repeaters will, so I would personally favor PageTable in more situations than Repeaters.
    1 point
  37. And there you have it, the easiest multilanguage website in the history of CMSs
    1 point
  38. This has always been one of my biggest issues with using a CMS - the whole deployment process and integrating updates from development - it always seems so dirty. If you can solve this problem it would be a massive help to myself and many other developers. I am usually only interested in migrating template field changes so I've always thought that flat file configurations would be the simplest way to manage this. But I understand that any sort of database model changes will always be difficult to manage. I am guessing the final solution will probably have to involve some sort of backup incase something goes wrong - maybe you could use something like capistrano (http://capistranorb.com/). I've used capifony previously and it's a nice solution to just type one command line to deploy updates.
    1 point
×
×
  • Create New...