Jump to content

Zeka

Members
  • Content Count

    741
  • Joined

  • Last visited

  • Days Won

    6

Zeka last won the day on December 11 2018

Zeka had the most liked content!

Community Reputation

788 Excellent

About Zeka

  • Rank
    Hero Member
  • Birthday 04/12/1989

Profile Information

  • Gender
    Male
  • Location
    Kiev, Ukraine

Recent Profile Visitors

2,741 profile views
  1. Definitely, I would recommend PW. In my case, the client didn't like the tree structure of pages, so I had to create separate Process modules for managing news, tags, banners, categories. I have found that it's much easier to control permissions and workflow via custom modules.
  2. Hi. I have custom module ProcessDashboard, not ProcessDashborad from modules repository, but when I go to ProcessWireUpgrade it indicated that my module has an update as it conflicts with the ProcessModule from the repository. Is there some way to prevent it? Something like 'private' flag? Didn't find any similar thing in module.php. Thanks
  3. Hi. I'm trying to get embed data for some posts from Facebook using specified endpoint https://developers.facebook.com/docs/plugins/oembed-endpoints/. It works for all type of posts, but not for posts that match this pattern https://www.facebook.com/permalink.php?story_fbid={post-id} For example, this post 'https://www.facebook.com/permalink.php?story_fbid=1461042474038729&id=188990994577223' returns 404 when requesting URL 'https://www.facebook.com/plugins/post/oembed.json/?url=https://www.facebook.com/permalink.php?story_fbid=1461042474038729&id=188990994577223' Maybe it somehow relative to additional ID parameter in post URL, but I haven't seen URLs for post only with 'story_fbid'. So, I really can't figurate out what is the issue here. Maybe somebody faced such problem and can get some ideas of recommendations?
  4. @neonwired https://processwire.com/api/ref/wire-file-tools/render/
  5. @elabx Thanks for idea. $repeater_fields = $this->wire('fields')->get('builder')->repeaterFields; $text_based_fields = $this->wire('fields')->find("id=" . implode($repeater_fields, '|') . ', type=FieldtypeTextarea|FieldtypeText|FieldtypeTextareaLanguage|FieldtypeTextareaLanguage'); $search_fields = $text_based_fields->implode('|', 'name'); $page->builder->find("{$search_fields}!=''")->each(function ($item) use (&$content, $search_fields) { $content .= $item->get($search_fields); }); Now I need to get it work with different langauges.
  6. Hi! I need to calculate estimated reading time for all of content inside all text extended fields inside repeater matrix field. That's how I do it now, but sometime I forgot to update selector when fields are changed for some of matrix types. /** * Calculate and save field value of estimated reading time */ public function calculateReadingTime($page) { $sanitizer = $this->wire('sanitizer'); $content = ''; $page->builder->find('body|title|otherfields!=""')->each(function ($item) use (&$content, $sanitizer) { $content .= $item->get('body|title|otherfields'); }); $page->readtime = $this->calculateEstimatedReadingTime($content); } That's why I was trying to use selector by Fieldtypes that was introduced in 3.0.91 with no luck $page->builder->find('FieldtypeText.extends!=""')->each(function ($item) use (&$content, $sanitizer) { $content .= $item->get(...); }); So the question is there more optimal way of doing it where I don't need to enter names of fields manualy?
  7. @neonwired Have you tried to use $files->render() instead?
  8. @David Karich Thanks again for the module. What do you think about adding an option to manually load js scripts from a custom folder?
  9. Hi @DooM Have you tried to use $files->rmdir ? https://processwire.com/api/ref/wire-file-tools/rmdir/
  10. Hi. Using 'explode' on newly created WireArray doen't do anything: but 'each' method works Am I missing something? Thanks
  11. Hi. Currently, I'm building a new multilanguage site. There are two languages: Russian (default - /ru/) and Ukrainian ( non-default - /ua/). In Languages Support - Page Names module I set 'No - Root URL performs a redirect to: /name/' for 'Default language homepage URL is same as root URL?' setting. Due to some new changes in language regulation from the government after some time, I will need to change the default language to Ukrainian. Currently accessing root domain I get redirect to /ru/. I thought that changing language for the guest user will be enough to get a redirect from '/' to '/ua/' on initial load, but it still redirects to '/ru/'. Is there is a way to get what I need without touching names for home page? Thanks.
  12. https://processwire.com/api/ref/pages/get-by-path/
  13. Maybe you can hook to Page::viewable, so all methods like $pages->find which filters access conteroll will also filter such pages $this->addHook('Page::viewable', function($event) { if($this->wire('pages')->saas_id !== $this->wire('user')->saas_Id) { $event->return = false; } });
  14. @Smoo Take a look at documentation for Pagefiles https://processwire.com/api/ref/pagefiles/ You can loop throught like // Traversing and outputting links to all files foreach($page->files as $name => $pagefile) { echo "<li><a href='$pagefile->url'>$name: $pagefile->description</a></li>"; }
  15. Hi. There ProcessPageEditLink where we can specify some options for links. But, in my case, every link gets also 'noreferrer', 'noopener' and doesn't get 'external' class. If I'm not mistaken, I remember that I have setup this elsewhere, but can't remember where)) Are there options somewhere else? Why 'external' class doesn't populate?
×
×
  • Create New...