Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


abdus last won the day on October 19 2017

abdus had the most liked content!


Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Istanbul, Turkey
  • Interests
    Web development, gymnastics, photography

Recent Profile Visitors

5,228 profile views

abdus's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. Change this line to <?php namespace ProcessWire; With v3.0, all global functions are now under ProcessWire namespace, so you need to either declare namespace at the top or prefix function calls (\ProcessWire\wire() for instance)
  2. Not yet, I'll update the post once I get the alpha version ready.
  3. There's invisible recaptcha that only shows up in case of suspected bot activity https://developers.google.com/recaptcha/docs/invisible
  4. Use $e->object->hasPage property // Inputfield.php * @property null|bool|Fieldtype $hasFieldtype The Fieldtype using this Inputfield, or boolean false when known not to have a Fieldtype, or null when not known. #pw-group-other * @property null|Field $hasField The Field object associated with this Inputfield, or null when not applicable or not known. #pw-group-other * @property null|Page $hasPage The Page object associated with this Inputfield, or null when not applicable or not known. #pw-group-other
  5. That would be up to 3rd party services (almost all services support some type of tracking) or developer (by creating trackable links, 1x1px tracking gifs etc)
  6. Hook into Pages::saveReady instead and throw error inside checkMethod()
  7. Enable debug mode in site/config.php. You're probably getting an error that's preventing PW to complete page render.
  8. Keep it simple. There are dozens of JS libraries out there that generate table of contents for you. Google "jquery toc"
  9. If you can find a .edu email, you can use it for free.
  10. I'm not sure if your editor highlights variables inside strings, but PhpStorm, for instance, makes it really easy to spot the difference. Check your editor/highlighting settings, there might be an option to enable it. And yeah, tunnel vision is definitely real.
  11. I may be wrong but the problem is most likely due to this line. With single quotes, $evName is interpreted literally, so you get errors trying to create the same page again, and don't notice it because you probably have the debug mode off as @Robin S pointed out. Also, <?php namespace ProcessWire; foreach ($events as $event) { // you don't have to manually clean up strings to create page names, just use $sanitizer $evName = $sanitizer->pageName($event['name']); $p = $pages->get("/events/$evName/"); if (!$p->id) { $p = new Page(); $p->template = 'basic-page'; $p->parent = '/events/'; // $p->name = '$evName'; // single quotes -> interpreted as literal string $p->name = $evName; } $p->of(false); $p->title = $event['name']; $p->save(); } ?>
  12. Ok, so if I understand it right, you want to force user to pick a template. I'm not sure if this fits your needs but with a bit of JS and hooks you can remove default value and set the template select required (with `required` html attribute), such that you cant get to the next step without deliberately picking a template wire()->addHookAfter('ProcessPageAdd::buildForm', function (HookEvent $e) { /** @var InputfieldForm $form */ $form = $e->return; $form->add([ 'type' => 'markup', 'value' => '<script>document.querySelector("[name=template]").selectedIndex = -1;</script>' ]); $template = $form->getChildByName('template'); if ($template) $template->attr('required', 1); });
  13. Check out field rendering https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#field-rendering-with-template-files
  14. abdus

    Hanna Code

    Assuming _func.php is under templates folder, you need to include _func.php in your hanna code like this: <?php include_once $config->paths->templates . '_func.php'; echo "<div class=\"grid_xs-1\">"; foreach ($pages->find("template=property") as $properties) { // ...
  15. https://processwire.com/talk/topic/6196-easy-search-on-pw-forums-with-google/?tab=comments#comment-60632 https://processwire.com/talk/topic/6196-easy-search-on-pw-forums-with-google/?do=findComment&comment=153343
  • Create New...