Giter Site home page Giter Site logo

Doubts about admin-page-class HOT 5 CLOSED

bainternet avatar bainternet commented on August 27, 2024
Doubts

from admin-page-class.

Comments (5)

bainternet avatar bainternet commented on August 27, 2024
  1. Yep, that is correct.
  2. To add fields to a conditional or repeater blocks you use the same methods as you normally would but you add one parameter set to true ex:
    to add a text field you use
    $options_panel->addText('text_field_id',array('name'=> 'My Text ', 'std'=> 'std TEXT'));
    and if you want to use it in a conditional or repeater blocks you just add true as the last parameter
    $fields[] = $options_panel->addText('text_field_id',array('name'=> 'My Text ', 'std'=> 'std TEXT'));

the only difference is that the later returns the $new_field array and the first one don't.

  1. its not documented but you can pass preview_height and preview_width to the addImage method
    ex:
    $options_panel->addImage('image_field_id',array('name'=> 'My Image ','preview_height' => '120px', 'preview_width' => '440px'));
    And if the height is an issue you can set it to auto :)

Its the same issue i'm currently facing in the same "issue" in my other class
whats your take on that?

from admin-page-class.

brasofilo avatar brasofilo commented on August 27, 2024

You forgot to put the true in your example above ;)
So, to be clear, both Repeater and Conditional have true as last param?

ah, the auto height, cool!

I agree with @manfer.
The real delete result was a bit surprising for me. Especially because I did the first tests without uploading an image and grabbed them from the Library tab. Then it was like "ups, where are my images?".

Maybe this could be solved by an extra option in $config, i.e., 'force_delete' => true // default false

  1. a new one
    As I'm dealing with many options, I wanted the page to reload in the last edited tab -not in the first one.
    Am using hashes to achieve that. What do you think?

from admin-page-class.

brasofilo avatar brasofilo commented on August 27, 2024

OMG, I wrote an extended answer an the "Comment" button evaporated with it!
---gee, I'll wait a little bit to see if it re-incarnates... will write a summary in the notepad meanwhile

from admin-page-class.

bainternet avatar bainternet commented on August 27, 2024
  1. yes.
  2. i actually already updated the other class with a remove meta only and a delete image by filter hook options.
  3. in my local development branch i have a solution based on cookies and i'll merge it later on :)

update:
4) done!
5) done!
:)

from admin-page-class.

brasofilo avatar brasofilo commented on August 27, 2024

From 1 to 5, five stars, olé!
👍

The spam filter got my previous messages, support says I'm cleared of being a spammy suspect 💯

from admin-page-class.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.