Items filtered by date: December 2015

This article will cover some of the favicon cache issues you get when working with Windows 10 and Firefox 56.0.2 (64-bit), but the information will probably apply to other setups.

If your Favicon is cached and you cannot unchache the icon then this article will guide you through the process of fixing that and why.

Where does an Internet Shortcut icon come from?

Internet Shorcuts are handled by your default browser. There are 2 ways to create an Internet Shortcut.

The following article goes into some depths about this. How do I set a custom icon for a desktop URL shortcut? - Ask Leo!

  • Most of the Windows system icons are stored in C:\Windows\System32\shell32.dll
  • The World icon is stored in C:\Windows\System32\url.dll

Right Click

On the Windows desktop, right click and create a new shortcut but using a URL as the location. This will create a shorcut that uses the Firefox default icon but I have seen it use the favicon before now.

The icon created typically looks like:

Right Click Icon

With the code inside the shortcut:

[{000214B0-0000-0000-C000-000000000048}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://quantumwarp.com/

Drag and Drop

In Firefox highlight the URL in the address bar and drag it to the Windows desktop.

This method always creates a shortcut using an icon created by using the Favicon (48px or highest quality layer in the icon) stored in Firefox and then super imposes this on a white background. This leads to a very small icon in the middle of a white square. a lot of people complained about this so it is possible to change this behavious to use the normal Firefox icon. If the icon does not exist in Firefox then the icon will be grabbed from the website via Firefox internally and the same process will occur. If no Favicon exists then you might see a World icon.

Some other browsers might support this feature but I have not tested them.

The icon created could looks like one of these:

Drag and Drop Icons

As you can see it has used the URL title for the description, this can be changed by renaming the shortcut.

With the code inside the shortcut:

[InternetShortcut]
URL=https://quantumwarp.com/
IDList=
HotKey=0
IconFile=C:\Users\testuser\AppData\Local\Mozilla\Firefox\Profiles\727ui0od.default-1577462149946\shortcutCache\TiE1mKLHrw+Is5_yDymu0w==.ico
IconIndex=0

Favicons not showing correctly in File Explorer but do show correctly in Firefox

This is an easy one to explain (after a lot of research) but first you need to know the process Windows goes through to create the shortcut.

The Process

When creating an internet shortcut via drag and drop the following occurs:

  1. User drags the URL from Firefox
  2. Firefox checks to see if it has a Favicon is in its Favicon cache (favicons.sqlite) for the given URL:
    • Icon present in cache - If there is a Favicon in the cache Firefox uses it.
    • No icon in cache - Firefox will attempt to download the favicon.ico from the URL, if success it will add the favicon.ico to the cache and use this icon. If there is no favicon.ico found then Firefox will use one of the following icons default Firefox icon, the World icon or White Paper icon instead. Firefox now skips to Step 5.
  3. Firefox now check if it has an icon in its shortcutCache:
    • Icon present in cache - Firefox will use this cached icon.
    • No icon in cache - Firefox creates an icon of the URL and adds it to the cache by creating an icon (A white square with the favicon in the middle which looks really small) in the /shortcutCache/ folder. The favicon layer used to create a shortcut icon in QuantumnWarps case is (48x48) but Firefox might use the highest resolution layer available. There seems to be a bug, even if there is no icon in this cache but the icon has previously been cached in the windows IconCache then an icon location is still sent back to Windows.
  4. Firefox now gives Windows the location of the custom icon.
  5. Windows checks its own IconCache for the URL to see if there is already an icon:
    • Icon present in cache - Windows will use this cached icon.
    • No icon in cache -Windows adds the supplied icon to the IconCache, and will use this cached icon.
  6. Windows now builds the shortcut with the supplied icon.

Cause

As you can see there are 3 caches involved, this is where the issue creep in. The favicon might be correct in Firefox but because Windows has its own independent cache the old version can persist within the Windows cache.

Solution

The only way to get a Windows Internet Shorcut Icon to have an upto date icon is to:

  1. Wipe the Firefox Favicons Database
  2. Wipe the Firefox Shortcut Cache
  3. Refresh/Wipe the Windows Icon Cache
  4. and then re-create the icon. (Not always required, but can speed things up)

NB: Firefox Favicons stored in the database expire after 7 days but I do not know if that causes the Internet Shortcuts Icons in the shortcutCache to be automatically updated or if you need to visit the URL in question or they do not get updated at all. Depending on the answer you might only need to wipe/refresh the Windows Icon cache if the favicon that you need to update is older than 7 days. One further thing you could try is to set the expiry data in the Firefox database for all of the required Favicons to 0 or another time in the past.


Firefox Favicon Caching

I have changed my favicon on my site but my Firefox Bookmark icon has not changed. This is because the favicon is cached but not within the normal Firefox file cache.

You can possibly bypass this problem if you use versioning on your favicon by using the following code to declare your favicon.ico changing the variable when you make change.

<link rel="shortcut icon" href="/favicon.ico?v=QWr4XjEpXx">

Disable the use of Favicons for Internet Shortcuts

You can disable the use of Favicons for Internet Shorcuts by modifying some Firefox settings in about:config, this also assumes Firefox is the default browser of Windows.

In about:config set these options to false and restart the browser.

browser.chrome.favicons
browser.chrome.site_icons

The original article from HowToGeek -  Quick Tip: Disable Favicons in Firefox | HowToGeek

Location of Favicon Cache

When you visit a site in Firefox it caches the favicon.ico, favicon-16x16.png, favicon-32x32.png (only 1 of the png is stored, 16x16 if both present).

It caches them in it's own database as BLOBs and the location varies from version to version. It only ever grabs the following layers 16/32/48.

FF <55 - %AppData%\Mozilla\Firefox\Profiles\.default\places.sqlite
FF 55+ - %AppData%\Mozilla\Firefox\Profiles\.default\favicons.sqlite

After research I can confirm the expiry date set on all favicon assets in the database is 7 days. I have not found anywhere that this can be changed. It should also be noted that changing caching options in your .htaccess seems to make no difference.

Firefox 55.0 got a new storage system for Favicon data.

Moved from the places.sqlite file into its own 'favicons.sqlite' file, along with adding two temporary storage files 'favicons.sqlite-wal' and 'favicons.sqlite-shm' which are used while Firefox is running. Then as Firefox is closed the temporary data is written to the main 'favcions.sqlite' file.

The goals for the new storage system include saving the new Favicon with the newly saved bookmark (vs being saved upon the first use of the new bookmark) and the ability for Favicons to be Sync'd (although I'm not sure if the Sync service has been updated just yet).

Favicons Disappear After 55+ Updates | Firefox Support Forum | Mozilla Support

Clear Firefox Favicon Cache

So for those of us who are developing our sites often we need a way to be able to empty the favicon cache. This is not always as easy as it seems so I will outline what works.

Option 1

  • Download and install DB Browser for SQLite. (You could also try the addon SQLite Manager but I have not tried this.)
  • Quit Firefox (close all open Firefox windows).
  • Open the following database with DB Browser. Your profile name might be different, so change as required.
    %AppData%\Mozilla\Firefox\Profiles\.default\favicons.sqlite
  • Click on the 'Browse Data' tab. All you icons will now be listed.
  • Select the favicons you want to delete.
  • Click the 'Delete Record' at the top right.
  • Write the changes.
  • Done, you can now restart Firefox.

Option 2 (not tested)

  • As above but instead of deleting the record you can set the expiry date to 0 (or other past date). the icon in this case will stay until it is refeshed by visiting the website.

Other Options

These are a collection of links with different ways of doing this. I have not test any of them but they are for reference.

Location of the Firefox Internet Shortcut Icons

  • Create a shortcut by the Drag and Drop method
  • Edit the .url/shortcut file by using a text editor such as Notepad++
  • You will see some code similiar to that below
    [InternetShortcut]
    URL=https://quantumwarp.com/
    IDList=
    HotKey=0
    IconFile=C:\Users\testuser\AppData\Local\Mozilla\Firefox\Profiles\727ui0od.default-1577462149946\shortcutCache\TiE1mKLHrw+Is5_yDymu0w==.ico
    IconIndex=0
  • Open that folder named in IconFile and you will see all of the icons used for shortcuts. (Remember that windows has already cached these)

