-
Posts
11,150 -
Joined
-
Last visited
-
Days Won
368
Everything posted by adrian
-
Page Hit Counter – Simple Page View Tracking
adrian replied to David Karich's topic in Modules/Plugins
@David Karich - on the issue of the AJAX call from the js file - turns out if you have url segments enabled for a template, when you view a page, the entire page's html is included in the response and sent to the browser along with the "Page Hit Counter: Tracked". I can workaround it by adding: if($config->ajax && $input->urlSegment1 == 'phcv1') exit; to _init.php, but I think there needs to be a more elegant solution ? I have read your section about "Notice: Tracking with URL segments", but I don't think that is really the issue here. I haven't defined my urlsegments yet (I will before the site goes live), but I don't think that will prevent this issue, will it? Any thoughts?- 111 replies
-
- hitcounter
- tracking
- (and 4 more)
-
@Macrura - I haven't used this before, but just tried on a PW latest dev install and I am seeing this browser error: selectize.js:2230 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. at Selectize.refreshOptions (selectize.js:2230) at Selectize.onFocus (selectize.js:1752) at selectize.js:2088 Please let me know if you have problems reproducing and I'll dig a little deeper. Thanks.
-
Page Hit Counter – Simple Page View Tracking
adrian replied to David Karich's topic in Modules/Plugins
Hi @David Karich - thanks very much for this. I just noticed that if you uninstall and reinstall, you get an SQL error because it's trying to create a table that already exists, so either the uninstall didn't clean things up properly (if that is the intention), or the install process needs to check to see if it already exists. Also, just wondering if the AJAX approach could be reserved for sites running ProCache? Is there a need otherwise for doing it this way, rather than hooking on page render? There's a good chance I am overlooking something, but just thought I'd ask. Another thought - have you considered a way for us to easily extend this to log click events to track users viewing PDFs etc? Maybe this really doesn't belong within this module and should be kept as something we implement on a case-by-case basis?- 111 replies
-
- 1
-
-
- hitcounter
- tracking
- (and 4 more)
-
@teppo - your first description is all I am really looking for. Obviously the second would be great, but I expect impossible with PW selectors.
-
Thanks @teppo - looking forward to seeing all these new features. I have another one for you ? Whenever I build a search engine I emulate Google's "search phrase" use of double quotes to effectively switch from ~= to *= Would you be willing to support something like that also?
-
@Robin S - I have been using this module since it was released and always thought it was a necessary tool for inserting Hanna codes, but I just starting using some of its other features like: linked_page__pagelistselect which makes it an entirely new beast - amazing. Thanks!
-
Running Firefox Developer version on MACOS here and can't seem to make it fail - tried multiple pages, multiple times. Maybe you could debug for me? When the single click scroll doesn't work, does the double-click to open settings also fail? I wonder if the JS that hacks into that button isn't loading at the right time after the button is rendered? I'll make the gear icons lighter in the next version.
-
@szabesz - I've taken care of most of your requests. The only ones I haven't done are the separate front/back end visibility for the various server type indicators - this will actually be quite a bit of work which I don't have time for at the moment. The other thing I didn't change is making those checkboxes into columns for those panels you mentioned - the problem is not just the responsive issues, but more importantly, it's that it messes with the order of checkboxes - they end up going across the rows, rather than down the columns which is actually pretty awful. Anyway, let me know if all the other stuff works as you'd hoped, including the scroll to top ?
-
@szabesz - thanks for your thoughts on the settings. One problem with setting those checkboxes to use columns is this: https://github.com/processwire/processwire-issues/issues/1327 Regarding the quicklinks being in alphabetical order. I kinda agree with you, but I @Robin S thought the matching the order of the settings was better. I'd be willing to change, but given that this is his feature, I'd like his OK first. There are direct links to settings at the bottom left of each panel. I think that is probably enough, but I could consider adding them to the Panel Selector as well if you still think it would be helpful. Not sure about the scroll to top button - it feels a bit out of place in Tracy, but I'll think it over. I'll also have a think about the server type indicator frontend/backend changes - that seems like a good idea.
-
@salmiak - did you see my suggestion above for incorporating monolog into Tracy? It might be the simplest option. If you go with a separate module, perhaps hooking into Wire::trackException might be of use?
-
Yep, it's Tracy - it's designed to give you a visual indicator as to whether you're working on a live, local, dev, staging etc version of the site. It is configurable to work with subdomains or TLDs. Take a look at the "Server Type Indicator" section in Tracy's settings. I find this really invaluable, but I know that @kongondo hates it ? Anyway, you can easily disable it if you want, but note that of course it's only visible to users with Tracy permissions, so visitors to the site won't see it.
-
Sorry, one more thought on the template search priority order. I think it would be great to have an option so that the template of the current page (and it's child page's template) were automatically given higher priority over the order set in the config settings. Or some other way to specify the order of priority depending on the page being searched from.
-
Just to give you a simple example of why I think this is a must-have feature. I am working on a site where the staff are mentioned in blog posts, but obviously if a user types in the person's name, the first result they want to see is the staff member's info page, rather than the blog posts that mention them. Awesome - I'll hold off on doing this myself.
-
Thanks for the explanation @teppo - I started to realize how it works as I played around with things. I like your initial thinking, although I do think it's slightly confusing, but I also don't think it's worth your time to reconfigure. I have another feature request for you ? I know I could do this if I went with the json rendering of results and then manipulating and rendering myself, but I think it would be great if the "Indexed Templates" config setting was an ASM Select field so we could choose template order. I'd love to see this template order used to group and order the rendered search results. I think it would be nice to have the option for using the template label to add group headings to the results. It would also be good to have an option for presenting these template grouped results into different tabs - a bit like the PW website's search results. Actually, speaking of the PW website search functionality, maybe adding an automatic option for AJAX rendering of results below the search box would also be nice. I know all of these are possible with manual rendering, but I think we could all benefit from an inbuilt implementation. BTW, this module really is awesome - thank you!
-
Yeah, I agree - I was confused by that when I was setting that stuff up in Tracy.
-
Sorry @teppo - another question / request for you - what do you think about being able to store theme folders in /site/templates/SearchEngine/themes to avoid any issues with overwriting during updates, and also so it's cleaner for version control?
-
Sorry if I'm being dumb, but when I went to set the 'form_action' argument, I assumed it needed to be an element within the 'render_args' array, but if I do that, it doesn't work. It does work if I set it at the top level of the args/options array that I am passing to the renderForm() method though. If I dump $args without setting this, I see it is at the top level. Did you change something intentionally since writing the docs, or am I just confused ?
-
Weird thing is that I don't think I have seen those errors in Tracy which uses getQuery() and getDebugQuery() https://github.com/adrianbj/TracyDebugger/blob/116324264c3d566c1cece8c53cc3a1075ca82862/panels/DebugModePanel.php#L232-L239
-
Sorry about that - I was running 3.0.171. I just updated to 3.0.172 and still seeing the notice, but now it's on line 1493
-
Hi @teppo - just playing around with this for the first time and got this error when using the Debug Query feature. Not sure if it's an issue with the way you are calling the PageFinderClass? PHP Notice: Undefined index: returnAllCols in .../public_html/wire/core/PageFinder.php:1460
-
It's something I built for my own use. I am constantly creating new / modified versions of it for all sorts of imports. Here is a copy of what I am currently using for that version: Obviously you'll need to make a lot of changes to have anything useful to you, but it's a good starting point. Also note that I am making use of this CSV library: https://github.com/parsecsv/parsecsv-for-php so you'll need to grab that so it can be included.
-
Sorry for the delay @lpa - the latest version will now let you replace with an empty value.
-
Just make use of the $page variable like: "template=item, parent!=$page" Note the double quotes, or if you prefer: 'template=item, parent!='.$page
-
@lpa - BCE only supports one level of importing. If you're importing content along with the second level pages, then you'll need to create the first pages first, but if you're just trying to create a hierarchy of pages with titles only for now, then this might help: https://processwire.com/modules/admin-actions-unordered-list-to-pages/ Otherwise, I tend to do all my complex imports these days with a custom AdminActions action. This is great if you have a complex CSV export from an old site - not sure if this is what you are doing or not, but just in case: I find this approach really useful as I can quickly do test imports and continue to tweak until I have everything correct. It even allows importing specific items from the CSV (by ID, or some other field if you want). You can then easily remove all test imports and do a full import of everything.
-
You gotta thank @Robin S for the idea and implementation of those: https://processwire.com/talk/topic/24932-feature-requests/?do=findComment&comment=210091