Posts Categorized: Notes

How to find in which Directory is file on server

Some wired server have really strange patch to file how to find if you need write exactly path to some file without using short way with you domain

Create directory.php file upload on server in directory which you are looking to and run this file for example:
youdomain.com/subfolder/directory.php

<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/file.html" . "</p>";
?>

 

Safe mode – menu in Winows 8

Safe Mode Windows
Along with Windows 8, a number of innovations that not everyone, especially the more advanced user appealed to. One of them is in my opinion how to start safe mode. Once I pushed F8 at startup, we had a nice selection … and everything worked. Here the key is pressed there is no reaction, and this mode can only go by passage through a billion steps in Modern interface (Settings -> PC Settings -> General -> Startup options .. blah blah blah). I wonder who decided to hide so this option. But in case of failure you can not get to … attention … EMERGENCY MODE. As for me, it is pure hypocrisy, but fortunately there is a way.
Continue reading

W4P-Note Function update customform

Function updating the CustomForm in Web4print Server

<div style="display:none;">
<!-- bg -->
<input type="text" name="upload_1"/>
<input type="text" name="XSave_1" class="imgstore" value="http://...">
<!-- ribbon -->
<input type="text" name="upload_21" id="ribbon_graphic_go"/>
<input type="text" name="XSave_21" class="imgstore" id="ribbon_graphic"/>
</div>

<script>
setthumbs();
function update_custom() {
	//check if any flash text and update the value of background graphic input
	//also set it like this: $("input[name=upload_1]").val( [put correct path here] );
	
	myheading = $("[name=text_201]").val();
	if($("#flash_text").val() == "") {
		//do something
	myheading = "&#10;<st_10>" + myheading; //this one sets it for no flash
	$("input[name=upload_1]").val("http://...")
	} else {
		myheading = "&#10;<st_9>" + myheading; //this one sets it for with flash
		$("input[name=upload_1]").val("http://...")
	}
	$("[name=text_201]").val(myheading);
}

</script>

HTML Entities

Some characters are reserved in HTML.
If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.
Character entities are used to display reserved characters in HTML.
Continue reading

Display Loading Graphic Until Page Fully Loaded

<!DOCTYPE html>
<html class="no-js">

<head>
	<meta charset='UTF-8'>
	
	<title>Simple Loader</title>
	
	<style>
		/* This only works with JavaScript, 
		   if it's not present, don't show loader */
		.no-js #loader { display: none;  }
		.js #loader { display: block; position: absolute; left: 100px; top: 0; }
	</style>
	
	
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
	
	
	<script src="https://github.com/Modernizr/Modernizr/raw/master/modernizr.js"></script>
	<script>
		// Wait for window load
		$(window).load(function() {
			// Animate loader off screen
			$("#loader").animate({
				top: -200
			}, 1500);
		});
	</script>	
</head>

<body>
		
	
	<img src="download.png" id="loader">
	
	
	<img src="https://farm6.static.flickr.com/5299/5400751421_55d49b2786_o.jpg">
		
</body>

</html>

 

Adding/Removing Class on Hover

<ul id="my-list">
    <li>
        Am I right?
        <div>
            Yugi....
        </div>             
    </li>
    <li>
        But am I right?!
        <div>
            Yugi...
        </div>            
    </li>

 

ul#my-list div {
    height: 50px;
    background-color: #ddd;
}

ul#my-list li.hover {
    background-color: #ffde8e;
}

 

$("ul#my-list li div").hide();

$("ul#my-list li").on({
    mouseenter : function() {
        $(this).addClass("hover");
    },
    mouseleave : function() {
        $(this).removeClass("hover");
    },
    click      : function() {
        var obj = $(this),
            div = obj.children("div");
        
        if(div.is(":visible")) {
            div.slideUp();
            obj.removeClass("hover");
        } else {
            div.slideDown();
        }
    }
});

 

How to keep indent for second line in ordered lists via CSS?

How to keep indent for second line in ordered lists via CSS?
We can make use of the browser’s table layout algorithm (without using tables) like this:

ol {
    counter-reset: foo;
    display: table;
}
ol > li {
    counter-increment: foo;
    display: table-row;
}
ol > li::before {
    content: counter(foo) ".";
    display: table-cell; 
    text-align: right;
}

 

5 new mobile apps from Adobe


Adobe have rolled out a number of brand-new applications for mobile use. They’ve all created for use on iOS 7, and are all available for free – although you’ll need a Creative Cloud subscription to make full use of most of them.
The thread tying together these apps is the new ability to use the cloud for raw processing muscle. In other words, some functions are actually uploaded to Adobe servers and you use their server processors to chug through your photo-manipulations. And that means you can do some pretty processor-heavy design work even though the iPad doesn’t pack a lot of processing power.
So here we present a brief introduction to the new Adobe apps.
Continue reading