Clear Firefox Internet Shortcut Icon Cache

This is the easiest cache to clean.

  • Delete all of the files in:
    %LocalAppData%\Mozilla\Firefox\Profiles\.default\shortcutCache\

Notes

  • The icons have filenames like TiE1mKLHrw+Is5_yDymu0w==.ico. These are not random. Firefox is aware if an icon has been already created for this domain and will use the same icon location even if you have deleted it or if an icon for that URL exists it will re-use it. This means that Firefox must keep a reference table for URL against icon name or it is some sort of hash. I have looked through the Firefox databases and search the Windows registry but have not found anything. I might of missed it.
  • This random name also seems to be used by the Windows icon cache.

Windows Icon Cache

As of now I do not believe that there is any Windows event that expires the Icon Cache or that they have an expiry date.

How to wipe the Windows Icon Cache

Most of the delete icon cache out there refer to just deleting the IconCache.db and this is ok for Windows 7 but is not correct for windows 10. The file IconCache.db is still present in Windows 10 but is no longer used. The icons are now stored in the following folder within the files all starting with iconcache*.

%LocalAppData%\Microsoft\Windows\Explorer

Option 1 - Refresh the Cache

This is where you can refresh the icons without needing to reboot the PC.

After issuing this command, icons might not refresh but instead change into Blank Paper icons. This is probably because you have emptied the Firefox Internet Shorcut Cache and Windows cannot find the correct icon so it uses the first icon (Blank Paper) in the default icon library (C:\windows\system32\shell32.dll). You can fix this by recreating the shortcut for the URL using the Drag and Drop method, this will cause the favicon to be downloaded again consequently this Internet Shortcut icon will display correctly with the new version of the icon. You also find all other shortcuts that were using the same icon will now also be restored but using the newer icon. You do not need to recreate each one individually, it is only because the icon is missing from the shortcutCache folder that we do this.

Open a command prompt and enter the appropriate command:

For Windows 7 and 8 use

ie4uinit.exe -ClearIconCache

For Windows 10

ie4uinit.exe -show

Notes

Option 2 - Manually Delete Files

  1. Open command console with admin privileges
  2. taskkill /IM explorer.exe /F
  3. cd /d %LocalAppData%
  4. del IconCache.db /a
  5. cd /d %LocalAppData%\Microsoft\Windows\Explorer
  6. del iconcache*
  7. explorer

NB: If some of the iconcache* files do not delete, logout, log back in and repeat the process, this should be enough. Once the icons have refreshed it would not harm to reboot, this is optional.

Notes

Option 3 - Other Apps


Links

Published in Media

The following instructions are how to export a transparent PNG version of my QuantumWarp logo from a SVG using Inkscape.

Once exported to make the white version you can manually change the black to white by using paint.net

Square Logo (400 x 400 / QW)

  • Configure the layers to the square version (i.e. all in viewport)
  • File --> Export Bitmap
  • Select 'Page'
    Export Bitmap Page
  • Select desktop for output
  • Export

Wide Logo (400 x 1000 / QuantumWarp)

Option 1

  • In Document Properties (under the 'File' menu),
    Document Properties
    alter Custom size to
    Width:1000.00
    Height:400.00
  • File --> Export Bitmap
  • Select 'Page'
    Export Bitmap Page
  • Select folder for output
  • Export

Option 2

  • Configure the layers to the long version
  • File --> Export Bitmap
  • Select 'Drawing' (Custom might work the same.)
  • You will get some settings like this below
    Export Bitmap Drawing
  • Change the settings in this order
    x0 = 0.000
    y0 = 0.000
    x1 = 1000.000
    y1 = 400.000
  • This should give
    Width: 1000px at 90.00 dpi
    Height: 400px at 90.00 dpi
  • Select folder for output
  • Export
Published in Media
Friday, 19 January 2018 12:56

JDownloads - Layout Previews

This page shows you what the different standard layouts that come installed with JDownloads look like so you can easily choose what you want.

There are some more layouts available at JDownloads.com in the Layout Section and these already have images and descriptions.

 

Categories

Defines the layout of the categories as well as the download items for the use with CHECK boxes above and below the Download list.

 

Categories Example with 2 columns v3.2

Categories Example with 2 columns v3.2

 

Categories Example with 4 columns v3.2

Here is a sample layout with 4 columns. If you create your own layout with more then one column, you must observe the rules which may be found in the FAQ.

Categories Example with 4 columns v3.2

 

Standard Categories Layout for paginated Subcategories 3.2

This is a subcategory layout used in categories when subcategory pagination is enabled by the 'Show page navigation for subcategories?' option in the Frontend tab of the Configuration. This layout must not be activated because it is automatically used when the above option is selected. It is not intended as a standalone category layout.

Standard Categories Layout for paginated Subcategories 3.2

 

Standard Categories Layout v3.2

Standard Categories Layout v3.2


 

Category

Defines the layout of the Download list when displaying as a single category view.

 

Standard Category Layout v3.2

Standard Category Layout v3.2


 

Files

Defines the layout of the Download list displayed below the categories.

 

Alternate Files Layout v3.2

Alternate Files Layout v3.2

 

Files Layout Full Info v3.2

Files Layout Full Info v3.2

 

Files Layout Single Line v3.2

Files Layout Single Line v3.2

 

Files link only v3.2

Files link only v3.2

 

Standard Files Layout v3.2

Standard Files Layout v3.2

 

Standard Files Layout with Checkboxes v3.2

Standard Files Layout with Checkboxes v3.2

 

Standard Files Layout without Checkboxes v3.2

Standard Files Layout without Checkboxes v3.2


 

Download Details

Defines the layout of the Download detailed view.

 

Example Details Layout v3.2

Example Details Layout v3.2

 

Example Details Layout with Tabs v3.2

Example Details Layout with Tabs v3.2

 

Standard Details Layout v3.2 - Full Info

Standard Details Layout v3.2 Full Info


 

Summary

Defines the layout of the Download summary page with the list of those files selected for downloading. This is the page where actual dowloading is initiated.

 

Standard Summary Layout v3.2

Standard Summary Layout v3.2


 

Search Form

Defines how the form and the results from the frontend search function are shown.

 

Search Form Horizontal Layout v3.2

Search Form Horizontal Layout v3.2

 

Search Form Vertical Layout v3.2 - Standard

Search Form Vertical Layout v3.2 Standard

Published in Joomla Extensions
Friday, 29 December 2017 14:34

Move a Windows User Profile

Back your system and files up before doing anything.

Currently if you have split profile locations you cannot upgrade Windows 10. This might be the case for other operating systems.

This article came about because I had already moved my documents, pictures and music to my D: drive by changing the location of those libraries. It is an easy thing to move your libraries but I kept on finding programs such as VirtualBox created their own library folder and this was back in my profile on the C: drive so I decided that I might aswell move my whole profile on to the D: drive. There were serveral methods I came across all with various pros and cons:

  • Xcopy / RoboCopy - These softwares allow the moving of files and folders whilst keeping them permissions and other things and are what I have based this tutorial on.
  • Profile Relocator - This does not move the profiles
  • SysPrep - Using the Microsoft SysPrep you can repackage your windows installation and during this you can tell it to move your profiles. This is not an easy process.
  • USMT - The Microsoft User State Migration Tool is very powerful and complicated to configure. This has the ability to transfer profiles.
  • Copy To and Move To profile options - This has been removed in later version of Windows. I think it is present in Windows 7 and hidden in Windows 8.
  • 3rd Party Transfer Software - This software tends to be designed to transfer a profile from one machine to another but potentially can be used to move a profile from one loaction to another on the same PC
  • Symbolic Links (symlinks) - Using a symbolic link allows you to keep using the C:\Users location virtually while the real files are located elsewhere on you r PC. This has potential to be a really good solution if done right.
  • Moving Libraries - This is where you only move all of your files (Documents, Pictures and Music etc..) but not the actual profiles. This is what I original did and although it is fully supported by windows it is not my preferred option.
  • Windows Easy Transfer - This use to be the way to move profiles but it has been removed in Windows 10.

