rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ifchen2

Pages: 1 2
16
HTML & templates / Re: HELP in need of an image gallery!
« on: March 30, 2008, 09:19:45 AM »
i have a idea to make image to show in HFS. but it need jalbum to create miniature.

for example

your photo folder name "PHOTO"
use jalbum to create miniature, and folder name "min"

now we got two folder
Code: [Select]
D:\WEB\PHOTO\           <<< this one is the real picture
D:\WEB\PHOTO\min\      <<< this one is miniature

then add these folder on HFS and make the "real folder"

like this
Code: [Select]
http://localhost/PHOTO/
http://localhost/min/

and we need to make a "new empty folder" before the "min" and name "min"
this one is the fake "min" folder.
Code: [Select]
http://localhost/PHOTO/
http://localhost/min/min/

Code: [Select]
http://localhost/min/is empty folder

Code: [Select]
http://localhost/min/min/is D:\WEB\PHOTO\min\



then change name of the real "min" folder to "PHOTO" (the real picture folder name)
now like this
Code: [Select]
http://localhost/PHOTO/
http://localhost/min/PHOTO/

Code: [Select]
http://localhost/min/is empty folder

Code: [Select]
http://localhost/min/PHOTO/is D:\WEB\PHOTO\min\


at last add some code in the fileTPL

change code in [file.jpg]
Code: [Select]
<img src='/~img_lock'>to
Code: [Select]
<img src="http://%host%/min%encoded-folder%thumbs/%item-url%" onerror="if(!this.times){this.times=1;};if(this.times<=10){document.title=this.times;src='%item-icon%';this.times++;}else{}" border="0"/>
Code: [Select]
http://%host%/min%encoded-folder%thumbs/%item-url%the "min" is the "empty folder" , "thumbs" is create by jalbum program.

now file *.jpg icon will try to get file under http://localhost/min/PHOTO/thumbs/
if nothing there then get the default icon "item-icon".


this one is for beta version, ex:
Code: [Select]
[file.jpg]
  <tr><td>
  {.if|{.get|is new.}|<span class=flag>&nbsp;NEW&nbsp;</span>.}
  {.if not|{.get|can access.}|<img src='/~img_lock'>.}
  <a href="%item-url%"><img src="http://%host%/min%encoded-folder%thumbs/%item-url%" onerror="if(!this.times){this.times=1;};if(this.times<=10){document.title=this.times;src='%item-icon%';this.times++;}else{}" border="0"/> %item-name%</a>
  {.if| {.?search.} |{:<div class=item-folder>{.!item folder.} <a href="%item-folder%">%item-folder%</div>:} .}</div>
<td align=right>%item-size%<td align=right>%item-modified%<td align=right>%item-dl-count%{.$item end.}

17
中文 - Chinese / Re: 希望增加缩略图功能
« on: March 30, 2008, 08:40:59 AM »
沒關係,我原諒你。

18
HFS ~ HTTP File Server / [idea] make upload easy
« on: March 30, 2008, 08:36:27 AM »
can HFS upload page use ActiveX like Windows live SkyDriver to upload?
I mean the user can drag file on the upload page.

maby this is more easy to select files.


sorry for my bad type of english.

19
中文 - Chinese / Re: 希望增加缩略图功能
« on: December 29, 2007, 09:25:26 AM »
希望在网页,摸板中增加缩略图功能,这个应该还实现. :D

縮圖功能可以搭配JAlbum來建立批次的縮圖檔。
之所以不使用原圖大小來當縮圖是因為當檔案數量過多的時候瀏覽器會將記憶體耗盡。
然後在TPL檔中修改 *.jpg 或 *.png 的圖示。
本人只是在路徑上動手腳而已。

例如:

原始存放圖片的路徑  (包含子資料夾)
http://host/相簿資料夾/

若要將裡面的圖片的小圖示全都顯示為縮圖

只要在相簿資料夾內建立完整的縮圖資料夾即可
http://host/相簿資料夾/PHOTO/

然後將修改 [file.jpg] 的 html 碼,將img的程式碼修改成這樣
<img src="http://%host%/PHOTO%encoded-folder%thumbs/%item-url%" onerror="if(!this.times){this.times=1;};if(this.times<=10){document.title=this.times;src='/template/icons/jpg.gif';this.times++;}else{}" width="64" height="64" border="0"/>

http://%host%%encoded-folder%thumbs/%item-url%  << 這是原本檔案的路徑
http://%host%/PHOTO%encoded-folder%thumbs/%item-url%  << 這是縮圖的路徑

onerror 是用來顯示預設圖片用的,當目標圖檔沒有製作縮圖時,就將它顯示程預設的圖片。


如果您只是要直接取縮圖的話,就把程式碼改成
<img src="http://%host%%encoded-folder%thumbs/%item-url%" width="64" height="64" border="0"/>
這樣就好了,不過和之前說的一樣,過大的相片會讓瀏覽器吃光記憶體。


可以參考我的網站
http://140.125.160.221/ROVER/%E7%BE%85%E6%B5%AE%E7%9B%B8%E7%B0%BF/15%E5%B1%86%20-%20%E5%B7%A5%E7%A8%8B%20-%20%E5%B7%B4%E9%BB%8E%E9%90%B5%E5%A1%94/


you can use the JAlbum to make lot small image.


Pages: 1 2