Jump to content

Nico Knoll

PW-Moderators
  • Posts

    1,835
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by Nico Knoll

  1. Nico Knoll

    31c3

    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
  2. @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.
  3. 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.
  4. 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;
  5. 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:
  6. 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
  7. 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
  8. 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"?
  9. Try: $ad->setOutputFormatting(0); $ad->ad_views = $count; $ad->save(); which error message you kept getting? The same as above?
  10. 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).
  11. This module won't be continued as Blad and I are merging our modules into his one: https://processwire.com/talk/topic/7728-module-firststeps/
  12. (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 )
  13. Maybe try to use one of the original AdminThemes (looks like you're using a custom one).
  14. I kinda rewrote blad's module and think I will concentrate on this one. I will add all the information from my module to his over time. Take a look. IMO it looks nicer now: https://github.com/NicoKnoll/FirstSteps
  15. Hey, I added a pull request on GitHub https://github.com/NicoKnoll/FirstSteps. I think we should work together on this module
  16. Everything rendered should be available through $page->seo->... (More complicated keys like "og:site_name" are available through $page->seo->{"og:site_name"})
  17. 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)
  18. 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.
  19. 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?
×
×
  • Create New...