Lightbox bug 2.4.0

Creating and modifying plugins.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

Yeah, thanks. Now netmirror has synced and the package_event_XX.xml is up to date.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Lightbox bug 2.4.0

Post by garvinhicking »

Timbalu wrote:Yeah, thanks. Now netmirror has synced and the package_event_XX.xml is up to date.
Phew, great. Thanks for letting me know.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

Works now. May I suggest an upgrade? In addition to working for entry body, extended body, comments, and html nuggets, how about a setting that reads extended properties for the current theme and creates a similar yes/no for each extended property field??
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

Did you check this isn't working already included/merged to/with the body field?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

Timbalu wrote:Did you check this isn't working already included/merged to/with the body field?
We can revisit this issue once the demo for my next theme is live, which is going to happen very soon. :wink:
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

I asked this, since the plugin already checks these 4 markup elements: body, extended body, comments and nuggets. If you allow the default body to be checked, I don't really see a need to separate body and extended, while this is actually one entry! This is done by runtime. If delivered by single entry request and body is allowed, extended is parsed too. If not, we are on blog default page where only the body field is available.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

Sorry - maybe my post wasn't clear

I understand the plugin can be configured to the entry body, extended body, comments and html nuggets.

My suggestion was to modify the plugin to also include an option to parse extended property fields (fields defined in serendipity_event_entryproperties) and theme specific property fields.
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

"Ah.." :idea: - now I see... :wink:
Extended properties could be problematic though, since not known. Its a users decision what kind of extended propery field is used, isn't it? [...] You mean, read at plugin config workflow all available ep fields and make them configurable by dynamic option... for parsing? What kind of content could that be?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Lightbox bug 2.4.0

Post by onli »

Wouldn't that be very helpful for the photo theme (which would also be a good, already available testcase for that)?

I think I merged magnific popup into that theme for the article-images, but if the plugin could cover that, I could remove it.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

Timbalu wrote:"Ah.." :idea: - now I see... :wink:
Extended properties could be problematic though, since not known. Its a users decision what kind of extended propery field is used, isn't it? [...] You mean, read at plugin config workflow all available ep fields and make them configurable by dynamic option... for parsing? What kind of content could that be?
Yes, extended properties can contain any kind of data... I personally use them A LOT for images. It might be a little more difficult than parsing entry body or extended body because there is no <a href=...> or <img> tag..... when using these ep fields for images, the value is typically just a path to an image in the media library.
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

onli wrote:Wouldn't that be very helpful for the photo theme (which would also be a good, already available testcase for that)?
Yes - definitely!
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

Ok please give me some example code to play around.
Then I can see if I get the idea to build that in....
If it is a simple path only ... why should it lightbox...?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

Timbalu wrote:Ok please give me some example code to play around.
Then I can see if I get the idea to build that in....
If it is a simple path only ... why should it lightbox...?
It may be a simple path, but what i am thinking of is a path to an image... something like "/mysite/uploads/image1.jpg.

A larger version of this image via lightbox might be nice.
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Lightbox bug 2.4.0

Post by Don Chambers »

The Kinetic theme used this bit of code (which probably isn't pretty) to detect available extended property fields defined in serendipity_event_entryproperties.... maybe it will help:

Code: Select all

if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates') {
    $ep_msg = '';
    $ep_selections = array();
    $ep_plug = serendipity_plugin_api::enum_plugins('event', false, 'serendipity_event_entryproperties');
    if ($ep_plug) {
        $ep_id = $ep_plug[0]['name'];
        $plug =& serendipity_plugin_api::load_plugin($ep_id);
        if ($plug) {
            $fields = $plug->get_config('customfields');
                if ($fields) {
                    $ep_names = preg_split('/, */', $fields); 
                    $ep_selections['none'] = NONE;
                    foreach ($ep_names as $name) {
                        $key = 'ep_' . $name;
                        $ep_selections[$key] = $name;
                    }
                } else { 
                    $ep_msg = "<div class='serendipityAdminThemeMsgError'>" . EP_ERROR_NO_CUSTOM_FIELDS . EP_ERROR_REQUIRED_FIELDS . "</div>"; 
                }
        } else {
            $ep_msg = "<div class='serendipityAdminThemeMsgError'>" . EP_ERROR_INACTIVE_EP_PLUGIN . EP_ERROR_REQUIRED_FIELDS . "</div>";
        }
    } else {
        $ep_msg = "<div class='serendipityAdminThemeMsgError'>" . EP_ERROR_NONEXISTENT_EP_PLUGIN . EP_ERROR_REQUIRED_FIELDS . "</div>";
    } 
}
I am not sure the error conditions are correct, but it does correctly retrieve the custom fields defined by the plugin. I have not begun to consider how it might retrieve fields defined by a theme, but perhaps those are available in a similar way.
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Lightbox bug 2.4.0

Post by Timbalu »

Don Chambers wrote:A larger version of this image via lightbox might be nice.
Yes, that is the normal usage for lightbox'ing. And even more some galleries...

But putting "/mysite/uploads/image1.jpg" into an EP field would need a case why this is necessary. At this point, I have no clue where this approach is heading to.., since a usage for some EP teaser image in a custom XX entries summary or something like this on startpage for example, is more like static, isn't it?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply