-
Posts
4,088 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
@owzim: I remember vague that this was real in the times when PHP version just had changed from 4.0.6 to 4.1.0. But its a long time ago Unfortunately the code you provided for testing will not run with the oldtimers, otherwise I would have done a test with it.
-
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
Good article! If we want to follow that, we should go with hisrc & jQuery, or independently with foresight. (Or modify them | take out the bandwith thing | create something own) Which effects does this have for browsers with disabled JS? Can it have a NoJS-fallback? -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
@Martijn: would be best, the browsers have implemented the <picture> tag and do this stuff by themself. The workaround solution for it (picturefill) do not have a bandwith check too, (or I haven't seen it). I have linked to the hisrc because I have thought maybe you can take this, because it looks close to what you have. This way you don't need to build all new. This also has no bandwith checking. Also I cannot imagin how to implement that on a per image basis. the PageimageAdaptive should do the following: has a configpage where you can add the data for the different variations (imagefields ?, templates ?) hook into imageupload and create the variations add new property / properties to pageimage to output complete img markup and / or only url/s optionally enable retina variations in the configpage or request with pageimage options on a per image basis need something to output / inject the needed JS code into the page Have I forgotten something? Actually I can do 1., 2., 4. 3. I will find out how to do it 5. I don't know yet -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
@Martijn: with a jQuery plugin, has you checked what SiNNuT has linked to? better view demo -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
Hhm, don't really know, (I'm a php man). The first one can working without jQuery? Is this an advantage? Otherwise I think jQuery plugin looks nicer, is more compact? -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
@Martijn: forgotten to say: your solution is better than some big libraries because it's support for noscript! EDIT: If it gets support for old IE8, it were perfect! -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
Thanks Martijn, I will try out later, or tomorrow. one thing I think it could have is a log which versions it has loaded. Means if it has already a larger version, there is no need to load a smaller one when resizing the window. (assuming it is displayed fluid!) But the decision to load a new one or not cannot depend simply on the direction of window resize, resize smaller = no load | resize larger = load, that's wrong. onload it's medium resize small <= resize large => = only 3. need to load a new image onload it's large resize small <= resize medium => = no need to load a new image, even when window resizes larger Or is this stupid? -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
Hhhm, wide native support for <picture> seems to be far far away. Here is a short explanation of the html5 picture tag and a soultion with picturefill. <= @MadeMyDay says this in the other thread So, which way would be best to go? (which JS-helper?) -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
@Sinnut: thanks for the links. I don't know much of css / js things, but in first place i like solutions that do not rely on activated scripting. Best would be something like MadeMyDay shows in his post under <picture> with css media queries. JS should be come in only for browsers that do not support media queries or the picture - tag. On the other side, nearly all pages with foto galleries today rely on JS, - so I'm yet not totally sure how to go. But the <picture> thing sounds promising. -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
@Martijn: do you know this format "<picture>"? I have thought about a little module that supports creating retina images and that at least need to add a property to pageimage to provide the retina url. I haven't wrote a line of code, just collecting informations. Would be fit perfectly to it to also create adaptive image variations and provide the markup. Which one would be better regarding browser support, the <picture> or your <img data- one? And do you have some lines of JavaScript for that? If yes, - can we put it together, collaborating on a module? -
Using ProCache With Wilcox' Adaptive Images Plugin
horst replied to bytesource's topic in Modules/Plugins
Pete, that's a good way to go. With the creation of different sized images, I would do it at uploading images through the images inputfield, the most common way I think. And if someone add images through the API somehow, he simply can add some more line of code to craete the images. It can go like this: public function init() { $this->addHookBefore('InputfieldFile::fileAdded', $this, 'createImages'); } public function createImages($event) { $inputfield = $event->object; if('images' != $inputfield->name) return; // we assume images field !! name of the field is: images !! otherwise change it $p = $inputfield->value['page']; // get the page if('gallery'!=$p->template) return; // don't do it on other pages than galleries $image = $event->argumentsByName("pagefile"); // get the image $image->width(400); $image->width(800); $image->width(1200); $image->size(200, 200); } This hooks into before the image gets added and creates the additional variations. It does not replace the event. After that the admin thumb is created. It is very basic and could be made a bit comfortable with checking the images filedname itself, etc. But it works fine for an individual single site. -
Hi, you need to go and read how to call thumbnails with the Thumbnails Module. It is explained on the Modulespage. SOmething like $cropfield->getThumb('nameOfYourThumbsetting') In the above code you simply request a Pageimage of 100 x 100 (centered autocropping)
-
Never say never! - but it is rather secure Welcome to the forums, qlex
-
DiagnoseAndRepairDatabase.module
-
Uups, have copied the latest version over my previous installed one, where a file of Diagnose Modules exists but is not installed! After login, when trying to go to the Modules-Tab of the Backend, I get this: Fatal error: Can't use method return value in write context in DOC_ROOT\site\modules\ProcessDiagnostics\DiagnoseModules.module on line 102 Makes my Modules Backend unusable (PW 2.4.2) - Haven't investigated further. @Nico: Do you need more infos? ----------- DiagnoseDatabase module works fine! I have some of these Warnings: 'Repair table to reclaim space.' What's about a Button that lets the user directly execute an optimize / repair? $query = 'OPTIMIZE NO_WRITE_TO_BINLOG TABLE ' . implode(', ', $tableNames);
-
Implement yet another way to access PW's globals
horst replied to owzim's topic in Wishlist & Roadmap
-
Create Pages (with File-Upload Field) via API
horst replied to MatthewSchenker's topic in API & Templates
http://www.php.net/manual/en/language.operators.string.php- 84 replies
-
- 1
-
-
- forms
- image upload
-
(and 1 more)
Tagged with:
-
Create Pages (with File-Upload Field) via API
horst replied to MatthewSchenker's topic in API & Templates
@videokid: ok that with readability is personal. agread but what trick does it? if($upload_path.$filename !== $upload_path . $filename) echo 'Horst is wrong!'; else echo 'This is nonsense!';- 84 replies
-
- 2
-
-
- forms
- image upload
-
(and 1 more)
Tagged with:
-
Implement yet another way to access PW's globals
horst replied to owzim's topic in Wishlist & Roadmap
I don't know if I'm right here, but isn't this the way to call static methods? (and only static methods regarding to strict mode?) Strict Standards: Non-static method MyClass::myMethod() should not be called statically -
Create Pages (with File-Upload Field) via API
horst replied to MatthewSchenker's topic in API & Templates
@videokid: Sorry, but this is nonsense. And for better readability you should use the first one with spaces.- 84 replies
-
- 1
-
-
- forms
- image upload
-
(and 1 more)
Tagged with:
-
Yes, is working now
-
@Nico: I can't follow in full, but simply stay to what I have said before: PS: Well, I remember a day back (or two), you have said it would be really useful to have this, regardless of the existence of somas modules. And well, others have agreed with you. So, now we want to have a functional module. That's all.
-
Hi and welcome mosravo, what have you done before? Have you copied pw files into the webroot or into a subfolder? Have you started the installer routine? ... what more ? Edit: So I'm not very well with this server stuff, but I know that some more information is needed / maybe useful for people who knows about it. And sooner or later they will come in here.
-
@steve: with the new version 0.2.0 I get an fatal error becuase of a missing method in ProcessDiagnostic. The missing function is this (from @adrian): /** * returns if function is disabled in php * * @return boolean: true, false */ static protected function isDisabled($function) { $disabled_functions = explode(',' , str_replace(' ', '', strtolower(ini_get('disable_functions')))); return in_array(strtolower($function), $disabled_functions); } @steve & @Nico: I have a question with the modules module: I don't want it to query all versions every time I call the diagnostics page. So, yes, I can uninstall it and only install it on demand. But would it not be better if this module has a button that I can press to execute the query and an option that lets select a time period (e.g. 1 week) that let run it via lazy cron at least once in the given time period?
-
Great, if you have this, you only need to check your actual url for the string /page and if it matches, append a / and a ?sort= to it, and if not, only append ?sort= to it. Ready. Done! Happy coding!