-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Also have a look at my New ImagesManager module.. Too lazy to link on mobile..
-
Hehe people actually read what I'm writing?! I wished nobody would ever ask more details about hat. ;-) No Sorry but I need some time... This is a rather hug.. huge subject I am not currently in a mood to respond...
-
I regularely express myself.
-
I think you both have valid points from your perspective. I think it comes down to that we're having the current ImageSizer getting some enhancement and trying to keep improving it and not having a dependency on an other lib which would need to be maintained also. The matter image and all its facets is such a huge subject in web development it's hard to sometimes argue about it. It's great to have some movement here happen and we all appreciate the work you do horst. It's also nice to suggest a different approach but it somehow sparked unwanted reactions because theres some good free time spent here. It's like telling someone after building his dreamhouse why not buy a house thats already built.
- 32 replies
-
- 3
-
- manipulation
- imagesizer
-
(and 3 more)
Tagged with:
-
On the page you selected if you browse the tree... It does say 'unselect'. Its there since maybe 2.1
-
Search with merged PageArrays + pagination = not working
Soma replied to isellsoap's topic in Getting Started
Well you test for if any results are found at all.What I do is check for if theres a result and show "no results found" or "out of range" and a link to first, or a redirect. Not sure its a good idea to show the a 404, like you also dont show one on a search result page if theres nothing found.- 17 replies
-
- PageArray
- pagination
-
(and 1 more)
Tagged with:
-
Search with merged PageArrays + pagination = not working
Soma replied to isellsoap's topic in Getting Started
There should be no page in pagination that has no results... Or do I miss something?- 17 replies
-
- PageArray
- pagination
-
(and 1 more)
Tagged with:
-
How do I get connected page's custom field value?
Soma replied to Vineet Sawant's topic in Getting Started
Just wanted to correct a missunderstanding that I've read in the beginning... Haven't ready through all so sorry if you guys already solved it. If you have a page field multiple or single it will be a PageArray or a Page reference, so you can iterate them with foreach. No need to get the pages through id's or anything like that, they're pages objects already. foreach($page->drama_theatres as $drama){ echo $drama->title; } or if a single page reference field echo $page->drama_theatre->title; -
Search with merged PageArrays + pagination = not working
Soma replied to isellsoap's topic in Getting Started
Yeah that normal and expected behaviour. And who would enter page number manually anyway? Edit: ah, to manually call a 404 you do throw new Wire404Exception();- 17 replies
-
- PageArray
- pagination
-
(and 1 more)
Tagged with:
-
Search with merged PageArrays + pagination = not working
Soma replied to isellsoap's topic in Getting Started
$value = $pages->find( "title%=$q" ); $pa->import( $pages->find( "template=abc, …|…|…=$value" ) ); $pa->import( $pages->find( "template=abc, title%=$q" ) ); What should that do? You have to explaing a little more for a short minded like me. I have an example that shows how to construct your own pager using the PW PagerNav class: // include paginator class require_once($config->paths->MarkupPagerNav . "PagerNav.php"); $pa = new PageArray(); $res1 = $pages->find("template=xyz, title%=space"); $res2 = $pages->find("template=abc, title%=hal"); $pa->import($res1); $pa->import($res2); // config paginator $baseUrl = $page->url; $limit = 4; $start = ($input->pageNum - 1) * $limit; $total = $pa->getTotal(); $pagerNav = new PagerNav($total, $limit, $input->pageNum); $pager = $pagerNav->getPager(); // construct paginator markup foreach($pager as $link) { if($link->pageNum == $input->pageNum) $class .= "on"; if($link->type == "separator") $item = '…'; else $item = "<a class='$class' href='{$baseUrl}page{$link->pageNum}/'>$link->label</a>"; $pagerMarkup .= "<li>$item</li>"; } // output paginator markup echo "<ul class='pager'>" . $pagerMarkup . "</ul>"; echo "total: $total<br/>"; echo "start: $start<br/>"; echo "limit: $limit<br/>"; echo "<ul>"; foreach($pa->find("start=$start, limit=$limit") as $p){ echo "<li>$p->title</li>"; } echo "</ul>"; Also in my ever growing gist examples https://gist.github.com/somatonic/5420536- 17 replies
-
- 5
-
- PageArray
- pagination
-
(and 1 more)
Tagged with:
-
Search with merged PageArrays + pagination = not working
Soma replied to isellsoap's topic in Getting Started
Pagination module doesn't work with in memory page arrays. Once you manipulate or merge arrays you operating in memory. Pager does need a single find db query to work. You'd need to create your own pager functions for in memory page arrays using the start and limit selectors.- 17 replies
-
- 4
-
- PageArray
- pagination
-
(and 1 more)
Tagged with:
-
Scary that you can't reproduce this... Well, I just tested with latest version and now it seems to work as it should! The result of the previous test first example is now like this: Title: Space | Parent: Images Title: hubble-wallpaper-space | Parent: Space Title: hubble-wallpaper-space-647500_1600_1200 | Parent: Space Title: outer-space-stars | Parent: Space Title: space-space-584336 | Parent: Space Title: 1920x1080-wallpapers-of-nature-1249994468-1 space | Parent: Nature Title: nature_444_photos space | Parent: Nature Title: serena space | Parent: Nature Title: | Parent: Space Title: | Parent: Space Title: | Parent: Space Title: | Parent: Space ... So the pages with a "Nature" parent are showing now. So definately you fixed something that was causing this.
-
Pete is from 2000BC you should know.
-
You can use the InputfieldMarkup to add custom markup. $field = $modules->get("InputfieldMarkup"); $field->markupText = "<p>your html string here</p>";
-
There is some "infos" on that sheet, you click "infos" see? There's "useful links". Also the forums contains lots of examples and bits of informations. Otherwise the source might be your best bet, and the HelloWorld.module. If you find any helpful posts you can send me links and I'll add it to the sheet.
-
You're mixing vanilla PHP with PW API. Selectors are PW specific. I don't know you guys know that you can also do this in PW (usually people miss this) if($page->is("template=home|basic-page")) echo "has template";
-
I'm not sure why you want to make it autojoin and global, global ok but autojoin? I'm not sure what autojoin does on repeaters but I don't think it's really needed. But most likely this or global could cause problems with repeater... However I just tried with one install and it works fine making it autojoin, but didn't wanted to go global... In the other install (latest dev) where languages support module is installed and also LanguagePageNames, I first had to install repeater module... and then got this: Notice: Undefined property: User::$language in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line443 Catchable fatal error: Argument 2 passed to LanguageSupportPageNames::getPagePath() must be an instance of Language, null given, called in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 444 and defined in/Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 244 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. After a refresh it was gone. But when I do create a repeater field and make it autojoin and global I got this: Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/FieldtypeTextLanguage.module on line 41 Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/FieldtypeTextLanguage.module on line 41 Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguagesPageFieldValue.php on line 114 Fatal error: Exception: Method Page::editable does not exist or is not callable in this context (in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php line 232) #0 [internal function]: Wire->__call('editable', Array) #1 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module(485): Page->editable('some_repeater') #2 [internal function]: FieldtypeRepeater->___wakeupValue(Object(Page), Object(Field), Array) #3 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php(271): call_user_func_array(Array, Array) #4 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php(229): Wire->runHooks('wakeupValue', Array) #5 [internal function]: Wire->__call('wakeupValue', Array) #6 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Page.php(443): FieldtypeRepeater->wakeupValue(Object(Page), Object(Field), Array) #7 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Page.php(1352): Page->setFieldValue('some_repeater', Ar in/Applications/XAMPP/xamppfiles/htdocs/pwmultilang/index.php on line 214 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. And I can't do anything anymore, just get this error always. Then I go delete the field and its table and in fieldgroups in the db and it's all back and working again.
-
Id guess something with sessions...
-
There you go http://gruntjs.com/plugins
- 17 replies
-
- preprocessors
- concatenation
-
(and 2 more)
Tagged with:
-
jQuery UI datepicker has different date formats than in PHP and not compatible. Maybe it's that. $field = $modules->get("InputfieldDatetime"); $field->label = "Aika"; $field->attr('id+name','time'); $field->required = 1; $form->append($field); // append the field Also I don't see any date formatting here...
- 5 replies
-
- datepicker
- format
-
(and 1 more)
Tagged with:
-
*grunts*
- 17 replies
-
- 4
-
- preprocessors
- concatenation
-
(and 2 more)
Tagged with:
-
Peter, depends what you have in mind. You can create custom admin pages and build your form using PW forms and API, so building on the foundation. The thread teppo linked to shows how to use inputs and form, whether for frontend or backend. Using PW components gives to plenty of possibilities to validate and manipulate and hook into various parts of the form and it inputfields. There around 400 hookable functions in PW http://processwire.com/api/hooks/. With this at your fingertips you can do almost anything pretty quickly, whether in backend or in front-end. It depends (as always) a lot what exactly you want to build and what the need are in detail and then look at what would fit best. Also remember all the PW backend stuff is built out of modules exactly the way you would build custom admin functionality and you always can look at how it's done or copy a module to site folder and start modifiying it. You could create your own admin pages and build mini apps that help editing, creating content and it's pretty straight forward. It would be in the same way for when building it in front-end. PW doesn't have a solution to all ready, but a strong foundation to build anything you want. I'm not sure what else you need to know or what you're exactly have in mind. I think you're still maybe need to play with that stuff to better understand all of that stuff and how to go about it in PW. So you should slowly start building custom admin pages I think and ask away.
-
Also look at core modules if you arent sure about something. Look up ProcessPageList.module which is configurable.
- 9 replies
-
- 1
-
- module
- ConfigurableModule
-
(and 1 more)
Tagged with:
-
the config "data" field in db is a "TEXT" field so about ~64kb. Module config is stored as JSON and to store 5mb of data you would need a MEDIUMTEXT field ~16mb. Of course you can, but depending on your data and for what it's used it's maybe not a good strategie. To add another possibility, you could add a textarea (MEDIUMTEXT) field to the "admin" template, and store the data there. But if you would need flexible and larger data stored I would certainly also consider using pages.
- 9 replies
-
- 1
-
- module
- ConfigurableModule
-
(and 1 more)
Tagged with:
-
Hey Ryan, I tested again on different installs and I'm still getting strange results. $pages->find('title|parent.title%=space'); In my language enabled install I get something like the following, no matter what user language is set to. Although it should return other pages that also have "space" in their title, it doesn't return them in the result. Title: Space | Parent: Images Title: hubble-wallpaper-space | Parent: Space Title: hubble-wallpaper-space-647500_1600_1200 | Parent: Space Title: outer-space-stars | Parent: Space Title: space-space-584336 | Parent: Space Title: pastedgraphic-2 | Parent: Space Title: pastedgraphic-3 | Parent: Space Title: 492772525_d8803eb637_o | Parent: Space Title: 2400862255_daeb5326d8 | Parent: Space Title: pwprofile_ch-uploads-4 | Parent: Space Title: pwprofile_ch-uploads2-4 | Parent: Space Title: pwprofile_ch-uploads-4 | Parent: Space Title: pwprofile_ch-uploads2-4 | Parent: Space Title: pwprofile_ch-uploads-4 | Parent: Space Title: pwprofile_ch-uploads2-4 | Parent: Space ... Notice the first has parent "Images". Which is strange as there's also "space" in titles under "Nature" parent! When I remove the parent.title from the selector I get this: Title: Space | Parent: Images Title: hubble-wallpaper-space | Parent: Space Title: hubble-wallpaper-space-647500_1600_1200 | Parent: Space Title: outer-space-stars | Parent: Space Title: space-space-584336 | Parent: Space Title: space | Parent: Nature Title: space | Parent: Nature Title: space | Parent: Nature In my other install with different pages but same selector, where I don't have language support installed: Title: Templates space | Parent: Home Title: asdasd§ | Parent: Templates space Title: sdf sfs f | Parent: Templates space Title: gsgfdsf | Parent: Templates space Title: fgfdsgsa as | Parent: Templates space Title: Space | Parent: Images Title: space-space | Parent: Space It finds all that it should with "space" either in title or parent title.