Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .resized {
- max-width: 800px;
- width: expression(this.width > 800 ? 800: true);
- height: auto;
- }
- <img class="resized" src="http://www.example.org/pictures.png" alt="Immagine">
- con notepad++
- cerca in tutti file:
- <img src="(.*?)" alt="(.*?)">
- sostituisci in tutti i file:
- <img class="resized" src="\1" alt="\2">
- Metti il flag su trova espressione regolare...
- poi vai nella regex che cattura tutte le immagini e aggiungi la classe "resized"...
- così:
- $body = preg_replace("/\[img\](.+?)\[\/img\]/i", '<img class="resized" src="$1" alt="Immagine">', $body);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement