Piwigo.org

You are not logged in. (Register / Login)

Announcement

#31 2017-02-11 22:43:49

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

Published new version, major revision. Now Piwigo2Img suport calling piwigo api by javascript. See admin options.
I have added this future because of CharlieM post piwigo.org/forum/viewtopic.php?id=27621 , some users can have problems with php/loopback.

Changelog:

v1.8.0pjm (php json mixt) (2017-02-10)
--Added api request method as php or javascript to admin options;
--Added custom-example output option to code <select>;
--Some small changes to "piwigo2img-demo.htm";
--Other small changes, refinements and fixes;

v1.7.11jc (json classic) (2017-01-22) [NOT PUBLISHED! ]
--Changes to jsDisable... functions, replaced with jsReset... functions for future compatibility with javascript method;
--Replaced api reguest method from php to javascript (using api json output);


@WuppiGER
I have added in 1.8.0 some custom-example on how you can generate custom html code. feel free to modify this lines to your needs.
[Github] piwigo2img file piwigo2img-archive/piwigo2img-v1.8.0pjm.php@L864-L867

Last edited by eliz82 (2017-07-26 22:16:16)

Offline

 

#32 2017-02-13 12:56:01

WuppiGER
Member
Location: Germany
Registered: 2016-05-31
Posts: 33
Website

Re: [Tool] Piwigo2Img

eliz82 wrote:

this part of the code (without the main DIV) is easy to generate without big changes to piwigo2img, because the code is symmetric. i have no plan to add asymmetric code generation to piwigo2img

eliz82 wrote:

@WuppiGER
I have added in 1.8.0 some custom-example on how you can generate custom html code. feel free to modify this lines to your needs.
[Github] piwigo2img file piwigo2img.php@L864-L867

Many thx for this example. And i see the Problem ... the <div> must be set manually
<div id="" class="gallery  gallery-columns-XXX gallery-size-thumbnail">. When i write it into custom-code - the div will set on every pic (of course) :(
FIRST Test: set div manually (in wordpress) around your code: works ;)

Idea ... click on copy/insert (check: only if "custom-code" is set): you will set the correct div (count pictures: gallery-columns-xxx) around the code. But: bigger changes need - i think ... ok ... Semi-automatic is for me ok *G*

THX!!!

Offline

 

#33 2017-03-09 20:36:08

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

Major revision with many changes

v1.8.1pjm (php json mixt) (2017-03-08)
--Category tree <select> is build to infinite level depth for php method;
--Added Async <button> that execute jsAsync() function, this can generate asynchronous code;
--Added user custom <input> field for async-example;
--Javascript 1 is added in the page only if api request method used is javascript;
--Added debug admin option for php method;
--Improved adding styles to html elements with javascript;
--Fixed bug when trying to insert code in <textarea> when <iframe> missing from page (bug introduced in 1.7.8);
--Reorganise the javascript code by the position in the page of element they refer;

WuppiGER wrote:

Idea ... click on copy/insert (check: only if "custom-code" is set): you will set the correct div (count pictures: gallery-columns-xxx) around the code. But: bigger changes need - i think ... ok ...

Originally I thinked to the same thing, but in the final I added a new button called Async, because is more clear for the user to understand what this button does.
Also integrated the Async function with the function that show the generated code in textarea, this keep the async code and the begging and the end even new pictures are clicked. So I can say now Piwigo2Img fully support generating asynchronous code.

I also made a recursive function that generate the album tree, so now the tree is show to infinite level depth.

Last edited by eliz82 (2017-03-25 20:00:58)

Offline

 

#34 2017-07-18 16:00:15

Marcel
Member
Registered: 2017-07-18
Posts: 1

Re: [Tool] Piwigo2Img

I am trying to run the Piwigo2Img plug-in on my wordpress blog to insert pictures served on a piwigo multi site configuration.

I build the piwigo multi site as described on this wiki page

http://piwigo.org/doc/doku.php?id=user_ … tiple_site

If I try to insert pictures from a standard piwigo site I have no problems.
But if I try to insert pictures from a multi site configured the plugin doesn’t show any pictures to choose from.

Did any body used this plugin in combination with a multi site config and got it working ??

Offline

 

#35 2017-07-26 22:12:33

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

Marcel wrote:

Did anybody used this plugin in combination with a multi site config and got it working ??

I have not tested with piwigo multi-site configs, I have no such possibility.

The question is: is the piwigo Api working ok in multi-site mode?
Maybe multi-site mode Api has a different output from the normal version and the plugin cannot interpret the new data type.


You can either:
1) check manually if Piwigo Api works in multisite mode ... example: http://subdomain.yoursite.com/ws.php?fo … tput=false

2) or if you have some minimal php programing skills you can enable $debug variable in my plugin options and check where is the problem.

Offline

 

#36 2017-10-20 18:58:15

Digidani
Member
Registered: 2017-10-20
Posts: 13

Re: [Tool] Piwigo2Img

I found this tool today and I tested it with my phpbb3-board. It´s all fine for me! Wonderful!

But one question / wish: at my 4images gallery I had a short code for linking the pictures at my phpbb3. The link looks like this (without spaces in tags):

[i m g]http://www.mydomain/4images/data/media/1/picture1.jpg[/ i m g][b r /][U R L=http://www.mydomain/4images/details.php?image_id=xxx]name of the picture[/U R L]

At my phpbb3 works a lightbox for image-tags. So that code shows a thumbnail and the title of the picture at the bottom. The title is a link to the details site at the gallery. A klick at the thumbnail shows the picture at the lightbox, a klick at the link shows the picture in the gallery.

Is it possible to configure your tool in a similar way? What I have to do? I am not a coder - so can you help me? What I need is an image-tag for the picture (to open it in phpbb3-lightbox) and a link to the gallery under the thumbnail (to open the picture in gallery instead of the lightbox).

Thank you in advance! And sorry my bad english...

Offline

 

#37 2017-10-20 20:16:32

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

Digidani wrote:

At my phpbb3 works a lightbox for image-tags. So that code shows a thumbnail and the title of the picture at the bottom. The title is a link to the details site at the gallery. A klick at the thumbnail shows the picture at the lightbox, a klick at the link shows the picture in the gallery.

Is it possible to configure your tool in a similar way? What I have to do? I am not a coder - so can you help me? What I need is an image-tag for the picture (to open it in phpbb3-lightbox) and a link to the gallery under the thumbnail (to open the picture in gallery instead of the lightbox).

From what you describe i think is possible with some small customization of the piwigo2img code.

So you want:
1) a small thumbnail that open a big jpeg image in lightbox.
2) under the thumbnail you want the title of the image linked to the Piwgo page of the image.

Do you have an extension (or mod) in phpbb3 that generate lightbox code?  If so, how the bbcode looks like?
I ask this because I also have give some instruction on how to install Lightbox [Github] piwigo2img file piwigo2img-readme/lightbox2-install.txt@L40-L72 . So I don't know if you use my method or something else.

Last edited by eliz82 (2017-10-20 20:16:57)

Offline

 

#38 2017-10-20 20:20:07

Digidani
Member
Registered: 2017-10-20
Posts: 13

Re: [Tool] Piwigo2Img

Yes, your description is right! Thats what I need.  :-)

I am using an extension for the lightbox:  https://github.com/VSEphpbb/lightbox

Offline

 

#39 2017-10-20 21:17:38

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

You didn't responded to this "If so, how the bbcode looks like?"

Code:

it's something like normal code [img][/img] or something custom like [lightbox] [/lightbox]

Is essential because I don't have a test version of phpBB3 anymore, so i cannot test the extension. I only had phpbb3 for tests last year when I have written the piwigo2img code.

Last edited by eliz82 (2017-10-20 21:19:34)

Offline

 

#40 2017-10-20 21:23:35

Digidani
Member
Registered: 2017-10-20
Posts: 13

Re: [Tool] Piwigo2Img

The complete code from the gallery is this one:

[ img ]http://www.mydomain/4images/data/media/1/picture1.jpg[ /img ][ size=85 ][ break ][ url=http://www.mydomain/4images/details.php?image_id=1]>>> Picture1[ /url ][ /break ][ /size ]

It´s a normal [img]-Code. So I can put in every picture from www - only combine with image-code and the lightbox make it to a thumbnail and opens it after clicking in the lightbox-view.
The "break"-code switches the text-link to the next column. "Size" is for the fontsize of the text-link.

Last edited by Digidani (2017-10-20 21:25:32)

Offline

 

#41 2017-10-20 22:32:32

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

this type of code

Code:

[ img ]http://www.mydomain/4images/data/media/1/picture1.jpg[ /img ][ size=85 ][ break ][ url=http://www.mydomain/4images/details.php?image_id=1]>>> Picture1[ /url ][ /break ][ /size ]

also create text with link under the picture?

so "size" and "break" are optional?

Offline

 

#42 2017-10-20 23:14:38

Digidani
Member
Registered: 2017-10-20
Posts: 13

Re: [Tool] Piwigo2Img

Yes.

Size = Fontsize in phpbb3
Break = new line

Offline

 

#43 2017-10-20 23:29:09

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

I find this code strange

Code:

[ img ]http://www.mydomain/4images/data/media/1/picture1.jpg[ /img ][ size=85 ][ break ][ url=http://www.mydomain/4images/details.php?image_id=1]>>> Picture1[ /url ][ /break ][ /size ]

because [ img ] is closed before [ url ] is starting. this don't look like a small image linked to a big image. your code look like an image without a link and text with a link.

also they are only 2 links in the code. so this one "http://www.mydomain/4images/details.php?image_id=1" is the big jpg and "http://www.mydomain/4images/data/media/1/picture1.jpg" is the small jpg ?

Offline

 

#44 2017-10-20 23:53:08

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

you can edit piwigo2img.php in notepadd++

Code:

$code_type = array('custom-lightbox2');

in the admin options (or add it at the end of the array if you also want to use the standard ones).

then after the line 934 / [Github] piwigo2img file piwigo2img-archive/piwigo2img-v1.8.2pjm.php@L934 , you can add the logic for this new type of code. something like this

Code:

//custom-lightbox2 - example
else if (code_type.options[code_type.selectedIndex].value == 'custom-lightbox2') {
    window.code =  bbcode_separator + '[img]' + lightbox2_image + '[/img][break][url= + link + ]' + image_title + '[/url][/break]';
}

then save and run piwigo2img. at "Output options" chose "picture" to link, and "enter" as separator.
---------
but like i said in the previous post, i doubt the code you gave me in your example is correct. "img" is not look to be linked. only the title is linked.

Last edited by eliz82 (2017-10-21 00:15:00)

Offline

 

#45 2017-10-21 00:10:56

eliz82
Member
Location: Romania
Registered: 2016-04-27
Posts: 190
Website

Re: [Tool] Piwigo2Img

do not copy paste the code. this forum software is messing with the text (is removing some text).
i will attach an image, try to reproduce


Uploaded Images

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2017 · Contact