Jump to content

vknt

Members
  • Posts

    72
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by vknt

  1. Wow Ryan! You have no idea how long I've been dreaming of this! Thank you so much!
  2. For my work this is a HUGE step forward. I'm using this on a site that we're developing right now and the structure look so much better. The only bug so far is the one christoph has already mentioned: the visibility settings don't work. Will we have separate options for the repeater and the items inside the repeater?
  3. You could just use a switch command for the title? switch ($page->parent->title) { case "hr": // do something break; case "en": // do something break; case "de": // do something break; case "" : // do something break; }
  4. Thanks Apeisa, works like a charm. I didn't knew you could pass a Page into that string!
  5. I'm doing a questionnaire with multiple choice questions, so I built pages with different fields of the type "Page" to store the choices. I now want to build some metrics that show how many people choose a certain option but I don't understand how to use the selectors for fields of the type pages. I can't just use "any_field=any_value" because the field holds a Page. So what I search is something like: Find al the pages that this Field with as the selected page this ID=SomeNumber I hope I'm a bit clear in this. Can anyone help me with this? Thx in advance!
  6. Ok, thx for the heads up Ryan!
  7. Hi, [edit] I've also found the template of the children was on not viewable by guest-user. That also seems part of the problem. In any case I got it back working. I've just been searching for 2 hours for this problem. It was really weird, all of a sudden chrome would show the output of a foreach loop but firefox and safari wouldn't. So what was happening? I had been editing the acces of the parents template and mistakenly checked "can't have children". So I'm guessing the api didn't output the values because he thought there could not be children. But they were there because I had added them before I (mistakenly) changed the template. So I'm suggesting a check somewhere so this cannot happen.Perhaps a warning when changing the template access or a check so that when asking for children in the API it checks if there are there regardless of the access settings of the template. best regards Valentijn
  8. Nice work Soma!
  9. +1 and willing to help out
  10. Sorry for the late answer, I'm calling the code from within the template file of a page that I use to sync to mailchimp among other things, but you could have it in the page template of you form. Doesn't really matter. As long as you make sure to include the necessary classes and fill in the API key.
  11. I use Mailchimp for newsletters. As Apeisa said, when using the API, confirmation mails are not necessary. I save the users in PW and sync them to Mailchimp. This is the piece of code I use: <?php /** This Example shows how to run a Batch Subscribe on a List using the MCAPI.php class and do some basic error checking or handle the return values. **/ require_once 'libs/mailchimp/MCAPI.class.php'; require_once 'libs/mailchimp/config.inc.php'; //contains apikey $api = new MCAPI($apikey); foreach ($page->children as $subscriber) { $name = $subscriber->title; $email = $subscriber->visitor_email; $batch[] = array('EMAIL'=>$email, 'NAME'=>$name); } $optin = false; //no, don't send optin emails $up_exist = true; // yes, update currently subscribed users $replace_int = false; // no, add interest, don't replace $vals = $api->listBatchSubscribe($listId,$batch,$optin, $up_exist, $replace_int); if ($api->errorCode){ echo "Batch Subscribe failed!\n"; echo "code:".$api->errorCode."\n"; echo "msg :".$api->errorMessage."\n"; } else { echo "added: ".$vals['add_count']."\n"; echo "updated: ".$vals['update_count']."\n"; echo "errors: ".$vals['error_count']."\n"; foreach($vals['errors'] as $val){ echo $val['email_address']. " failed\n"; echo "code:".$val['code']."\n"; echo "msg :".$val['message']."\n"; }} ?>
  12. In 2.0 I think we had a field in Templates "What to do when the user has no access" and then the option to throw 404 or login. I can't find this in 2.1 anymore. Any light on the reason for that? I'm having this 2.1 site that show the parent page if a page is not found, I'm assuming there's a standard flow for this. Any ideas?
  13. I've been building some sites with processwire now and I've come across some annoyances, I may have these because of my personal workflow but I'm noting them here nonetheless. Example1: When viewing a template in setup>templates>yourtemplate you can see a list of fields. I would like be able to edit the properties of that field with one click instead of going to setup, then choose fields and then search in a (most long) list for the correct fieldtype. Same the other way around: direct links to edit the templates that use field Example2: - Ability to view a list of pages that are currently using a particular template in setup>templates>your template For example in the Delete Tab, it says by how many pages this is used, by not way to access those. If the template is used by more than 25 pages, not list them to ensure speed. To get functionalities these in there are surely other thing to take into account, so let's hear if this others in the forum have affinity with..
  14. almonk, I really really like this theme. Had some issues with the theme, as mentioned by Soma and I was just wondering if you are planning to continue to work on it in the near future?
  15. I can help out with the dutch translation if needed.
  16. Ok, thanks for pointing me to the roadmap Adam. I look that up before I post next time. I also think validation for certain fields are interesting.
  17. I'm having this scenario: for my page to render properly, I need to have certain fields filled in. Is their a way to make fields obligatory? So that you can't publish the page when those fields are not filled in? As I would solve it now, I would start the template by checking if the fields are empty, and if so provide a default value. However, sometimes a default value is not a good option. Any thought on how you would approach this? Thx in advance!
  18. Makes me feel stupid now Thx Soma!
  19. I think I've read all the forum posts on pagination, but I could find what I needed: to change the pagination limit of the tree in the admin. Basically I want to heighten the limit so my subpages in the admin view are not paginated. I've also looked at the config.php, but couldn't find a way to change it. Any pointers where I can change that value? Thx in advance!
  20. Ok, hadn't thought about doing it that way. Thx!
  21. Thanks for that clarification. I gave this another go at another site I'm building, in which I actually need some functions of 2.1. Pages display properly, only 1 problem: I don't get my tree in the admin screen anymore! [edit] Sorted it out. I accidently switched the 2.0 wire with the 2.1. Was a bit in a hurry..
  22. This is the error I'm getting: Template 'home' is used by the homepage and thus must have the 'guest' role assigned. I'm getting why this is so. However, I like to work on a server online, so my clients can already fill in fields while I'm working on them, so I want to restrict the access to the site for the public but let my clients have access after logging in. So I deselect guest and select "editor" role. But pw won't let me. I can get around this problem offcourse by adding other pages etc. but I wanted to put it out for reconsideration. Maybe: Dissallow only if "404 page is shown" is selected and allow if "show login page" is selected. Or maybe I'm missing a point?
  23. Thanks Ryan! Glad I've been able to contribute
  24. vknt

    Happy birthday Ryan!

    Happy birthday Ryan!
×
×
  • Create New...