-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Add description to form field object - method missing
kongondo replied to gebeer's topic in API & Templates
$serverField = $modules->get("InputfieldText"); $serverField->label = "Server Name"; $serverField->attr("id+name","servername"); $serverField->attr("value",$prefillServer); $serverField->attr("class","form-control"); $serverField->description = "this is my description";//this is the right syntax $serverForm->append($serverField); -
If I get you correctly, you want the current image displayed by your carousel? PW has no control over that. That will have to be done using JS I think....
- 4 replies
-
- Current image
- images Current image
-
(and 1 more)
Tagged with:
-
Sorry to hear that. Here's a post that might help: https://processwire.com/talk/topic/6736-pharma-hack/ I am also moving this topic to the 'off-topic - dev talk' forum....since it is not directly related to PW...
-
@Bwakad, What you should do is get some sleep then read the instructions again . The instructions are very clear. You need to read the ReadMe first in its entirety. The reason you don't see the css and js? Here's a quote from the ReadMe 'How to Install':
-
@Toothpaste Please read the documentation here Posts are always returned sorted by date, latest first if you pass first parameter of renderPosts($posts) as a string I am not getting you clearly. Are you saying you want posts from ALL categories or from only THREE (1042, 1043 and 1044). If from only three, you can do the following: $categories = $pages->find('id=1042|1043|1044'); $blog = $modules->get("MarkupBlog"); $posts = $pages->find("template=blog-post, blog_categories={$categories}, limit=10"); if ($posts) { echo $blog->renderPosts($posts, true);//the 'true' truncates posts' length } Read here about ProcessWire OR selectors. Yes. This is all documented in the Blog tutorials. The default truncate length is 450 characters. You can set a custom length in your Blog settings page.
-
Aah I see.. 1B: Blog will actually not give you anything unless you selected it yourself/or let the default stay . For template files, I don't know if you realise you could have installed demo template files or none at all? As for the _main / _init stuff, I think you will have to append renderPosts($posts) to $content. Have a read here where Ryan explains how the various site-profiles work. This other tutorial on structuring your template files is also useful. 2B. Yes, I understood that bit. I just don't know why you are seeing that and others, including myself are not. I will have to test on a multi-language profile install to see if I get the same problem.
-
@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.