How do I copy all file names in a folder to notepad?

source: https://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-do-i-copy-all-file-names-in-a-folder-to/5a4b8da9-123a-4c98-b4aa-1260b38409a2?auth=1

For example if you wanted to get an output of the following folder, C:\Users\{username}\Pictures\Summer Vacation

Navigate to that folder in Windows Explorer. Hold down the shift key and RIGHT click on Summer Vacation folder. You will see a new option called ‘Open command window here’. This way, you don’t have to type the full path in your dir command.

dir *.* > dir.txt /b /o

Posted in time-savers | Comments Off on How do I copy all file names in a folder to notepad?

Remove line breaks using Microsoft Word

Find

^p, replace with

Find

^p, replace with

http://www.iom3.org/web-editors-community/news/2011/jun/21/how-instantly-remove-unwanted-line-breaks-when-copying-pdf

Posted in database, Excel | Comments Off on Remove line breaks using Microsoft Word

Prestashop: Export Pro for products, categories, combinations (paid module)

Recommended: https://www.prestashop.com/forums/topic/429028-module-export-pro-csv-export-products-combinations-customers-categories-orders-addresses/

Free version with less features: https://www.prestashop.com/forums/topic/37900-free-module-products-export-module-v253-updated-23032016/

Posted in ecommerce, modules | Tagged , | Comments Off on Prestashop: Export Pro for products, categories, combinations (paid module)

Prestashop: Add editable product date added field in admin (prestashop 1.6)

Source: https://www.prestashop.com/forums/topic/126518-change-date-for-products-in-bo-date-add/?p=1947106

Add it to line 134 of: admin folder\themes\default\template\controllers\products\informations.tlp

The if is added in case this is a new product and there is no existing date added data

{if $product->date_add}
<div class=”form-group”>
<label class=”control-label col-lg-3″></td>
<span class=”label-tooltip” data-toggle=”tooltip”
title=”{l s=’Change date for “product new from”.’}”>
{$bullet_common_field} {l s=’New from’}
</span>
</label>
<div class=”col-lg-3″>
<input type=”text” id=”date_add” name=”date_add” value=”{$product->date_add|escape:html:’UTF-8′}” />
</div>
</div>
{/if}

Posted in ecommerce | Tagged , | Comments Off on Prestashop: Add editable product date added field in admin (prestashop 1.6)

WordPress: Responsive video (mp4 video inserted from media library)

Changed the wordpress wp-includes/media.php file. Probably not the best way to do this.
Ref: https://codex.wordpress.org/Video_Shortcode

At around line 2504, comment out the following:

$html_atts = array(
	'class'    => $atts['class'],
	'id'       => sprintf( 'video-%d-%d', $post_id, $instance ),
	'width'    => $atts['width'],
	//'width'    => absint( $atts['width'] ),
	//'height'   => absint( $atts['height'] ),
	'poster'   => esc_url( $atts['poster'] ),
	'loop'     => wp_validate_boolean( $atts['loop'] ),
	'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
	'preload'  => $atts['preload'],
);

At around line 2565, comment out the following and add code:

if ( ! empty( $atts['width'] ) ) {
//	$width_rule = sprintf( 'width: %dpx; ', $atts['width'] );
	$width_rule = '';
}

Added additional CSS styles to make it work.

video {
  width: 100%    !important;
  height: auto   !important;
}

Source: https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
https://coolestguidesontheplanet.com/videodrome/youtube/

While we’re at it, also centralize the video with this CSS

.wp-video { display:block; margin: 0 auto; }
Posted in CMS | Tagged , | Comments Off on WordPress: Responsive video (mp4 video inserted from media library)

Embed a video with both autoplay, mute and other variables

Source: http://stackoverflow.com/questions/19241151/adding-additional-parameters-to-the-yt-player-object-from-youtube

https://developers.google.com/youtube/player_parameters?playerVersion=HTML5

https://productforums.google.com/forum/#!msg/youtube/XS5_P_9OXCo/-oNOf3d8x4sJ

http://jsfiddle.net/oLtcsh49/2/

<!– 1. The <iframe> (and video player) will replace this <div> tag. –>
<div id=”player”></div>

<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement(‘script’);

tag.src = “https://www.youtube.com/iframe_api“;
var firstScriptTag = document.getElementsByTagName(‘script’)[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

// 3. This function creates an <iframe> (and YouTube player)
//    after the API code downloads.
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player(‘player’, {
height: ‘195’,
width: ‘260’,
videoId: ‘h3P1OR9gg2Y’,
playerVars: { ‘autoplay': 1, ‘controls': 1,’showinfo':0, rel:0},
events: {
‘onReady': onPlayerReady,
‘onStateChange': onPlayerStateChange
}
});
}

// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
event.target.setVolume(0);
event.target.playVideo();
}

