-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Yeah, it was the path to those _phpcls classes. I am testing locally and it seems like there was an issue with $_SERVER['DOCUMENT_ROOT']. Once I hardcoded this, the install works fine. So maybe just an issue for me and no-one else will be affected.
-
I actually installed from scratch just using the files in your zip. I saw the wire folder in there and so didn't think there was need to do the normal profile install method of copying just those certain folders across. The problem is those extra lines you added to config.php. I am looking at them now to see if I can narrow down the issue. EDIT: It was the require_once failing due to a path problem. I just hard coded the path for now to get things working.
-
Hey horst, I just tried to install your profile test site and get the following error. I followed up with an install of the latest dev (April 3rd) and it worked fine, so looks like there is maybe something corrupted in your profile. Anyone else having troubles with it? There are no php errors of significance that suggest what the issue might be either.
-
The logic to find and display specific children should be in the template of the page that is linked to, not the page with the link. Right now you are trying to use a PW array of pages as a URL - that just can't work. You could potentially pass page ids via a url like: mysite.com/children/?ids=1003|1024|1934 but I don't think you have any need for that and it's just way messier than necessary. It sounds like you are trying to link to a page that contains children which have a field with a particular value. In that case I would recommend url segments: mysite.com/children/fieldvalue Then in the template on the children page you need to get the value of the url segment and then do your $pages->find("fieldname={$input->urlSegment1}"); where $input->urlSegment1 is equal to the value of "fieldvalue" that was in the url that go you to this page. This link should get you started: http://wiki.processwire.com/index.php/URL_Segments
-
Thanks @woop. I hadn't seen that option before. I just committed a small update that includes that in the default list of thumbnails to grab.
-
Well that shows it's running Apache. Looking at the path of that error it shows the server is running php under suPHP and if you google that error you are getting, it seems that everyone is also running suPHP, so I think it might be time to put the onus back on your host. Maybe someone else has some better ideas? PS I had to deal with crazydomains once - I found the site was often unavailable for a few minutes at a time, quite regularly. I know you can't change, but I am sure they are the issue.
-
Horst is the PW image guy - pretty much everything he does ends up in the PW core. He has already submitted these changes as a pull request for Ryan to incorporate: https://github.com/ryancramerdesign/ProcessWire/pull/440/commits
-
The eq (if that's what you mean by qe) you are referring to is like first(), last(), eq(n). It will get the number of the image in order starting with 0. If the image field is set to Max 1 then you won't need this. Anything else and it's an array and so you need to specify which image. I would imagine you need to replace the existing ImageSizer.php with the code in the revised one that horst posted. In wire/core.
-
I didn't even realize this wasn't built in because it works (the browsing, not the editing) in ForkLift.
-
"Unable to generate password hash" when log in after site is deployed
adrian replied to JohnHalsey's topic in General Support
Have you read this thread: https://processwire.com/talk/topic/3528-when-logging-in-to-admin-getting-unable-to-generate-password-hash/ -
Actually, that was an oversight on my part. I have just committed an update so that GetVideoThumbs now supports CropImage fieldtypes, and any other fieldtypes that are an instanceof FieldtypeImage. Before I was limiting it just to FieldtypeImage. Let me know if it works ok for you. As for the configuration options of CropImage - ie changing the fieldtype (basics tab) vs the inputfield (details tab). I haven't tested, but I always assumed you needed to change both. Might be a more appropriate question for the support thread for that module though.
-
No worries - we aim to please Thanks again for letting me know about the problem!
-
Install error - Error: Exception: SQLSTATE[28000] [1045]
adrian replied to wtrainer's topic in Getting Started
The url of the site is: http://wire.madaboutbrighton.net/ (which works as expected BTW, until you proceed to the next step) so I think the two wires is correct, but maybe the wire subdomain is causing a conflict somehow? -
Install error - Error: Exception: SQLSTATE[28000] [1045]
adrian replied to wtrainer's topic in Getting Started
Maybe some rewrite rules or other weird apache directives in the apache conf file? I really don't know - sorry! -
@videokid - thanks for the report. I have just committed a quick fix for this. I am not sure on the best solution, but the Custom Upload Names module will now ignore any images with an initial filename that contains "youtube" or "vimeo". Of course that means that these won't get renamed at all, but I think that is probably the best behavior at the moment. Please let me know how it works for you. EDIT: Just to clarify - it is Custom Upload Names that got the update, not GetVideoThumbs
-
It's not garbled code - view the page source and it will be better formatted showing you all the fields in the template on the page. Echoing $page->fields shows the template name because of the way things are configured, but I honestly don't think there is a real need to ever do that, because you get the same thing from $page->template->name which is more logical if that's what you are after. While it's great to learn and understand the inner workings of the code, I sometimes feel like you are trying to learn too much too soon. Spend more time building and using what you need, rather than dissecting everything. You'll figure out the minor details when the need arises, rather than confusing you before you a full handle on the basics. Does that make sense? For a basic PW site you really just need to know that you can echo out any field with $page->fieldname and that an images field either returns a single image, or an array of images depending on the maximum files allowed setting. If you have an array you can foreach through it. That's really the extent of things you need to build your first site. Using your current question - how often do you really need to get all the fields on a given page? I am really not trying to criticize your approach, I just think you'll get more for your effort by just building stuff. Either way, we'll continue to help, but it's always more fun helping with solutions to practical questions
-
Install error - Error: Exception: SQLSTATE[28000] [1045]
adrian replied to wtrainer's topic in Getting Started
Is it possible that you have an .htaccess file at the root of http://wire.madaboutbrighton.net/ that is not the one that comes with PW? I see that http://wire.madaboutbrighton.net/ looks just fine, but if you add anything to that url you get the error you mentioned, so I am wondering if it is loading some other content somehow via a rewrite rule or something. -
If I understand correctly I don't think there is a built in way of doing this, but I have done something like this programmatically in front-end forms, so you could do the same with a hook on an admin form template. Curious though what your use case is. Couldn't you just have two page fields with the different parents? If not, one solution might be to hook on ProcessPageEdit::processInput and take the value from a text field (child_new) that would be where you'd enter the name of the new page, and then have a select for choosing which parent you want it added to (whichparent). I would actually disable the allow new pages to be create from field option to avoid confusion. Then after you have created the new page from the value of the text field, set it to blank so it can be used again. Sorry I don't have much time right now, so this should be considered pseudo code and ugly pseudo code at that, but maybe it will get you going! class NewPageCreator extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'New page creator', 'summary' => '', 'href' => '', 'version' => 1, 'permanent' => false, 'autoload' => true ); } public function init() { $this->addHookAfter('ProcessPageEdit::processInput', $this, 'addToParent'); } public function addToParent($event){ // ProcessPageEdit's processInput function may go recursive, so we want to skip // the instances where it does that by checking the second argument named "level" $level = $event->arguments(1); if($level > 0) return; $pp = $this->post->input->whichparent; if($this->input->post->child_new == '') return; //if no child_new entered, leave now $newchild = new Page(); $newchild->template = $this->templates->get("template-name"); $newchild->parent = $pp; $newchild->of(false); $newchild->title = $this->sanitizer->text($this->input->post->child_new); $newchild->save(); // Save the new child $pp->test_page = $newchild; //add it to the list of selected pages for the page field $pp->child_new = ''; //empty the child_new field - it is now in the main child field $pp->of(false); $pp->save("child_new"); } } I revised this significantly and did a little testing. This should now pretty much work, although note that field names for child_new and whichparent are hardcoded.
-
return $page->parent; in the Custom PHP code to find selectable pages option.
-
In case anyone is wanting to access the item link or summary, you just need to add these to the makeCalendarItem function. $a->link = $this->cleanText($item->link['href']); $a->summary = $this->cleanText($item->summary); and edit the __construct function appropriately.
-
Hey Ryan, Just went to use this module and that break/continue error is still happening. I'll submit an issue on Github too. EDIT: Apparently I submitted an issue already - 3 months ago!
-
Is this possibly the issue: https://processwire.com/talk/topic/6077-reduced-image-quality-of-images-added-to-image-fields/
-
I am sure many of you here will appreciate this: Sorry, can someone move this to pub?
-
+1 for leaflet - it's very cool and lets you use your own map tiles too, if that's something you need. If you do ever want to go that route, take a look at mapnik for server-side generation of map tiles from SHP files.
-
Thanks Steve, I'll see what I can do about incorporating these changes.