ich habe zur Zeit ein Problem mit einem PHP-Script und da mir bei diesem Thema hier sehr gut geholfen wurde, wende ich mich an euch.
Dummerweise werden über das Javascript unten ein paar Variablen aus einem externen Script bei Picasa aufgerufen, die ich nicht ändern kann (media$group.media$content).
Meine PHP-Seitenverwaltung interpretiert das aber als lokale Parameter und zeigt mir dann nur ne weiße Seite.
Code: Alles auswählen
<?
preg_replace('!\[bild=(.*)\](.*)\[/bild\]!isU',"<script type=\"text/javascript\"> var imgNum = 0; var pwaHeader = false;var albumDisplay = false;var pwaHorizontal = true; var pwaSlideShow = false; var pwaSlideSpeed = 5000; var pwaImageSize = 150; var pwaImageFeed = 20; var pwaBorder = false; var pwaBorderSize = 2; var pwaBorderColor = '#000'; var pwaCurrent = 0; var numImageSize = parseInt(pwaImageSize,10); function pwShow(root) {var feed = root.feed; var entries = feed.entry || [];var album = feed.link[1].href;pwf= document.getElementById('pwFeed');cDiv = document.createElement('div'); if(pwaSlideShow){cDiv.style.position = 'relative'; pwfw = numImageSize +5; pwf.style.width = pwfw + 'px';pwf.style.margin = '0px auto 0px auto';} cDiv.style.textAlign = 'center'; if(pwaHeader){hDiv = document.createElement('div');if(pwaSlideShow){ hwidth = numImageSize + 5;hDiv.style.width = hwidth +'px';} if(pwaHorizontal){hDiv.style.textAlign = 'center';hDiv.style.paddingLeft = '5px';}else {hDiv.style.textAlign = 'center';}h2 = document.createElement('span');h2a = document.createElement('a');h2a.id = 'pwHeading';h2a.href = album; h2t = document.createTextNode(pwTitle);h2a.appendChild(h2t); h2.appendChild(h2a); hDiv.appendChild(h2);pwf.appendChild(hDiv);}ul = document.createElement('ul');ul.id = 'pwaUL';ul.style.listStyleType = 'none';if(pwaSlideShow){ulh = numImageSize +10;ul.style.height = ulh + 'px';}if(pwaHorizontal){ul.style.textAlign = 'center';}ul.style.margin = '5px 0px 0px 0px';ul.style.padding = '0px';if(feed.entry.length > pwaImageFeed){pwaFetch = pwaImageFeed;}else {pwaFetch = feed.entry.length;} for (var i = 0; i < pwaFetch ; ++i){var entry = feed.entry[i];var title = entry.title.$t;var jsonImage = entry.media$group.media$content[0].url;var link = entry.link[1].href;li = document.createElement('li');li.style.backgroundImage = 'none';if(pwaHorizontal){li.style.display = 'inline';li.style.padding = '3px';li.style.textIndent = '-3px';li.style.verticalAlign = 'sub';}if(pwaSlideShow){li.style.position = 'absolute';li.style.top = '3px';li.style.left = '0px';li.style.padding = '0px';li.style.margin = '0px';li.style.textIndent = '0px';}li.style.border = '0px';if(pwaSlideShow){li.style.display = 'none';li.id = 'pwa' + imgNum;}a = document.createElement('a');a.id = 'pwaImage' + imgNum;a.href = link; a.title = title;img = document.createElement('img');img.src = jsonImage + '?imgmax=' + pwaImageSize + '&crop=1';if(pwaBorder){img.style.padding = '2px';img.style.border = pwaBorderSize + 'px ' + pwaBorderColor + ' solid';} if(pwaHorizontal){img.style.display = 'inline';}img.style.width = pwaImageSize + 'px'; img.style.height = pwaImageSize + 'px';a.appendChild(img);li.appendChild(a);ul.appendChild(li);imgNum++;}cDiv.appendChild(ul);pwf.appendChild(cDiv);if(pwaSlideShow){pwaPlay();}}</script>",$content);
?>