view · edit · sidebar · attach · print · history


<< 20120329-setup-de-oddb-org | 2012 | 20120327-update-fachinfo-photo >>


  • Photo in Fachinfo
    • updated sort images by size in package name
    • load thumbnails size image (from Flickr) in document
    • created Photo chapter
    • updated image layout
  • Setup



Update ntumbnails in Fachinfo


  • load thumbnails size image (from Flickr) in document
  • updated image layout

In FachinfoChapterChooser and FachinfoInnerComposite use @photos variable of @container.

FachinfoComposite (as @@container@@)
  @photos (from Fachinfo Model Class) 
  -> FachinfoChapterChooser
  -> FachinfoInnerComposite

And moved Downloading of photos from Flickr to Fachinfo model class (Not FachinfoDocument class)


HtmlGrid::Div < HtmlGrid::Component

  • CSS_ID

@value is nil (ininialize)
before to_html are called, set Array or String

photos chapter

In Chapter chooser, added Fotos link.
created :photos (Photo) chapter.

Photo link (F) in result list

Updated photo link in result list as direct link to photos chapter

General way to create event_url for href of link

 args = [
   :reg, model.registrations.first.iksnr,
   :chapter, @name,
 photo.href = @lookandfeel._event_url(:fachinfo, args)

Fallback image

some photo doesn't have Small size image.


If are there photo then use Thumbnail size image instead of Small as fallback
in Photo chapter.

Flickr Image Size

 # "Square"    :  75 x  75 px
 # "Thumbnail" : 100 x 100 px
 # "Small"     : 180 x 240 px
 # "Small320"  : 240 X 320 px
In Fachinfo Document

use Thumbnail size image

In Photo Chapter

use Small size image. If it doesn't exist, use Thumbnail(if possible)

no_method_error_for_sponcer_link? No Method Error for Sponser link


undefined method `name' for {}:Hash
Error Log
@400000004f733964279dea14 error in SBSM::Session#to_html: /de/gcc/fachinfo/reg/61261/chapter/composition/currency/USD
@400000004f733964279dedfc NoMethodError
@400000004f733964279dedfc undefined method `name' for {}:Hash
@400000004f733964279dedfc /var/www/ `company_name'
@400000004f733964279df1e4 (eval):2:in `name'
@400000004f733964279df1e4 /var/www/ `init'
@400000004f733964279df1e4 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.5/lib/htmlgrid/component.rb:139:in `initialize'
@400000004f733964279dfd9c /var/www/ `new'
@400000004f733964279dfd9c /var/www/ `sponsor'

This also comes from Data Floating.
Then I rebooted via svc

$ svc -h /service/SERVICE_NAME
$ svstat /service/SERVICE_NAME

It works fine again.

Error is Fachinfo Print View

2012-03-28 18:06:20.145339500 error in SBSM::Session#to_html: /fr/gcc/print/fachinfo/37512
2012-03-28 18:06:20.145340500 NoMethodError
2012-03-28 18:06:20.145340500 undefined method `photos' for #<ODDB::View::Drugs::FachinfoPrintComposite:0x00000009a42140>
2012-03-28 18:06:20.145342500 /var/www/ `init'
2012-03-28 18:06:20.145343500 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.5/lib/htmlgrid/component.rb:139:in `initialize'
2012-03-28 18:06:20.145343500 /var/www/ `new'
2012-03-28 18:06:20.145344500 /var/www/ `document'
2012-03-28 18:06:20.145344500 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.5/lib/htmlgrid/composite.rb:142:in `create'

allowed access to photo in print view.


Cloned via git into /var/www/

$ cd /var/www
$ git clone ssh://

Created http.conf

<VirtualHost *:80>
  DocumentRoot /var/www/
  DirectoryIndex index.rbx
  RubyAddPath /var/www/
#RubyAddPath /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.1.5/lib
  RubyRequire 'sbsm/trans_handler'
  SetHandler ruby-object
#RubyTransHandler SBSM::FlavoredTransHandler.instance
  RubyTransHandler SBSM::ZoneTransHandler.instance
  SetEnv DRB_SERVER druby://localhost:11000
  Alias /rss /var/www/
  Alias /images /var/www/
  Alias /captcha /var/www/

try run

/var/www/ 498(master) $ bin/oddbd 
bin/oddbd:4: warning: variable $KCODE is no longer effective; ignored
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /var/www/ invalid multibyte char (US-ASCII) (SyntaxError)
/var/www/ invalid multibyte char (US-ASCII)
/var/www/ syntax error, unexpected $end, expecting keyword_then or ';' or '\n'
      if /^([ľA-Za-z_]+([A-Za-z_0-9-]+[A-Za-z_])?)$|^[$%'"]'?$/o =~ a
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

Note use Ruby 1.8

Tried with Ruby 1.8 (1.8.7)

/var/www/ 500(master) $ ruby18 bin/oddbd 
/var/www/ `require': no such file to load -- rclconf (LoadError)
        from /var/www/
        from bin/oddbd:7:in `require'
        from bin/oddbd:7

Installed following gems via Ruby 1.8.7

Continue to Tomorrow


view · edit · sidebar · attach · print · history
Page last modified on June 28, 2013, at 05:33 PM