一个简单实用的制帖程序

本帖于 2012-05-13 10:48:26 时间, 由普通用户 poiuyt 编辑

This one-screen program is made to make post-making easier. It's a good place to start if you're new to posting but is still useful if you're a veteran poster.

Installation

  • In Firefix or Chrome, right click this link, choose "Save Link As",
    in the dialog box, set "Save as type" as "All files",
    and "File name" as "yykdpost.zip", then save it.
  • Use winzip, winrar or 7-zip to extract the zip content somewhere, like C:/, and there will be a directory named "C:/yykdpost".

How to use it

  • Double click "yykdpost.hta" in yykdpost directory;
  • Click "New post", fill in relevant text fields and click "Test" to experiment;
  • Once satisfied with the layout, click "Copy to clipboard";
  • In YYKD post, fill in Subject line, click [HTML源代码], put the cursor in the text area and then paste.

Now come a few details

  • First thing first, select example files and click "Test" to get a feel of how the program works.
  • All measures (postion[Left,Top] and size[Width,Height]) are in pixels. Positions start from upper-left corner with (0,0).
    Image.Top is the distance between the top of the post area and the top of the image.
    If the image is too wide, you can put a smaller Width and adjust Height accordingly.Or you can set Image.Left to a negative number to center the image.
    If the post does not have an image (for ex. one of the flashes provides the background), you still need to put Image[Top,Size] to set the frame for the flashes.
  • The positioning of the music player depends on the "Left" parameter:
    If "Left" is -2, then music player is completely hidden. suitable for single mp3 file;
    If "Left" is -1, then music player is placed below the image and "Top" is the distance between the bottom of the image and the top of the music player;
    Otherwise, the music player is placed somewhere relative to the upper-left corner of the image by [Left,Top].
    The music file is either .mp3 or .xml, in which case is a playlist. Look at this example for how to create playlists. The config file describes how the music player looks like (color... one example here). Other URLs(images and flashes) can be local files (for testing only, before final posting, you still need to upload them on the Internet), but playlist and config files must be on the Internet, even for testing.
  • A dozen example XML files are included with the program.
    "Bahama.xml" shows how "Image Border Color" and "Border width" work.
    "Yuanyuan88-1.xml" shows how "Background Start Color" and "Background End Color" work.
  • There are two checkboxes for each flash which allow you to hide the flash or put a frame around it for testing purposes. "Copy to clipboard" includes all the flashes without frame.
  • The textarea at the top of the window contains HTML codes which are placed above the image.
  • The textarea above the buttons row contains HTML codes which are placed together with image and flashes.
  • The textarea below the buttons row contains HTML codes which are placed beneath the music player or the image.
  • Each time you click "Test", the content is saved back into XML file (in "sandbox" sub-directory, previous versions being put in "versions" sub-directory) so you won't lose what you have done after quitting the program. If you want to backup your work, backup XML files.
  • "Copy to clipboard" removes all line breaks in HTML code to get better cross-browser compatibility whilst "View Code" shows the original generated code.
  • This program generates correct code to embed playlists, hopefully you won't get "Playlist not found" error.
    For reference, here is the code used to embed playlists :
    <embed height='245' width='200' name='mp3player' border='0'
           type='application/x-shockwave-flash' wmode='transparent'
           pluginspage='http://www.macromedia.com/go/getflashplayer'
           src='http://space.wenxuecity.com/media/1234581326.swf'
           flashvars='&config=http://space.wenxuecity.com/media/1235009667.xml&file=http://space.wenxuecity.com/media/1246584107.xml' />
  • The program (yykdpost.hta) being written in vbscript and HTML, feel free to view the source code and enhance it.

所有跟帖: 

友情提醒:Caveat: However, other web browsers such as Firefox and Ope -毛毛雨62- 给 毛毛雨62 发送悄悄话 毛毛雨62 的博客首页 (361 bytes) () 05/13/2012 postreply 09:28:10

谢谢, 程序是用VBScript写的,生成的扣的既没有Javascript也没有VBScript -poiuyt- 给 poiuyt 发送悄悄话 (0 bytes) () 05/13/2012 postreply 09:51:29

good plate, however, -弓尒- 给 弓尒 发送悄悄话 弓尒 的博客首页 (242 bytes) () 05/15/2012 postreply 00:04:20

problems: -弓尒- 给 弓尒 发送悄悄话 弓尒 的博客首页 (205 bytes) () 05/15/2012 postreply 00:10:11

what to do with : config -弓尒- 给 弓尒 发送悄悄话 弓尒 的博客首页 (8 bytes) () 05/15/2012 postreply 00:16:57

This may be the fix. -poiuyt- 给 poiuyt 发送悄悄话 (307 bytes) () 05/15/2012 postreply 18:38:31

太谢谢poiuyt!向你敬礼,一会挂左边“论坛管理”去! -yy888- 给 yy888 发送悄悄话 yy888 的博客首页 (0 bytes) () 05/13/2012 postreply 09:50:19

圆班为快递任劳任怨,有目共睹,谢谢! -poiuyt- 给 poiuyt 发送悄悄话 (0 bytes) () 05/13/2012 postreply 09:55:39

回复:圆班为快递任劳任怨,有目共睹,谢谢! -yy888- 给 yy888 发送悄悄话 yy888 的博客首页 (273 bytes) () 05/13/2012 postreply 10:09:30

很好,谢谢! 飞飞凝凝小朋友你已经没有不做帖的借口了,好好做帖吧:-) -tianyi- 给 tianyi 发送悄悄话 tianyi 的博客首页 (0 bytes) () 05/13/2012 postreply 10:08:07

咳咳,哆嗦一下,还得下载解压,先收藏,仔细研究一下啊。快递有天意小同学撑着呢。:)) -凝凝- 给 凝凝 发送悄悄话 凝凝 的博客首页 (0 bytes) () 05/13/2012 postreply 18:00:16

The link is a .mp3 file, not a zip file -赌城安家- 给 赌城安家 发送悄悄话 (0 bytes) () 05/13/2012 postreply 10:39:21

跟我赌一把怎么样? :) -poiuyt- 给 poiuyt 发送悄悄话 (108 bytes) () 05/13/2012 postreply 10:59:27

hahaha, this is also the way how I uploaded gif files to WXC :-) -tianyi- 给 tianyi 发送悄悄话 tianyi 的博客首页 (0 bytes) () 05/13/2012 postreply 11:07:02

Understood, thank you! -赌城安家- 给 赌城安家 发送悄悄话 (0 bytes) () 05/13/2012 postreply 11:30:29

请教高手,怎样把图片转化成mp3格式啊? -guyucaoming- 给 guyucaoming 发送悄悄话 (0 bytes) () 05/15/2012 postreply 01:03:31

error: path not found -netwalker- 给 netwalker 发送悄悄话 netwalker 的博客首页 (229 bytes) () 05/15/2012 postreply 15:52:12

You have not extracted properly. -poiuyt- 给 poiuyt 发送悄悄话 (69 bytes) () 05/15/2012 postreply 18:44:25

请您先登陆,再发跟帖!