-
Posts
4,090 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
so, forgive me if this is a completly other thing, but what about a crossdomain.xml file? Is this used for something other? <?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="example.com" /> <allow-access-from domain="www.example.com" /> <allow-access-from domain="data.example.com" /> </cross-domain-policy>
- 7 replies
-
- X-Frame-Options
- SAMEORIGIN
-
(and 2 more)
Tagged with:
-
Repeater, pages selector and "connected data"
horst replied to moonwhaler's topic in General Support
I think you need to build a selector for your selection list with a pseudocode like: select all from teammembers that are not in games.position.teammembers So, it depends on your fieldnames that you use in games. -
+2 @adrian: I think you are not over-reacting! After reading #7 my blood pressure and pulse are getting too high for some minutes. (da muss man sich ja fremd-schämen) @blad: I find it good that you have helped with some fixes for those found security issues via PM.
- 22 replies
-
- 2
-
-
- web design
- web development
-
(and 1 more)
Tagged with:
-
How to Display data across multiple sites on different servers
horst replied to Mel's topic in Getting Started
RSS: http://modules.processwire.com/modules/markup-rss/ or better use the webservices module? (http://modules.processwire.com/modules/service-pages/) -
@Mel: here is a post that describes how to use a watermark that is uploaded into a single image field (to make an image field a single image field you have to setup the field to only allow 1 file, otherwise, 0 or greater 1 it is a multiple files field): https://processwire.com/talk/topic/4264-release-page-image-manipulator/#entry41883 The general how to you can read in the initial post here in this thread: The $pngAlphaImage can be a filename (full path and not an url!) or a pageimage. Example with filename, assumed you have uploaded a png watermark image per FTP to your server into a directory besides wire and site, called "_mystuff": $png = $_SERVER['DOCUMENT_ROOT'] . '/_mystuff/' . 'basename-of-my-watermark.png'; foreach($images as $image) { $watermarked_image = $image->pimLoad('tw', true)->width(500)->watermarkLogo($png, 'southeast', 0)->pimSave(); echo "<img src='{$watermarked_image->url}' />"; } An example with png from an imagefield, assumed it is called 'watermarkfield' and is on a page with the name/url '/tools/'. The tools page isn't visible from the frontpage, it is only a page that holds some fields and stuff that I need around the site on different places: // assumed the watermarkfield is a single image field: $png = $pages->get('/tools/')->watermarkfield; // assumed the watermarkfield can have multiple images and I want use the first one: $png = $pages->get('/tools/')->watermarkfield->first(); foreach($images as $image) { $watermarked_image = $image->pimLoad('tw', true)->width(500)->watermarkLogo($png, 'northwest', 0)->pimSave(); echo "<img src='{$watermarked_image->url}' />"; }
-
@Mel: I changed the subject of your thread and I moved your post into the Support-Board-Thread of the PiM and have answered the question there: https://processwire.com/talk/topic/4264-release-page-image-manipulator/page-6#entry71075
-
Page-Edit -> tab: Children -> Sort Settings -> Children are sorted by or: https://processwire.com/talk/topic/4758-release-pagetree-add-new-child-reverse-on-top/
-
@xorotle: you can use the underscore for that or you can configure something other in your site/config.php for $config->ignoreTemplateFileRegex see: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/config.php#L249 if you define something in your site/config.php it overrides the setting from wire/config.php.
-
@renobird: which fileformat(s) do you test? png, gif, jpeg or variing? For PNG and GIF the quality setting has no effect, only for JPEG it should.
-
it says: default option, not the only one you can have. As far as I know defaults, they will be taken if you have not specified an individual value for something.
-
Uhh? Where does it say that? This would be new to me. (good reference is here)
-
I think not a "special PW-function" but what's about radio buttons in your form with left - center - right and within form processing you crop the images west - center or east, according to the selected radio button?
-
Hi, in the examples of pocketgrid it is to read that this should support n-th child for IE 6 - 8, but like I understand the code it only selects IE7 ?? I thought gte = "is greater then" and lte = "is lesser then". I'm wrong or right?
-
Module: Spex: An asset and template management module
horst replied to Jonathan Dart's topic in Modules/Plugins
+1 for $config->siteScripts and $config->siteStyles with absolute pathes / urls -
but if it has a single image in it, why do you try to select the ->first() ? I assume you have set the image field to allow only 1 image? Also, if you have set it proper to a single image field, it could be that you have a page without an uploaded image to that field. if($featured->Featured_Image) { echo "<img src=\"{$featured->Featured_Image->getThumb('thumbnail')}\" />"; } ------ Also my questions a post above was thought a bit different. I was trying to get you debug the output in your page, just above the line that raises the error. But I wasn't clear, so it doesn't . The error messages said that it isn't an object or the wrong object, so you can debug it to see what's going on. You expect it to be a cropimage field, therefore it should be an instance of type "FieldtypeCropImage". if($featured->Featured_Image->first() instanceof FieldtypeCropImage) { echo "\n<p>the Featured_Image->first() is a cropimage</p>\n"; } if($featured->Featured_Image instanceof FieldtypeCropImage) { echo "\n<p>the Featured_Image is a cropimage</p>\n"; } // imagefield is: FieldtypeImage Most collections in PW are based on WireArrays, so multiple images fields are too and you can look for that: // or checking for single vs multiple if($featured->Featured_Image instanceof WireArray) { echo "\n<p>it is multiple</p>\n"; } else { echo "\n<p>it is single</p>\n"; } You can also just dump a variable with var_dump($featured->Featured_Image->first()) to see what is in it, but that's mostly not very usefull in PW because objects in PW have way to many references to other objects so that var_dump results into very, very large outputs.
-
if $featured->Featured_Image->first() isn't an object that has a method getThumb, so what is it actually? or lets have a look at one step before: what does $featured->Featured_Image hold? (an images array, a single image, nothing?)
-
Sorry Tom, I have misunderstood or haven't answered clearly. My tip was regarding this comment I don't know nothing about that error with the usage on profile pages. My tip was only to let you know that if you like the stored crop rectangle coords per session, you can use it also permanent with installing PiM and the setting in config.php.
-
@xorotle: has you set debug to true? (site/config.php -> $config->debug = true;) have you entries in your site/assets/logs/error.txt ? (after switching debug to true?)
-
"Komodo Edit" (not Komodo IDE) is a free Editor (OSX, Win, Linux) that supports FTP-Remote editing too: http://komodoide.com/komodo-edit/
-
Gallery: A photo album module (preview)
horst replied to kongondo's topic in Module/Plugin Development
@Kongondo: ^-^ ^-^ -
Hi Tom, unfortunately not yet without hacking. The plan is, in a new fork of the Thumbnail module, to add the (optional) permanent storage directly into Thumbnails. If you want hide the options you can hack/edit the site/modules/Thumbnails/ProcessCropImage/ProcessCropImage2pim.css and set them as display none (#hd form label, #hd form select, #hd form button) ??
-
@renobird: Do you also have installed PiM? Together with PiM installed, you can store the used crop rectangle coords permanent by just add this to your site/config.php $config->imageManipulatorOptions = array( 'thumbnailCoordsPermanent' => true );
-
A different way of using templates / delegate approach
horst replied to Soma's topic in API & Templates
Haha, - to add one more, I want to point out that I really like to use the way it is done with Spex! -
A different way of using templates / delegate approach
horst replied to Soma's topic in API & Templates
@enricob: 1) You do not have to add an alternate template file on a per page basis, you only have to add it once for a newly created template. Don't know how many templates one need for a average site, - I seldom have used more than 10 or 15. 2) I think it isn't a good idea. For example, it is different if a page has a template that has no template file compared to pages that have a template which is assigned a template file. Those pages without a template file cannot be shown on the frontend (because there is no template file that specifies how to generate the output). Such pages have many usecases like for example toolpages etc., or trees and childpages that you need to define categories or tags or whatever. You don't want them accessible through HTTP.