Moving your profile from one location to another on the same PC is not an easy thing to do, not any more, because you need to make sure that file permission are correct and that all references point to the new location properly. My process outlined below goes over all aspects of moving your profile correctly. This will should work on XP, Vista, Windows 7, Windows 8 and Windows 10.

One other thing to consider is are you just moving 1 User Profile or do you want to move all of your profiles in which case you will find is is also possibly to change the default location for new profiles easily.

Prerquisite Software

  • RoboCopy - All modern versions of Windows have this built in to the command line (except XP). This seems to be a replacement for xcopy.
  • ChoEazyCopy - Simple and powerful GUI to Microsoft RoboCopy tool (optional).
  • Registry Editor (select one)
    • RegCool - Free
    • RegEditX Pro - Extend Windows Registry Editor (REGEDIT). There is a 30 day evaluation copy available.
  • Profile Relocator - Profile Relocator is a step-based application that allows the re-locating of the Windows Users profile directory (optional).

1. Create a User Folder (optional)

I would recommend you create a user folder to hold your profiles (eg D:\Users) even if it is just for your one profile at the minute. This folder will have the exact same permissions as on the C: drive so you know the permissions are not going to cause any problems. It is possibly to put this folder anywhere but I prefer to use D:\Users\ as in this example.

Also read about changing the default profile locations before doing anything in this section as you might not want to do this step.

Method 1 - Manual

  • Create the folder D:\Users\
  • Manually duplicate the permissions from C:\Users\ to D:\Users\ folder by having both folder permissions windows open and then going through them one by one to make them the same.

Method 2 - RoboCopy / ChoEazyCopy

This method takes a little setting up and understanding but this method will do all of the heavy lifting for you whilst you know there wont be any mistakes. You can use either the RoboCopy command directly or you can use ChoEazyCopy whichs configures and uses RoboCopy via a GUI. Both methods do exactly the same thing.

RoboCopy Command

RoboCopy.exe "C:\" "D:\" *.* /E /LEV:2 /DCOPY:T /SEC /COPYALL /MT:8 /XF *.* /XD "C:\$RECYCLE.BIN" "C:\$SysReset" "C:\$Windows.~WS" "C:\Boot" "C:\Documents and Settings" "C:\MSOCache" "C:\PerfLogs" "C:\Program Files" "C:\Program files (x86)" "C:\ProgramData" "C:\Recovery" "C:\System Volume Information" "C:\VTRoot" "C:\Windows" "C:\Windows.old" /L
  1. Copy the rule above to a text editor and make sure you add any folder exclusions that you need to it. The folders that are configured cover most folders but do not forget to check hidden and system folders aswell.
  2. Remove the /L switch if you want to run this live (optional)
  3. Open a command prompt as Administrator
  4. Paste the modfied code in a command prompt and run

ChoEazyCopy Settings File

<ChoAppSettings>
  <MaxStatusMsgSize>1000</MaxStatusMsgSize>
  <SourceDirectory>C:\\</SourceDirectory>
  <DestDirectory>D:\\</DestDirectory>
  <RoboCopyFilePath>RoboCopy.exe</RoboCopyFilePath>
  <Files>*.*</Files>
  <CopyNoEmptySubDirectories>false</CopyNoEmptySubDirectories>
  <CopySubDirectories>true</CopySubDirectories>
  <OnlyCopyNLevels>2</OnlyCopyNLevels>
  <CopyFilesRestartableMode>false</CopyFilesRestartableMode>
  <CopyFilesBackupMode>false</CopyFilesBackupMode>
  <FallbackCopyFilesMode>false</FallbackCopyFilesMode>
  <UnbufferredIOCopy>false</UnbufferredIOCopy>
  <EncrptFileEFSRawMode>false</EncrptFileEFSRawMode>
  <CopyFlags />
  <CopyDirTimestamp>true</CopyDirTimestamp>
  <CopyFilesWithSecurity>true</CopyFilesWithSecurity>
  <CopyFilesWithFileInfo>true</CopyFilesWithFileInfo>
  <CopyFilesWithNoFileInfo>false</CopyFilesWithNoFileInfo>
  <FixFileSecurityOnFiles>false</FixFileSecurityOnFiles>
  <FixFileTimeOnFiles>false</FixFileTimeOnFiles>
  <DelDestFileDirIfNotExistsInSource>false</DelDestFileDirIfNotExistsInSource>
  <MirrorDirTree>false</MirrorDirTree>
  <MoveFiles>false</MoveFiles>
  <MoveFilesNDirs>false</MoveFilesNDirs>
  <AddFileAttributes />
  <RemoveFileAttributes />
  <CreateDirTree>false</CreateDirTree>
  <CreateFATFileNames>false</CreateFATFileNames>
  <TurnOffLongPath>false</TurnOffLongPath>
  <RunAgainWithNoChangesSeen>0</RunAgainWithNoChangesSeen>
  <RunAgainWithChangesSeenInMin>0</RunAgainWithChangesSeenInMin>
  <RunHourStartTimeTicks>0</RunHourStartTimeTicks>
  <RunHourEndTimeTicks>0</RunHourEndTimeTicks>
  <CheckRunHourPerFileBasis>false</CheckRunHourPerFileBasis>
  <InterPacketGapInMS>0</InterPacketGapInMS>
  <CopySymbolicLinks>false</CopySymbolicLinks>
  <MultithreadCopy>8</MultithreadCopy>
  <CopyNODirInfo>false</CopyNODirInfo>
  <CopyWithoutWindowsCopyOffload>false</CopyWithoutWindowsCopyOffload>
  <CopyOnlyFilesWithArchiveAttributes>false</CopyOnlyFilesWithArchiveAttributes>
  <CopyOnlyFilesWithArchiveAttributesAndReset>false</CopyOnlyFilesWithArchiveAttributesAndReset>
  <ExcludeFilesWithGivenNames>*.*</ExcludeFilesWithGivenNames>
  <ExcludeDirsWithGivenNames>"C:\$RECYCLE.BIN";"C:\$SysReset";"C:\$Windows.~WS";"C:\Boot";"C:\Documents and Settings";"C:\MSOCache";"C:\PerfLogs";"C:\Program Files";"C:\Program files (x86)";"C:\ProgramData";"C:\Recovery";"C:\System Volume Information";"C:\VTRoot";"C:\Windows";"C:\Windows.old";</ExcludeDirsWithGivenNames>
  <ExcludeChangedFiles>false</ExcludeChangedFiles>
  <ExcludeNewerFiles>false</ExcludeNewerFiles>
  <ExcludeOlderFiles>false</ExcludeOlderFiles>
  <ExcludeExtraFilesAndDirs>false</ExcludeExtraFilesAndDirs>
  <ExcludeLonelyFilesAndDirs>false</ExcludeLonelyFilesAndDirs>
  <IncludeSameFiles>false</IncludeSameFiles>
  <IncludeTweakedFiles>false</IncludeTweakedFiles>
  <ExcludeFilesBiggerThanNBytes>0</ExcludeFilesBiggerThanNBytes>
  <ExcludeFilesSmallerThanNBytes>0</ExcludeFilesSmallerThanNBytes>
  <ExcludeFilesOlderThanNDays>0</ExcludeFilesOlderThanNDays>
  <ExcludeFilesNewerThanNDays>0</ExcludeFilesNewerThanNDays>
  <ExcludeFilesUnusedSinceNDays>0</ExcludeFilesUnusedSinceNDays>
  <ExcludeFilesUsedSinceNDays>0</ExcludeFilesUsedSinceNDays>
  <ExcludeJunctionPoints>false</ExcludeJunctionPoints>
  <AssumeFATFileTimes>false</AssumeFATFileTimes>
  <CompensateOneHourDSTTimeDiff>false</CompensateOneHourDSTTimeDiff>
  <ExcludeJunctionPointsForDirs>false</ExcludeJunctionPointsForDirs>
  <ExcludeJunctionPointsForFiles>false</ExcludeJunctionPointsForFiles>
  <NoOfRetries>0</NoOfRetries>
  <WaitTimeBetweenRetries>0</WaitTimeBetweenRetries>
  <SaveRetrySettingsToRegistry>false</SaveRetrySettingsToRegistry>
  <WaitForSharenames>false</WaitForSharenames>
  <ListOnly>true</ListOnly>
  <ReportExtraFiles>false</ReportExtraFiles>
  <VerboseOutput>false</VerboseOutput>
  <IncludeSourceFileTimestamp>false</IncludeSourceFileTimestamp>
  <IncludeFullPathName>false</IncludeFullPathName>
  <PrintByteSizes>false</PrintByteSizes>
  <NoFileSizeLog>false</NoFileSizeLog>
  <NoFileClassLog>false</NoFileClassLog>
  <NoFileNameLog>false</NoFileNameLog>
  <NoDirListLog>false</NoDirListLog>
  <NoProgress>false</NoProgress>
  <ShowEstTimeOfArrival>false</ShowEstTimeOfArrival>
  <NoJobHeader>false</NoJobHeader>
  <NoJobSummary>false</NoJobSummary>
