-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
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.
-
Hi Joe, If you go to the particular template and click to edit it, then click on the title field you can adjust the visibility of that field (along with other settings) for just this template. This is for all users though, but it sounds like it should be ok for your use.
-
Thanks renobird - glad it was timely for you. I am contemplating adding a variety of conversion setting options and the ability to generate a PNG at a specific size via an API call that comes directly from the SVG so that quality would be maintained, rather than resizing the initially created PNG. Something else I will be doing, although maybe not as part of the module will be an interface for management of SVG metadata for maintaining a library of vector illustrations. If you have any other ideas, please let me know.
-
I don't think there is a simple PW way to do this like $page->my_select->title. This is ugly, but works: foreach(explode("\n",$page->fields->my_select->select_options) as $option) { $valueLabel = explode(':=',$option); $value[$valueLabel[0]] = trim($valueLabel[1]); } echo $value[$page->my_select];
-
Well, I do love highcharts
-
Module for admin and front-end resizing and rasterizing of vector SVG images Requirements IMPORTANT: This module requires Imagemagick and the pecl imagick extension. For anything but simple SVGs, you must make sure imagemagick was compiled with a relatively recent version of rsvg (I know that 2.32.1 works well and presumably anything more recent should also be fine). If you don't manage your own server and the results are not good, check with your host. If everything is set up correctly, the rendered PNGs will be "perfect" representations of the SVGs. See this post below for just how much of a difference rsvg can make. How to use You must add SVG as an allowed file type for a multiple images field. Check the module configuration for a variety of settings for both PNG and JPG output options. In particular be aware of the Rasterized Images Field selector. If you choose "None" only the SVG will be stored in the images field. You can still access rasterized versions via the rasterize() method - see below for details. NB: You need to be running a recent dev version (or 2.4 stable once available) of Processwire that supports field dependencies for the configuration settings to work as expected. Once the module configuration settings are completed: Upload an SVG image and the module will create a rasterized version. You need to save the page to see the rasterized version which can then be accessed via the API like any other image. The module also adds a new method: rasterize() which can be called from your templates like: $image->rasterize(200,0)->url This method optionally resizes the vector version of the image and then rasterizes it so you can scale it infinitely and there will be no loss of quality. Make sure you point it to the svg version in your images field. Modules Directory: http://modules.processwire.com/modules/image-rasterizer/ Github: https://github.com/adrianbj/ImageRasterizer
-
there on setting ->template choose not show my template
adrian replied to haha's topic in Getting Started
Creating a template php file in your file system won't automatically create a template in PW. You still need to go to Setup > Templates and add the new template. Also, I am not sure why you are creating a separate brands-head.inc file. All you need to do is add a conditional statement in your head.inc file. Something like: if($page->template != "brands-basic-page"){ //echo the sidebar } Let us know if that helps you sort things out. -
Manol, You can definitely use one file for the structure. Ryan has a pretty good explanation of the approach here: http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/?p=6174
-
@alan - I have added support for your suggested URL structure. Please test when you get a chance and let me know how it goes for you. @diogo - thank you for the testing. The ->find("sort=sort") works for me too - any ideas why it doesn't work as normal? Good point about iterating all those pages on a large site - that definitely won't work well at all. I have changed config setting to a InputfieldPageListSelectMultiple and it seems to work well now. So now it is possible to limit the redirection of these links by template and or page/page parent. Any other thoughts/ideas?
-
@diogo - I have added support for limiting this functionality to only those selected templates (in the module config settings). I was also trying to add support for by page, but have come across a very strange thing - I can't seem to get an array of pages using wire('pages'). I get: Trying to get property of non-object in /share/www/usaus-h2o-dev/site/modules/ProcessRedirectIds/ProcessRedirectIds.module on line 179 I have commented out this section of the code for the moment, but if you have any ideas why this isn't working, I'd love to hear them @alanfluff - thanks for that link - I think this module will take care of what you are looking to do. @Marty Walker - I have added a new tab to page edit screen in the admin called ShortLinks that lists a few key links for that page that the user might be interested in. The last example I give on that tab makes me wonder whether this module should actually be renamed to something that mentions permalinks. I am not sure where to go with this now - I will definitely be using this for an upcoming site, but I would really like some feedback from some other PW gurus, especially Ryan, as to whether this should be a released module and whether you guys think this idea of a permalink like: http://www.mysite.com/1234/articles/my-article-title/ is a good idea to be promoting or not. I know that Page Path History does an amazing job already of handling changes to page names and parents. So would the idea of using this module to create this style of permalink be redundant, or just bad practice? Thanks for any feedback.
-
Long (?) selector on customized User Template - no get() or find()
adrian replied to Eltom's topic in Getting Started
If you use *= or %= in your selector it will work.- 3 replies
-
- Users
- customized
-
(and 2 more)
Tagged with:
-
Custom module: API call to delete cache of all pages programmatically?
adrian replied to titanium's topic in API & Templates
Are you talking about the Markup Cache module? If so, you should be able to use: $cache->removeAll(); -
This might also be of some interest. I will probably be implementing diogo's suggestions shortly, but hoping for some other feedback as well: http://processwire.com/talk/topic/4611-redirect-id-based-urls/
-
v6 takes care of the inconsistent order between default and the labeling. I still have the default order with large first though as I figure you can always resize with the PW API, but obviously it comes down to each use case, which is why the order is configurable I'll add to the modules directory now, so updating to new versions will be easy Thanks for the kudos.
-
v6 now has optional (default) automatic file renaming. Images will be named with this format: videoID-ImageName.jpg where, the videoID is the ID of video from YouTube or Vimeo and ImageName is the name of the image and matches those names that are in the Youtube Image Names and Vimeo Image Names config fields. I think this standardized format will make it much easier to call the images via the API in templates. Ok, hopefully that is it for a while unless anyone else has any other suggestions
-
Ok, just added another new option (v5). You can now decide whether you want to grab all the available images listed, or just the first available one (default). This way you can list all available images, but if one doesn't exist, it will move onto the next in the comma separated list until it finds one that does exist. List them in your order of preference.
-
Thanks Martijn, That high res version is great - "maxresdefault". It is the only one that doesn't get letterboxed, which actually makes it useful, unlike the other ones! I also added "hqdefault" and "default" as other default options. I also added checks to make sure an image exists before trying to add it to the images field. Now along with Antti's thumbnail module, Horst's PIM module, or your Image Interceptor module it should be possible to manipulate that high res version however the user wants!