Zotonic
Zotonic
zotonic@conference.zotonic.com
Sunday, 6 January 2013< ^ >
arjan has set the subject to: Zotonic - the Erlang Content Management Framework
Room Configuration

GMT+1
[07:52:19] Maas joins the room
[08:12:23] Maas leaves the room
[08:45:32] hcvst6 joins the room
[09:04:49] hcvst6 leaves the room
[09:07:31] hcvst6 joins the room
[09:07:46] hcvst6 leaves the room
[10:16:32] Arjan joins the room
[10:18:00] Protagores joins the room
[10:18:16] <Protagores> Hi again.
[10:18:43] <Arjan> morning
[10:18:56] <Protagores> Why does embedded media render as <!-- z-media --> comment?
[10:19:13] <Arjan> it is post-processed with a runtime filter
[10:19:29] <Arjan> http://zotonic.com/docs/latest/ref/filters/filter_show_media.html
[10:19:41] <Arjan> so you'd have to do {{ id.body|show_media }}
[10:20:06] <Protagores> where?
[10:20:37] <Arjan> on the place where you want to show the embedded images
[10:21:12] <Protagores> in the TinyMCE?
[10:21:59] <Arjan> in the frontend
[10:23:30] <Protagores> web? or have I to do the job with templates?
[10:24:08] <Arjan> I dont understand
[10:24:13] <Arjan> what is your problem exactly?
[10:25:22] <Protagores> I embed an image into home page, it shows in rich text editor but not on the home page itself
[10:25:43] <Protagores> when I look at source, I see only z-media comment where it should be
[10:25:49] <Arjan> ok
[10:26:00] <Arjan> so you have to edit your .tpl file for the homepage
[10:26:17] <Protagores> dissuks...
[10:26:35] <Protagores> anyway, what to insert and where?
[10:26:57] <Arjan> in the tpl, on the place where it outputs the 'body' attribute
[10:27:04] <Arjan> you have to add the show_media filter
[10:27:48] <Protagores> {{ m.rsc.page_home.body | show_media }}
[10:27:52] <Protagores> like that?
[10:28:52] <Arjan> exactly
[10:29:48] <Protagores> keen to fix basesite skel?
[10:30:04] <Arjan> aaaaah
[10:30:11] <Arjan> ok gotcha
[10:30:17] <Arjan> I will fix that :)
[10:30:27] <Arjan> I thought it was in one of your own templates
[10:31:10] <Arjan> I'll fix it
[10:31:23] <Protagores> what are proper values for "size" attribute
[10:31:26] <Protagores> ?
[10:31:37] <Protagores> I need a thumbnail w/o labels
[10:32:06] <Arjan> you can choose between small/medium/large
[10:32:15] <Arjan> the actual sizes for that are in the "site.media_dimensions" config key
[10:32:16] <Arjan> see http://zotonic.com/docs/latest/ref/filters/filter_show_media.html
[10:32:17] <Protagores> css float:'ing at the left
[10:32:46] <Protagores> or it may only be placed between text vertically?
[10:33:01] <Arjan> that is the "align" property
[10:33:12] <Arjan> block means between text
[10:34:31] <Protagores> is it possible to hide the label? without editing it out in the image item itself?
[10:35:12] <Arjan> yes, by overriding the _body_media.tpl template
[10:35:24] <Arjan> copy it into your site and edit it
[10:36:25] <Protagores> well
[10:36:46] <Protagores> I perhaps would add another boolean attribute "label"
[10:36:56] <Protagores> rather
[10:38:26] <Protagores> should it take values "0"/"1" or rather textual "true"/"false"?
[10:39:15] <Protagores> or even maybe "none"/"above"/"below"? :P
[10:41:24] <Arjan> "true" / "false" is fine
[10:41:35] <Arjan> z_convert:to_bool is a smart function :)
[10:41:44] <Arjan> (zotonic001@ixion)11> z_convert:to_bool("true").
true
(zotonic001@ixion)12> z_convert:to_bool("false").
false
[10:56:27] <Protagores> so what about above/below
[10:56:33] <Protagores> is that necessary?
[10:56:48] <Protagores> or, well, useful
[11:03:53] <Arjan> just saying that you can store a string
[11:04:10] <Arjan> if you use it later in a template it will do the "right thing"
[11:04:55] <Protagores> btw I need a float:left, not align:left
[11:05:20] <Protagores> because the latter just puts a single string right to image
[11:05:36] <Arjan> the align string is meant to use as a css class
[11:05:43] <Protagores> but I need a *whole paragraph* right to it
[11:06:13] <Arjan> sounds like a CSS issue
[11:06:39] <Protagores> so, I just need to edit site.css?
[11:06:55] <Arjan> yes create your own site.css
[11:07:01] <Arjan> in your site
[11:07:10] <Arjan> (it will override the default one)
[11:07:17] <Protagores> :P
[11:07:34] <Protagores> a funny thing is this CMS, indeed :P :P
[11:07:50] <Arjan> try to avoid editing zotonic's files directly, because that will get you into trouble when you want to upgrade later
[11:08:06] <Protagores> git checkout?
[11:08:25] <Protagores> that should get rid of stuff
[11:08:42] <Arjan> yes
[11:09:08] <Protagores> btw, I think, .pot templates should be put into .gitignore or something
[11:09:24] <Arjan> yes, I agree
[11:09:39] <Protagores> because when I re-generate them and do git status, they show as rubbish
[11:21:05] <Protagores> /* Media alignment classes */
.left {
float: left;
}
.right {
float: right;
}
.block {
display: block;
}
[11:21:14] <Protagores> is this OK?
[11:21:18] <Arjan> yep
[11:23:33] <Protagores> I think, margin-right should be added or smth
[11:23:51] <Arjan> probably yes
[11:23:57] <Protagores> and margin-left for .right class
[11:24:04] <Arjan> yep
[11:24:07] <Protagores> how many px do you recommend?
[11:29:27] <Arjan> 10?
[11:29:37] <Arjan> depends on the design..
[11:49:18] <Protagores> they recommend 2em
[11:49:49] <Protagores> de-facto typesetting standard
[11:52:00] <Protagores> > width='200' height='180'
but I set "size":"small"... o.O"
[12:09:33] <Protagores> it should be 100x100, shouldn't be it?
[12:30:51] <Protagores> wow, when I set site.media_dimensions, it worked :P
[12:48:21] <Arjan> cool
[12:49:15] <Arjan> ah the defaults are different I see
[12:49:17] <Arjan> will fix
[12:50:37] <Arjan> the default value is 200x200,300x300,500x500
[12:50:40] <Arjan> documentation bug
[12:50:43] <Arjan> sorry about that
[13:10:05] <Arjan> pushed a fix, also for the basesite skel show_media
[13:10:06] <Arjan> :)
[13:10:07] <Arjan> thanks
[13:10:09] <Arjan> im out for lunch
[13:11:39] Arjan leaves the room
[15:19:55] Arjan joins the room
[15:27:42] <Protagores> Hi again. Is the property value for size called "middle" or "medium"?
[15:29:16] <Arjan> middle
[15:57:21] maas.maarten.zeeman joins the room
[16:24:38] Arjan leaves the room
[17:18:23] maas.maarten.zeeman leaves the room
[19:59:24] Protagores leaves the room
[21:43:09] Arjan joins the room
[22:33:38] Arjan leaves the room
[22:36:11] Arjan joins the room
[23:08:57] Arjan leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!