// 5. The API calls this function when the player’s state changes.
//    The function indicates that when playing a video (state=1),
//    the player should play for six seconds and then stop.
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
//      setTimeout(stopVideo, 6000);
done = true;
}
event.target.setVolume(0);
}
</script>

Posted in Youtube | Tagged , , | Comments Off on Embed a video with both autoplay, mute and other variables

WordPress: Redirect after Login on WordPress

Source: http://stackoverflow.com/questions/8127453/redirect-after-login-on-wordpress

Add the following to child theme’s functions.php

function admin_default_page() {
return ‘/new-dashboard-url';
}

add_filter(‘login_redirect’, ‘admin_default_page’);

Posted in CMS | Tagged , | Comments Off on WordPress: Redirect after Login on WordPress

Easy Fancybox: Solution for Iframe no-scroll issue in mobile

Source: https://alucard-blog.blogspot.sg/2016/06/how-to-fix-fancy-boxeasy-fancybox.html

How to fix fancy box scroll not working in mobile. Using wordpress plugin https://wordpress.org/plugins/easy-fancybox/

In Easy Fancybox, you will see these 2 lines in the jquery.fancybox-1.3.7.js: (do a folder search for id=”fancybox-content” to get better idea of how it looks like)

<div id=”fancybox-content”……..>
<iframe id=”fancybox-frame” name……………

Apply to fancybox-content, not fancybox-frame

So in your custom/child theme CSS, it should be:

#fancybox-content{
overflow: scroll !important;
-webkit-overflow-scrolling: touch !important;
}

Posted in CMS, CSS, troubleshoot | Tagged , , , | Comments Off on Easy Fancybox: Solution for Iframe no-scroll issue in mobile

CSS: Media queries for mobile, tablet display devices

In practice, many designers convert pixels to ems, largely b/c ems better afford zooming. At standard zoom 1em === 16px. Multiply pixels by 1em/16px to get ems. For example, 320px === 20em.

Suggested breakpoints

Source: http://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile

@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480×320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800×480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }

Refined to work better with 960 grids:

@media (min-width:320px) { /* smartphones, iPhone, portrait 480×320 phones */ }
@media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */ }
@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 800×480 or 854×480 phones */ }
@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }

Managing multiple styles by linking to different stylesheets using media queries

Source: http://www.htmlgoodies.com/beyond/css/introduction-to-css-media-queries.html

Adding all the styles in the same CSS file is acceptable for the above example, but for a full-fledged website, it will become a pain to manage the code. That is why I prefer to link a new stylesheet for specific screen sizes. The way to do that is to use the media attribute of the link tag.

<link rel=”stylesheet” type=”text/css” media=”only screen and (max-device-width: 480px)” href=”mobile-device.css” />

Now you can define all the mobile specific styles in the mobile-devices.css file.

Google Mobile SEO guideline

Source: https://developers.google.com/webmasters/mobile-sites/mobile-seo/

Mobile: In this document, “mobile” or mobile devices refers to smartphones, such as devices running Android, iPhone, or Windows Phone. Mobile browsers are similar to desktop browsers in that they can render a broad set of the HTML5 specification, although their screen size is smaller and in almost all cases their default orientation is vertical.

Tablets: We consider tablets as devices in their own class, so when we speak of mobile devices, we generally do not include tablets in the definition. Tablets tend to have larger screens, which means that, unless you offer tablet-optimized content, you can assume that users expect to see your site as it would look on a desktop browser rather than on a smartphone browser.

Based on the above, I would be inclined to set tablets to load the same CSS version as desktop since this should not penalize SEO rankings.

Posted in CSS, SEO, web design | Tagged , , | Comments Off on CSS: Media queries for mobile, tablet display devices

Visual Composer: Remove Visual Composer Tab from Dashboard Menu

Add this following code to your themes functions.php

function custom_menu_page_removing() {
    remove_menu_page('vc-general'); //vc
}
add_action( 'admin_menu', 'custom_menu_page_removing' );

This is how to find out for the next time:

The link for Visual-Composer main page is admin.php?page=vc-general if you want to hide a link from an plugin in the admin backend, simply use everything behind the ?page= in this case it’s vc-general

Source: http://wordpress.stackexchange.com/questions/227593/remove-visual-composer-tab-from-dashboard-menu

 

Posted in CMS, Visual Composer | Comments Off on Visual Composer: Remove Visual Composer Tab from Dashboard Menu