Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

javascript pictures

берем любую страницу где есть картинки, и в адресной строке браузера вводим : javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0)

Photoblogging with Textpattern: atom feeds

To textpattern/publish/atom.php somewhere around line 131 (in 4.0.2), or after
else {
$Body = '';
// If there's no excerpt, use body as content instead of body as summary
if (!trim($Excerpt))
$Body = fixup_for_feed($thisarticle['body'], permlinkurl($a));
}

add this:
// hack to get pictures to syndicate
if ($a['Section'] == "photo")
{
$img_url = hu."images/".$a['Image'].'.jpg';
$Body = doSpecial('<a href="'.permlinkurl($a).'"><img src="'.$img_url.'" alt="the latest and greatest" /></a>');
}
// /hack

Photoblogging with Textpattern: rss feeds

Add this to textpattern/publish/rss.php somewhere around line 62 (in 4.0.2), or after "$Body = (!trim($Body)) ? $thisarticle['body'] : $Body;":
// hack to get pictures to syndicate
if ($a['Section'] == "photo")
{
$img_url = hu."images/".$a['Image'].'.jpg';
$Body = doSpecial('<a href="'.permlinkurl($a).'"><img src="'.$img_url.'" alt="the latest and greatest" /></a>');
}
// /hack
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed