-
Posts
1,835 -
Joined
-
Last visited
-
Days Won
21
Everything posted by Nico Knoll
-
Hey, I will be at the 31c3 this week (starting at the 27th) in Hamburg. Is anybody else of you ProcessWire guys going to be there (and maybe would like to meet )? Let me know! Greets, Nico
-
@mike: Not sure where you defined it but normally you have to create and delete admin pages manually in the ___install() and ___uninstall() functions (Example: https://github.com/NicoKnoll/ProcessTemplateEditor/blob/master/ProcessTemplateEditor.module#L264-L311) Edit: maybe I missed an Ryan-update and there is an easier way now.
-
You can use $image->size(1500)->url in your template wich will generate a smaller version on the fly and save it into the pages asset folder.
- 6 replies
-
- out of memory
- memory_limit
-
(and 2 more)
Tagged with:
-
Best way to display relational data from another page?
Nico Knoll replied to kathep's topic in Getting Started
Hope I understood it correctly. The code above will show all courses which are selected with course_name_from_list if included in the assignment.php. $course = $page->course_name_from_list; // the page inputfield returns a page object if max=1, or a PageArray, if max. is above $content = ''; // because I don't know your settings I do it as flexible as possible, but of course you could make it shorter // Case 1: You have not set a max or max is above 1 and you chosre more than one page if($course instanceof PageArray) { foreach($course as $course_item) { $content .= $course_item->course_number . " " . $course_item->title; } // Case 2: One page selected } elseif($course instanceof Page) { $content .= $course->course_number . " " . $course->title; } echo $content; -
I think you'll never get a negative amount of visitors (so you don't need "-50") How to solve: Change line 42 in the js file (0 instead of null): yaxis:{min:0, ---------- And another little thing:
-
Or if you want to use multiple ads you have to use a foreach loop: # else: display the specified ad else { if($ad instanceof PageArray) { foreach($ad as $ad_item) $display_sidebar .= $ad_item->body; # Update this ad's view count $ad_views = $ad_item->ad_views; $count = ( empty($ad_views) ) ? 1 : $ad_views + 1; $ad_item->setOutputFormatting(0); $ad_item->set('ad_views', $count); $ad_item->save(); } } else { $display_sidebar .= $ad->body; # Update this ad's view count $ad_views = $ad->ad_views; $count = ( empty($ad_views) ) ? 1 : $ad_views + 1; $ad->setOutputFormatting(FALSE); $ad->set('ad_views', $count); $ad->save(); } } # end if
-
It looks like "$ad" is not a page but a PageArray (multiple pages). So guessing from your code above you use something like the following to get "$ad_page": $ad_page = $pages->find('...'); // or $ad_page = $pages->findRandom('...'); The solution would be to change line 65-67: # else: display the specified ad else { if($ad_page instanceof PageArray) $ad = $ad_page->first(); else $ad = $ad_page; } # end if
-
Differentiate between update and upgrade on module settings page
Nico Knoll replied to owzim's topic in Wishlist & Roadmap
Maybe it would be enough to show a warning like "This module might not be compatible to it's previous version." if the version number changes from e.g. "1.6.4." to "2.x.x"? -
Try: $ad->setOutputFormatting(0); $ad->ad_views = $count; $ad->save(); which error message you kept getting? The same as above?
-
Updated the README and Screenshots on GitHub. Should be really nice to use now: https://github.com/LuisSantiago/FirstSteps/ I also splitted this module to allow third-party modules to use this feature (examples are on github).
-
Differentiate between update and upgrade on module settings page
Nico Knoll replied to owzim's topic in Wishlist & Roadmap
+1 -
(You just have to merge. It works great so far and I even updated intro.js and added a processbar and more). At the moment I'm adding all of my GetStarted texts to it (I have holidays so I have some time at the moment )
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
Fixed it -
Maybe try to use one of the original AdminThemes (looks like you're using a custom one).
-
Hey, I added a pull request on GitHub https://github.com/NicoKnoll/FirstSteps. I think we should work together on this module
-
Try $item->{"media:thumbnail"}
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
@toothpaste: Thanks! I fixed it now -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
Everything rendered should be available through $page->seo->... (More complicated keys like "og:site_name" are available through $page->seo->{"og:site_name"}) -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
And some more minor changes: I switched to PHP_EOL instead of \n and \n\r, which should solve the double line break issue. And I added a option, to add a whitespace at the beginning if automatically inserted. (will publish it in 10min) -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
I fixed this bug and changed how customs are rendered. So now they will overwrite existing meta tags if they have the same key. That means: I won't add a special "robots" field to pages, but if you define "robots := index,follow" in the custom area, that will overwrite config settings. Guess that should do the job, too. -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Nico Knoll replied to Nico Knoll's topic in Modules/Plugins
Version 0.6.0: Big feature: Google suggestion autocomplete Google preview updates while you type Custom contents only get sanitized now Bugfixes @NorbertH: This is not an image field because you can't have an image field in the modules config settings page. And I think this is good enough for now. Maybe I change my mind later on @toothpaste: Why no line breaks?