</ChoAppSettings>

NB: C:\\ (source) and D:\\ (target) it is intentional to have 2 trailing slashes and is a workaround for a bug when using root folders in ChoEazyCopy. This bug has been reported but only applies to ChoEazyCopy but not when using RoboCopy directly.

  1. Install ChoEazyCopy
  2. Create a new file called copy-user-folder.ezy
  3. Copy and paste the code above into it and save
  4. Run ChoEazyCopy as an administrator
  5. Open copy-user-folder.ezy with ChoEazyCopy 
  6. Add any folder exclusions that you need to it. The ones that are present cover most folders but do not forget to check hidden and system folders aswell.
  7. Remove the /L (ListOnly) switch if you want to run this live (optional)
  8. Save any changes.
  9. Run the command by clicking the play arrow at the top.

Switches Explained

  • "C:\" (Source) - Files/Folders Source
  • "D:\" (Target) - Files/Folders Target
  • *.* (Files) - Which files to select. We have to put something in here so i use *.*
  • /DCOPY:T (CopyDirTimestamp) - Preserve folder timestamps
  • /COPYALL (CopyFilesWithFileInfo) - Copy files with their attributes
  • /SEC (CopyFilesWith Security) - Keeps file ACL permissions as they are in the source
  • /E (CopySubDirectories) - Copy all sub directories including empty ones
  • /MT:8 (MultithreadCopy) - Do multi-threaded copies with n threads. Makes copying quicker.
  • /LEV:2 (OnlyCopyNLevels) - Only copy folders to 1 level below (i.e. C:\Users)
  • /XD (ExcludeDirsWithGivenNames) - Exclude all folders except C:\Users. With RoboCopy you select all and then exclude what you dont want.
  • /XF *.* (ExcludeFilesWithGivenName) - *.* excludes all files because we only want the C:\Users folder.
  • /L (ListOnly) - This switch is a test switch which prevents copying, timestamp changes or deleting of any files and is present to prevent accedentally running this command with setting things up properly. Remove this when you want to perform this command for real.

2. Change Default location for User Profiles (optional)

This can easily be done with a piece of software called Profile Relocator. This is ideally used when you first setup a new PC before you create any profiles (except the one you were required to do to set windows up which you can delete later), however you can still use this on a live PC.

Profile relocator does not move exisiting profiles.

Instructions

  1. Login to an Administrator account
  2. Install Profile Relocator 
  3. Run the software and follow the onscreen instructions.

This is what it does according to the readme:

  1. If the user has explicitly enabled the option, PR will copy the Public and Default folders from the old location - which varies depending on the version of the operating system - to the new location. The original folders aren't modified in any way.
  2. PR updates the following registry keys to reflect the new location the user chose:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\Public
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\Default
  3. To allow the process to be reverted back to its previous state, PR will then create - or update if it already exists - the following registry key with the location of the profiles directory it found when it PR was started:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\!ProfileRelocator-Original

Notes

  • You can make these changes manually in the registry so do not need this software for that but it makes things easier.
  • You get the option as to whether you want to copy the Public and Default folders and use them in the new location.
  • I do not know how Profile Relocator copies the Public and Default folders and therefore how it maintains their permissions. I am guessing that it does.
  • How To | How To Move A User Profile To Another Drive or Partition In Windows - YouTube - This is just showing the same thing that Profile Relocator does but also shows that when you change the Users folder location in the registry to D:\Users then Windows will automatically create the D:\Users folder when you create a new account along with the D:\Public profile.

3. Copy User Profile to new location

This process will copy the selected profile to the new location with all of the ACL permission intact. In this example I am moving a single profile from C:\Users to D:\Users. This process will copy all profiles that you do not specify in one action so you do not have to repeat this for every profile if doing more than one.

You can use either the RoboCopy command directly or you can use ChoEazyCopy whichs configures and uses RoboCopy via a GUI. Both methods do exactly the same thing.

Notes

  • You cannot run these commands from within a profile that you are going to move. You must logout into another account that has administrator rights and that you are not going to move. You can create a temp administrator account for this.
  • Do not login to these profiles untill these instructions tell you that it is ok.
  • Disable your antivirus if you are moving folders with files in that might trigger it.
  • After a migration always check your error log
  • If find errors, you might find that running these in safemode gives a better result.
  • You cannot just use copy and paste because the ACL permissions and other things are not preserved.

RoboCopy Command

RoboCopy.exe "C:\Users" "D:\Users" *.* /E /ZB /DCOPY:T /SEC /COPYALL /SL /MT:8 /XD "C:\Users\All Users" "C:\Users\Default" "C:\Users\Default User" "C:\Users\Default.migrated" "C:\Users\DefaultAppPool" "C:\Users\LogMeInRemoteUser" "C:\Users\Public" "C:\Users\UpdatusUser" /R:1 /W:1 /UNILOG:"C:\profile-copy.log" /L
  1. Copy the rule above to a text editor and make sure you add any User Profile folders to the folder exclusion list that you do not want to copy. The list that is in the example code above covers most default/system folders present but do not forget to check for other hidden and system folders aswell.
  2. Remove the /L switch if you want to run this live (optional)
  3. Open a command prompt as Administrator
  4. Paste the modfied code in a command prompt and run

ChoEazyCopy Settings File

