1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Need some quick help Bob

Discussion in 'Showcase Support' started by Ludachris, May 18, 2014.

  1. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    I'm trying to finish up my migration and am testing some things... I'm trying to map a few showcase items for the members to existing discussion ID's. In the process I'm being forced to fill in fields that weren't filled in via the auto generation script I used. No problem, I fill those in. But them there's a more generic error:

    "Please enter a value that matches the required format."

    Problem is, it doesn't tell me which field to look at. Wish those errors were more specific. So I'm trying to manually go through them all, and I have a ton of fields. Some are text fields set to Number. Will numbers with decimal points cause errors? If not, I'll look for something else that might be causing the issue.

    Thanks man.
     
  2. Bob

    Bob Developer Staff Member

    That error is only thrown when you manually set the "Value Match Requirements" on a particular field.

    Here is the code so you can see what each Value Match requirements look for... (This is CORE XenForo code that is used in User Fields and the Resource Manager).

    Value Match Requirements:
    Empty values are always allowed.​
    • None
    • Number
    • A-Z, 0-9, and _ only
    • Email address
    • URL
    • Regular expression:
      • PHP Callback:

    PHP:
                    $matched true;

                    if (
    $value !== '')
                    {
                        switch (
    $field['match_type'])
                        {
                            case 
    'number':
                                
    $matched preg_match('/^[0-9]+(\.[0-9]+)?$/'$value);
                                break;

                            case 
    'alphanumeric':
                                
    $matched preg_match('/^[a-z0-9_]+$/i'$value);
                                break;

                            case 
    'email':
                                
    $matched XenForo_Helper_Email::isEmailValid($value);
                                break;

                            case 
    'url':
                                if (
    $value === 'http://')
                                {
                                    
    $value '';
                                    break;
                                }
                                if (
    substr(strtolower($value), 04) == 'www.')
                                {
                                    
    $value 'http://' $value;
                                }
                                
    $matched Zend_Uri::check($value);
                                break;

                            case 
    'regex':
                                
    $matched preg_match('#' str_replace('#''\#'$field['match_regex']) . '#sU'$value);
                                break;

                            case 
    'callback':
                                
    $matched call_user_func_array(
                                    array(
    $field['match_callback_class'], $field['match_callback_method']),
                                    array(
    $field, &$value, &$error)
                                );

                            default:
                                
    // no matching
                        
    }
                    }

                    if (!
    $matched)
                    {
                        if (!
    $error)
                        {
                            
    $error = new XenForo_Phrase('please_enter_value_that_matches_required_format');
                        }
                        return 
    false;
                    }
                    break;
     
  3. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    I'm a f'n idiot. I had one of the fields set to something wrong. It was supposed to be Number. I'm going on 16 hours now... getting ready to turn it on and prepare for the griping.
     
  4. Bob

    Bob Developer Staff Member

    So you got it all imported then? And don't take all the griping personal, its human nature that most don't like "change" and griping is the new internet "norm" lol
     
  5. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    It's all imported - had to run 6 importers, run the usergroup batching, rebuild caches, go over permissions with a fine tooth comb with testing, build a homepage with XenPorta, do a bunch of manual work that I couldn't do until after the import, and I know there's still several things I missed.... the downside of having a heavily customized forum.

    Finishing up rebuilding the search and will take one last look before I flip the switch. If I don't post again here tonight be sure to check out the site: http://www.dsmtuners.com

    Unless something goes wrong I'm flipping the switch before I go to sleep.
     
  6. Bob

    Bob Developer Staff Member

    I see that you've not turned it on yet, did something go wrong?
     
  7. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Yeah, well my plan of turning on the new homepage at 3am hit a snag when I realized I couldn't make the XenPorta portal replace my domain root since I installed everything in a /forum/ directory. Didn't realize that would come back to bite me at the very end. So I made a full backup copy of the /forum/ directory, which just finished about 30 mins ago and now I'm moving all the files to root and will adjust the config. Of course, that means a lot of the nav links I hard coded throughout the site will break, but that shouldn't take too long to fix.

    I can see the light at the end of the tunnel at least. Got about an hour or two of sleep during the backup.
     
  8. Bob

    Bob Developer Staff Member

    I THINK you also need to rebuild attachments (as well as rebuilding showcase thumbs and xenmediagallery thumbs) (altho, that might have been when moving hosts). Make sure to test thumbs and images everywhere.
     
  9. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Bob likes this.
  10. Bob

    Bob Developer Staff Member

    Awesome! Just had a quick look. Seems pretty smooth so far. Everything loads instantly (no lag). Showcase turned out great! Glad you were able to get all of that imported!
     
  11. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    It took quite a bit of planning and work, and it wasn't done perfectly, but it works. Time for a little break from my desk...

    Hey, I know I can find this somewhere, but since you're here, what's the easiest way to remove the Search Showcases tab from the search page? I need to remove that tab and the Search Resources tabs here for now... I'll add the Showcase tab back when the users can search the custom fields.
     
  12. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    And thanks for all the help along the way Bob.
     
  13. Bob

    Bob Developer Staff Member

    The TAB itself is easy to remove as I use a TM for that, however, that does not remove the link from the nav nor does it prevent the FORM itself from being directly accessed (and usable).

    To remove the tab... Admin CP >> Appearance >> Template Modifications >> Showcase >> search_form_tabs (just disable it).

    You'll also need to remove the direct link to the search from the nav bar

    Edit Template: nflj_showcase_tab_links

    find this li tag and remove it or wrap it in a xen comment

    HTML:
        <li><a href="{xen:link search, '', 'type=showcase_item'}">{xen:phrase nflj_showcase_tab_link_search_items}</a></li>
    You can't completely disable the "search" functionality in showcase as it is deeply imbeded and involves other functionality like the "find-new" ie, new posts, new showcase items, new media etc...

    Hope that makes sense?
     
  14. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    That's all I need to do - I just don't want people getting confused thinking they can search the custom fields. Removing the tab and some of the links should solve that for now.
     
  15. Bob

    Bob Developer Staff Member

    also, be aware that searching custom fields will NOT be associated with the core xf search functionality. It will be its OWN area and will have nothing to do with core XF search handler.
     
  16. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Not a big deal, probably better to have it that way anyway. Just as long as they can do it, I'm good.
     
  17. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Hey Bob, is there a permissions setting for users to set cover images? I just verified the problem - you can click the link to set a cover image and you get to a page with all the images with radio buttons under them. But you can't click any of the radio buttons. When you click them nothing happens. Is it a setting? Or ever get any complaints about this from others?
     
  18. Bob

    Bob Developer Staff Member

    There is no "direct" permission, but it does require the permission "editItemSelf" (the owner of the item) or "editItemAny" (which is a moderator permission that allows moderator's the ability to change/set the cover image).

    As far as clicking on the LINK, it is purposely programmed to open in an overlay, so you must have JS disabled or have modified the templates to remove the overlay JS class.

    They are regular HTML radio buttons, so I don't know why you'd have any problems selecting them. I'd have to SEE (not an image) with my own browser so I can inspect the HTML to see what is going on.

    This is what it SHOULD look like. The first Radio button should be pre selected by default.

    Selection_078.png

    THIS VIEW WILL NOT WORK!
    Selection_077.png
     
  19. Bob

    Bob Developer Staff Member

    I should note, you CAN NOT click on the IMAGE. You have to click on the Radio Button itself (this is just how radio buttons work).
     
  20. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Yeah, it's not using an overlay like the first image. I'll have to do some digging tomorrow to find out why it's not. Strange. Thanks for the clarification.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.