Hi,
I'm writing an plugin that create an image from first page pdf, eps files to preview what is in document. After some review I used class-WEBdocs as base of new one.
I have:
- upload
- checked function of generating image(by ghostscrip)
In class-WEBdocs use static images, but I want to generate a thumb of image which will be stored in directory. Is there a class for it and can you indicate in which file is used?
Other thing - is there any place to disable scaning for images placed in directory, in albums? (/albums/sample_direcotry)
Comments
There is a plugin that will disable scanning of folders and/or file suffixes. It is named `filter-fileSearches` and may be found in our repository of unsupported code on GitHub.
Then I must in "function getThumbImageFile" indicate on this file?
`$filename = $this->filename;`
`$album = $this->folder;`
`$ff_src_file = $_SERVER['DOCUMENT_ROOT'] . '/' . $albums . '/' . $filename;`
But have an error with
`
NOTICE: Undefined property: EXTdocs::$folder in /zp-core/zp-extensions/class-EXTdocs.php on line 138
EXTdocs->getThumbImageFile called from TextObject->getThumb (class-textobject_core.php [162])
from getImageThumb (template-functions.php [2627])
from printImageThumb (template-functions.php [2645])
from include (album.php [56])
from index.php [100]
`
Have you mayby some good solution for get the right path?
$filename = $this->filename;
$album = $this->folder;
`
That cannot work, first `$this` is a variable within a class and then images and albums are different objects. EIther it is an album object or an image one. In any case `filename` and `folder`won't work on both.
Please read: http://www.zenphoto.org/news/zenphotos-object-model-framework
and review the documentation of the main Zenphoto classes. If you haven't you should read the theming tutorial as well.
If you just want the full image url there are template functions available.
and review the documentation of the main Zenphoto classes. If you haven't you should read the theming tutorial as well.
If you just want the full image url there are template functions available.
`
You don't understand. I don't use this in theme but in class. I sed:
`full path to file.`
Not url - i need something like
`/home/some/some/albums/test`
`home/some/some/albums/test`
What is "some" here?
You get the url to an item (which refers to any supported items) within an album via `getFullImageURL()` if in the right context. Otherwise you need to create an image object first to use the method. Before you can create an image object you need the object of its album. That is explained on the object model tutorial.
If this file is outside the albums and not supported by a plugin like videos you cannot use the object model naturally.
I base plugin on: `class-WEBdocs`
I want to get:
`SERVER_DOCUMENT_ROOT/BASE_ALBUM_DIR/ALBUMS/Filename`
Like I write above, I want to create an image from uploaded file. For that I need to tell ghostscript from where get file and where storage image file.
After some improves in code, I want to publish for other. Can you say how/where send/publish, so that others also have the chance to use?
If someone need, find here: http://pastebin.com/J7iJcWZG
Mayby one day I have time to finish it or mayby someone do it for me