Project / Support Center
Welcome, Guest. Please login or register. January 26, 2023, 10:48: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Recent Posts
Pages: 1 2 3 4 5 6 [7] 8 9 10

 61 
 on: January 17, 2017, 06:59: PM 
Started by admin - Last post by admin
1vw = 1% of viewport width

1vh = 1% of viewport height

1vmin = 1vw or 1vh, whichever is smaller

1vmax = 1vw or 1vh, whichever is larger
h1 {
  font-size: 5.9vw;
}
h2 {
  font-size: 3.0vh;
}
p {
  font-size: 2vmin;
}
from Css-tricks: http://css-tricks.com/viewport-sized-typography/

this seems to work too:

.style4{
   font-size:2.0vmin;
   font-size: 2.5vmax;

   font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
   color: #333;
}

 62 
 on: December 23, 2016, 03:43: PM 
Started by admin - Last post by admin
abs is the code needed meaning abstract and will take a negative number and drop the negative -  sign. you'll have to some how tell people that this number is negative in some way.

What we did tell the system to display the number in RED but you can do what ever works for you.

  <?php
// Show IF Conditional
if ("$estimate" > 0) {
?>
                           <strong>  Under Budget $<?php echo number_format(($estimate),2,'.',','); ?></strong>
                           <?php
// else Conditional
} else { ?>
                           <strong> <span class="style1">Over Budget by:  $<?php echo number_format(abs($estimate),2,'.',','); ?></span></strong>
                       <?php }
// endif Conditional
?>

<style type="text/css">
<!--
.style1 {color: #CC0000}
-->
</style>

 63 
 on: December 23, 2016, 02:19: PM 
Started by admin - Last post by admin
Found this JS that appears to work in displaying the correct local time on a page - used it on a php reporting page only tested it for EST because php can only use server time which in our case was always 5 hours off of GMT. Apparently when printing this will print the time out twice - not sure why or how to fix it yet.

<script type="text/javascript">
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()

if (minutes < 10){
  minutes = "0" + minutes;
}
var suffix = "AM";
if (hours >= 12) {
suffix = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}

document.write("" + hours + ":" + minutes + " " + suffix + "");
</script>


Use this

<?php echo date('F') ?> <?php echo date('d') ?> <?php echo date('Y') ?> -  
             <script type="text/javascript">
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()

if (minutes < 10){
  minutes = "0" + minutes;
}
var suffix = "AM";
if (hours >= 12) {
suffix = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}

document.write("" + hours + ":" + minutes + " " + suffix + "");
</script>

To produce this

December 23 2016 - 9:31 AM

 64 
 on: December 12, 2016, 04:44: PM 
Started by admin - Last post by admin
This will hide or show something based on the page you are on. This solution is not the best one around but normally because our page include variables in the url like ?yr=2016 etc we found it was the easiest way to handle it, based on the type of page it was.

You basically declare the type of page using this

<?php $url = "expense";?>

(you can name $url anything you want), put this at the top of your page above the <body> tag.

then the show if can be based on the defined page type, in this case "expense".


<?php
// Show IF Conditional
if ($url == "expense") {
?>
        Budget
        <?php

} else { ?>
        Expense
      <?php }
// end IF Conditional
?>

 65 
 on: October 04, 2016, 07:22: PM 
Started by admin - Last post by admin
This I think is the easiest way to detect what type of device is being used by a visitor to your site - we used it to display the correct Map app icon but it can be modified easily to fit your needs. this is a If then else statement.

<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS') !== false) {  
?>


the strpos searches the HTTP_USER_AGENT to determine what device is being used for the Filter you supply 'Mac OS' in this case.

a typical HTTP_USER_AGENT if echoed to your screen would look like this :

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

by using the strpos it can search the entire HTTP_USER_AGENT string for what ever filter word you want.

Our examples below looked for Apple, Android & Windows to display the correct Map App icon and link


Code:
 
Macintosh Filter

<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS') !== false) {  
?>


------- display what ever you want based on the filter match here ------------
 <a href="maps://?q=<?php echo $row_rsclass_events['event_address']; ?> <?php echo $row_rsclass_events['event_city']; ?>, <?php echo $row_rsclass_events['event_zip']; ?><img src="../../assets/2016/ios-maps-icon.jpg" width="72" height="72" hspace="0" vspace="0" align="middle" /></a>
------- end display area  --------------------------------------

<?php
}
?>


