Category Archives: Programming

How to Customize the Footer in WordPress Twenty Seventeen Theme

In the WordPress Admininstrator’s dashboard, select >Appearance, select >Editor, and select >footer.php from the list on the right margin.

Edit the footer.php file.

Locate this part of the footer.php file:

get_template_part( ‘template-parts/footer/site’, ‘info’ );
?>
</div><!– .wrap –>

Change that part as follows:

Insert “//” at the beginning of the “get_template_part” line in order to comment-out this line. Next, insert the 4 lines shown below between the “?>” line and the </div><!– .wrap –> line.

//get_template_part( ‘template-parts/footer/site’, ‘info’ );
?>
<div class=”site-info”>
<a href=”https://wordpress.org/”>Copyright 2017, Your site name</a>
</div>
</div><!– .wrap –>

Customize by fixing the URL — http://www.yoursitedomain.com/  and Your site name.

Save your changes / update / the footer.php file.

Note:  Your modifications will likely be overwritten in the next WordPress version update.  That’s okay.  And, it might be easier to again edit the footer.php after the version update rather than trying to figure out how to use a child theme that would preserve your modifications from being overwritten due to a version update.

DAA Opt-Out of Targeted Advertising Interest-based Advertising

Digital Advertising Alliance Consumer Choice Page

Go here using the particular browser that you wish to set your opt-out cookies:

http://www.aboutads.info/choices/

Microsoft Opt-Out regarding browser and apps:

http://choice.microsoft.com/en-us/opt-out

 

Toggle Preferences on/off for Microsoft and Internet Explorer:

  • Personalized ads in this browser.
  • Personalized ads when you use your Microsoft Account.

 

Install KODI Media Center in Linux Ubuntu and Mint

Open a Terminal (CTRL+ALT+T)

sudo apt-get install python-software-properties pkg-config

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:team-xbmc/xbmc-nightly

sudo apt-get update

sudo apt-get install xbmc

exit

Originally Published on YouTube on Sep 23, 2014

See how To Install the Kodi Media Center (XBMC), In Ubuntu and Linux Mint from the nightly builds. Kodi is a free and open source media player and entertainment center for Linux, OS X, Windows, iOS and Android.

Open-Source SilverStripe CMS

SilverStripe CMS is an open source web content management system. It is a powerful tool for professional web development teams.  Web content authors rave about how easy it is to use.

Before installing, make sure to do the following:

  • Properly set the date.timezone in php.ini
    For example:
    date.timezone = “America/New_York”
  • Enable “Tidy” support library of code to clean up your html. SilverStripe should operate fine without Tidy, but HTMLCleaner will not be effective. For example, in php.ini you should enable – remove the leading semicolon in the following line:
    ;extension=php_tidy.dll
  • Find /framework/thirdparty/Zend/Loader.php and comment out as follows:

Go to: framework/thirdparty/Zend/Loader.php
at about line 190 you will find this foreach statement:

foreach (self::explodeIncludePath() as $path) {
if ($path == ‘.’) {
if (is_readable($filename)) {
return true;
}
continue;
}
/* COMMENT THIS OUT
$file = $path . ‘/’ . $filename;
if (is_readable($file)) {
return true;
}
*/
}

Hope it helps

[Warning] is_readable(): open_basedir restriction in effect. File(C:\php\pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php) is not within the allowed path(s): (c:/zpanel/hostdata/client/public_html/yourdomain_com;c:/windows/temp)

GET /

Line 198 in C:\zpanel\hostdata\client\public_html\yourdomain_com\framework\thirdparty\Zend\Loader.php

Source

189 
190         foreach (self::explodeIncludePath() as $path) {
191             if ($path == '.') {
192                 if (is_readable($filename)) {
193                     return true;
194                 }
195                 continue;
196             }
197             $file = $path . '/' . $filename;
198             if (is_readable($file)) {
199                 return true;
200             }
201         }
202         return false;
203     }
204

