Anti link/email spam script

1
2
3
4
5
6
<script type='text/javascript'>
   function nerf_email(){
      return 'offi'.replace(/i/, 'ice') + '@' + 'point'.replace(/t/, 't47.com');
   }
   document.write(nerf_email());
</script>

The above script will show: office @ point47.com

Popularity: 1% [?]

Cute Bubbles – WordPress Theme – Updated

Version 1.0 is live and it has full IE6 support, improved header graphic and some more tweaks here and there.

cute bubbes wordpress theme

You can download the theme from here Cute Bubbles WordPress Theme.

Popularity: 100% [?]

Drepturi de upload mai mare cu .htaccess

In mod normal PHP-ul e setat sa poti uploada fisiere de maxim 8MB(sau chiar doar 2MB).
Poti schimba asta insa din php.ini:

1
2
post_max_size = 40M
upload_max_filesize = 40M

.. dar asta inseamna sa dai drepturi la tot serverul sa poata incarca fisiere de pana in 40MB

Dar daca vrei sa dai drepturi doar fisierelor dintr-un anumit folder poti sa faci un fisier “.htaccess” si sa scrii urmatorul cod.

1
2
3
4
<FilesMatch "\.(php)$">
 php_value post_max_size "40M"
 php_value upload_max_filesize "40M"
</FilesMatch>

Astfel toate fisierele din acel folder au dreptul de uploada fisiere de pana in 40mb.

Dar cred ca si codul asta e functional, daca vrei sa dai drepturi doar unui anumit fisier:

1
2
3
4
<Files "upload.php">
 php_value post_max_size "40M"
 php_value upload_max_filesize "40M"
</FilesMatch>

sau doar pentru 2 fisiere:

1
2
3
4
<FilesMatch "^(upload|multi_upload)\.php$">
 php_value post_max_size "40M"
 php_value upload_max_filesize "40M"
</FilesMatch>

! Daca aveti hosting cumparat pe undeva tebuie sa verificati mai intai daca sunt drepturi ca .htaccess-ul sa suprascrie setarile default.

Popularity: 2% [?]

Reverse la o animatie Flash cu ActionScript 3.0

Exemplu:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
@ ActionScript 3
* Reverse la o animatie
------------------------------------
Scena contine un movie clip cu nume de instanta:  img
Movie clipul e o animatie de 60 frame-uri in care se mareste poza.
-----------------------------------------------------
*/

// activeaza movie clip-ul ca buton
img.buttonMode = true;
// dezactiveaza eventualele
img.mouseChildren = false;

// adauga 2 eventListener pe imagine
// pentru mouse over
img.addEventListener(MouseEvent.ROLL_OVER,overThat,false,0,true);
// pentru mouse out
img.addEventListener(MouseEvent.ROLL_OUT,outThat,false,0,true);

// cand cursorul este peste mc adauga un nou eventListener
// si activeaza functia "inainte"
function overThat(event:MouseEvent):void {
    event.target.removeEventListener(Event.ENTER_FRAME,inapoi);
    event.target.addEventListener(Event.ENTER_FRAME,inainte,false,0,true);
}

// cand cursorul iese de pe zona mc-ului scoate eventListener-ul existent
// si activeaza functia "inapoi"
function outThat(event:MouseEvent):void {
    event.target.removeEventListener(Event.ENTER_FRAME,inainte);
    if (!event.target.hasEventListener(Event.ENTER_FRAME)) {
        event.target.addEventListener(Event.ENTER_FRAME,inapoi,false,0,true);
    }
}

// atat timp cat mouse-ul este peste mc-ul "img" este activata aceasta functie
// si merge pana da peste "stop" in timeline-ul din movie clip
function inainte(event:Event):void {
    event.target.nextFrame();
   
}

// e reversul functiei "inainte"
function inapoi(event:Event):void {
    event.target.prevFrame();
}

Sursele complete aici: img_in_out.fla (Flash CS3). Enjoy!

Popularity: 2% [?]

Reseteaza stilurile CSS

Urmatorul cod CSS reseteaza sau seteaza toate tag-urile intr-o pagina HTML.
Browserele au valori diferite de padding sau margin si asta poate cauza probleme la afisarea elementelor in pagina.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del,
dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub,
sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
    background: transparent;
}

Trebuie pus exact la inceputul fisierului ce contine CSS-ul tau.

Popularity: 1% [?]