-
Posts
70 -
Joined
-
Last visited
Everything posted by seddass
-
Two separate fields with one and the same dbtable as data source
seddass replied to seddass's topic in General Support
Well.. I think I have created a new Inputfield with multiple checkboxes and sort option based on asmSelect. I think there is room to improve and probably I will upload a new revision soon but it could to be used as it is now. The module cold to be placed in modules folder and after installation it should to be included in Page module => "Inputfield modules available for page selection". InputfieldAsmSelectCheckboxes_v1.zip -
Two separate fields with one and the same dbtable as data source
seddass replied to seddass's topic in General Support
hehe, strong argument. It works always but not in this case which is not so bad for me. btw. I am almost done with the solution and it looks well. Will post it here tomorrow. -
Two separate fields with one and the same dbtable as data source
seddass replied to seddass's topic in General Support
I totally agreed but not the client. Thinking that the requirement comes from the client because of stress of migrating to new cms with different (and better) controls. -
Two separate fields with one and the same dbtable as data source
seddass replied to seddass's topic in General Support
Thanks Ryan! Yes, the client would like something similar to sortable checkboxes. I totally agree about the issues related to "unlimited" checkboxes in one page and there is no doubt that PageListSelectMultiple is much better solution. Will try to duplicate the select multiple items with checkboxes and to keep as closer as I can to ASMSelect! -
Hi all, Hope someone could help me. Is there an easy way to have two "Page" fields with the same dbtable as data source? All of the settings of the both "Page" fields are equal except: first is "Checkboxes" and the second is "ASMSelect" or PageListSelectMultiple type. The reason of this weird idea.. is the client requirement to select the items from a full list with checkboxes with an option for changing the items show order. My idea was to have the two fields mentioned above in one page, attached to one dbtable. The client will select the items with checkboxes and after save he could change their show order as the selected items will be selected in "ASMSelect" field too. If it is important.. the count of the current items is aprox. 100 and will grow slowly. The client doesn't like the PageListSelectMultiple or ASMSelect method of selecting the items because not all of the items are listed at once. Probably there are more great ideas. Please, advice. Thanks Update: Have realized that saving "Checkboxes" field will overlap and reset the show order of the items reordered from ASMSelect field.
-
That was the golden key. Solved the <p> and many other string related issues with regex in setAttribute() method. Have used the regex with white spaces! Thanks, appreciate it. Will reply here if I find a better TinyMCE settings related to output formatting.
-
Hi all and mostly Ryan, Actually.. Instead of ABU I am the guy who need an advice related to the TinyMCE configuration in PW. I wouldn't like to waste your time if it is more complicated and time consuming answer. Using the default PW settings the TinyMCE editor wraps "p" tag on each none block element. If in the field is placed a table, inside each of the "td" are generated "p" tags too. I have set margin and padding to zero for "table p" and this solved the problem visually but the "p"s are still there. I have spend... hours playing with forced_root_block, indentation, removeformat_selector, valid_children, ... Is there an tricky TinyMCE setting that will prevent that? Also.. the output formatting doesn't worked for me too. I know both are not so important but.. if someone could give a hint - it will be great. Thanks. Alex
-
Hi Ryan, Great work as always. Thanks for the improvement, this simplifies the work with PW and makes it more enjoyable. It does make sense using ".count" and it is more human friendly than using only the field name. In the first tests It is working flawless, as expected. Will report if there are related issues. Thank you, Alex
-
It seems like a good feature for countable fields. Crossed fingers.
-
Hi all, Is this possible with PW selectors? I am trying to fetch the children pages with more than two (or any other integer) of uploaded images. Was trying it with something like that but still without success: $children = $page->children('images>2'); Does anybody have a quick answer? Thanks.
-
Where to set image resizing quality and how to re-resize images
seddass replied to Adam Kiss's topic in General Support
Agreed. Regarding the cleaning of the thumbnails/images created from the uploaded originals... I am using Pageimage->getVariations() and/or removeVariations() and API to loop thru the images. -
Where to set image resizing quality and how to re-resize images
seddass replied to Adam Kiss's topic in General Support
via ImageSizer->setQuality() method in /wire/core/ImageSizer.php by default it is 90%. I am curious if the quality of your images will be much better if you change it to 100%. -
First... thank you, it was useful advice, as all your. I am still impressed how flexible is PW and wandering how may hidden features i am not using. And forgive me.. i should include in my previous post that my case was to initially sort the imported child pages by name and later the clients to use the drag-&-drop for sorting them. Less common scenario.
-
Import images from file system using the PW API
seddass replied to seddass's topic in Getting Started
Thank you for the clarifications. Now all makes sense. -
Import images from file system using the PW API
seddass replied to seddass's topic in Getting Started
After the morning has come... i think i have figured out. It is simple as i expected. $pageImages = new Pageimages($pageWithImagesField); begin loop $pageImages->add($fullPathToOldImage); end loop $pageWithImagesField->images = $pageImages; $pageWithImagesField->setOutputFormatting(false); // not sure why but there was error without it while saving the page $pageWithImagesField->save(); or alternate way in the loop begin loop $pageImage = new Pageimage($pageImages, $fullPathToOldImage); $pageImage->rename(substr(basename($fullPathToOldImage), 0, -11) . ".jpg"); // some extra manipulations $pageImages->add($pageImage); end loop Hope it will be helpful for someone. -
Hello guys, hope you could help me. I will appreciate it. I am trying to migrate the data from one of my oldest sites to PW. It is about of hundreds of records, please, dont suggest to do it using the admin area. Based on Ryan's code (http://processwire.com/talk/index.php/topic,24.0.html) i have handled creating the pages, but I am still wandering how to "upload/import/insert" images from the file system and to attach them into the $page->images field using the PW API. PW is so scalable and powerful, there should to be a simple way of implementing that. I think i should create Pageimage objects and to "add" them in Pageimages but I missing something. Thanks in advance. Briefly with sample code: $myPage = wire('pages')->get('template=myPageTemplate'); $imagesOld = array('image1.jpg', 'image2.jpg', ....); $myPage->images = $imagesOld; // i know this is wrong $myPage->save();
-
In addition to the code above.. probably will be good if we assign a incremented index to the skyscraper->sort property before save(), otherwise all of the pages will be saved with sort = 0 in the "pages" table and later they are unsorted in the tree list. $sortIndex = 0; ... $skyscraper->sort = ++$sortIndex; $skyscraper->save();