Pages (4):    1 2 3 4   
Administrator
Administrator
acrylian   14-01-2019, 12:05
#11

Well, those are suggestions. textobject usage itself has no standard behaviour except outputting its content instead of the normal image.

@vincent3569 Sidenote: I just wanted to try myself and somehow I could not activate the theme. Reason was that the folder/archive downloaded from Github is named zpBootstrap-2.2 while the theme name is actually zpBoostrap. So it needs to be renamed to zpBootstrap first. Probably other users stumble upon that so I suggest to add taht to the install instructions.

Administrator
Administrator
acrylian   14-01-2019, 12:13
#12

@tplowe56 I now understand what you tried. It tries to open the file directly this way which of course is not working. It will require the theme to handle non image files differently by outputting the textobject html directly on the thumb view. It might be possible to have the full-image.php return the content if protected full image view is enabled. Will take a look when I get the time.

Member
Member
tplowe56   14-01-2019, 14:53
#13

Just FYI, the Basic theme presents YouTube videos just fine when clicking on a thumbnail. I have use this method for years, but I have set that video album to use the basic theme. The code I use in the text file looks like this: [code][/code]

Administrator
Administrator
acrylian   14-01-2019, 18:24
#14

Yes, because the basic theme uses the image page itself and not any *box script like zpBoostrap that opens the file itself (the "full image" which in this case is not an image but a text file).

Member
Member
vincent3569   15-01-2019, 10:17
#15

hi
with zpBootstrap, it works too on image.php as with basic.
the behavior of zpBootstrap on album.php is a following:

  • click on image name under image itself: redirect to image.php
  • click on image thumb: open image in fancybox (it's a behavior closed to gallerrific : able to see all images in albums page without reload image page for each image).

to improve my theme to open video with fancybox in album.php, I have to detect if it's an image or a text file and then, adapt the code.

Administrator
Administrator
acrylian   15-01-2019, 10:50
#16

You can quite easily check if it is a real image or another "image" type within the next_image loop:
[code]
if(isImagePhoto($_zp_current_image)) {
// real image
} else if(isImageVideo($_zp_current_image)) {
//custom stuff for real video/audio "images"
} else {
$objectclass =strtolower(get_class($_zp_current_image));
if($objectclass == 'textobject') {
// do Fancybox custom code for textobjects - however caution since textobject can be anything
}
}[/code]

Member
Member
vincent3569   15-01-2019, 11:22
#17

thanks malte
really appreciate the help

Member
Member
vincent3569   17-01-2019, 10:45
#18

hi
I need help for video or audio files:
with class-video, is there a way to know if there a video or audio file?

Administrator
Administrator
acrylian   17-01-2019, 13:32
#19

Best check the suffix using getSuffix(). It's generally .mp4/m4v for video and m4a/mp3 for audio.

Member
Member
vincent3569   17-01-2019, 18:37
#20

hi again,

to manage online video with my theme, I would like to create a new class, quite similar to the class-textobject class.
I started doing this in a dedicated plugin.

rather than this solution, is it possible to create it directly in my theme?
if so, how should I go about it?

thank you in advance for your help.

Pages (4):    1 2 3 4   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.