-
Posts
4,088 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
Show entire page tree as a dropdown under PAGES in Admin?
horst replied to Thomas108's topic in Getting Started
Ah, ok. No it will not change in behavior. And no, I don't know of any tool that does that. I'm not sure, but I think no, there also isn't what you are asking for, but you may have a look to the admin themes section by yourself. -
Show entire page tree as a dropdown under PAGES in Admin?
horst replied to Thomas108's topic in Getting Started
with the new PW 2.5 (what will be released very soon, or you can get in the dev-branch on GitHub) you can use Tree and Find. Do you know Find? -
I think this is sort of a syntax error: default: ; break; You need to add something between default: and ; Or you let it out if you do not want to specify a default! switch($sort) { case 'asc': $sort = "name"; break; case 'desc': $sort = "-name"; break; } http://php.net/manual/en/control-structures.switch.php
-
@SteveB: you may compare how it is built / used with WireMailSwiftMailer or WireMailSmtp. Both are modules that set on top of the base class and just working fine. So, without knowing how you have coded it, I cannot tell you more than to compare yours to those and refer to their examples. -------- It also is possible to check for the right module like so (logging isn't necessary): $mail = wireMail(); if($mail->className != 'WireMailSendgrid') { // Uups, wrong WireMail-Class: do something to inform the user and quit echo "<p>Couldn't get the right WireMail-Module (WireMailSendgrid). found: {$mail->className}</p>"; return; } As a sidenote, you should only install one module on top of the base class. I have encountered that, if you install two, the last one installed is used. I don't know of any method to select from different modules through the WireMail base class.
-
I think it should be page, not pages: $this->pages->addHookBefore('save'
-
Combining pages from multiple page select and children (limit=xx)
horst replied to MuchDev's topic in General Support
I'm in a hurry: https://www.google.com/search?q=site:processwire.com+pagination https://www.google.com/search?q=site:processwire.com%2Ftalk+pagination https://processwire.com/api/modules/markup-pager-nav/ (limit) ... -
<?php echo $member->get($page->name)->title; ?>
-
Very cool story! And a very wise decision to switch to PW without telling the client to early. (only after they have seen it live) it makes me:
- 33 replies
-
- 1
-
-
- Photography
- Travel photography
-
(and 1 more)
Tagged with:
-
He, if I get you right, you have version 2.4.10 installed and want upgrade to 2.4.17 (or the latest version available)? you should make a DB-backup rename your current wire folder to something like wire-2410 rename your current index.php to index.php.bak or something and then upload only the wire folder of the latest version and the index.php Regarding changes in the .htaccess file I have compared the 2.4.9 against the 2.4.17 and there were only 2 new lines added (row 150 + 151): # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Allow screenshot files (for install.php only: this 1 line below may be removed after install) RewriteCond %{REQUEST_URI} !(^|/)site-[^/]+/install/[^/]+\.(jpg|jpeg|png|gif)$ # Block access to any htaccess files RewriteCond %{REQUEST_URI} (^|/)\.htaccess$ [NC,OR] You need to update that manually. Then you should start the site by log into the admin and also view your site from the frontend.
-
@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.