Changeset 17661 for platform/tdiary/plugin/notify_wassr.rb
- Timestamp:
- 08/15/08 11:30:32 (5 months ago)
- Files:
-
- 1 modified
-
platform/tdiary/plugin/notify_wassr.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/plugin/notify_wassr.rb
r17660 r17661 43 43 date = @date.strftime('%Y%m%d') 44 44 diary = @diaries[date] 45 titles = [] 45 sectitle = '' 46 index = 0 47 46 48 diary.each_section do |sec| 47 titles << sec.subtitle 49 index += 1 50 sectitle = sec.subtitle 48 51 end 49 52 50 blogtitle = @conf.html_title 51 sectitles = titles.join(', ') 52 url = @conf.base_url + anchor(date) 53 url = @conf.base_url + anchor("#{date}p%02d" % index) 54 prefix = @conf['wassr.notify.prefix'] 53 55 format = @conf['wassr.notify.format'] 54 prefix = @conf['wassr.notify.prefix']55 56 56 status = format % [prefix, blogtitle, sectitles, url]57 status = format % [prefix, sectitle, url] 57 58 58 59 begin 59 wsupdater = Wassr::Updater.new(@conf['wassr.user'], @conf['wassr.pass'] ) 60 wsupdater.update( status ) 60 # wsupdater = Wassr::Updater.new(@conf['wassr.user'], @conf['wassr.pass'] ) 61 # wsupdater.update( status ) 62 @conf.debug(status) 61 63 rescue => e 62 @conf.debug( e)64 @conf.debug( e ) 63 65 end 64 66 end 65 67 66 68 def notify_wassr_init 67 @conf['wassr.notify.prefix'] ||= '[blog update] '68 @conf['wassr.notify.format'] ||= '%s %s :%s %s'69 @conf['wassr.notify.prefix'] ||= '[blog update]' 70 @conf['wassr.notify.format'] ||= '%s %s %s' 69 71 end 70 72 71 73 add_update_proc do 72 notify_wassr if @cgi.params['wassr.notify'][0] == 'true' 74 if @mode == 'append' then 75 notify_wassr if @cgi.params['wassr.notify'][0] == 'true' 76 end 73 77 end 74 78 75 79 add_edit_proc do 76 checked = ' checked'80 checked = '' 77 81 if @mode == 'preview' then 78 82 checked = @cgi.params['wassr.notify'][0] == 'true' ? ' checked' : ''
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)