-
Posts
11,185 -
Joined
-
Last visited
-
Days Won
372
Everything posted by adrian
-
create pages via API, how add to the top of tree?
adrian replied to horst's topic in Getting Started
I haven't tested Soma's solution, so not sure about those bugs, but do you need manual sorting in the back-end after creation? If not, wouldn't Ryan's suggestion of setting the sort order to "date created" in reverse work for you? I am guessing you do want the manual sorting, but thought I'd mention it, just in case -
I asked Ryan about this module and he is happy with it going in the modules directory, so I have submitted it: http://modules.processwire.com/modules/process-redirect-ids/ It is fine to have it run on all your pages/templates (the default), but don't forget to check out the module config settings where you can limit this. Remember it is only called by pages that return a 404 so I don't believe there should be any overhead on normal page loads. So please feel free to start using it and let me know if you have any improvements you'd like to see.
-
Just been thinking about joshuag's original aim and wonder if it could be tackled from a different angle. I know I often have the instinct to categorize things in the page tree to make them easier to find when editing, like in his example: /blog/ cat1/ article1 article2 cat2/ article3 article4 I usually refrain because I want the simpler URL structure on the front-end and it can be hard to know what category is really the most important when an article belongs in multiple categories, but it can make browsing through pages tedious when you have 100's or 1000's of articles. What I wondering is if there might be a way to group and sort the pages into categories in the tree view based on a chosen (and easily changeable) field value (most likely an ASM field that points to a list of selectable categories). I see this as being somewhat analogous to the way we can add tags to fields to have them appear grouped on the Setup > Fields page. Not sure the best way to implement this - maybe it could be a module - I'll think about it more soon - maybe even put together a mockup of what I think it could look like. Imagine being able to instantly group and sort the page tree by year and month, and then switch to subject, keywords, categories, or whatever other field you want. Any thoughts?
-
I have made a few minor tweaks / cleanup, but mostly improved the documentation in the Github readme and also in the first post in this thread, along with some new screenshots showing all the functionality in use. Will need a bigger chunk of time to deal with the major enhancements etc, but hopefully now you can get a better idea of what it does and it will be a little more user-friendly to test out. Send me feedback!
-
create pages via API, how add to the top of tree?
adrian replied to horst's topic in Getting Started
Hey horst - did you see this thread: http://processwire.com/talk/topic/3327-new-page-on-top/ EDIT: and this: http://processwire.com/talk/topic/1428-create-new-child-as-top-sibling-rather-than-bottom/ -
Thanks ozwim for the testing and bug reports. I'll see what I can do about getting these sorted out. I haven't tested with fieldsets at all yet. As for the error on line 734 - it is a language module related thing. I had seen that once before - should be easy enough to sort out. Good idea for adding details to the github readme on what's working etc - I have a feeling it will be an increasing list for a while, before it starts getting smaller, but I am sure we'll get there
-
It depends on whether you want one or several dev websites set up under htdocs. You can do root, but chances are you'll want more than one, so subfolders would make sense. Also, if you haven't seen it, check out DNSMasq - it will make multiple sites a breeze - trust me and take the time to set this up! Here are some instructions for MAMP setup that might be handy: http://eddmann.com/posts/the-ultimate-mamp-setup-hands-down/ There shouldn't be a processwire directory - htaccess will take care of redirecting something like localhost/processwire to the admin panel, assuming you left the admin as "processwire" Regarding the rewrite base - make sure you only uncomment one at a time, not all. I would assume the first would work if you installed processwire in htdocs.
-
Hey Martijn, I have made some substantial changes and pushed to github: Images are no longer deleted and repopulated by default - makes saving the page when there are no changes to the videos much faster as this module doesn't have to do much. Any images that are from videos that have been removed from the page are now deleted on a per video basis (ie if the URL is now gone) I have removed the option to disable image renaming - renaming proved essential to make the above two options work properly. I don't think this should be a problem. Renaming is handled slightly differently nowif you choose "First Available" for Which Images, it will name the image like so: videoID.jpg (eg: pmqzchx-mtc.jpg) if you choose "All Available" images it will append the name to the videoID: videoID-imageName.jpg (eg: pmqzchx-mtc-maxresdefault.jpg) I think this change will make it even easier to call the image from the API as you can directly match the image name to the video ID without knowing which one was grabbed. You just need to do a strtolower on the video ID as image names in PW must be lowercase. I think that's it, but definitely open to additions if you have ideas / code. EDIT: v0.1.3 limits module to page edit process only - prevents php notices on other admin pages.
-
different collection of fields for different class of users?
adrian replied to applab's topic in General Support
Hi applab and welcome to PW! Maybe check out this module: http://modules.processwire.com/modules/page-edit-field-permission/ and see if that can do what you need. -
Given that PW installed properly, I assume you managed to change htaccess.txt to .htaccess? It might not be visible now though. Does entering the following in your terminal help: defaults write com.apple.Finder AppleShowAllFiles YES Once you can edit the .htaccess file at the root of your site, try uncommenting some of the rewrite base options - probably the first one will do the trick.
-
Still can't delete image via API. What's wrong??
adrian replied to thomas's topic in API & Templates
Is it possible that error is still there as a result of previous issues? I am wondering if the image is still in the field_images DB table, but not on the filesystem. I would try removing it from the database and see if that resets things. -
Still can't delete image via API. What's wrong??
adrian replied to thomas's topic in API & Templates
I think you want deleteAll() rather than removeAll() which works on WireArray, not on files/images. Let us know if that solves your problem. -
Just pushed a new update that supports multiple videos in multiple fields on a page, so this should now work seamlessly with the VideoEmbed module. Also, you can now select the fields to search and the images field to populate using dropdown selects, rather than manually entering. The list of fields is limited to appropriate field types. Thumbnails in first post have been updated to show new functionality.
-
Just a quick on - and maybe this is something for Soma to fix in the modules manager, rather than in your theme (I haven't checked where the problem is), but see the button offset in the attached screenshot.
-
images inserted by editor to open in lightbox - best coding?
adrian replied to Joe's topic in General Support
No need to hack anything. Check out Image Interceptor: http://modules.processwire.com/modules/textformatter-image-interceptor/ That will take care of the resizing and can also add a class to the image that can be used to trigger a call to your lightbox script. -
Problem with setting a page to be unpublished by API
adrian replied to titanium's topic in API & Templates
Make sure you have debug mode on so you can see any errors that are thrown. It might be as simple as needing this before the save line: wire('page')->of(false); http://wiki.processwire.com/index.php/Text_Formatters http://cheatsheet.processwire.com/?filter=of(true -
Hey Ryan, Just noticed this error when viewing the page tree with today's dev version: Notice: Trying to get property of non-object in /wire/core/Template.php on line 540
-
Hey Ryan, Just a small usability issue with the thumbnail version of the gallery. When trying to reorder images you can't move to the left or right, you have to move up and down of the image beside it. Also, love the new items in the debug mode tools - hooks etc! and the way it now starts collapsed by default. I would like to see an option to collapse everything again after expansion though. Any thoughts for a different skin for TinyMCE? Cirkuit would look good I think. Thanks again!
-
Hi davo, You should be using the name of the page, rather than the title, in the URL, eg: echo "<li><a href='http://www.garagesalefinder.co.uk/listing-parent/{$c->name}'>{$c->title} ( $list_count )</a></li>"; Or alternately, so long as your page structure matches your URL structure, which is should unless you have done something unusual, you can simply use: echo "<li><a href='{$c->url}'>{$c->title} ( $list_count )</a></li>";
-
A small update - I have added support for import options so now you can decide whether you want to import just the fields and templates, or the entire page tree at the import stage, regardless of what is in the exported JSON file. Of course you can't import the page tree if it wasn't exported, but you can import just the fields and templates from a JSON file that contains the entire page tree. I have also added support for importing page trees directly from the repo at: https://github.com/adrianbj/ProcessWirePageLists Just choose the "Shared JSON Packages" option when importing. I haven't tackled the repeater field etc issues yet, hopefully soon. Will also be adding more shared packages soon and would love any contributions See the attached screenshot showing the direct page tree import using Ryan's awesome new admin theme
-
Might depend on exactly how you have your forms set up, but something like this should work. $inputfield->error($this->_("Please enter your First Name"));
-
The Site Profile Exporter will backup the database: http://modules.processwire.com/modules/process-export-profile/ It will also include all files and templates so it may be more than what you are looking for. If you want to backup just the database, there are a lot of non PW specific tools for this. If you are comfortable with the command line look into mysqldump which you can trigger with a cronjob and automatically copy to a remote server using rsync. The site profile exporter uses mysqldump for the DB part of the export. If you are after a more automated and user friendly approach with a graphical user interface, something like: http://sourceforge.net/projects/automysqlbackup/ works well, but there are lots of other options if you google: https://www.google.com/search?q=mysql+backup+tool Perhaps it might be a worthwhile addition to PW to have a stripped down version of the site profile exporter that just exports the database. This could be run with the lazycron module.
-
BTW - I love where you are headed with color schemes and Pete's suggestion to be able to easily change color combos within a given theme. I think it's really nice to be able to match the admin panel to the color scheme of a client's site without needing to create a new theme. It makes the client feel like the backend has been built especially for them.
-
Hey Ryan, I am no designer, so take my comments with a grain of salt, but I like the warm color scheme the best - it looks great! The one change I would like to see is the implementation of a sidebar rather than top tabs like the ERGO theme has, but similar to onjegolder's modification: http://processwire.com/talk/topic/1856-release-ergo-admin-template/?p=43471 I love the way the left sidebar tree is expandable for quicker access to items under setup. Of course this could also be done by making the setup menu a dropdown menu (sorry, I see you have already done this - NICE!), but I still prefer sidebars - given our modern widescreen aspect ratios it seems a better use of space. Also, and maybe this is just me, I have always found it easier to move the mouse left and right, rather than up and down - hence I have my OS dock/taskbar on the side, rather than on the bottom. Maybe we need a real UI expert to chime in Maybe a little off-topic, but I have also been wondering if maybe it is time to have a new "Tools" item in addition to "Setup" where modules can place their interfaces if it would be more appropriate.
-
Just under the Basic tab in the fields section. Just click on the name of the field in the orderable list of fields - this will bring up a popup of all the settings for the field that can be changed on a per template basis. If you still can't find it, let me know and I'll post a screenshot.