-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
@Bwakad, Thanks for using Blog. I moved your thread here since this is the support board for the Blog module. Please note it is not the Blog module profile . OK, back to business. I honestly do not understand the question . If you installed with empty template files, there is no header or footer there at all. Are you talking about your custom header and footer? You render the posts where you want them. Please clarify so I can give you a more definitive answer. As for your code to display posts under a current category (blog_category) your code will only work if you are rendering those posts in a 'category' page similar to what is discussed a few posts above yours (#161 and #163). There is a related solution here if you want to limit posts of only a certain category but rendering the posts on other pages. That is very strange. I have never seen that. Maybe because I have never used the PW multi language site profile. Is that the one you are using? Are you using the stable (2.5.x) or dev version of PW?
-
I could be wrong, but the answer you will most likely get are that those modules were never really meant to be used in the frontend . Process modules are meant to run in PW admin for various reasons. If your goal is to avoid certain users from accessing the admin, there are various examples in the forums on how that can be achieved including Fredi, etc.
-
Access repeater field values in form processing
kongondo replied to gebeer's topic in API & Templates
Read this quickly. Just guessing here; are you by any chance dealing with a multi-dimensional array? If yes, then $input will not help. It is only set to deal with simple arrays. An option would be to use PHP's $_POST instead or there was some other nice code in the forums yesterday but I can't find it now here you go if it is relevant. Anyway, just guessing for now but you will get better answers am sure- 2 replies
-
- 3
-
- processing
- form
-
(and 3 more)
Tagged with:
-
What Nico said! My thoughts exactly! .
-
If it is a memory issue it really has nothing to do with PW but PHP These would be useful http://php.net/manual/en/features.file-upload.common-pitfalls.php http://stackoverflow.com/questions/5106871/relationship-between-php-s-memory-limit-upload-max-filesize-and-post-max-filesi http://php.net/manual/en/ini.core.php https://processwire.com/talk/topic/2190-max-file-size-for-uploading-a-file/ https://processwire.com/talk/topic/2194-flie-upload-max-file-size/
-
@Bernard, You can change this line: $category = $pages->get("/blog/categorieen/")->children->find("title=$page->title"); to this: $category = $pages->get("/blog/categorieen/")->child("title=$page->title"); Refer to $page->child($selector) in the cheatsheet
-
I don't know much about translation other than I have tried to make all strings translatable. I might have missed something. Have a look at this guide: http://processwire.com/api/multi-language-support/code-i18n/ Others more knowledgeable might chip in. And you could always search the forums for additional info.
-
Glad you got it sorted.. For the curious, the reason why the option 'tag' is not being hidden on selection of another select input is because the following doesn't work with pageautocomplete: $tags->attr('class', 'batcherAction'); I guess the reason is that it is a different kind of inputfield. Don't know how to get around this. Because of the above, the following js doesn't catch: $('#batcherAction').change(function(){ var option = $(this).find('option:selected').val(); $('.Inputfield_tags').closest('li.Inputfield').hide(); $('#wrap_'+option).show().css('list-style-type', 'none'); }); Of course there are other ways to get around this using js...
-
Glad you solved it. So, your submit button didn't have a name....been there ...
- 7 replies
-
- 1
-
- Multiple forms
- processing
-
(and 1 more)
Tagged with:
-
I modified and quickly tested this example from SO: http://stackoverflow.com/questions/7849478/how-to-process-multiple-forms-using-one-php-script and it works fine...(but haven't tested with processInput). Make sure your PHP/PW form logic is at the top of the template file btw... <?php if (isset($input->post->submitForm2)) { echo '<pre>'; print_r($input->post); echo '</pre>'; echo 'Yes'; } ?> <form action="" name="form1" method="post"> <input type="text" value="" name="A" /> <input type="text" value="" name="B" /> <input type="text" value="" name="C" /> <input type="text" value="" name="D" /> <input type="Submit" value="Submit Form" name="submitForm1" /> </form> <form action="" name="form2" method="post"> <input type="text" value="" name="A" /> <input type="text" value="" name="B" /> <input type="text" value="" name="C" /> <input type="text" value="" name="D" /> <input type="Submit" value="Submit Form" name="submitForm2" /> </form> <form action="" name="form3" method="post"> <input type="text" value="" name="A" /> <input type="text" value="" name="B" /> <input type="text" value="" name="C" /> <input type="text" value="" name="D" /> <input type="Submit" value="Submit Form" name="submitForm3" /> </form>
- 7 replies
-
- 1
-
- Multiple forms
- processing
-
(and 1 more)
Tagged with:
-
Does each form have its own submit button or you are using one button for all three?
- 7 replies
-
- Multiple forms
- processing
-
(and 1 more)
Tagged with:
-
Between them, don't your form fields have different names? $input->post->nameofield should then work irrespective of form, I would think...
- 7 replies
-
- Multiple forms
- processing
-
(and 1 more)
Tagged with:
-
I think you understood Soma but he will speak for himself. As for my bit, have a look at my ProcessBlog module. I use both ___execute() and wire('input')->urlSegment1 (your $this....etc). ___execute(), in a sense, gives you 'virtual pages view'. They don't really exist but are created on the fly on view (if that makes sense). In my case (in Blog), in the method blogMenu(), I use urlSegment1 to set the css class for the active ___execute() page, i.e. what the user is currently viewing. It's basically grabbing a 'GET' query string (in a loose sense)...Otherwise, there was no other way to know what the active page was given that they don't actually exist. ... So, if you want a viewable 'page' in your ProcessModule, use ___executeSomething()...urlSegment1 just gives you the 'name' (something) of that virtual page... my 2p...
-
http://webscripts.softpedia.com/
-
show my array of images on my js slider?
kongondo replied to lord_dupalski's topic in Getting Started
foreach ($page->slider1 as $slider) { echo "<div class='item'> <img src='$slider->url' alt='$slider->description'> </div>"; } This assumes that you have an image description for each of your images that you will use as you image alt attribute. Also assumes that you are pulling images from the current page's image field named 'slider1' Also assumes that you will do your homework and read up on how to check if images exist/found on a page before attempting to output them.... Apart from the 'alt', same as what Adrian posted above... -
Will do..but you can do it too ...if you edited your first post and used the full editor
- 14 replies
-
- Trash pages
- user
-
(and 2 more)
Tagged with:
-
show my array of images on my js slider?
kongondo replied to lord_dupalski's topic in Getting Started
foreach... http://processwire.com/api/fieldtypes/images/ Please try to read the docs if you haven't done so already, thanks. -
I think it is a forum board specific thing. It seems this forum board does not have that feature enabled.
- 14 replies
-
- Trash pages
- user
-
(and 2 more)
Tagged with:
-
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
Read more here http://processwire.com/api/multi-language-support/code-i18n/ There are differences when working in a class versus in a template file... -
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
$tagSelectField = $modules->get("InputfieldSelectMultiple"); $tagSelectField->label = __("Tags:");//note the translation string change from your original code $opts = $pages->find('template=tag, include=all'); foreach($opts as $opt) { $tagSelectField->addOption($opt->id, $opt->title); } $tagSelectField->attr('id+name', 'recipeTags'); $form->apend($tagSelectField); Edit. There might be lots of tags though...so you might want to use a different inputfield, maybe autocomplete...But don't know if autocomplete will work in the frontend! -
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
@Marcus, Answered here: https://processwire.com/talk/topic/4646-inputfieldselectmultiple-how-to-set-selected-for-option/ -
Add user filter to inputtype page field selector
kongondo replied to gebeer's topic in General Support
Try this in the 'custom php code input' $author = wire('user')->id; return $pages->find("template=server, created_users_id=$author");- 6 replies
-
- 4
-
- user filter
- page
-
(and 2 more)
Tagged with:
-
OK, I have gone ahead and customised Batcher to do this. Almost ready but there are a few kinks (js/css). The 'Tag' action is hidden on load (similar to Change Parent) but it is not hidden on selection of a different option; js is not my forte. PW API side works fine although you may want to limit the number of pages you apply batch tags to. You can apply single or multiple tags. There are also some hard-coded things in there that you might want to change such as the name of your 'tags' field. Just search for @@kongondo in the ProcessBatcherExt.module and ProcessBatcherExt.css files for changes I added. Feel free to do with it as you please BatcherExt.zip