-
Posts
79 -
Joined
-
Last visited
About pmichaelis
- Birthday 05/23/1978
Profile Information
-
Gender
Male
Recent Profile Visitors
3,966 profile views
pmichaelis's Achievements
-
Hey, there is a deprecation notice when running php 8.3 🥸 Deprecated: Calling get_class() without arguments is deprecated in .../cache/FileCompiler/site/modules/InputfieldAceExtended/InputfieldAceExtended.module on line 499 The error "Deprecated: Calling get_class() without arguments is deprecated" occurs when using PHP 8.3 or later to call the get_class() function without providing an argument. This is because the function's arguments are now required. Call get_called_class(), which works similarly to get_class() but doesn't require arguments. public static function getStatic($name) { $class = get_called_class(); return isset($class::$$name) ? $class::$$name : array(); }
-
pmichaelis started following Fieldtype modules , SeoMaestro , radial search (over Map Marker coords) and 3 others
-
Hey, I have made an adjustment to the output of the hreflang tags in getCommonMetatags() On news pages with pagination, only the url of the page is currently output as hreflang. As I understand it, the url segment of the pagination should also be appended to the hreflang tags so that the correct translation pages are referenced. The attached change works for me. Is my assumption correct? If so, what is the correct procedure here? Should I make a pull request? /** * Build common metatags not configured via fieldtype. * * @return array */ private function getCommonMetatags() { $baseUrl = $this->seoMaestro->get('baseUrl'); $defaultLang = $this->seoMaestro->get('defaultLanguage') ?: 'en'; $hasLanguageSupportPageNames = $this->wire('modules')->isInstalled('LanguageSupportPageNames'); $tags = ['meta_generator' => '<meta name="generator" content="ProcessWire">']; if ($hasLanguageSupportPageNames) { # page number & prefixes $pageNum = $this->wire('input')->pageNum(); $prefixes = $this->config->pageNumUrlPrefixes; foreach ($this->wire('languages') ?: [] as $language) { if (!$this->page->viewable($language)) { continue; } $code = $language->isDefault() ? $defaultLang : $language->name; $url = $baseUrl ? $baseUrl . $this->page->localUrl($language) : $this->page->localHttpUrl($language); # add pagination segment if ($pageNum > 1) { $prefix = isset($prefixes[$code]) ? $prefixes[$code] : $prefixes['default']; $pageSegment = $prefix . $pageNum; $url = rtrim($url, '/') . '/' . $pageSegment . '/'; } $tags["link_rel_{$code}"] = sprintf('<link rel="alternate" href="%s" hreflang="%s">', $url, $code); if ($language->isDefault()) { $tags['link_rel_default'] = sprintf('<link rel="alternate" href="%s" hreflang="x-default">', $url); } } } return $tags; } Kind regards & many thanks
-
I could have just used that. Thanks for the information.
-
Hey, is this feature already in the master branch? Thanks for help
-
In a multilingual environment I get the following error, wehen sorting menu-items TypeError method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given File: .../modules/MarkupMenuBuilder/ProcessMenuBuilder.module:2602 2602: if($language != null && method_exists($pages->get($itemID)->title, 'getLanguageValue')) $itemTitle = $pages->get($itemID)->title->getLanguageValue($language);// title of each PW page in this array This works for me: // multilingual environments if($language != null && $itemID && method_exists($pages->get($itemID)->title, 'getLanguageValue')) $itemTitle = $pages->get($itemID)->title->getLanguageValue($language);// title of each PW page in this array
-
Hello @torf, I pushed an update a minute ago. Please have a look, if the issue is resolved. Happy new year.
-
Page Hit Counter – Simple Page View Tracking
pmichaelis replied to David Karich's topic in Modules/Plugins
hej, is it possible to hook into pageViewTracked from ready.php? I tried the following, but since I am not so familiar with hooks, it is not working out. wire()->addHookAfter('PageHitCounter::pageViewTracked', function($pageID) { $page = wire('pages')->get($pageID); ... } Thanks for any help.- 111 replies
-
- hitcounter
- tracking
- (and 4 more)
-
Hey Bernhard, Weird! thanks for bug-reporting. I'll update the repository!
-
Hey everybody, I just uploaded a small textformatter module for wrapping tables with a div container in order to display responsive HTML tables in the frontend. TextformatterWrapTable Processwire wrap table module is a textformatter module for processwire CMS/CMF. It is wrapping markup tables with a div container. wrapping tables with div container simplifies the process of displaying responsive tables in the frontend. The css classes for the wrapper and the table are configurable. .table-responsive / .table by default the module produces the following markup: <div class="table-responsive"> <table class="table"> ... </table> </div> Link to Repository https://github.com/pmichaelis/TextformatterWrapTable
- 5 replies
-
- 10
-
-
-
StaticWire - Covert pages to static HTML
pmichaelis replied to christophengelmayer's topic in Modules/Plugins
Hi, i wanted to test the module. Is there still a namespacing issue? Error: Class 'ProcessWire\HtmlExporter' not found in /home/vagrant/web/pw-static/web/site/modules/StaticWire/StaticWire.module.php on line 41 thanks for help -
Hey Thomas, first of all: thanks for your all the effort you put into the RestApi Module. I've seen the AppApi Module recently and I think it would be good to focus on it. keep it up.