pmarki
Members-
Posts
26 -
Joined
-
Last visited
Everything posted by pmarki
-
Thanks @Macrura but @flydev PM'd me first. Nothing personal, I took timestamp as main criteria. I'm glad other people find this module useful.
-
Hi, sorry for not being up to date, I'm working with Magento now. @msncom I don't think it's possible. I am happy to pass ownership of this module to someone who will be able to maintain it. In community we trust
-
PW refreshes versions once a day, so you have to wait or update manually.
-
Fixed now, Thanks @PWaddict
-
If only I knew how to do this... Adding file fields isn't easy, beacuse you have to store a file somewhere. So far I haven't find a way to achieve this But any advice would be appreciated
-
To be honest I had the same issue and decided to count visits on other pages but home, because I was more interested in how many people visit a new post in a week than how many visits I have so far. In this case I didn't use visit_counter_flag at all assuming that visitors don't come back to posts. So in this line: if($session->get('visit_counter_flag') === 0 && !$user->isSuperuser())... I only check if not superuser, that's why there was an error with ===, sorry about that. As it was sad here: processwire.com/talk/topic/12191-make-visit-counter-code-count-once-per-session/ there are better ways for statistics, our way is suitable for estimates only. If you would like to count visits per page and on a home page you can increase siteviews if it's not a home page and event if visit_counter_flag is not 0.
-
Sometimes most obvious things aren't obvious, so remember to check if it's working as a quest. if($session->get('visit_counter_flag') === 0 && !$user->isSuperuser())... If you are a superuser it does nothing.
-
Yes, it works with pw3. Just updated module info and added textarea field.
-
I have it in a site/ready.php (if you don't have this file just create one) function bot_detected() { if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) { return TRUE; } else { return FALSE; } } if($session->get('visit_counter_flag') === 0 && !$user->isSuperuser()) { if (bot_detected()) return; /* if the user is NOT logged in and not counted */ /* turn of output formating so PW do not give an error when we change the value */ $page->of(false); /* save the visitor_counter field */ $page->set('visitCounter', ($page->visitCounter ?? 0) + 1); $page->save('visitCounter', array('quiet' => true, 'uncacheAll' => false, 'resetTrackChanges' => false)); /* turn on output formating so PW work as it should */ $page->of(true); /* set a visit counter flag to 1 so next load do not count */ $session->set('visit_counter_flag', 1); } As a extra bonus this script exludes bots from statistics.
-
I thought about it as well. If you created a foot template and a foot.php file is included in a _main.php it does't mean that fields from this template will be accessible. You should add visit_counter to page-currently-being-rendered template. Btw.: I use something like this for the same purpose: $page->save('visitCounter', array('quiet' => true, 'uncacheAll' => false, 'resetTrackChanges' => false)); Otherwise on all pages the modified user will be quest.
-
Done, but honestly I thought it's done automatically.
-
Oh, Forgot to change version number, but already fixed. Thanks @tpr
-
I think I'll leave it as is. It's a good indicator for newcomers and obvious for advanced. Thanks, fixed
-
I have reorganize module settings, it uses JSON and ASM Select for fields, now it's possible to reorder settings, add, delete and so on. The only drawback is that it's not compatible with previous version. If you want to update, you will lose all entered settings.
-
you can check its path: if ($page->path == '/admin-page-name/page/list/') $event->return = false ;
-
I just didn't want to override to much AOS css, that's why those 2 light lines were left untouched. Thanks, fixed.
-
Take a look at this Ryan's topic, there is a snippet about changing urls. It should be easy to get rid of /designers/ part.
-
Can someone explain these DB Name fields etc please
pmarki replied to sudodo's topic in Getting Started
You should find the ip of db host in your hosting or db configuration, ie. when I create a new db on my hosting provider it shows me ip and port to access it. -
Can someone explain these DB Name fields etc please
pmarki replied to sudodo's topic in Getting Started
Hi, make sure that db host and db port are valid, I often forget to change db host value if not localhost and receive such an error. -
There is a new version of the module, as tpr suggested all features are optional. Now works in AdminOnSteroids, but: - you can have turned on sticky header in only one module (though in AdminOnSteroids must have sticky compact), - if you have AOS header "Show host name" doesn't work - if you have DarkAdmin header "Always show search field" should be disabled and "Place header button next to title" should be enabled - probably other small glitches, but overall should be usable.
-
Yes, I used to use MultiValueTextformatter for this and had the same worries. Just modified it a little to have 'some kind of multilanguage support', not as convenient as built in pw, but better than nothing
-
This module provides a solution for keeping various site settings in one place (titles, slogans, api keys, emails, addresses, etc.). Features - Admin can create unlimited number of settings - Settings can be grouped - Admin can set setting label, notes, property name, field width and type - Settings can be of type text, checkbox, radios, select, email, url, integer How to use In module configuration create as many settings as needed. Customize their label, type, width and provide a name you want to use in a template files (property name). After that admin can set those settings on "General Settings" page in "Setup" section. Every time you wish to output eg. site name you can use $settings->site_name or wire('settings')->site_name or $settings->option2 to get value of 'Check it' as seen on the first screenshot. (Checked checkbox returns 1). You can change global name ($settings) to something else in module configuration. To get basic markup with all settings and their values use $settings->render(), usefull to check returning values (esp. select/radios - their values are sanitized as page names). Current limitation: -no way to change order of settings, -new settings can only be added at the bottom. Multilanguage To make fields multilanguage aware create a field with a same property name with '_languageName' appended. Example: Your site has two languages: default and french, create site_title and site_title_french fields. Put in a template $settings->site_title. If a user has set french language, this module output site_title_french, otherwise site_title. Please notice that render() function is not language aware. https://github.com/pmarki/ProcessGeneralSettings
- 85 replies
-
- 11
-
I used to have the same issue and enabling Session Handler Database module solved it. So if you use text based session try this.
-
Thank you for your feedback, I'm really glad seeing someone else interested. My idea was to make most used features easily accessible that's why Pages and Settings are always open, modules configurations always closed and Access is opened on hover (Mike Rockett 2, 3, 4.). With such a configuration you can with one click only check a name of a field or go to template settings still having less frequently used sections collapsed. So it's not a bug, it's a feature I have never used system notification, so will check it. I'll try to make some features optional in next release as tpr suggested. UPDATE: Just uploaded small fixes (notification bell, shadow, sidebar scrollbar, header height aligned to sidebar items)