I'm using DVDpedia and i'd like to modify the InfoView, so that links (images) attached to a record are shown as image AND other file-types as links.
I already got the following code, but either the first block of <!--IFlinks or (if this one is removed) the second block works.
Both blocks of code in the file and the images are not shown.
Is there any way to show both?
Background: I have images and video-files attached to a record. I want the images to be shown as "<img src", the videos as "<a href".
Thanks in advance.
bateman23
Code: Select all
<!--IFlinks
<div class="links" ref="[link:type]">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
</ul>
</div>
ENDlinks-->
<!--IFlinks
[linksBegin]<img src="[link:url]" alt="[link:name]">
[linksEnd]
ENDlinks-->
Code: Select all
<script type="text/javascript">
function removeUnwantedPrefix() {
// pedia://bruji.com/loadLink= is the prefix that we want to remove from img tags
links = document.getElementsByTagName('img');
for (indexX in links) {
nextLink = links[indexX];
if (nextLink.src.indexOf('pedia://bruji.com/loadLink=') !=-1) {
nextLink.src = nextLink.src.substring(27, nextLink.src.length);
}
}
}
</script>