Member
Member
vincent3569   2013-05-29, 10:33
#1

hi

I am not sure to understand well how works Content macros http://www.zenphoto.org/news/content-macros.

in a page, I added some content in Codeblocks 3.
in my page content, I added [CODEBLOCK 3] somewhere.
but in my FE, I have the following message :
[CODEBLOCK 3] should have 1 parameter.

so, is it a bug or how to use this macro ?

Administrator
Administrator
acrylian   2013-05-29, 11:29
#2

That is actually the right usage. Best you open a ticket so we can try to reproduce it later.

Member
Member
sbillard   2013-05-30, 00:54
#3

I did discover that TinyMCE inserts ascii "non-breaking" spaces if you type more than one space in a row. The current DEV branch will now treat these as white space. I suspect that is the problem you were seeing.

Member
Member
vincent3569   2013-05-30, 07:16
#4

I checked html code of my content.
in fact, there was a introduce by a copy/paste from the zenphoto news.

After purge of html code, it works fine.

macro will certainly be useful, but we will have to be careful with the html code generated by TinyMCE, and it may be a point to be specified in the user guide...

Administrator
Administrator
acrylian   2013-05-30, 08:40
#5

Hm, I did not notice the non breaking white spaces in my tests. But copy&paste can lead to some issues in TinyMCE. For example if you copy text from a website Safari somehow carries some safari specific inline styles with it sometimes that leads to unexpected layout changes.

Member
Member
vincent3569   2013-05-30, 09:42
#6

in the same way, what should be the album name for [SLIDESHOW %1 %2] macro ?

I set [CODEBLOCK 'images/photos-du-mois' true], as explain in admin/macro, in a content block, and I obtain this error in my page :
[CODEBLOCK 'images/photos-du-mois' true] should have 1 parameter.

Administrator
Administrator
acrylian   2013-05-30, 10:05
#7

[CODEBLOCK 'images/photos-du-mois' true] of course does not work as the codeblock macro has only one parameter, that for the the codeblock to get.

[SLIDESHOW images/photos-du-mois true] is the usage for the slideshow. No quotes and no spaces for the parameters itself (other wise it would be noted as "%1" "%2").

Member
Member
vincent3569   2013-05-30, 10:57
#8

ooops! of course, I would use slideshow macro...
however, [SLIDESHOW images/photos-du-mois true] doesn't work, and break html flow.

I will create a ticket.

Administrator
Administrator
acrylian   2013-05-30, 11:01
#9

You did enable the JS on the page you are using the macro? Without that it does break the layout. Also you theme might need to have the slideshow css included as well. Both is noted within the slideshow plugin file comments.

Member
Member
vincent3569   2013-05-30, 11:16
#10

see the ticket, to avoid multiple conversations on same subject
https://github.com/zenphoto/zenphoto/issues/406

Member
Member
sbillard   2013-05-30, 17:13
#11

I will add a strip_tags to the parameter parsing to take care of TinyMCE inserting HTML markup.

Member
Member
sbillard   2013-05-30, 17:28
#12

I also guess that the Slideshow macro needs to be improved since maybe images and albums would have spaces in their names.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.