VB Script to Delete Files In a Certain Path Having a Certain Extension

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/6d5fb3f5-b553-42ee-8a2d-b86e1c582ad8/vb-script-to-delete-files-of-a-certain-extension

DOWNLOAD ZIP FILE ATTACHED CONTAINING VBS FILE FOR USE ON WINDOWS

Note:  The download file is based on the Technet Script shown below, except that the Echo Confirm Deletion line has been commented-out.  This is a good way to selectively delete those rogue .htaccess files that have been injected into every sub-folder of your website.  Make sure you test this script on a PC on which it will not matter if you happen to mistakenly delete the entire system. USE AT YOUR OWN RISK. BE VERY CAREFUL.  IF YOU DON’T UNDERSTAND THE CODE IN THE SCRIPT, THEN DON’T RUN IT.

OPTION EXPLICIT
DIM strExtensionsToDelete,strFolder
DIM objFSO, MaxAge, IncludeSubFolders

‘ ************************************************************
‘ Setup
‘ ************************************************************

‘ Folder to delete files
strFolder = “D:\test”
‘ Delete files from sub-folders?
includeSubfolders = true
‘ A comma separated list of file extensions
‘ Files with extensions provided in the list below will be deleted
strExtensionsToDelete = “log”
‘ Max File Age (in Days). Files older than this will be deleted.
maxAge = 10

‘ ************************************************************

set objFSO = createobject(“Scripting.FileSystemObject”)

DeleteFiles strFolder,strExtensionsToDelete, maxAge, includeSubFolders

wscript.echo “Finished”

sub DeleteFiles(byval strDirectory,byval strExtensionsToDelete,byval maxAge,includeSubFolders)
DIM objFolder, objSubFolder, objFile
DIM strExt

set objFolder = objFSO.GetFolder(strDirectory)
for each objFile in objFolder.Files
for each strExt in SPLIT(UCASE(strExtensionsToDelete),”,”)
if RIGHT(UCASE(objFile.Path),LEN(strExt)+1) = “.” & strExt then
IF objFile.DateLastModified < (Now – MaxAge) THEN
wscript.echo “Deleting:” & objFile.Path & ” | ” & objFile.DateLastModified
objFile.Delete
exit for
END IF
end if
next
next
if includeSubFolders = true then ‘ Recursive delete
for each objSubFolder in objFolder.SubFolders
DeleteFiles objSubFolder.Path,strExtensionsToDelete,maxAge, includeSubFolders
next
end if
end sub

Can’t Download Novacom Drivers for Windows to Connect HP Touchpad

Here are the Novacom Drivers for Windows 32-bit and 64-bit operating systems.  There are two zip files and select the correct file download for your operating system.  Extract the Zip files to a known folder.  The Zip file includes the Novacom.MSI installer file the HP License Agreement PDF (Date Modified August 2011).

Novacom-win-32.zip

Novacom-win-64.zip

Here is a Video:
How to install Android 5.0.x/4.4.x on the HP TouchPad the Super Easy Way (Idiots Guide 4.0)
By: Roland Deschain. This video explains using the Touchpad Toolbox (TP Toolbox) by J.C. Sullins.

Resources:

TPToolbox by J.C. Sullins
Here: http://forum.xda-dev…d.php?t=2756314 and
Here: http://forum.xda-developers.com/showthread.php?p=52776881#post52776881

CM11/Android 4.4.2 by J.C. Sullins
http://forum.xda-dev…d.php?t=2712680

The CM11 link above says:
[ROM] [4.4.4] [CyanogenMod 11 by Jcsullins] [DM] [01/13/15]

Downloads:  [See 1., A., B., and C. below]

1.  TPToolbox:  V40 released on 2014-05-18
It can be downloaded from:
http://goo.im/devs/jcsullins/cmtouch…-05-18-v40.zip or
http://www.androidfilehost.com/?fid=23487008491965131 or
http://www.mediafire.com/download/in…-05-18-v40.zip