<ChoAppSettings>
  <MaxStatusMsgSize>1000</MaxStatusMsgSize>
  <SourceDirectory>C:\Users</SourceDirectory>
  <DestDirectory>D:\Users</DestDirectory>
  <RoboCopyFilePath>RoboCopy.exe</RoboCopyFilePath>
  <Files>*.*</Files>
  <CopyNoEmptySubDirectories>false</CopyNoEmptySubDirectories>
  <CopySubDirectories>true</CopySubDirectories>
  <OnlyCopyNLevels>0</OnlyCopyNLevels>
  <CopyFilesRestartableMode>false</CopyFilesRestartableMode>
  <CopyFilesBackupMode>false</CopyFilesBackupMode>
  <FallbackCopyFilesMode>true</FallbackCopyFilesMode>
  <UnbufferredIOCopy>false</UnbufferredIOCopy>
  <EncrptFileEFSRawMode>false</EncrptFileEFSRawMode>
  <CopyFlags />
  <CopyDirTimestamp>true</CopyDirTimestamp>
  <CopyFilesWithSecurity>true</CopyFilesWithSecurity>
  <CopyFilesWithFileInfo>true</CopyFilesWithFileInfo>
  <CopyFilesWithNoFileInfo>false</CopyFilesWithNoFileInfo>
  <FixFileSecurityOnFiles>false</FixFileSecurityOnFiles>
  <FixFileTimeOnFiles>false</FixFileTimeOnFiles>
  <DelDestFileDirIfNotExistsInSource>false</DelDestFileDirIfNotExistsInSource>
  <MirrorDirTree>false</MirrorDirTree>
  <MoveFiles>false</MoveFiles>
  <MoveFilesNDirs>false</MoveFilesNDirs>
  <AddFileAttributes />
  <RemoveFileAttributes />
  <CreateDirTree>false</CreateDirTree>
  <CreateFATFileNames>false</CreateFATFileNames>
  <TurnOffLongPath>false</TurnOffLongPath>
  <RunAgainWithNoChangesSeen>0</RunAgainWithNoChangesSeen>
  <RunAgainWithChangesSeenInMin>0</RunAgainWithChangesSeenInMin>
  <RunHourStartTimeTicks>0</RunHourStartTimeTicks>
  <RunHourEndTimeTicks>0</RunHourEndTimeTicks>
  <CheckRunHourPerFileBasis>false</CheckRunHourPerFileBasis>
  <InterPacketGapInMS>0</InterPacketGapInMS>
  <CopySymbolicLinks>true</CopySymbolicLinks>
  <MultithreadCopy>8</MultithreadCopy>
  <CopyNODirInfo>false</CopyNODirInfo>
  <CopyWithoutWindowsCopyOffload>false</CopyWithoutWindowsCopyOffload>
  <CopyOnlyFilesWithArchiveAttributes>false</CopyOnlyFilesWithArchiveAttributes>
  <CopyOnlyFilesWithArchiveAttributesAndReset>false</CopyOnlyFilesWithArchiveAttributesAndReset>
  <ExcludeFilesWithGivenNames />
  <ExcludeDirsWithGivenNames>"C:\Users\All Users";"C:\Users\Default";"C:\Users\Default User";"C:\Users\Default.migrated";"C:\Users\DefaultAppPool";"C:\Users\LogMeInRemoteUser";"C:\Users\Public";"C:\Users\UpdatusUser";</ExcludeDirsWithGivenNames>
  <ExcludeChangedFiles>false</ExcludeChangedFiles>
  <ExcludeNewerFiles>false</ExcludeNewerFiles>
  <ExcludeOlderFiles>false</ExcludeOlderFiles>
  <ExcludeExtraFilesAndDirs>false</ExcludeExtraFilesAndDirs>
  <ExcludeLonelyFilesAndDirs>false</ExcludeLonelyFilesAndDirs>
  <IncludeSameFiles>false</IncludeSameFiles>
  <IncludeTweakedFiles>false</IncludeTweakedFiles>
  <ExcludeFilesBiggerThanNBytes>0</ExcludeFilesBiggerThanNBytes>
  <ExcludeFilesSmallerThanNBytes>0</ExcludeFilesSmallerThanNBytes>
  <ExcludeFilesOlderThanNDays>0</ExcludeFilesOlderThanNDays>
  <ExcludeFilesNewerThanNDays>0</ExcludeFilesNewerThanNDays>
  <ExcludeFilesUnusedSinceNDays>0</ExcludeFilesUnusedSinceNDays>
  <ExcludeFilesUsedSinceNDays>0</ExcludeFilesUsedSinceNDays>
  <ExcludeJunctionPoints>false</ExcludeJunctionPoints>
  <AssumeFATFileTimes>false</AssumeFATFileTimes>
  <CompensateOneHourDSTTimeDiff>false</CompensateOneHourDSTTimeDiff>
  <ExcludeJunctionPointsForDirs>false</ExcludeJunctionPointsForDirs>
  <ExcludeJunctionPointsForFiles>false</ExcludeJunctionPointsForFiles>
  <NoOfRetries>1</NoOfRetries>
  <WaitTimeBetweenRetries>1</WaitTimeBetweenRetries>
  <SaveRetrySettingsToRegistry>false</SaveRetrySettingsToRegistry>
  <WaitForSharenames>false</WaitForSharenames>
  <ListOnly>true</ListOnly>
  <ReportExtraFiles>false</ReportExtraFiles>
  <VerboseOutput>false</VerboseOutput>
  <IncludeSourceFileTimestamp>false</IncludeSourceFileTimestamp>
  <IncludeFullPathName>false</IncludeFullPathName>
  <PrintByteSizes>false</PrintByteSizes>
  <NoFileSizeLog>false</NoFileSizeLog>
  <NoFileClassLog>false</NoFileClassLog>
  <NoFileNameLog>false</NoFileNameLog>
  <NoDirListLog>false</NoDirListLog>
  <NoProgress>false</NoProgress>
  <ShowEstTimeOfArrival>false</ShowEstTimeOfArrival>
  <UnicodeOutputLogFilePath>C:\profile-copy.log</UnicodeOutputLogFilePath>
  <NoJobHeader>false</NoJobHeader>
  <NoJobSummary>false</NoJobSummary>
</ChoAppSettings>
  1. Install ChoEazyCopy
  2. Create a new file called copy-user-profile.ezy
  3. Copy and paste the code above into it and save
  4. Run ChoEazyCopy as an administrator
  5. Open copy-user-profile.ezy with ChoEazyCopy 
  6. Add any User Profile folders to the folder exclusion list that you do not want to copy. The list that is in the example code above covers most default/system folders present but do not forget to check for other hidden and system folders aswell.
  7. Remove the /L (ListOnly) switch if you want to run this live (optional)
  8. Save any changes.
  9. Run the command by clicking the play arrow at the top.

Switches Explained

  • "C:\Users" (Source) - Files/Folders Source
  • "D:\Users" (Target) - Files/Folders Target
  • *.* (Files) - Which files to select. Select all files
  • /DCOPY:T (CopyDirTimestamp) - Preserve folder timestamps
  • /COPYALL (CopyFilesWithFileInfo) - Copy files with their attributes
  • /SEC (CopyFilesWith Security) - Keeps file ACL permissions as they are in the source
  • /E (CopySubDirectories) - Copy all sub directories including empty ones
  • /SL (CopySymbolicLinks) - Copy symbolicLinks versus the target. Not sure this does anything didnt harm my profile when I moved it.
  • /ZB (FallbackCopyFilesMode) - I think this is volume shadow copy and is used when a file is locked and a 'Access is Denied' error is returned.
  • /MT:8 (MultithreadCopy) - Do multi-threaded copies with n threads. Makes copying quicker.
  • /LEV:2 (OnlyCopyNLevels) - Only copy folders to 1 level below (i.e. C:\Users)
  • /XD (ExcludeDirsWithGivenNames) - Exclude all folders in C:\Users except the profile(s) that you want to move. With RoboCopy you select all and then exclude what you dont want.
  • UNILOG:"C:\profile-copy.log" (UnicodeOutputLogFilePath) - If you dont use this Eazy Copy will crash.
  • /R:1 (NoOfRetries) - As default the retry limit is 1 Million which is daft so this switch will limit it to 1. In Eazy Copy if you set this to zero the switch does not get added.
  • /W:1 (WaitTimeBtweenRetries) - Default time is 30 seconds which is far to long so this sets it to 1 second. In Eazy Copy if you set this to zero the switch does not get added.
  • /L (ListOnly) - This switch is a test switch which prevents copying, timestamp changes or deleting of any files and is present to prevent accedentally running this command with setting things up properly. Remove this when you want to perform this command for real.

4. Change the Registry to reflect the Profile's new location

Once the profile has been moved the registry needs some changes making to it so things work properly. This needs to be done for each profile moved.

