We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Solspace Gallery Extended conflicting with Mark Huot’s File Extension

Development and Programming

larry@transitid.com's avatar
[email protected]
14 posts
16 years ago
larry@transitid.com's avatar [email protected]

This question may be related to a resolved thread.

This question may be related to this thread as well.

Has anyone been able to solve this problem (while keeping both extensions active?)

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
16 years ago
Lisa Wess's avatar Lisa Wess

I’ve moved this down to the Extensions forum as neither of the mentioned add-ons are first-party. Your best bet would be to contact the authors and see if they have a solution for you

       
larry@transitid.com's avatar
[email protected]
14 posts
16 years ago
larry@transitid.com's avatar [email protected]

Ahhh. This was already answered here.

The Gallery Extended module/extensions is just that; a module AND an extension. I wasn’t even using the extension, so I disabled it. Back on track now.

       
Yuri's avatar
Yuri
273 posts
16 years ago
Yuri's avatar Yuri

Here, I got the solution (a module hack)

The hack is based on the assumption that if there is a field of File type in the form, there is no linked gallery. That is, if among the fields for the entry edited there is a cusom field of File type - the Gallery Extended extension is not processed.

So, in the file mod.gallery_extended.php find (approx. line 1319) <pre><code>$this->data = array();

    foreach ( $_FILES as $key => $val )
    {
        if ( preg_match( "/image(\d+)$/s", $key, $match ) )
        {
            if ( $_FILES[ $match['0'] ]['name'] == '' ) continue;[/code]

and change to <pre><code>$this->data = array();

    foreach ( $_FILES as $key => $val )
    {
      // If the form has our custom Mark Huot's File field
      // do not process the Gallery Extended
      if ($key=="field_id_8") {
        return FALSE;
      }
        if ( preg_match( "/image(\d+)$/s", $key, $match ) )[/code]

In the replacing code change field_id_8 to “techical” (from the database) name of your File custom field (might also need to add _img suffix - cannot tell as I’m using a modifiled version of File extension)

       
Qrat's avatar
Qrat
40 posts
16 years ago
Qrat's avatar Qrat

I get this error

There was no category provided. Please go back and provide a category

Gallery extension ask me to provide a category, but I disable Images tab in this weblog =) this wxtension loads anyway…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.