Jump to content

thomas

Members
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by thomas

  1. Hello Ryan, I think I found it. Whenever I forget the trailing slah, it redirects. So https://ssl-account.com/neu.bigair.tv/admin/ works (even though no stylesheets or anything is found) but https://ssl-account.com/neu.bigair.tv/admin redirects to https://ssl-account.com/admin which of course doesn't work at all. I'll try to get this to work with that. Thanks! thomas
  2. Hello, I want to build a facebook tab for my website, but FB requires SSL. So I have an option to use an ssl proxy for my domain which sounds like https://ssl-account.com/domain-name/ ... A quick check reveals my page but of course no links work or images appear since they are all absolutely linked to /. I can't seem to access any page but home (/) though. Every time I want to access say https://ssl-account.com/domain-name/news/ it redirects to https://ssl-account.com/news which obviously doesn't work. I only need one single page with one template to work with SSL. Has anyone got any experience with this? Thanks, thomas
  3. Cool. I just did that. Thanks nik!
  4. Yes I tried it and there are results! But here's the weird part: As soon as I do this, unpublished pages show up in the results. Sounds odd, but it's true! The resulting MySQL query is this: SELECT SQL_CALC_FOUND_ROWS pages.id,pages.status,pages.parent_id,pages.templates_id FROM `pages` LEFT JOIN field_is_private ON field_is_private.pages_id=pages.id LEFT JOIN pages_access ON (pages_access.pages_id=pages.id AND pages_access.templates_id IN(2,3)) WHERE (pages.templates_id=43) AND field_is_private.pages_id IS NULL OR field_is_private.data='0' AND (pages.status<1024) AND pages_access.pages_id IS NULL AND pages.templates_id NOT IN(2,3) GROUP BY pages.id ORDER BY pages.created DESC with the important part being this: [...]AND field_is_private.pages_id IS NULL OR field_is_private.data='0' AND (pages.status<1024)[...] NOw if I add a set of paranthesis like so: [...]AND (field_is_private.pages_id IS NULL OR field_is_private.data='0') AND (pages.status<1024)[...] it works perfect, at least for my case. Bug? Thanks, thomas
  5. Yes Nik, I'm on the latest dev (dl'd because of this) and I also tried on the latest stable. Thanks, thomas
  6. Hello Soma, not sure about your second sentence ... my checkbox field is called "is_private" ... the DB table field_is_private holds 3 entries with data "1", the ones I checked. Now I try to select the ones which aren't checked: $pages->find("template=video,is_private!=1") $pages->find("template=video,is_private=0") $pages->find("template=video,is_private<1") ... no results. The resulting MySQL query has no results either: SELECT pages.id,pages.parent_id,pages.templates_id FROM `pages` JOIN field_is_private AS field_is_private ON field_is_private.pages_id=pages.id AND (((field_is_private.data!='1' ) )) LEFT JOIN pages_access ON (pages_access.pages_id=pages.id AND pages_access.templates_id IN(2,3)) WHERE (pages.templates_id=43) AND (pages.status<1024) AND pages_access.pages_id IS NULL AND pages.templates_id NOT IN(2,3) GROUP BY pages.id ORDER BY pages.created DESC I'm not too good in MySQL but I guess that's because those entries simply don't exist. So they are neither "0" nor "not 1" nor "lower than 1" ... Hope that clarifies my problem. Thanks, thomas
  7. Hello, I have about 1000 articles and now added a checkbox to the template (I know it's a bit late but sometimes problems arise where you don't expect them ...) Now I can't seem to check for "not checked". Neither field=0 nor field<1 nor field!=1 yield any results. Only field=1 works but that's not really what I want. Maybe a DB expert can help? Thanks, thomas
  8. Thanks Nik, obviously there will be a lot more to exclude than to include but I can't fugure out a way to rephrase those queries for include other than what you posted earlier (using import()). I'll compare those two and ditch the iteration Thanks, thomas
  9. I use MarkupCache to cache JSON data all the time so I'll definitely take a look at your code, Jeroen. Thanks
  10. Thanks nik, that's what I thought. I have a rather large list of articles which can be sorted and configured by the user. It also contains 'private' articles and 'drafts' which are only visible to it's creater. Right now I iterate over the complete list but that's becoming too slow. I wonder if this is a good approach: $noShow = $pages->find('private=1,author!='.$user); $results = $pages->find('template = video,id!='.$noShow); there are about 1K articles and counting ... I'm thankful for all hints! t
  11. Hello, Quick question: can i use selectors like $pages->find('fieldA=xy || (fieldA=z && fieldB = x)') ? (I'm on a mobile and need to know ...can't try before Monday ...) Thanks, t
  12. Hi Joss, I found /wire/modules/Process/ProcessPageEdit really helpful. There you'll find all you need to know to use PW inputfields in your own form. Also look at roles and permissions and $users. Hope this helps.
  13. No, "new pages" is not selected and I don't want it.
  14. Hello, I just set up a PageAutocomplete field which was supposed to use a different field for selection (different to name or title that is). I didn't work. It seemed to find something but the pulldown showed empty lines and when I selected one of them, the list only showed "Label". Once I switched the field to title, everything worked fine. Is this a bug or is there something to configure before using a custom field for PageAutocomplete? Thanks, t PS: Using PW 2.2.15
  15. Hello, I need to migrate a bunch of users from an old symfony site to the brand new PW one. Symfony saves the passwords as md5 hashes in the DB but I can't figure out how to configure PW for this. I set $config->userAuthHashType = 'md5'; $config->userAuthSalt = ''; and pasted the hash into the field_pass DB table of a working user. No success. What else is there to do?? Thanks, thomas
  16. Hi Joss, you somehow need to pass that $page object of the mothership onto the widget page and into that function. I'm not on my coding computer right now and can't test anything but maybe you could simply attach it to the widget object function categorySidebarWidgets() { $categoryWidgets = wire("pages")->get("/content-management/settings/site-settings")->site_category_sidebar_widgets; foreach ($categoryWidgets as $categoryWidget) { # $categoryWidget->mothership = wire('page'); # echo $categoryWidget->render(); } } And then test if you can output $page->mothership->title in your widget template. If you can, run with it! Oops, Interrobang war schneller
  17. Hi Joss, are there more than one site_category_sidebar_widgets? I've never used the render() method so I have no idea how to access the main page. I usually use php includes which live in the scope of the main page ... What's in the template of site_category_sidebar_widget? Only that function?
  18. Not sure I understand. You said your widget is a page in a field of the main page? So "main" page would be $page and widget is $page->widgetfield ...? Now if you call that function getChildCategoriesPosts($page); The function will use the main page as $page (remember $page doesn't exist yet in the function, you have to declare it and it can be something completely different than $page outside of the function. For clarity it might help to use a different name than $page) If you call getChildCategoriesPosts($page->widgetfield); the widget page will be used . I hope I'm understanding this correctly ...
  19. function getChildCategoriesPosts($page=null) { if(!$page) $page = wire('page'); else $page = wire('pages')->get($page); #loads of stuff } getChildCategoriesPosts($pageyouwant); is this what you are looking for?
  20. How do you find the pages at /news/political/xoxox? To move the pages out of the tree, I guess you have a page somewhere that reads the urlSegment and then finds the approriate page in the tree (ie /content-management/posts/xoxoxo). THis would be your category page. Whatever this page needs is what you have to use as an url. So if your category page (/news/politics/) works like this to find an actual post: $post = $pages->get("name=$input->urlSegment1"); this code: <a href='/news/politics/{$post->name}'> *should* work. (make sure to use "name" not title, and watch the slashes)
  21. Ah, now I get it. Try this: foreach ($posts as $post) { echo "<a href='/news/politics/{$post->name}'><h4>{$post->title}</h4></a>"; echo "</div>"; } Or even: echo "<a href='{$page->url}{$post->name}'><h4>{$post->title}</h4></a>"; to make the category variable as well ...
  22. I don't really understand what you are doing here, but then again, I'm no Soma If post_category_select is a page field holding the category page and $page is that category page, you won't need any url segments at all. If your category name is fed to $page by an urlSegment, try this: $posts = wire('pages'->find('post_category_select.name = '.$input->urlSegment1) If your foreach() should link to the actual posts, you won't need any urlSegments since the url() of the posts are already ready and correct. I'm making a lot of assumptions here so maybe it's all wrong ...
  23. Thanks for your answer Ryan, I just tried your code and the repeaters still remain in the DB. The unneccessary code was my attempt at forcing PW to delete the repeaters but that didn't work either. Could this be an issue of how the repeaters were created? Thanks, t
  24. Hello Jeff, thanks for the detailed explanation. I was aware of that, but "reverse direction" does nothing for me when sort order (4) is on "manual drag and drop". It doesn't stay checked and it has no effect on the sort order. - thomas
  25. Hello, I noticed that when using "drag and drop" as sort order in the admin, new pages always end up on the bottom of the list. We have a site that has a few hundred pages under one parent and i'd like to change the sort order to drag and drop so the editor can decide which article stands where on the page. The way it is now, he won't find his newly added article though, or only after going through an endless list. Is there a way to change this behaviour so new articles go to the top of the list? Thanks, thomas
×
×
  • Create New...