1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Content Type Management 1.0.3

Easily manage and rebuild XenForo content types from the Admin CP

  1. Chris D

    Chris D XenForo Developer Staff Member

    Chris Deeming submitted a new resource:

    Content Type Management - Easily manage and rebuild XenForo content types from the Admin CP

    Read more about this resource...
     
    Bob, shadrxninga and Adam Howard like this.
  2. Adam Howard

    Adam Howard Well-Known Member

  3. xf_phantom

    xf_phantom Well-Known Member

    great addon:)
    thx very much for this!


    It would be nice if you would add add the default addonid ($addOnModel->getDefaultAddOnId()) if non addon is selected
    PHP:
    'addOnSelected' => (isset($contentType['addon_id']) ? $contentType['addon_id'] : $addOnModel->getDefaultAddOnId()),
    instead of only
    PHP:
    'addOnSelected' => $contentType['addon_id']
    this way nobody would need to set the addon id, if he has set the default addon id in the configuration file
     
    Bob and Chris D like this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Thank you @xf_phantom :)

    I didn't even know you could do that... all that time I have wasted by having to click for the add-on I'm working on ;)
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    xf_phantom likes this.
  6. NixFifty

    NixFifty Well-Known Member

    Viewing the index gives me the following:

    Code:
    Template Errors: content_type_management_index
    
        Invalid argument supplied for foreach() in F:\xampp\htdocs\se7ensins\library\XenForo\Template\Abstract.php(265) : eval()'d code, line 77:
    
        76:                         ';
        77: foreach ($contentType['fields'] AS $fieldId => $field)
        78: {
    
     
  7. NixFifty

    NixFifty Well-Known Member

    Actually, never mind. Had a phantom content type that was causing it :p
     
  8. Liam W

    Liam W Well-Known Member

    Bug:

    When generating the SQL code, backslashes in class names (for namespaces) aren't escaped (a double backslash is needed for a backslash).

    Liam
     
  9. Hoffi

    Hoffi Well-Known Member

    This should be in the core for developers.
     
  10. Chris D

    Chris D XenForo Developer Staff Member

  11. cclaerhout

    cclaerhout Well-Known Member

    -5 stars-
    This resource indeed helped to start to implement a search system for a particularity content type. Thank you.
     
    Chris D likes this.
  12. cclaerhout

    cclaerhout Well-Known Member

    A small feedback about the helper provided with the sql code. It certainly depends on the SQL version, but for a maximum compatibility each insertion would require a specific DB query and the final ";" should not be used.
    Example:
    PHP:
          $db->query("INSERT IGNORE INTO xf_content_type
               (content_type, addon_id, fields)
               VALUES   ('abctype', 'addonid', '')
           "
    );
           
           
    $db->query("INSERT IGNORE INTO xf_content_type_field
               (content_type, field_name, field_value)
               VALUES   ('abctype', 'search_handler_class', 'MyClass_Search_DataHandler_AbcType')
           "
    );
     
    Xon likes this.
  13. Jaxel

    Jaxel Well-Known Member

    This addon doesn't seem to list field names for sitemap handlers.
     
  14. Chris D

    Chris D XenForo Developer Staff Member

    Quite possible. It hasn't been updated since 1.4 was released.
     
  15. Chris D

    Chris D XenForo Developer Staff Member

  16. Chris D

    Chris D XenForo Developer Staff Member

    Sorted now.
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    25 minutes from reported issue to updated release.

    Now that's how you support a free add-on.
     
    NixFifty, Bob, Chris D and 1 other person like this.
  18. Chris D

    Chris D XenForo Developer Staff Member

    I've not made any changes with regards to this.

    The SQL output is simply formatted to allow the dev to then do what they wish with it. It would be trivial for me to actually format it into the appropriate PHP syntax, but I didn't want to make your lives too easy ;)

    In isolation, though, the MySQL query that is output is fully compatible with MySQL 5.0+. It may just need additional formatting if then being used in PHP code.
     
  19. Chris D

    Chris D XenForo Developer Staff Member

    Chris D updated Content Type Management with a new update entry:

    Fixed undefined index error and more

    Read the rest of this update entry...
     
  20. Chris D

    Chris D XenForo Developer Staff Member

    The latest version actually generates the PHP code for easier copy/pasting into install methods.
     
    cclaerhout likes this.

Share This Page