-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
@Ivan: as far as I understand -aj- he is aware of that and I share his opinion / suggestion on building that not in the core but building it as a paid ProFeature for enterprise customers.
-
I never have used a language pack before. Today I want. @nico: I have noticed some things: coming from google or from where ever to the first post of this thread, it would be good if there were some short instructions on how to get the newest lang-pack for stable and for dev. (with links!) A short instruction or appropriate links on how a lang pack must be applied would be useful too. and there shouldn't be old zip archives available for downloading. @Manfred62: really cool that you are that fast with updates to the dev-branch. Is it right that I have to grab the files from yellowleds repo and add the latest pw-lang-de-dev-update.zip to it?
-
don't know if you can find something useful here, but it sounds like you can grab some code or ideas about 404: https://processwire.com/talk/topic/4884-hook-before-a-404-exception/ yes, here it is: https://github.com/harikt/Assets/blob/master/Assets.module#L59 https://processwire.com/talk/topic/5724-404-search-module/
- 1 reply
-
- 3
-
No. I meant: What's about "get the image size of the cropped image URL" ? What size from what url? But above all: why?
-
->getThumb() actually returns an url, not a pageimage object. You may try to use the PiM for that? (with PiM you can manipulate imagefiles, not only pageimages) But because of the lack of native PW methods, you need to use some plain PHP code: // define some vars $cropname = 'crop'; $width = 600; // build the fullpath from the thumbnail url $sourceFilename = $_SERVER['DOCUMENT_ROOT'] . $page->header->getThumb($cropname); // build the targetfilename $targetFilename = dirname($sourceFilename) . '/' . $cropname . '_' . $page->header->name . ".{$width}x0." . pathinfo($sourceFilename, PATHINFO_EXTENSION); // get instance of PiM for manually usage, do the resize and save to a new file and return the targetfilename on success $result = $wire->modules->get('PageImageManipulator')->imLoad($sourceFilename)->setTargetFilename($targetFilename)->resize($width)->pimSave(); if($result==$targetFilename) { // resizing and saving was successful, now we need to get the url from the diskfilename $url = str_replace($_SERVER['DOCUMENT_ROOT'], '', $targetFilename); // and can output an image to the page echo "<img src='{$url}' />"; } This is written in the browser, but I think you get the clue, also it looks a bit clumpsy. But if it works, ...
-
+1 for #1 (optional)
-
Hey sunlix, welcome to the forums. Really cool first post! Reading a bit through the code on Github makes me "want to try it out" (unfortunately I haven't enough time now, but will come back to this soon)
-
shouldn't it be utf-8 by default?
-
Prevent function from outputting markup more than once
horst replied to LostKobrakai's topic in General Support
// _init.php $GLOBALS['gallery_used'] = false; // _func.php function renderGallery(){ if(!$GLOBALS['gallery_used']) { $GLOBALS['gallery_used'] = true; return "gallery"; } else { return "already used"; } } -
delete orphaned files/images from site/assets/files
horst replied to interrobang's topic in General Support
as far as I understand this, orphaned images are images without an original image, but I may be wrong. There are different variations in your assets/files folder: .0x100 // this one is (auto) created for the backend, all others are custom ones => your variations .390x100 .390x125 .390x166 .390x83 .585x125 there are a minimum of 5 variations of each original image. These are no orphaned images because their parent image are still there. 9 x 5 = 45 valid custom variations Do you not use / need them anymore? -
Understanding FieldtypeTextareaLanguage::wakeupValue
horst replied to bytesource's topic in Module/Plugin Development
@bytesource: it's really nice to build own modules. You make your hands dirty with code and get better skills in PW and PHP. But IMHO for your need to change a page-id into a link, I simply would go with hanna code module. -
https://processwire.com/talk/topic/6472-charleswuorinencom/#entry63522 https://processwire.com/talk/topic/6538-using-procache-with-wilcox-adaptive-images-plugin/page-2#entry64304
-
This draft capability, would it work that way that when you edit (add/remove and /or rearrange) images on a page that is already published that these changes are not directly visible at the frontpage? This one is really odd and need some better handling IMO.
-
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)