Jump to content

adrian

PW-Moderators
  • Posts

    11,097
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. Looking into it further, this isn't supported in MarkupLoadRSS. It would be possible to extend it to do this, or you could consider some alternatives, like Martijn's approach above, or use Simplepie which is awesome http://simplepie.org/wiki/tutorial/how_do_i_get_a_thumbnail_from_a_youtube_feed http://simplepie.org/wiki/addons/youtube
  2. I am all for this idea, but I don't feel that the current system makes it easy. It seems that we are "encouraged" to use integers for our versions, but this doesn't really work when you run out of numbers. For example, how do I show version number: 1.2.11 ? I know Nico enters them exactly in that format with the periods, but I was following the pattern that Ryan and others were using with integers, so I just gave up on doing it semantically. Am I missing something?
  3. When you say "get rid of", do you mean not have it exist in the admin and database at all, or are you referring to front-end display? If it is not clickable does it matter? You could set its status to hidden so it won't appear in searches. You could set it to unpublished so it won't load even if someone tries the URL directly (make sure you are not logged in when testing this). I think we need to know a little more about exactly what you are trying to achieve. Remember that a "page" in PW that has only a title field is just two lines in the database, one in the pages table and another in the field_title table - nothing to worry about - assuming that is what you are worried about
  4. Ok - that makes sense - you had me confused there for a minute Firstly, it's not important, but the PW way of handling post data is to use: $input->post->firstname etc. Secondly, teppo has a great SwiftMailer module for PW - works great unless you need to get into batch sending and want access to the throttler and decoration plugins etc. You should try that instead of calling swift manually. Now onto the problem at hand - I am not sure at this point Do you have debug mode turned on so you are seeing all PHP errors? I am wondering if those require_once paths are correct - is the ecommerce folder inside your templates directory? Have you tried just directly echoing out $_POST['firstname'] with nothing else in the template file? Can the page return any content at all, like: echo 'test'; ?
  5. Ok, so if the page field that you added to the user template is called allowed_pages, then this should work: if($user->allowed_pages->has($page)){ echo "true"; } else { echo "false"; } It is checking that the allowed_pages field for the current user ($user) contains (has) the current page ($page) in it's array of pages. By the way, rather than my initial suggestion of ASM Select, I would recommend: PageListSelectMultiple
  6. Hi Richard - this should all be very easy to solve. You say that linking directly to submission.php in the templates folder works - that is weird, because the htaccess rules that come with PW prevent calling php files from the templates folder directly You should get a forbidden error. If you want to call the file directly, you should place it in a folder outside the site folder. This is pretty common practice when processing forms, or calling ajax scripts. You can redirect ($session->redirect) back to a page after the submission, so the user won't even see the .php file in their browser. That said, there should also be no problem processing a form from a page that has the submission.php template if you'd prefer. I think we need to see your code so we can help - should be an easy fix!
  7. What about if you use this link: http://gdata.youtube.com/feeds/api/users/disney/uploads?orderby=updated&v=2&client=ytapi-youtube-rss-redirect&alt=rss That actually contains the thumbnail url. Note the "api", rather than "base"
  8. This should be very easy to add. Sorry I don't have time in the next few days and so it will probably have to wait till the new year, but if you are in a hurry, take a look at: http://flourishlib.com/docs/fMailbox That shows what you need to add: "received" (date) and "from". If you decide to add this support before I get a chance to look into, please send me a PR It seems like going forward, this module needs to be further configurable so you can decide what fields you want stored and which PW fields you want them added to.
  9. I am not really sure on why that would happen - did the import actually work properly after commenting out that check? The fact that $fp is empty at that point in the code suggests that the conversion from the xml into a json file ready for parsing by migrator didn't work. But if it all worked as expected for you, then I'll just add it to my list of things to keep an eye on.
  10. Can you PM me the zip or JSON file you are trying to import so I can take a look?
  11. Hi Charles, I think my fork is well ahead on the attachment functionality. In my limited tests I think it was working in all situations, but I might have missed something - so many different things to consider with different email clients. Anyway, please test my version and let us know how it goes for you.
  12. If I understand correctly, the usual approach is to use a counter inside your foreach. $i=0; foreach($sliderimage as $image){ echo '<img ' . ($i==0 ? 'class="active"' : '') . ' src="{$image->url}" />'; $i++; } Or something along those lines.
  13. Sorry, in a rush, but I think you are correct - I think it's coming from: $_SERVER['HTTP_HOST'] https://github.com/ryancramerdesign/ProcessWire/blob/7b9730d43e6eda8bd27841a4811a1b9737bfe903/index.php#L41 I wonder if Ryan should add a backup check for $_SERVER['SERVER_NAME'] if host return nothing. Can you confirm what $_SERVER['HTTP_HOST'] is actually returning?
  14. This might be easiest using jquery which you can do quite easily from your module also. Looking at your str_replace, I don't really get it. Wouldn't you want: $event->return = str_replace('<div class="container">', '<div class="container" contenteditable='true'>', $event->return); But that said, I think jquery might be easier: $('.container').attr('contenteditable', 'true'); Otherwise, you might want to consider domdocument to modify it in PHP if you need to do it server side - it really depends on whether you can guarantee the exact structure of that container div. Have you tested that the $event->return is actually being implemented in the first place? Have you looked at the: $event->replace = true; option?
  15. Well: $config->urls->root will usually just give you "/" $config->httpHost should give www.example.com How are you defining the url in config.php ? Is this an issue in your local testing environment, or on a live server?
  16. Really lovely looking site Peter - clean and professional, and a great writeup on PW too! Only one quick thing I noticed - the dropdown menus are missing highlighting on subitems - not a big deal I guess, but the root item becomes almost invisible when hovering on the subitems because it goes back to being green text. Love your post above too!
  17. Any chance you are using these inside a function or module? In that case you'd need: wire('config')->urls->root Do you have debug mode turned on? That should let you know that you have an undefined variable: $config
  18. Sorry about that teppo - I knew there was another one, but had forgotten what it was
  19. Looks pretty good to me. A couple of things though: if ($f->type == 'Email') etc should be if ($f->type == 'FieldtypeEmail') - at the moment those won't be triggered at all. I think you should change though is to add "true" as the second argument for the pageName. This might not be necessary depending on the input, but I don't think it hurts. Glad you got it all working in the end!
  20. There are a couple of options: https://processwire.com/talk/topic/5019-template-notes/ https://processwire.com/talk/topic/8392-simple-built-in-docs/ Hope that helps!
  21. Yeah, we have the same thing in Canada, but it doesn't do S*&t!!! I almost think some companies are using it as a free call database to work with
  22. I haven't read through your code yet, but have you seen this module: http://modules.processwire.com/modules/inline-editor/ It is listed as proof of concept, but it might work for you, or help you solve the problems with your code. There is of course also Fredi: http://modules.processwire.com/modules/fredi/ and AdminBar: http://modules.processwire.com/modules/admin-bar/ - even though they are not inline, they do make front-end editing easy.
  23. If I understand correctly, this could be done easily with a page field added to the user template. To access the user template, go to the templates page and click Filter > Show System Templates. The Page field (probably ASM Select) that you add would be linked to all the film pages. So you'd just select the films they are allowed to view. Then in your template files you can check whether the user has the film selected before showing it in the list of films for them to watch. Let me know if anything there doesn't make sense. EDIT: Of course it could also be done from the other direction. The template for the films could have a page field that contains a list of all the users and you could choose which users can view the film. You might want to consider PageAutocomplete as the Inputfield type if you end up with a lot of films / users.
  24. Thanks to Soma: https://processwire.com/talk/topic/3875-module-to-add-userid-to-pages-and-control-edit-permissions/?p=37915 Also check out the revised version a few posts below from pogidude. And also this version from tinacious: https://processwire.com/talk/topic/3271-can-i-limit-page-editing-to-the-user-that-created-that-page/?p=32121
  25. Oh I see - you are using a textareas field - sorry, I read textarea, not the plural. What about: $p->prod_features_multi->prod_rating_operating_voltage->setLanguageValue($en, 'test'); BTW, I am sure it works fine, but why: if((string)$p == "1798"){ and not: if($p->id == 1798){ EDIT: Are you using the new multilanguage version of the textareas fieldtype? Also, maybe this question should be posted in the support thread for Profields - that way it will get Ryan's attention for sure.
×
×
  • Create New...