缩略图地址替换

This commit is contained in:
wlx 2011-10-26 09:34:33 +00:00
parent 915b7c1ab5
commit e2f7c3c1d5
11 changed files with 16 additions and 14 deletions

View File

@ -23,7 +23,7 @@ $this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$
<?php <?php
foreach($this->metadata as $md) : ?> foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span> <span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>

View File

@ -16,7 +16,7 @@ $this->breadcrumb()->setSeparator(' > ');
<hr /> <hr />
<?php foreach($this->metadata as $md) : ?> <?php foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div> <div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>

View File

@ -11,7 +11,7 @@
?> ?>
<div id="download"> <div id="download">
<h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1> <h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1>
<div id="thumb"><img src="/data/thumb/id/<?php echo $this->md['id'];?>" /></div> <div id="thumb"><img src="/service/thumb/id/<?php echo $this->md['id'];?>" /></div>
<div id="ftpurl"> <div id="ftpurl">
<fieldset><legend>FTP下载地址</legend> <fieldset><legend>FTP下载地址</legend>
<ul> <ul>

View File

@ -56,7 +56,7 @@
popup = new OpenLayers.Popup.FramedCloud("chicken", popup = new OpenLayers.Popup.FramedCloud("chicken",
feature.geometry.getBounds().getCenterLonLat(), feature.geometry.getBounds().getCenterLonLat(),
null, null,
"<div style='font-size:.8em'><a href=/data/"+feature.attributes['uuid']+">"+ feature.attributes['title'] +"</a> | <a href=/data/map/id/"+feature.attributes['id']+"><img src=/images/map.gif></a><hr /><img src=/data/thumb/id/" + feature.attributes['id']+"/></div>", "<div style='font-size:.8em'><a href=/data/"+feature.attributes['uuid']+">"+ feature.attributes['title'] +"</a> | <a href=/data/map/id/"+feature.attributes['id']+"><img src=/images/map.gif></a><hr /><img src=/service/thumb/id/" + feature.attributes['id']+"/></div>",
null, false, onPopupClose); null, false, onPopupClose);
feature.popup = popup; feature.popup = popup;
map.addPopup(popup); map.addPopup(popup);

View File

@ -14,11 +14,12 @@ $this->breadcrumb()->setSeparator(' > ');
<?= $this->partial('data/tools.phtml'); ?> <?= $this->partial('data/tools.phtml'); ?>
</div> </div>
<?php echo $this->page->getNavigation(); ?> <?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?>
<hr /> <hr />
<?php foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
<a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a> <a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
<a href="/data/doc/uuid/<?php echo $md['uuid'];?>"><img src="/images/doc-icon.png" /></a>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<hr /> <hr />

View File

@ -14,11 +14,12 @@ $this->breadcrumb()->setSeparator(' > ');
<?= $this->partial('data/tools.phtml'); ?> <?= $this->partial('data/tools.phtml'); ?>
</div> </div>
<?php echo $this->page->getNavigation(); ?> <?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?>
<hr /> <hr />
<?php foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
<a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a> <a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
<a href="/data/doc/uuid/<?php echo $md['uuid'];?>"><img src="/images/doc-icon.png" /></a>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<hr /> <hr />

View File

@ -20,7 +20,7 @@ $this->breadcrumb()->setSeparator(' > ');
foreach($this->metadata as $md) : ?> foreach($this->metadata as $md) : ?>
<hr /> <hr />
<div class="mditem"> <div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span> <span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>

View File

@ -38,7 +38,7 @@ $this->breadcrumb()->setSeparator(' > ');
<hr /> <hr />
<?php foreach($this->metadata as $md) : ?> <?php foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span> <span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>

View File

@ -20,14 +20,14 @@ $this->breadcrumb()->setSeparator(' > ');
<hr /> <hr />
<?php foreach($this->metadata as $md) : ?> <?php foreach($this->metadata as $md) : ?>
<div class="mditem"> <div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span> <span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div> </div>
<?php echo $this->page->getNavigation(); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php echo $this->page->getNavigation(); ?>
</div> </div>
<?php else : ?> <?php else : ?>
<div id='leftnav'> <div id='leftnav'>

View File

@ -59,7 +59,7 @@ window.onload=function() {
"title" : "<?php echo $row['title']; ?>", "title" : "<?php echo $row['title']; ?>",
"options" : { "options" : {
// set the full HTML for the info window // set the full HTML for the info window
"infoHtml": "<a href=/data/<?php echo $row['uuid']; ?>><?php echo $row['title']; ?></a><hr /><img src=/data/thumb/id/<?php echo $row['id']; ?> />" "infoHtml": "<a href=/data/<?php echo $row['uuid']; ?>><?php echo $row['title']; ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> />"
} }
}, },
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -148,7 +148,7 @@ endforeach;
</div> </div>
<div id="left"> <div id="left">
<div id="ImageViewer"><img src="/data/thumb/id/<?php echo $md->id;?>" onclick="fnCreate('<?php echo $this->thumburl; ?>')" /> </div> <div id="ImageViewer"><img src="/service/thumb/id/<?php echo $md->id;?>" onclick="fnCreate('<?php echo $this->thumburl; ?>')" /> </div>
<div id="abstract"> <div id="abstract">
<p> <p>
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?> <?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>