Android Filter

<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Andriod') !== false) {
?>


<a href="geo://0,0?q=<?php echo $row_rsclass_events['event_address']; ?> <?php echo $row_rsclass_events['event_city']; ?>, <?php echo $row_rsclass_events['event_st']; ?> <?php echo $row_rsclass_events['event_zip']; ?>  <img src="../assets/2016/Maps-Android-R.png" width="72" height="72" hspace="5" vspace="5" /></a>

<?php
}
?>


Windows Filter

<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== false) {
?>


<a href="http://maps.google.com/?q=<?php echo $row_rsclass_events['event_address']; ?> <?php echo $row_rsclass_events['event_city']; ?>, <?php echo $row_rsclass_events['event_st']; ?> <?php echo $row_rsclass_events['event_zip']; ?>  " target="_blank"><img src="glovebox/code/images/map0-with-pin.png" width="72" height="72" hspace="5" vspace="5" /></a>

<?php
}
?>

 66 
 on: September 28, 2016, 03:59: PM 
Started by admin - Last post by admin
add this to your global css file or just to the page displaying youtube videos (in the <head> area

 iframe {
    height:100%;
    width:100%;
    overflow:hidden;   
   }

 67 
 on: September 25, 2016, 10:35: PM 
Started by admin - Last post by admin
This will make a background for a <div></div> tag responsive and allow you to add a text overlay

.banner {
   background-image: url(../../../assets/registration_default_header.png);
        background-repeat: no-repeat;
   background-size: 100% auto;
        min-height: 10.5vw;      
  }

---Adjust the min-height until it looks as you want on a tablet and smartphone.
 vw = view window

Text overlay

div.caption p {
   position: relative;
   text-align: center;
   font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
   font-weight: 600;
   font-size: 3.4vw;
   line-height: 4.5vw;
   color: #fff;

}

HTML

Way it looks in your source code

<div class="banner">
  
   <div class="caption">  
     <p>Text goes here</p>
   </div>

</div>

 68 
 on: August 12, 2016, 08:45: PM 
Started by admin - Last post by admin
 <?php
// Show IF Conditional not past a Date
if (strtotime(@$row_transaction_per_group_owed['date']) >= strtotime('today GMT')) {
?>

Everything you put in here will only show if it is not past the current date

<?php
}
//End Show not past a date
?>

 69 
 on: June 29, 2016, 03:37: PM 
Started by admin - Last post by admin
Pixels => Points
6px => 5pt
7px => 5pt
8px => 6pt
9px => 7pt
10px => 8pt
11px => 8pt
12px => 9pt
13px => 10pt
14px => 11pt
15px => 11pt
16px => 12pt
17px => 13pt
18px => 14pt
19px => 14pt
20px => 15pt
21px => 16pt
22px => 17pt
23px => 17pt
24px => 18pt

 70 
 on: June 17, 2016, 01:38: AM 
Started by admin - Last post by admin
Zoom can be repressed by doing the following:

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />

and

<meta name=”viewport” content=”user-scalable=no” />

It’s the initial-scale=1.0 and maximum-scale=1.0 which effectively disables zoom in the first example and content=”user-scalable=no” in the second. On mobile devices you want to give the user as much control over screen size as you can.

So instead change the maximum-scale=2.0 or higher though 2.0 seems to be enough for most users :

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=2.0" />

and

<meta name=”viewport” content=”user-scalable=YES” />

Pages: 1 2 3 4 5 6 [7] 8 9 10
Web Global Net Web Application & Web Development Project Center  |  Recent Posts


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!