Awstats extra section hits by subdirectory - regex

I've followed the format at http://www.internetofficer.com/awstats/by-directory/ to setup an Extra Section with hits by directory. This works.
images 28273657 38871644 1389.77 GB
content 12607984 12652114 390.53 GB
etc.
However, I need hits by (first level) subdirectory. At the bottom of that page, it suggests using:
ExtraSectionFirstColumnValues1="URL,^\/([^\/]*\/[^\/]*)\/"
Still only shows top-level directories. I've also tried
ExtraSectionFirstColumnValues1="URL,^\/*\/*\/"
which results in the same thing. I can't get the right regexp to do what I need.
Full code:
#Include hits by top 25 directories
ExtraSectionName1="Hits by Directory"
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URL,^.*$"
ExtraSectionFirstColumnTitle1="Directory"
ExtraSectionFirstColumnValues1="URL,^\/*\/*\/"
ExtraSectionFirstColumnFormat1="<A HREF='/%s/' TARGET='_blank'>%.80s</A>"
ExtraSectionStatTypes1=PHB
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=25
MinHitExtra1=1

You should use:
ExtraSectionFirstColumnValues1="URL,^\/([^\/]*)\/"

Related

Move the storage directory outside of the web directory

In opencart version 3 there is a notification:
It is very imporant that you move the storage directory outside of the
web directory (e.g. public_html, www or htdocs)
Screenshot
I tried by clicking on move button in the picture also tried manually but after trying it is giving weird errors.
You can move storage directory outside of the web directory (e.g. public_html, www or htdocs) in three ways
Automatically Moving
Manual Moving (from admin panel)
Manual Moving ( By editing Config files)...
Assuming that you know first and second methods.Here I will explain the third method to you.
Copy your storage directory from system/storage to public_html, www or htdocs.
Change the following file path from both config files i.e. config.php and admin/config.php as shown below.
define('DIR_STORAGE', 'public_html/storage');
Please replace public_html to your desired path.
I hope this answer might help you.
It is very simple to remove / hide this dialog box:
open 'admin/controller/common/dashboard.php' file
search below line
$data['security'] = $this->load->controller('common/security');
and replace it with below line
$data['security'] = '';
That's it :)
Change directory path as decribed abowe--but when You save the config.php use utf8 encoding. I have worked 2 hour on it- did everithing i found on google, but nothing worked. Just this simple thing!
I also ran into this little problem, and the fault was layer 8 (problems between the keyboard and the chair)
I hadn't read the code that I had to change correctly and I was doing it wrong, I'll explain better in case someone runs into the same problem:
capturing the variable to be deleted
I was just replacing the new directory path, not removing the DIR_SYSTEM variable.
you have to delete DIR_SYSTEM and place the new route. that's all.
For this reason it gave me an error and so I came to this post.
It is my first contribution. I hope this helps you.

C++ Windows API DlgDirList sometimes don't return the correct listing

I have 2 List Box, one always listing directories from a path and other listing the files from the selected directory.
The first time i select a directory, the files are shown properly, but if i select another directory, it lists nothing.
That's my current main.cpp, where all GUI stuff happens: http://pastebin.com/PjSb8aKy
List Box codes goes from lines 31 to 45 and 150 to 165.
Thanks in advance.
--------------------------------------------------EDIT---------------------------------------------------------------
I put a simple std::cout on the sel string, the result is that on the first directory i select, it's "", then it becomes "DirectoryName\", i tried changing the sel string to be "./DirectoryName", didn't managed to do it, the "\" still appears, but that isn't what bothers me, the real weird stuff is the first selection returning "" to the sel string...
I think the clue is in the docs for the DlgDirList function:
If lpPathSpec specifies a directory, DlgDirListComboBox changes the
current directory to the specified directory before filling the list
box.
I've never used these functions myself but I'd bet that your current directory is being modified and so subsequent calls to DlgDirList are looking in the wrong place.

7z exclude top level few folders

I would like to compress the folder having the following structure using 7zip or.. using any other zip archive utility available for windows that can use the command line argument in windows and achieve what I want to accomplish.. Here is my folder structure:
/images
/cache
/skin/common/images
/skin/skin1/images
/extensions/extension1/images
What I want to do is, I just want to exclude the top level "images" and "cache" folders from the root folder (The very first two entries in my listing above).
I have tried using the xr!images or xr!/images but.. xr!images removes all images folder. xr!/images just doesn't work.
Can someone please point me to the right direction?
Thanks
Use -x!images instead of -xr!images.

Django and tinymcs: getting list of image files using external_image_list_url

I am trying to get external_image_list_url to work with tinymcs and Django. My understanding is that the user will be able to see a list of his or her images when clicking on the image icon (the one with the tree). From here an image can be selected and inserted.
Am I right that it is the icon with the tree? It's the one called "image". The one called "insertimage" doesn't work at all - the icon is not displayed. It and insertfile are the only ones that aren't displayed. I'm Ok with that unless I need it for this list functionality.
First I am trying just to get any image to appear in a list. I have done the following:
Created myexternallist.js and placed it where I keep my other JS files. I can access these other files via src = "/media/js/filename.js" because of my django settings. But is this also what I should put for:
tinyMCE.init({
external_image_list_url : "/media/js/myexternallist.js",
... })
In this file it says:
var tinyMCEImageList = new Array(["Logo 1", "/media/js/photo.jpg"],);
photo.jpg is in the same folder as myexternallist.js
I have also tried just "photo.jpg" and various other combinations. Not sure if my issue has to do with my relative paths or something else altogether. I'm not sure what an absolute path should be. Right now I'm working on localhost, but won't always be.
Solved it, argh. The issue was the comma near the end of the line "var tinyMCEImageList =..."
Now it works fine with the relative urls starting with /media
The clue was given by Firebug Console, which showed me the js error. I just happened to click there, but will be using that a lot from now on!

Configuring LucidWorks Include Paths to only crawl certain file types

I'm trying to configure the LucidWorks web data source to only index certain file types. However, when I set Include paths to .*\.html to only crawl .html files (as a simplified example), it only ends up indexing the top level folder. Crawl depth is set to -1 and when I leave Include paths blank, it crawls the whole sub-tree as expected.
I've looked at their documentation for creating a web data source, and for Using Regular Expressions, and can't find a reason why .*\.html would not work, since .* should match any character.
As I was proofreading the question, I had an idea which was the correct solution. Posting it here for posterity.
The content being crawled is a file share, so it relies on directory listing of the web server, which was filtered out because it doesn't have a .html extension. So simply adding .*/ to the Include paths fixed the problem.