-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
you can do it after the install, if you have installed a single language site profile. Most of us have created their personal starter site profile, I think. It has all settings for default language (inkl.language pack), and the modules, one never can miss, etc. To export a site profile is easy with the site profile exporter module.
-
default is default, it is required by the system for every other language that has no content in a field. But you are not forced to use english as default. You can make every thing you want as default, - with only one language or with multiple. For example you can use nl as default and fr as additional language.
-
If you get an error json parse error, you need to check what data is returned from the server. You can see it with the network tab of e.g. Firefox. When selected the ajax call there, you have additional tabs from which one is called server answer or something that like. What does it contain?
-
Nice, now you have found it. I have posted a link to another explanation for the rescue. But you don't need it anymore.
-
here is a post with another detailed step by step explanation:
-
I think it should be ok: https://en.wikipedia.org/wiki/HTTP_301#Search_engines When sending with a 301, search engines should update their index. At least it is how I have learned it
-
additionally to the family settings described above, you can enable / disable "add to new" (... something). It is enabled by default, but better you check this for the child template.
-
Hi tom0360, @flydev has created and shared a siteprofile for bootstrap. If this is something for you, you may use it. But you are totally free in how you define, organize and use your markup, and with wich profile you starts.
-
Why multiple functions/methods that do the same thing?
horst replied to Robin S's topic in API & Templates
1) The main keyword seems to be: access as a procedural function and not only as class instance. -
Basic beginner question - setting defaults in init.php
horst replied to SamC's topic in Getting Started
But don't forget to play with code too. ... and welcome to the forums, @SamC -
Bootstrapping ProcessWire gives an error on image resize???
horst replied to Xonox's topic in General Support
which PW version you are using and what is the code in the templates file line that raises the error? Also of interest maybe a few lines of code before that line raisng the error -
-
With my last attempt to croppable images I also had tried out some configurable settings. One of them was the background color for the thumbs, sitewide in the images module! No overhead, fully visual control for the admin, etc. Another point is, that the checkerbox (only) is much to hard in contrast. I had used a way more soft one. PNG with alpha transparency too. It should not dominate, it only should be a bit visible through the transparent parts. Using black white / medium gray is not very useful. I also don't want to switch around when I come to an images side. I want get my images presented in a less distracted way, that lets me focus on the relevant things just from the start. Now, as we are at it, there are some other parts that I really would see to be solved too: These are mainly the thumbs displayed in different sizes in regard of orientation and aspect ratio. Often the simplest solutions are the best. I suggest a solution like with css property CONTAIN in a given box (fe. 280x280). Following is a screenshot. Please tell me (or tell yourself) what information you get from the thumb overview. If you have no clue what may be of interest when screening 100 images, think about: pixel dimensions or min height / min width image format? (png jpg gif) Another question: Which one distracts you more from the images? first or second? --------------------------------------------------------------------------------------------- Here is another comparision. Which one is more distracting and which one guides you visually faster to the relevant information? This one is without any question Keep in mind that we are talking about the last 10% to become nearly perfect ( for all cases ). <= is this possible? for all cases? I'm not blaming anything, I'm fighting for the last 10%.
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
horst replied to David Karich's topic in Modules/Plugins
For me, it goes here: // condition <?php if ($config->debug) { ?> // condition as variable <?php $skipMinify = $config->debug || $user->isSuperuser(); if ($skipMinify) { ?> // or, if you have only one occurence in your code where you check this condition, // ommit the temorary variable and write it direct into the condition <?php if ($config->debug || $user->isSuperuser()) { ?> $config->debug is true when developing, and additionally I use superuser condition for later, when in production mode! -
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
horst replied to David Karich's topic in Modules/Plugins
OMG. I shouldn't post in the morning before the first cup of coffee. -
I assume you are speaking of the default admin thumb? If yes, there is no way I know about to avoid this with image fields. It is a requirement to display each image in the admin. But if you don't need the thumbnails, just a list with filenames, you can use a file field instead of an image field. The image field is based upon file field, it only has additonal methods and properties related to images.
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
horst replied to David Karich's topic in Modules/Plugins
My conditional is: $skipMinify = $config->debug || $user->isSuperuser() ? true : false; -
@benbyf: I have used to look into the fields exporter to find out some things and found it very quick and nice method. I created a few fields with all settings I'm interested in, select it in the exporter and looked to the json data: So, this alone is not enough, but after seeing a compact list of possible properties I can pickup one of interest and run a search for that in the inputfield class in my editor. <kidding>Don't wail about uncomplete docs or missing tuts. Instead search, find and learn, - we are waiting for you to contribute new tuts!</kidding>
-
Buchhandlung Scheuermann Today we have relaunched the site of a local bookstore, Buchhandlung Scheuermann. The site is based upon PW 2.7 and twitters bootstrap 3. It is fully customizable for the customer because we made use of: PageTables ALIF Croppable Images And the admin's sweeties are: Admin Custom Files Pageimage Manipulator 2 Pia - Pageimage Assistant ProCache Spex Wire Mail SMTP
-
Metadata Exif Version 0.9.0 (currently a WIP) for PW 2.8.+ / 3.0+ This is a new attempt to add easy EXIF reading support to ProcessWire. It should be an easy and less error prone API task. Thats why the module internally uses lowercase key names for all EXIF keys and all of your requested key names. But you are not forced to use lowercase key names, you can use any mixed chars for it as you like. You will get back an array or object with keynames / properties named the same (casesensitive) way as you have passed them in with your request. API The module adds one hook to the Pageimage: getExif($options = null) Without any $options passed to the method, it returns all EXIF data in a RAW multidim array. Passing a simple list with requested key names as array to it returns an array with only the values of those requested keynames. If you want change the output from array to object, you can use the a boolean "toObject" set to true. Additionally to this and / or any other option, you need to put your requested keynames list to the option "keys". $rawArray = $image->getExif(); $options = array('Whitebalance', 'Flash', 'ISOSpeedRatings', 'FNumber', 'UserComment'); $array = $image->getExif($options); $options = array('toObject' => true, 'keys' => array('whitebalance', 'flash', 'isospeedratings', 'fnumber', 'usercomment')); $object = $image->getExif($options); Possible options are A working example $options = array( 'keys' => array('ISOSpeedRatings', 'FNumber', 'Flash') ); echo "<table><tr>"; foreach($options['keys'] as $key) echo "<th>{$key}</th>"; echo "</tr>"; foreach($page->images as $image) { $exif = $image->getExif($options); echo "<tr>"; foreach($exif as $value) echo "<td>$value</td>"; echo "</tr>"; } echo "</table>"; This will output something like: With the boolean option "unformatted" passed as true, the output would look like: For some keys, that only store something like integer values, what are not very meaningful to most of us, the module contain xyzFormatted methods. This way, it is easy to enhance and maintain the module in the future. Help wanted It would be nice if some of you test the module and report back if the intended API suites your needs. And you are very welcome to post suggestions for which keys you want to have a ...Formatted method. Thank you! https://github.com/horst-n/MetadataExif
- 19 replies
-
- 12
-
page->get(field) where field is a GET var - wont work
horst replied to Jochen Kremer's topic in General Support
Thanks for mentioning. I have updated it in the post. (It was written in the browser, so without syntax checker ) -
page->get(field) where field is a GET var - wont work
horst replied to Jochen Kremer's topic in General Support
You should do another nice Debugging like you have done with your GET string, to see whats going on: $itemsData = wire()->pages->find("template=portfolio-item"); echo "<pre>"; echo $itemsData InstanceOf PageArray ? "is PageArray\n" : "NOT a PageArray\n"; if($itemsData InstanceOf PageArray && count($itemsData)) { // we have at least one page in the collection, get the first one for testing $p = $itemsData->first(); echo $p InstanceOf Page ? "is Page\n" : "NOT a Page\n"; if($p InstanceOf Page && $p->viewable()) { echo $p->fields->has("$targetGrid") ? "Field $targetGrid exists\n" : "Field $targetGrid does NOT exist\n"; if($p->fields->has("$targetGrid")) { var_dump($p->$targetGrid); } } } echo "\n</pre>"; If you not already know it, here are a nice overview: http://cheatsheet.processwire.com/ PS: instead of $_GET you better should use wire('input')->get->targetGrid, or when in template scope: $input->get->targetGrid. Also don't forget to sanitize input values! $targetGrid = wire('sanitizer')->fieldName( wire('input')->get->targetGrid ); -
It is a caching problem. You have copied cache values (directory pathes) from one computer (your online) to another computer (your local), and file_last_modified timestamps too. But this stored ones from your online mostly will not match to your locals. So you need to clear caches and have to refresh the modules lists. (Maybe better 2 times than only once ) After all the caches are refreshed and the filecompiler builds all fitting to your local computer, all settings in DB should work again. The second thing in your case is the SessionHandlerDB. SessionHandlerDB is an alternative handler fro session management. Now, after you have disabled it the hard way, PW switched to the default session management via files, located under site/assets/sessions/. If you like, you also can switch back to SessionHandlerDB after all other caches (also minor one!) are working perfect again. To switch back, please go to modules and install it via the interface, as you have done when using the first time. (Don't modify the modules table!! this only works the other way round!) ------ --- ------ To avoid those caching issues, you could use the SiteExporterModule, but this would not give you an exact copy of your online site. So, in your case you have done most things right. Only thing what you may try next time could be: make a copy of all site/... files to your local PC modify the site/config.php to point to your local DB get a mysql dump from your online DB modify the mysql dump: remove all entries of the tables "caches, sessions", but only the data value entries, not the table definitions! import the modified mysql dump into your local DB login into admin, go to modules and hit the refresh button one or two times
-
There is SessionHandlerDB and ProcessSessionDB in the modules table. Both belong together, ProcessSessionDB is a submodule of SessionHandlerDB.
-
Only to be sure, you have setup your site/config.php to point to your local DB? I believe it is a caching problem. If you just copied a dump from the remote DB to your local DB, you should delete all session and cache records before starting your local installation.