Step 1 - Change Profile Image Path

  1. You should be logged in with the temporary Administrator account
  2. Create a System Restore Point (optional)
  3. Open Regedit as an Administrator
  4. Change the Profile Image Path from C:\Users\{username} to D:\Users\{username} in the registry key below. Each profile with have a slightly different parent folder in the registry for obvious reasons. It will not look exactly like it does below.
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-xx-xxxxxxxxxx-xxxxxxxxxx-xxxx\ProfileImagePath
  5. Change the profile state from 0 to 1 in the registry key below. The base type should stay as Hexidecimal. I do not know why you need to do this but this YouTube video tells you to.
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-xx-xxxxxxxxxx-xxxxxxxxxx-xxxx\State 
  6. Rename the orginal profile folders i.e. C:\Users\{username} to C:\Users\{username}.bak. This prevents accidental use and that only the new profile will be used. You can delete it at a later date as it should no longer be needed or used.

Once you have done all of the above for each of the moved profiles, reboot the computer.

Step 2 - Change the static references in the registry

We need to change all references of C:\Users\{username} to D:\Users\{username}  - this is also a good reason for keeping the same folder format but on the D: drive as it is slightly easier to change the locations in the registry.

For this we will use a Registry editor that will allow us to do a text search and replace within the registry. Install this via your temporary administrator account.

This procedure needs to be done for each profile.

  1. Log into the moved profile
  2. Create a System Restore Point (optional)
  3. Pick Your REG software
    • RegCool
      1. Open RegCool as an Administrator
      2. Search the registry for C:\Users\{username} in Values, Data and all HKEY hives and I did NOT match case.
      3. In the results window at the bottom select all of the results
      4. right click on the highlighted results and click replace
      5. You should now replace C:\Users\{username} with D:\Users\{username}
        • Make sure you double check the strings are correct as this cannot be undone
      6. Click start/replace
        • When I did this I found some registry keys would cause the software to crash. In this case just start the software again, do the same search but instead of selecting the whole block of results, select half and keep going until the are all done.
        • Some keys will not change or if they do they just change back again. they must be protected somehow. But it does not harm to leave them.
        • These are the keys I had issue with:
          • [HKEY_LOCAL_MACHINE\SOFTWARE\4Developers\RCrawler\History]
          • [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths]
          • [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache]
    •  RegEditX Pro
      1. Open RegEditX Pro as an Administrator
      2. In the menu at the top select (RegEditX-->RegEditX Crawler)
      3. Search the registry for C:\Users\{username} in Values, Data and all HKEY hives and I did NOT match case.
      4. Highlight all of the results
      5. On the right click Replace
      6. You should now replace C:\Users\{username} with D:\Users\{username}
        • Make sure you double check the strings are correct as this cannot be undone
        • Do NOT confirm every replacement
      7. Click Start
        • The program will appear to crash or lockup. It is still working. I think this is bug.
  4. Logout

NB: Some entries in the registry have the format C:\Users\USERNAM~1\ (old file format) you might want to change these but I suspect that this is fromm old buggy software I no longer have 

Once you have done the process above for each moved account then you should reboot the computer.

5. Housekeeping

Now you have moved your profile you might need to do some of the follwoing to keep you computer running correctly

  • Update AV exclusions in both your choosen AV and Windows Defender

6. Thats it Folks

All the changes have been made and hopefully you now have moved your profiles.


Known Issues

After I have finished moving my profile I noticed a couple of issues which might not always occur. These are easy enough to fix.

  • Library Folders dont work - This could just be my PC but to fix this you should delete all of the libraies (files will be untouchjed) and then click recreate default
  • Quick Access links might be come faulty - Delete/Unpin them and then re-add as required.
  • Outlook PST references become broken causing error 0x8004010F. See my solution.
  • ClassicShell menu layout is lost - If you have customised your start menu using classicshell and have spent ages arranging your menu, the arrangement will probably be lost. There might be a way to preserve this before moving profiles.
  • Moving profiles to a non standard location can cause upgrade issues? - This might not be the case anymore in Windows 10 and might only have been an issue on older versions of windows because the profiles were moved wrong. Anything using Windows 8 is flaky and I think this is where most of the issues were caused by this.

There could be some other minor issues that occur because of the change of folder and file locations but should just be a case of changing settings in the various softwares.

Links

General

Registry Software

  • RegEditX Pro - Extend Windows Registry Editor (REGEDIT). There is a 30 day evaluation copy available.
  • Registry Replacer | CNET Download.com - Registry Replacer is a search-and-replace utility for the Windows Registry. It lets you search the contents of keys and key names for strings and replace them.

Microsoft User State Migration Tool (USMT) Software

  • USMT GUI - Gui for MS User State Migration - This looks like a very comprehensive GUI for USMT. i.e. "Its a simple three-step procedure to backup a user profile and to restore the data and settings to another user profile /other AD"
  • Migrate-WindowsUserProfile - Migrate Windows user profile to a new machine using Microsoft USMT with a PowerShell GUI.

Microsoft User State Migration Tool (USMT)

3rd Party Transfer Software

RoboCopy GUI Software

RoboCopy

Xcopy

Symbolic Links

SysPrep

  • Move Users Folder Location in Windows 10 Installation & Upgrade Tutorials - A very indepth tutorial with videos on how to use Sysprep to move User profiles. The method described in this tutorial allows relocating Windows 10 main profile folder Users including all present and future user profiles and folders while installing Windows, before any user accounts are created, as well as later on an already installed system.

Managing Libraries

Quick Links

NTFS Cut and Copy Permissions behaviour

NTFS Extended Attributes

Published in Windows General
Friday, 15 December 2017 14:03

My EasyBlog 5 Notes

These are for those fiddly settings you can never find.

Settings

cron jobs

You need to setup a cron job for both EasyBlog and Komento because

  • Emails are sent out via 'Send E-mails During Page Load' mechanism. This is slow and can cause issues with high traffic sites.
  • This will move the email handling away from the normal running of the website and will not suffer timeouts or other issues related to emails.
  • EasyBlog has a feature where it can autopost emails as articles from a defined mailbox. This feature will not work without a cron setup.
  • The crons can handle a lot more emails than the page load method.
  • Stackideas - In short, sending e-mails is a long process and it requires your server to communicate with the recipient's e-mail server. Sending one e-mail is perfectly fine but imagine sending it to 500 recipients because you have 500 subscribers. Two main issues for not utilizing cronjobs:
    1. The only way to dispatch e-mails is when someone accesses the component area (either EasyBlog or Komento). Imagine having 5000 pending e-mails and you do not have the sufficient traffic to these pages. Those e-mails would stuck in the queue.
    2. Even if you have sufficient traffic, it would cause delays when anyone accesses these pages because your mail server would need to communicate to the recipient's mail server.

Send E-mails During Page Load Location

Use this information to turn the feature off, if not already. This also where you can setup other notification options.

  • EasyBlog (Settings-->Notifications-->General-->General Settings-->Send E-mails During Page Load) = off
  • Komento (Settings-->Notifications-->General-->General-->Send E-mails On Page Load) = off

Official Documentation

Notification of the requirement to use cron

Currently the only notification that you need a cron job is if you visit the following pages. they also have a link to the official documentation for setting up a cron job.

  • EasyBlog (Mail Activities-->Mail Activities)
  • Komento (E-mails-->Email Activities)

Shared Hosts

remember that on shared hosts you will have limits on your email send and receive volume and the frequency that your cron can run.

These are a typical example of limitations on a well run server.

  • cron
    • Any client who schedules cron jobs in such a manner that jobs take more then half the time to complete before the next scheduled iteration, and more frequently then 10 minutes is abusing the cron system.
    • Any automated processes that excessively consume resources and impact server stability may be disabled at our discretion by our technicians.
  • Maximum email rate
    • The maximum allowed email send rate is 350 messages per hour per domain (cPanel is irrelevant). Please keep in mind that each recipient counts as a separate message as it is being sent to a separate address. This should be the only limitation in place as far as outgoing messages.

Setup your cron to run every 10 minutes with a 50 emails max send. You could push it to 100 emails max send.

Toolbar

Disable Blog Header Title and Header  Description

The settings to disable these are at

  • (Settings-->Layout-->Toolbar-->General)
    • Enable Headers Above Toolbar – set to no - This disables the global title at the top of easyblog (optional)
    • Enable Headers Description Above Toolbar – set to no – This disables the global description at the top of easy blog (optional)
  • (Settings-->Layout-->Toolbar-->Toolbar)
    • Display Tags Link = off
    • Display Bloggers Link = off
    • Display Teamblog Link = off
    • Enable Archives Link = off

Enable Automatic Approval of Posts

  • (ACL-->Author 'Group'-->Compose-->Compose-->Allowed To Publish Post) =  Yes
  • Also you must add content-editor into the Author group (publisher will not inherit author settings for EasyBlog)

In EasyBlog user author settings

NB: EasyBlog retrieves the info from Joomla, not a separate database

  • (Authors-->{username}-->Details)
  • (Authors-->{username}-->Blog Settings)
    • Blog Permalink – set to this something sensible, not the account username

Change the a blog post to userX

Assuming EasyBlog Composer

  • (Posts-->Posts)
  • Edit the requires Blog Post
  • Edit the Author on the top right
  • Select the userX account
  • Update the post

Storage Paths

(Settings-->Media-->General-->Storage Paths)

I need to test my folder selection to see if it all works as expected.

Default:

  • Article Images                images/easyblog_articles/
  • User media                     images/easyblog_images/
  • Shared media                 images/easyblog_shared/
  • User avatars                    images/easyblog_avatar/
  • Category avatars            images/easyblog_cavatar/
  • Team avatars                  images/easyblog_tavatar/

Mine:

  • Article Images                images/blog/article-images/
  • User media                     images/blog/user-media/
  • Shared media                 images/blog/shared-media/
  • User avatars                    images/blog/user-avatars/
  • Category avatars            images/blog/category-avatars/
  • Team avatars                   images/blog/team-avatars/

This is much neater as all of the blog media is within one folder. I have many application installed in my Joomla website.

Themes

If you are using EasyBlog and Komento it is important to match the themes.

I like the following EasyBlog themes:

  • bubbles
  • x origami
  • plain
  • timeless
  • wireframe

Kometo also has these themes:

  • bubbles
  • Wireframe

 

Questions and Answers

If easy blog has its own built in commenting system why do i need Komento ?
EasyBlog had its own commenting system, integrating with komento gives you more features given in the default easyblog comment.

  1. Instantly activate user interaction and get feedback from visitors to your site.
  2. Professionally control all incoming comments or spam in one easy centralized system.
  3. Migrate comments from EasyBlog and other comment extensions and have them display in Komento.
  4. Komento handles comments in K2, EasySocial, JomSocial, FlexiContent, ZOO, EasyBlog 3.5, VirtueMart, redSHOP, and more.
  5. Control certain activity that a particular user or user group can do in the comments area.
    You could read more about it here --> Komento, by stackideas - Joomla Extension Directory

Do i need to use the inbuilt media manager?
You do not need to use media manager to upload your pictures, using your editor would work.

What are the benefits of using the inbuilt media manager?
The build in manager makes it easy for you to upload picture, it also automatically create thumbnails and full view and will come in handy when using lightbox. It also has additional features like pictures that you could share with others using the shared folder.

Can you recommend which comment system to use? i do not know if disqus is better because it is cloud based ?
You might need to check your requirements and what you will need for your blogs.

Why does Easyblog not use the Joomla template?
EasyBlog had themes which you could choose to better suite your site. We also have partners with template developer that supports easyblog
Link --> http://stackideas.com/partners

Will ever use the joomla template?
As for the Joomla template, the default theme that is included in EasyBlog was created to inherit most of the styling of your Joomla template but some of the elements are designed internally. For instance, the toolbar in EasyBlog, we have to design this on our own because there's no other Joomla template that is designing the toolbar :)

You can read this documentation link and see is it helpful for you? -> Template Overriding - Customizations - EasyBlog Documentation

Does Easyblog allows the use of joomla plugins
EasyBlog does trigger content plugins but whether or not it works with EasyBlog is another matter because some of these content plugins are explicitly configured to work with Joomla articles. We can't really tell you which plugin works and which plugin doesn't but if I recall correctly, allvideos plugin does work but EasyBlog has a built in video embed tool so not too sure if Allvideos is really necessary?

Where does the number come from of the folder my uploaded images are put it?
The number comes from the User ID

When i upload an image using your image manager, the manager uploads the image and puts it in a folder of that user, ie /easyblog_images/623/ is there anyway of turning this off because running a blog i do not want images all over the place. i want them like /images/blog/2014/09 etc.. no user number
There is also a shared folder in EasyBlog where they are stored in a shared folder . The shared folder does not categorize images into user id folders. However do take note that storing them in a shared folder also means that all authors on your site will be able to access them.

When inserting an image using your manager it uses an absolute image link ie http://www.mywebsite.com/images/easyblog_images/mypicture.jpg this is really bad, lets say i was developing on my test server and then moved it, none of the image links would then work. please can you tell me if you can turn this off as i do not understand why anyone would have this option on anyway.
The URL that is inserted into the blog post is actually dependent on your editor's configuration. If the editor that you are currently using is configured to use relative URLs, the url of the image will be relative because these WYSIWYG editors would format the urls accordingly.

This is only seems to work with JCE Editor. Does not work with None/TinyMCE/JCK


 

Other Notes

Published in Blogging
Wednesday, 13 December 2017 12:38

Proprietary Software Licenses and EULA

Proprietary software is computer software for which the software's publisher or another person retains intellectual property rights—usually copyright of the source code,[1] but sometimes patent rights.[2]. A Proprietry

A license for such software maintains the vendors rights tot hat software and affords the end user the use of the software under certain conditions and are usually aggreed to in a End User License Agreement (EULA).

For further information see these articles from Wikipedia

Examples of Proprietary Licenses

I have come across these examples of licenses.

  • RocketTheme Licenses - The RocketTheme Proprietary Use License (v1.3) and others. You should also look at their copyright notice for the site (link in the footer).
  • License & Terms of Service - JoomlaWorks
    • JoomlaWorks includes the following copyright notice in their code which points to this page.
      /**
       * @version     3.0.x
       * @package     Simple Image Gallery Pro
       * @author      JoomlaWorks - http://www.joomlaworks.net
       * @copyright   Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
       * @license     http://www.joomlaworks.net/license
       */
  • License | Artetics - This has really simple and easy to understand Proprietry Use License. There is also a DMCA statement.

Examples of Eula

  • RSComments - Terms and Conditions
    By checking this, you agree with the following:
    
    1. To accept full responsibility for the comment that you submit.
    2. To use this function only for lawful purposes.
    3. Not to post defamatory, abusive, offensive, racist, sexist, threatening, vulgar, obscene, hateful or otherwise inappropriate comments, or to post comments which will constitute a criminal offense or give rise to civil liability.
    4. Not to post or make available any material which is protected by copyright, trade mark or other proprietary right without the express permission of the owner of the copyright, trade mark or any other proprietary right.
    5. To evaluate for yourself the accuracy of any opinion, advice or other content.

 

Published in General

Getting Xdebug, Xampp and Netbeans to work together in Windows can be a tricky thing and I want to address that here. These instructions will get debugging working all on the same PC and IP.

A symptom of a PC that is not setup correctly is this Netbeans Socket Exception error. You get this error when Netbeans cannot communicate with Xdebug and is usually because you are running them both on the same computer and therefore IP so the traffic routing is getting mixed up. It could also because something else is running on the debug port you have selected.

Netbeans Socket Exception error

These Settings Work

These settings are what I am using now and work well.

Windows

  • You need to set a static IP on your ethernet adapter (or wifi)

