1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

icon folder with dropdowns

Discussion in 'Professional Support' started by bea, Aug 1, 2010.

Thread Status:
Not open for further replies.
  1. bea

    bea Active Member

    Level: Community
    Hi Rob & Hugh,

    I just noticed, that I don't get any icons of my icon-folder into the table with the dropdown element (also checkboxes). This nice feature works only with radiobuttons.

    Is there a possibility to change this?

    Edit: The only way to get the icons into the table (dropdown), is to write 0 or 1 or 2 as a value and label ???

    Cheers, Bianka
     
  2. peamak

    peamak Moderator

    Level: Community
    The way those icons are grabbed changed some time ago: before you needed to use a file called "1.png" for a choice with a value of 1 and a label of "whatever". Now, you need to use a file called "whatever.png"...

    I don't really like it either (what about labels like "Label avec d?s ?ccents ou des z'apostrophes" ?) but at the moment, that's the way it is.
     
  3. bea

    bea Active Member

    Level: Community
    Hi Tom,

    many thanks for your reply. It was confusing last night, because the radio buttons worked like before, but the dropdowns showed always my labels.

    The icon folder tooltip gives also the information about '1' as a value and '1.png' as the image...

    I would also prefer, that the value gives the information... you know, we have the german umlaut...

    I will use the radio buttons for this table now.

    Cheers, Bianka
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Hmmm, I wasn't aware we had changed that. If we did, I suspect it was unintentional.

    My Eclipse IDE is going to be unavailable for an hour or two while it's digests my new J! 1.6 / Fabrik 2.1 project, so I can't check on this right now. But IMHO, it should use the value, not the label. If you want to bump this thread at some point, I'll take a look once Eclipse comes back to life.

    -- hugh
     
  5. peamak

    peamak Moderator

    Level: Community
    I did ask Rob at the time and it was intentional (well, maybe not "intentional" but "required" for some reason)...
     
  6. bea

    bea Active Member

    Level: Community
    Hi,

    I have to come back to this issue, because all my radiobuttons with icon folder are now a text in table view...:(

    It seems, that there was a change in the link to the image folder, because the image-text is shown like this:
    _img_src_http_sub_websitename_de_images_stories_icon_element_yes_no_1_png_alt_1__

    before the linked image was like this:
    HTML:
    http://sub.websitenam.de///images/stories/icon_element/traffic/0.png
    Also the classes are different....

    What can i do, to get my images in table view ???

    ok... i have found the new error script ;) in fabrikradiobutton.php:

    HTML:
    function renderTableData( $data, $oAllRowsData )
        {
            $data = explode( GROUPSPLITTER, $data );
            for ($i=0; $i <count($data); $i++) {
               $data[$i] =  $this->_renderTableData( $data[$i], $oAllRowsData );
            }
            $data = implode( GROUPSPLITTER, $data );
            return parent::renderTableData( $data, $oAllRowsData );

        }
    Cheers, Bianka
     
  7. rob

    rob Administrator Staff Member

    Level: Community
    Hi Bianka

    There were some changes in the file names to remove/replace accented characters with their ascii equivalents.

    are you radio buttons in a repeat group, can you point us at the page please?

    -Rob
     
  8. bea

    bea Active Member

    Level: Community
    Hi Rob,

    I have sent you the details for the page.
    The radio buttons are not in a repeat group.

    Many thanks to look into it now.

    Cheers, Bianka
     
  9. rob

    rob Administrator Staff Member

    Level: Community
    Hi I think I've fixed this one in the SVN, could you update and let me know please?

    thanks
    Rob
     
  10. bea

    bea Active Member

    Level: Community
    Hi Rob,

    we have made an update, but the issue is still there.

    When I deactivate following lines (56-65) in fabrikradiobutton.php, I will get my icons:

    HTML:
    function renderTableData( $data, $oAllRowsData )
        {
            $data = explode( GROUPSPLITTER, $data );
            for ($i=0; $i <count($data); $i++) {
               $data[$i] =  $this->_renderTableData( $data[$i], $oAllRowsData );
            }
            $data = implode( GROUPSPLITTER, $data );
            return parent::renderTableData( $data, $oAllRowsData );

        }
     
    Cheers, Bianka
     
  11. rob

    rob Administrator Staff Member

    Level: Community
    looks like you hadn't updated correctly, as I ftp'd into the site uploaded the file and it worked.
    As it uses the labels and you had a space before 'Ja' and 'nein' the two images I added were

    _ja.png
    _nein.png

    in /images/stories/fabrik/icon_element/yes_no

    -Rob
     
  12. bea

    bea Active Member

    Level: Community
    Hi Rob,

    that's really odd, because we run SVN 4131 on another site and the issue is there too...

    I can see the difference. The icon must have the same name as the icon now, otherwise it show the label and not the icon. Is this correct ??

    This chance is confusing, because have the german umlaut and I am not sure, if this works together.
    The solution for german umlaut: replace ?,? or ? with '_' like e.g. 'gr_n.png'


    The space before 'ja' and 'nein' just makes a space between radiobutton and text, otherwise it's was to close. In this case the image should be named now: _ja.png

    very confusing...

    Cheers, Bianka
     
  13. bea

    bea Active Member

    Level: Community
    Hi Rob,

    I just copied and renamed all my icons in my image folders. I really don't understand this change. Even the tootip still says 0.png and 1.png.

    Before I had just 3 icons, e.g 0.png, 1.png and 2.png
    Now I need to create for each label an extra icon... same image, but different names.

    Sorry, I don't understand why this change from value to label is necessary.

    Cheers, Bianka
     
  14. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Me neither.

    Rob?

    -- hugh
     
  15. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I've raised a ticket on this, and will leave y'all to fight it out.

    ;)

    I suspect the issue is that we apparently made this change some time ago, so if we revert to previous behavior, we'll be breaking existing sites.

    One possible workaround is to add an option "Use option label or value as icon name".

    Or it may just be that we can't use option values, for some deeply technical reaosn I'm not aware of.

    -- hugh
     
  16. bea

    bea Active Member

    Level: Community
    Hi Hugh,

    thanks for support ;)
    This issue hit only checkboxes and not radio buttons in the past, that's why I have start this thread. The change for radio buttons is very new.

    I really would like to have the option, because I have so many different labels on some sites...

    Cheers, Bianka
     
  17. rob

    rob Administrator Staff Member

    Level: Community
    don't think its that new to be honest, certainly its been an change thats been done for several months.
    There really was a good reason for changing it but of course I can't remember what it was, probably the only valid solution is to check for images with names the same as both value and labels
     
  18. peamak

    peamak Moderator

    Level: Community
    From my skype archives:

    If that helps for remembering the reason ;)
     
  19. bea

    bea Active Member

    Level: Community
    Hi Rob,

    I don't want to be picky ;), BUT this issue with radionbuttons was in September. One site running SVN3819 works fine with 01.png radiobutton.

    We have several icons in tables and this is something we notice immediately. The code change must be later than SVN4051.

    When I started this thread, it hit only the check-boxes.

    I can deal with label.png's, but this is not so elegant ;)

    Cheers, Bianka
     
  20. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I'm definitely on Bea's side on this one. IMHO, for a value/label arrangement, the label is just used for the "human readable", rendered page view. Everything 'internal' should use the value. For instance, we may not (yet) support translation of checkbox/radio/dropdown labels, but if we did ... it'd be a major pain to have multiple images for each translation.

    And labels quite often change throughout the lifetime of an element. Different wording to make something clearer. A change elsewhere on the page which requires a labeling change.

    And if we're talking about a join element, the 'label' could be changed by any number of ways.

    And of course naming the image after the label requires a-priori knowledge of how Fabrik 'translates' the label into a legal filename.

    I just feel like we need to be consistent, and always use the value for the image name.

    -- hugh
     
Thread Status:
Not open for further replies.

Share This Page