Note:  To load TPToolbox, you will need novacom to be installed on your PC.  See Novacom Links above.

THE TPToolbox will help you load A, B, and C below onto your HP Touchpad:

A.  ROM:  CyanogenMod 11 by JcSullins find the latest one to download.  I used cm-11-20141015-Snapshot but there is a more recent at the bottom of the file download list.

B. DATA MEDIA: (KitKat) Data Media Install files [Note: I used Philz-CWM]

Download traditional CWM:
http://goo.im/devs/jcsullins/cmtouch…n-20140317.zip or
http://www.androidfilehost.com/?fid=23487008491965138 or
http://www.mediafire.com/download/hb…n-20140317.zip

Download Philz-CWM: [I used this one]
http://goo.im/devs/jcsullins/cmtouch…n-20140317.zip or
http://www.androidfilehost.com/?fid=23487008491965137 or
http://www.mediafire.com/download/ba…n-20140317.zip

Download TWRP:
http://goo.im/devs/jcsullins/cmtouch…n-20140512.zip or
http://www.androidfilehost.com/?fid=23487008491965135 or
http://www.mediafire.com/download/17…n-20140512.zip

C.   G-Apps: KitKat Google Apps
https://goo.im/gapps/gapps-kk-20140105-signed.zip/  Standard Gapps
Paranoid Android Gapps Choose the Micro or Nano Modular Packs

I either used the (i.) pa-gapps-stock-4.4.4-20141110-signed or the (ii) Gapps-kk-20140606-signed (less trusted).  Need to figure out which works and is compatible with the ROM that you will use.  Try searching for gapps as there may be some on Google Apps in developers sections. Get an inclusive g-apps base package for KitKat.

My Self Notes from Above Resources (no warranties):  Download PDf: Installing-Android-on-Touchpad

Setting File Permissions for MyBB on Linux with Apache

File Permissions

Certain file permissions are required for MyBB to function correctly. Once you’ve uploaded your files you will need to set the permissions on certain files and directories.

** On new installs (not necessarily for upgrades), before applying file permissions, rename config.default.php to config.php

*nix systems via CHMOD
If you have SSH access, you can apply the necessary permissions via the following command, executed from your root MyBB directory:

chmod 666 inc/config.php inc/settings.php
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/

Optionally, you can also apply the following permissions:

chmod 666 inc/languages/english/*.php inc/languages/english/admin/*.php
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/ admin/backups/

If you are using FileZilla you can right click on a file or directory and click File Attributes to modify the permissions of that file.

Upgrading MyBB To Version 1.8.0

Upgrade Instructions

These instructions apply to upgrades on Windows server running Apache web server as well as upgrades on linux server installations except that with linux you may need to set various folder permissions.

  • Download MyBB version 1.8.0
    http://www.mybb.com/download/
  • Extract the website files from the downloaded ZIP file into a temporary folder of your choice
  • Backup your MyBB database and all MyBB website files and folders (in case you need to revert to the previous version 1.6.15 or earlier)
  • Copy the /inc/settings.php and /inc/config.php files to a separate folder (as a backup) so that you can copy them back into the website later
  • Disable any plugins that you have installed
  • You may choose to disable the board, but I didn’t and the upgrade went fine
  • Overwrite the files and folders in the website by coping or FTP uploading all of the new extracted version 1.8.0 files and folders into your website (use the root or forum sub folder that you previously used with the existing installation of MyBB
  • Replace the newly uploaded files named settings.php and config.php with the files those same two files that you previously copied to a separate folder.
  • You may need to delete the “lock” file in the “/install” folder of your website so that you don’t receive an error message alerting you to delete the “lock” file when you access upgrade.php
  • Now for this installation — Open a web browser and enter the address to the page /install/upgrade.php
  • Select the version of MyBB that you were previously running and click Next

2014-10-11 23_15_24-MyBB Installation Wizard _ Welcome

  • Follow the upgrade process making sure each step is completed successfully before clicking next to continue with subsequent steps of the upgrade process
  • Once the upgrade process is completed, then remove the install directory from your web server (or rename it) and follow any remaining instructions in the upgrade wizard, or in the announcement for the upgrade. This can include reverting selected templates to default.

2014-10-11 23_22_37-MyBB Installation Wizard _ Upgrade Complete

  • Enable any plugins one at a time and determine whether they require updating.  Have updated plugins ready to be installed.

Owncloud External USB Storage Via FTP Option on Zpanel Windows Server

This article applies to a self-hosted ownCloud version 7.0.1 which is hosted through a Zpanel on Windows Server 2008 R2, and for which you have remote desktop admin access to the server.

Configuring the External USB and FTP.

Connect USB drive to USB port on the Server.  Check Windows Explorer to see if it is present as Drive (X):\ (where “X” is the drive letter assigned by Windows,  usually drive E:\).  In Windows Explorer, on the USB drive, create a new folder path on the X:\ drive, such as E:\owncloud\external_storage.

Setup the FTP Account in Zpanel.  Log into your Zpanel hosting account to setup an FTP account credential leading to the external USB drive path.  Click on “File Management” and select “FTP Accounts.” Create a new FTP account by entering a username and password.  The access type should be read and write – full access.  Select the radio button to Create a new home directory.  The new home directory will be the same name as the username chosen above.  Click the Create button.

Access Windows Server via Remote Desktop to Adjust the FileZilla FTP Account to Point to the external USB drive file path.  Since Zpanel only creates an FTP within the Directory Path configured for the Zpanel User Account, usually on  “C:\zpanel\hostdata\[Zpanel_username]\External_Storage_username” drive, you need to create an alternate FTP path to the USB Drive storage path.  How?  Log into the Windows Server using Remote Desktop access, and click the Start button, select All Programs, then Zpanel, Management, and open the FileZilla Console.  In the Filezilla console, Select the pre-configured FTP user account that you just established within Zpanel file management.  How? In FileZilla console select Users and select the particular FTP user account you just established.  Select Shared Folders, and you should see the original Home directory path that you pre-configured under Zpanel.  For the same FTP user account, click the “Add” button and add a new directory path leading to your USB file folder path, such as E:\owncloud\external storage.  Select this new path with your mouse and click the button to “Set as home directory,” in order to set this “External Storage” path as the new “Home” default folder.  Make sure for “Files” that you check each checkbox to select all -> read, write, delete, append, and check each check box under Directories to select all -> create, delete, list, +Subdirectory, to ensure these authorizations are granted.  You can leave the existing pre-cofigured Zpanel directory in place. For now, it is no longer the Home directory for the FTP path for this FTP user account. Click OK to exit the zpanel configuration.  You can now exit the FileZilla console.

Enable External Storage in your Owncloud Admin Account.  Log into your administrator account for ownCloud.  Select Apps from the left menu.  Select External Storage Support from the list.  Under the heading External Storage Support 0.2.1, internal app, Mount external storage sources, click the Enable button.

Configure External Storage Via FTP.  Remain logged in under ownCloud Administrator Account.  Select “Admin” from the Menu. Within Admin, under the heading for “External Storage,” click the drop down menu on the button for “Add storage” and select “FTP.”

Change the Folder Name to your desired folder name, such as “Ext” and, under configuration, you probably need to type in localhost (for ftp server location), enter your pre-configured FTP username and your FTP password.  Under “Available For” you can select ALL USERS or a particular user or particular group.

2014-09-21 19_54_06-ownCloud

When you open your ownCloud desktop client or your web interface and login, you should see the new folder named “Ext” in your folder list. If you copy a file to that folder, it will syncronize from the server to all webdav and desktop connected devices.

Enjoy!