php.ini

    • Use your static IP to set xdebug.remote_host. Setting a static IP seems to fix most connecion issues. xdebug does not like 127.0.0.1 it works sometimes but can be problematic.
    • Swapping xdebug.remote_port to 9001 helped when xdebug just stopped working. The default is 9000.
    • Disable output_buffering in your php.ini by altering/uncommenting the following line
      output_buffering = Off
    • Add the following code to the end of your php.ini file.
      [XDebug]
      
      zend_extension="D:\websites\php\ext\php_xdebug.dll"
      ;zend_extension="D:\websites\php\ext\php_xdebug-2.5.4-5.6-vc11.dll"
      xdebug.idekey = netbeans-xdebug
      xdebug.profiler_append = 0
      xdebug.profiler_enable = 0
      xdebug.profiler_enable_trigger = 0
      xdebug.profiler_output_dir = "d:\websites\tmp\xdebug"
      xdebug.profiler_output_name = "cachegrind.out.%t-%s"
      xdebug.remote_enable = 1
      xdebug.remote_autostart = 0
      xdebug.remote_connect_back = 0
      xdebug.remote_host = "192.168.1.160"
      xdebug.remote_port = 9001
      xdebug.remote_handler = "dbgp"
      xdebug.remote_mode = req
      xdebug.remote_log = "d:\websites\tmp\xdebug\xdebug_remote.log"
      xdebug.show_local_vars = 9
      xdebug.trace_output_dir = "d:\websites\tmp"
      
      ;xdebug.show_exception_trace = 1

      Minimum working settings

      These are the minimum settings I have found to work but are here only for reference.

      [XDebug]
      
      ;zend_extension="D:\websites\php\ext\php_xdebug.dll"
      zend_extension="D:\websites\php\ext\php_xdebug-2.5.4-5.6-vc11.dll"
      xdebug.remote_enable=1
      xdebug.remote_handler=dbgp
      xdebug.remote_mode=req
      xdebug.remote_host=192.168.1.160
      xdebug.remote_port=9001
      xdebug.idekey=netbeans-xdebug

Netbeans

(Tools --> Options --> PHP --> Debugging)

  • Debugger Port: 9001
  • Session ID: netbeans-xdebug
  • Maximum Data Length: 2048 - I think this is the default
  • Stop at First Line: off
  • Watches and Balloon Evaluation: All off
  • Show Requested URLs: off
  • Show Debugger Console: On

Browser

You need to send a trigger to Xdebug via your browser to trigger the debugger. You can send the trgger via GET/POST but you need a plugin for this.

Test Debugger is working

Now you have configured your system as above you need to test it before you can rely on it.

  • Set a breakpoint in Netbeans on the index.php (or a PHP file that is parsed) in your software project, preferably one before the content is displayed. (or you can enable the ‘Stop at First Line’ option in the Netbeans config
  • Start debugging in Netbeans
  • Open your project in a chrome browser with the xdebug helper plugin enabled
  • If the browser and Netbeans stop at the breakpoint, everything is working

Diagnostics

Things that Might help

If xdebug does not work straight away then trying these things might help.

  • could disabling ipv6 in the network adapter help? because xampp has issues with ipv6
  • xdebug might fail if you have multiple version of xampp running
  • Localhost is mapping to ::1 and not 127.0.0.1
  • Not all lines can act as breakpoints, these are displayed as cracked breakpoint markers in Netbeans. These breakpoints will not work because Netbeans does not like them. To fix this yoou should choose another breakpoint.
  • Run the Xdebug on another server which has another IP
  • Get the latest dll from xdebug site (i.e. php_xdebug-2.5.4-5.6-vc11.dll)
  • Comment out any zend extensions
  • Some people use port 9001 when they have issues with 9000.

Test the port is not already in use - dbgtest.php

This code is taken from 21.4.2 How to Set Up XDebug | Oracle

<?php
$address = '127.0.0.1';
$port = '9000';
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
socket_bind($sock, $address, $port) or die();
socket_listen($sock);
$client = socket_accept($sock);
echo "Connection established: $client";
socket_close($client);
socket_close($sock);
?>

However I found this slightly better version from dbgtest.php · GitHub

<?php
// adapted from https://blogs.oracle.com/netbeansphp/entry/howto_check_xdebug_installation
$address = $argv[1] ?: '127.0.0.1';
$port = '9000';
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
socket_bind($sock, $address, $port) or die();
echo "Listening to $address:$port\n";
socket_listen($sock);
$client = socket_accept($sock);
echo "Connection established: $client\n";
socket_close($client);
socket_close($sock);
  1. Create a php file with the code above called dbgtest.php and put it in the htdocs folder of your xampp server
  2. Change the port to 9001 if that is the port number you are using/diagnosing
  3. Enable sockets - extension=php_sockets.dll
    • only be need for the test script
    • You enable this by uncommenting the appropriate line in the php.ini
    • if you do not enable this you will get this error
      Call to undefined function socket_create()
  4. Close Netbeans if that is running.
  5. Restart Xampp
  6. Run the script

If there is something running on this socket you will get an error as shown below. This shows that some other process is using the port 9000.

Warning: socket_bind(): unable to bind address [10048]: Only one usage of each socket address (protocol/network address/port) is normally permitted. in D:\websites\htdocs\dbgtest.php on line 5

Workarounds

These are a few workarounds I tried and might work for you. These are not designed to be a permanent fix.

Method 1

  • Make sure netbeans and xampp are not running
  • Put the basic xdebug settings in php.ini
  • Enable extension=php_sockets.dll in php.ini
  • Run xampp
  • Put a copy of the oracle script in your Webroot and run it. This causes xampp to open socket on 9000
  • Now open and run NetBeans debugging

* I am not sure if you need to do the IP fix aswell for this to work. It is all caused by routing issues on the loopback system of the PC. Or sockets might be needed.

Method 2

  • Turn of netbeans debugging (leave netbeans open)
  • Run the dbgtest.php to allow xampp/xdebug to grab the port
  • Now start netbeans debugging

Method 3 - (if working and then stops for no reason)

  • Close Netbeans, Xampp and browsers
  • Restart them all

Links

Published in xampp

This code is incredibly useful for going through an array and applying changes to the individual values without having to create a specific loop to perfom this action. In this example all apostrophes are escaped.

// Walk through the array and escape all apostophes (anonymous function)
array_walk($merged_config, function(&$value, &$key) {
    $value = str_replace("'", "\\'", $value);
});

this also works, without the &$key

// Walk through the array and escape all apostophes (anonymous function)
array_walk($merged_config, function(&$value) {
    $value = str_replace("'", "\\'", $value);
});

keep the '&' it is important. This creates a reference to the object in memory.

Published in PHP

When testing the translation system on QWcrm I needed to try different locales (languages) to see if the software actually worked how it should. The following are ways to change the HTTP_ACCEPT_LANGUAGE header that the browser sends to the webhost with its request.

FireFox

This will also fix the issue where Firefox was sending en-US instead of en-GB

Option 1 - Change the browser system settings

  • Goto (Tools menu --> Settings --> Content --> Languages)
  • Add English/United Kingdom [en-gb]
  • (optional) remove the other version of english. I do not know if this would cause issues so i have left them

Option 2 - re install

You can also just install Firefox with the correct locale.

Option 3 - Plugins

Using a plugin will allow you to easily change the settings on a temporary basis.

Chrome

Option 1 - Change the browser system settings

  • In the address bar type chrome://settings/ or click the 3 balls button-->settings
  • Open advanced section at the bottom
  • Goto languages
  • Install 'English (United Kingdom)' language
  • with 'English (United Kingdom)':
    • move to the top so it is first in the order of preference
    • set 'Display Google Chrome in this language'
    • set it as the language for spell checking
  • (optional) remove the other version of english. I do not know if this would cause issues so i have left them

Links

Published in Firefox

This is useful when you want to control the errors outputted tot he screen or is a class or some other code is not behaving as expected, such as the ADOdb error class.

The following code will preserve the current error reporting level so once your code has finished running the system's error reporting will be returned to its normal state.

// Get current PHP error reporting level
$reporting_level = error_reporting();

// Disable PHP error reporting (works globally)
error_reporting(0);

// Add you code here

// Re-Enable PHP error reporting
error_reporting($reporting_level);

 

Published in PHP
Page 11 of 96