Oct 10

The timepicker addon adds a timepicker to jQuery UI Datepicker, thus the datepicker and slider components (jQueryUI) are required for using any of these.

To create your own regional objects per region, use the setDefaults method to tie these together. Setting datepicker and timepicker regionals separtely will help ensure proper wording when only using datepicker or timepicker. Here is an example:

$.datepicker.regional['ru'] = {
closeText: ‘Закрыть’,
prevText: ‘<Пред',
nextText: 'След>‘,
currentText: ‘Сегодня’,
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
'Июл','Авг','Сен','Окт','Ноя','Дек'],
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
weekHeader: ‘Не’,
dateFormat: ‘dd.mm.yy’,
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ”
};
$.datepicker.setDefaults($.datepicker.regional['ru']);

$.timepicker.regional['ru'] = {
timeOnlyTitle: ‘Выберите время’,
timeText: ‘Время’,
hourText: ‘Часы’,
minuteText: ‘Минуты’,
secondText: ‘Секунды’,
millisecText: ‘миллисекунды’,
currentText: ‘Теперь’,
closeText: ‘Закрыть’,
ampm: false
};
$.timepicker.setDefaults($.timepicker.regional['ru']);

$(‘#example4′).datetimepicker({
timeFormat: ‘h:m’,
separator: ‘ ‘
});

documentation here

Sep 1

jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web. Since the grid is a client-side solution loading data dynamically through Ajax callbacks, it can be integrated with any server-side technology, including PHP, ASP, Java Servlets, JSP, ColdFusion, and Perl.

jqGrid’s Home page can be found here

Jun 1

Excel interpreteaza < br > ca fiind un rand now, ca sa evitam aceasta problema si sa adaugam o linie noua in celula in MS Excel trebuie adaugat un CSS pentru break

< style >
br {mso-data-placement:same-cell;}
< / style >

Apr 26

TCPDF is an Open Source PHP class for generating PDF documents. It continues where FPDF stopped, and contains all its goodies plus support of UTF-8 Unicode and Right-To-Left languages! Especially the missing UTF-8 Unicode support in FPDF is a problem for everyone living outside the English language only countries.

* Go to www.tcpdf.org and download the latest version of TCPDF.

Main Features:

* no external libraries are required for the basic functions;
* all ISO page formats, custom page formats, custom margins and units of measure;
* UTF-8 Unicode and Right-To-Left languages;
* TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
* methods to publish some XHTML code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index – Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
* Grayscale, RGB, CMYK, Spot Colors and Transparencies;
* automatic page header and footer management;
* document encryption and digital signature certifications;
* transactions to UNDO commands;
* PDF annotations, including links, text and file attachments;
* text rendering modes (fill, stroke and clipping);
* multiple columns mode;
* bookmarks and table of content;
* text hyphenation;
* automatic page break, line break and text alignments including justification;
* automatic page numbering and page groups;
* move and delete pages;
* page compression.

Check the default TCPDF Examples.

Jan 29

HTML Regex Data Extractor

This extension is useful for those who want to test the regular expression on the live HTML content.
They can also use their custom content.

Usage :
- Press Alt-R to test with your custom content
- Press Ctrl-U or right-click and choose “View Page Source” to test with HTML source of current page
- When you are viewing the source code, to show/hide the Regular Expression Bar, on Toolbar, choose View -> RegexHTML

Source : here

Jan 26

How does it work?

Rather than creating a SWFUpload instance and assigning handlers directly, it associates the SWFUpload instance with an element in the DOM, and all events handlers are bound to that DOM element.

Live Examples

Here are some live examples you can pull apart. Although the UI is not pretty, it demonstrates how you listen to events, and from there you can create whatever UI you want.

Download source here

Jan 26

The line-layering technique uses no images and no javascript, only display: block bold tags layered on top of each other. We simply create lines with decreasing side margins, stick them on top of each other and we have a well-emulated round corner.

.b1f, .b2f, .b3f, .b4f{font-size:1px; overflow:hidden; display:block;}
.b1f {height:1px; background:#ddd; margin:0 5px;}
.b2f {height:1px; background:#ddd; margin:0 3px;}
.b3f {height:1px; background:#ddd; margin:0 2px;}
.b4f {height:2px; background:#ddd; margin:0 1px;}
.contentf {background: #ddd;}
.contentf div {margin-left: 5px;}


<b class="b1f"></b><b class="b2f"></b><b class="b3f"></b><b class="b4f"></b>
    <div class="contentf">

        <div>Round FILL!!</div>
    </div>
<b class="b4f"></b><b class="b3f"></b><b class="b2f"></b><b class="b1f"></b>

Din cauza framework-ului wordpress se injecteaza tag-urile HTML in editor, de acea nu pot sa afisez corect exemple, le puteti vedea [ aici ]

Round Border!!

Dec 7

Va propun o metoda de a pune un watermark pe o imagine in PHP. In principiu functia primeste ca parametrii imaginea sursa (locatie), locatia destinatie, watermarkul (locatie imagine), si calitatea jpeg.

Va returna Boolean, iar in cazul TRUE va salva un jpeg cu watermark din imaginea initiala. Functia se foloseste de libraria GD inclusa in php si accepta orice fel de tip de imagine pe care o poate recunoaste aceasta.

Watermarkul este pus in coltul din dreapta jos, dar asta se paote modifica dupa bunul plac.

function set_watermark($source, $dest, $watermark, $quality = 80)
{
  if (func_num_args() < 3)
  {
    $set_watermark_error = "Insufficient parameters supplied!";
  }
  else
  {
    if (file_exists($source))
    {
      if ($src = imagecreatefromstring(file_get_contents($source)))
      {
        $info = getimagesize($source);
        imageantialias($src, true);
        if ($wm = imagecreatefromstring(file_get_contents($watermark)))
        {
          $wm_info = getimagesize($watermark);
          imagealphablending($src, true);
          imagecopy($src, $wm, $info[0]-$wm_info[0]-5, $info[1]-$wm_info[1]-5, 0, 0, $wm_info[0], $wm_info[1]);
          if (imagejpeg($src, $dest, $quality))
          {
            if (file_exists($dest))
            {
              chmod($dest, 0777);
              return true;
            }
            else
            {
              $set_watermark_error = 'Unable tosaveimage! ';
            }
          }
          else
          {
            $set_watermark_error = 'Unable tosaveimage! ';
          }
        }
      }
      else
      {
        $set_watermark_error = 'Unrecognized imageformat! ';
      }
    }
    else
    {
      $set_watermark_error = 'Source filedoesnotexist! ';
    }
  }
  return false;
}

Functia mai poate fi customizata pentru a intoarce si alte tipuri de imagine, dar lasam asta la alegerea fiecaruia.

Nov 21

For page autorefresh just have this line on your meta tags:

<meta http-equiv=refresh content=”time; url=page.html”>

where time is the number of seconds before a refresh (integer)
and the url is the target link (optional)

Nov 13

wireless telephony application interface (WTAI), aceasta este alternativa la callto: care foloseste 3rd party software pentru initializare apelurilor telefonice, cum ar fi Skype, NetMeeting, Yahoo etc, aceste aplicatii la randul lor sunt inregistrate ca “the associated
application for that purpose”

deci,
sintaxa pentru callto: este:
<a href=”callto:+01234567″>Make a call by 3d party application</a>
pentru wtai:
<a href=”wtai://wp/mc;+3581234567″>3581234567&lt/a>

Powered By Wordpress - Theme Provided By Wordpress Theme - Credit Loan