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

Recent content by MaGeFH

  1. MaGeFH

    Not a bug XF\Cli\Command\AddOnActionTrait: save result of $importFromOutput for later

    Good to hear, that solves my problem as well. ;-)
  2. MaGeFH

    Not a bug XF\Cli\Command\AddOnActionTrait: save result of $importFromOutput for later

    While working on importing custom add-on data I stumbled across this one. If you need to do a re-import after installing the addon, you need the information if the user wanted to import from xml or from dev output. This will be asked in XF\Cli\Command\AddOnActionTrait::importAddOnData, but the...
  3. MaGeFH

    XF 2.0 Ability to customize the data import during an addon installation

    Ok, I see your point there. :) I think adding extra xml-tags as siblings to the advertising_position tags will work well enough. ;) Thanks for your time. Most helpful! :)
  4. MaGeFH

    XF 2.0 Ability to customize the data import during an addon installation

    I've started testing with extended data and ran into another problem: The import of new data xml files fails on the old code because XF\AddOn\DataType\AdvertisingPosition::importAddOnData expects the contents of the advertising_position xml-tag to be a singular CDATA value. However i changed...
  5. MaGeFH

    XF 2.0 Ability to customize the data import during an addon installation

    Hello there, I'm currently working on an addon that extends the advertising system shipping with XF2. In here, i've extended the advertising position entity to require a type (class string), type data (json) and some more fields. This also means that XF/AddOn/DataType/AdvertsingPosition will be...
  6. MaGeFH

    Fixed Options "adsDisallowedTemplates" not working

    To reproduce: Add template page_view to templates that should prevent ads (adsDisallowedTemplates). Create a new ad position eg.: "pagetest". Create a new ad to display on that position. Create or edit page to contain the code for that ad position: <xf:ad position="pagetest" />. Open the page...
  7. MaGeFH

    Fixed Javascript scope-slip in "display-template-contents-of-entered-template-name"-snippet

    The template admin:template_modification_edit does feature a javascript snippet to dynamically load the contents of the template into the form, for easy reference. As soon as I tried to use this for two or more form fields on the same page, it broke a bit. This is due to one variable not being...
  8. MaGeFH

    Fixed Template macro public:color_picker_macros:color_picker_row mishandling of arg-required

    The macro specifies the argument as optional with a default value of false: arg-required="false" However, if the macro invocation omits the arg-required parameter the generated HTML code looks like this: <input type="text" class="input" name="fh_ad_type_options[color_url]" required="false">...
  9. MaGeFH

    Lack of interest Import: add a unique identifier per import

    I second this suggestion! :)
  10. MaGeFH

    How do you protect your work?

    Prefixed css classes work out quite well here. Something like "magefh_addonname_container". If someone would want to remove that they have to scour all the templates and css files of the addon. Depending on the addon size this could be a pretty time-consuming task.
  11. MaGeFH

    How do you protect your work?

    Since you can't distribute binaries, you can't really prevent this. Also I would not recommend to sacrifice performance over piracy prevention, never works out well. :) But you could rely on pirates being lazy. Commenting out a licence check callback is pretty easy. But if your addon creates...
  12. MaGeFH

    Input Filter List

    All available input types should be defined as class constants in Input.php. So, you should already have the complete list. :)
  13. MaGeFH

    How to add a multidimensional array

    Don't query the database in a foreach loop. This is very bad for performance. Instead build a query string by looping through your array and adding value assignments to the string as you go. Then, when the loop is done (or the chunk, if your data may cause a single query string to grow too...