-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
No need to encode sepcial chars if you're using utf-8.
-
Thanks Ryan for your response and talking about how things came to be in the context. I respect that and understand that your time is limited here and currently are focusing on other more important things. Don't take this personally or anything. I'm just expressing my experience without having any context of knowing how things came to be or what you're thoughts are on certain things. Sometimes these are really minor things. Regarding this Inputfields and the Page list tree functions and usability behaviors, I think everybody has different expectations how something should or shouldn't work and you've done an amazing job on this, but still as you said yourself there's always room to improve things. As for the Page reference field: I think this is one of the features which I really enjoy having in PW, and I'm using it a lot for different things. It's a really strong feature, very useful and flexible. I go as far as saying this very feature, is one why I finally chosen/love PW. I think I'm not the only one here. So I think if these page fieldtype/inputfields will become even stronger and get more love in the future it's will be awesome. I understand that it serves for what you and your client need/needed and having it to build on it, is such a great thing already. I would love to help you out on this, I would just start right now, but I fear my knowledge of the system is yet not enough. Some help and more time getting familiar with the core would be neccessary. Instead of saying "I want this or that is not good" I would get my hands dirty with this and help improve it. Thanks Ryan again, for this amazing CMS/CMF.
-
Aah, thanks Ryan I didn't know, that makes sense. I don't know a way around that problem with enter. I just know it can be really tedious to implement such things cross browser.
-
I just noticed that custom modules are displayed bold, while core modules are normal. When did you implement that? That's really nice, as I thought it would be nice to somehow make it clearer to see which are custom modules. Great!
-
While my co-worker is building pages for a website, I've came across a page that has name: "1.-title" How's this possible? I thought only a-z 0-9 dashes or underscores. I figured it's possible with space or number before ".".
-
Module: Languages (multi language content management)
Soma replied to Oliver's topic in Modules/Plugins
BTW. Not sure if we already mentioned this. Will it be possible to have pages not being mapped? -
Module: Languages (multi language content management)
Soma replied to Oliver's topic in Modules/Plugins
hey lorgg great to hear you're working on it again. I think there's no reason to go delete a page manually in the trash? Just empty trash... ? -
Aaaaaaah, but that's cumbersome. Why is it like this? Would it be possible to have a remove button beneath the add button?
-
I recently noticed, when using PageListSelect, and I select a page, how can I remove that again, so it's empty again?
-
Thanks Ryan, I think we been there already..., it would be really great to have "select" button not show on pages not having template specified. Since there's this option I wouldn't expect other pages to be selectable and disappear when saving, not even showing a message. It doesn't break anything, but is bad design in my opinion.
-
Yes, but I can't use another since I need the user to be able to browse the tree and with other inputfields this doesn't work the same. When using PageListSelect is the same issue. The select action appears on all.
-
I'm using PageListSelectMultiple
-
Yes I have a parent selected. And field setting is multiple. I can select all pages not just the ones using the template specified, but once saved they dissapear.
-
I've set up an page reference field to allow certain template to be selected. But I still can select other pages with other templates too. I think they shouldn't.
-
+1 ;D
-
Custom Code for selectable pages not working properly
Soma replied to vknt's topic in General Support
Even more confused. But now I know, I did something wrong, I did a find for hidden pages, and forgot to include=all... Your're right it does work, but with the limitations you mention. I'm not sure, how flexible it should be but you could do something like this: $p = $pages->get("/sidebar-elements/")->children(); foreach($pages->get("/polls/")->children() as $c) $p->append($c); return $p; -
Custom Code for selectable pages not working properly
Soma replied to vknt's topic in General Support
Apeisa, actually it works, I tested it before posting. But I think I messed up, you're right. But using get("/")->children() instead would work. EDIT: I'm confused, apeisa method doesn't work, just tested. Returns "Call to a member function children() on a non-object" even when using ->first(). I'll let Ryan answer here. -
Custom Code for selectable pages not working properly
Soma replied to vknt's topic in General Support
it should be return $pages->get("/")->find("...")->children("..."); -
Just noticed a typo in my code it should of course be: <?php if($page->poll) { echo $page->poll->render(); } ?> But I think you noticed that too? cause it wouldn't have outputed something at all with $poll->render(); If it still does not work, you're doing something wrong in setting this up all. Not sure how I can further help without seeing the code and field/template setup. 1. I 100% think you forgot this: Make sure the poll page select field is set to allow single pages only (like I mentioned in my previous post). Having different setup wouldn't work since it would return page array when with multiple. You would have to change my code to $page->poll->first()->render(); I think. <?php if(count($page->poll) > 0) { echo $page->poll->first()->render(); } ?> 2. The Poll1,Poll2 uses template that has code from ryan, thats going to render. I have set up a testcase locally within 5 minutes and it works well.
-
Exactly how you're doing it already and how I explained. I'm a little confused. To clarify again. You have a page field named "poll". This is set to allow only 1 page reference "Single page (Page) or boolean false when none selected", and set parent to be the parent page "Poll" containing all the polls (Poll1,Poll2). Then, on page you select the poll you wish to output like --Poll1. So you got 1 Poll selected, and in the template of the page there would be this code: <?php if($page->poll) { echo $page->poll->render(); } ?>
-
Not sure where you got problems. I assume you have created it with the code of Ryan on this page further above? You can use this code as is, just insert following before $answer->save(); <?php $answer->setOutputFormatting(false); Make this code of Ryan a template "poll.php", in PW this will be the poll (question) template, containing the answer pages later. Now, you already got your reference page field called "poll" or "poll_selected". So on the template that uses this field to select a poll, you could make it like the following using the "render" method. This is a module under "Page" section called "Page render" you need to install in case you haven't already. This adds render method to all pages. Now using this method it's as simple as: <?php // output poll where you want in you page templates if($page->poll_selected){ echo $page->poll_selected->render(); {
-
Welcome Mickael, that can happen and not always depends on the subject/content of the email but on the email filter of your mail server, some mail servers mark them as spam when first time reciveing email from a unknown domain, once you accept it will not be spam anymore. Not sure what you're talking about. Do you mean an image itself? TinyMCE does support drag and drop of images, though it get inserted as base64 encoded url string. Undo and redo, isn't implemented in PW, but you can add button in TinyMCE for that. If inserting an image in TinyMCE using PWs image dialog, it inserts and new resized version of the image. That's why we all love PW Frontend stuff is easily possible depending on your php skills, search through the forum, theres some threads concerning front end implementation of forms. Since there's different ways to do such thing usually, you should first get familiar with the system and ask and search in forum. I think there will be at some point exists modules for doing things more easy on frontend as this is what many poeple have been asking. That's true, it is great feature! - See respond above. That's again why we all love PW for what it is! Thanks, Soma
-
I see. I went through this and tried something which works converting php to jquery ui format. Since datepicker doesn't support time output, you gonna use datepicker only for years months days anyway. Thought it's possible to break it, but most reasonable cases work. It wouldn't be perfect but at least a little closer. <?php $replace = array( 'd'=>'dd', 'D'=>'D', 'j'=>'d', 'l'=>'DD', 'N'=>'', 'S'=>'', 'w'=>'', 'z'=>'', 'W'=>'', 'F'=>'W', 'm'=>'mm', 'M'=>'M', 'n'=>'m', 't'=>'', 'L'=>'', 'o'=>'yy', 'Y'=>'yy', 'y'=>'y', 'a'=>'', 'A'=>'', 'B'=>'', 'g'=>'', 'G'=>'', 'h'=>'', 'H'=>'', 'i'=>'', 's'=>'', 'u'=>'', 'e'=>'', 'I'=>'', 'O'=>'', 'P'=>'', 'T'=>'', 'Z'=>'', 'c'=>'', 'r'=>'', 'U'=>'' ); $str = "Y.m. l H:i:s"; $out = str_replace(array_keys($replace),$replace,$str); $out = preg_replace("/^((?![a-zA-Z]).)+/", '', $out); $out = preg_replace("/((?![a-zA-Z]).)+$/", '', $out); echo "PHP to jQ UI dateformat: '$str' => '$out'<br/>";
-
I'm not sure what you mean with input/output exactly anymore. I think there's a missunderstanding This is exactly what's needed to solve the problem here with datepicker. You can display the date in a user defined format (visible to the user), while have a different format output to a hidden field and use only that to save it to db. I've done it myself in apps, so I see no problem with this approach. Quoted from jquery ui doc: "The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the formatDate function" http://jqueryui.com/demos/datepicker/#option-altFormat EDIT: ah, do you mean by format, what the user defines in PW field setting like d/m/y isn't compatible with ui datepicker format?
-
I don't know if that makes sense. Datepicker is highly flexible... how about something like this? http://jqueryui.com/demos/datepicker/#alt-field You can display alternates, and may have a input hidden field thats used to save it using iso.