template syntax

  1. CStrategies

    XF 2.2 Template Syntax JS tag - How does versioning work?

    I tried adding a version number to the file location in the JS tag: <xf:js prod="myscript/myscript_min.js?v=1.1" dev="myscript/myscript.js?v=1.1" /> However, this rendered as: <script src="/js/myscript/myscript_min.js?v=1.1&amp;_v=04a5b62b"></script> I noticed other scripts on the page seem...
  2. Kier

    Beta PhpStorm Live Templates for XenForo 2 20210519

    This is an export of the Live templates I use for XenForo development in PhpStorm. You can see them in use in the Building with XenForo 2 video series. The list of templates is far from complete, and will be updated periodically as I get around to it but in the interest in sharing useful work...
  3. celebrir

    XF 2.1 BB Code to return value of custom user field

    I want to create a BB Code which returns the value of a certain simple custom user field. I have a staff list as a thread on my internal Forum and I want to include the telephone number of the staff members. (Field ID "user_tel"). I figured I need to use the PHP Callback function on the BBcode...
  4. DeltaHF

    XF 2.1 Template conditionals not working as expected in macro

    I want to show unique content in the header of different "new post" widgets. I want to use a macro to do this, but it's not working as expected. I am calling the macro like so from the widget_new_posts template: <h3 class="block-minorHeader"> <a href="{$link}" rel="nofollow">{$title}</a>...
  5. L

    <select> inside a <xen:option>

    I'm trying to create a template modification that adds a new option to a radio unit in an admin template. This existing radio unit looks like so: <xen:radiounit label="..." name="..."> <xen:option value="...">...</xen:option> ... </xen:radiounit> I want my new option to contain a...
  6. CyberAP

    PHP min() function alternative in templates?

    Is there any way to have something similar to min() function in PHP but in templates?
  7. CyberAP

    Lack of interest Self-required css templates or an easy alternative to include css with 0 TM or direct edits

    It is a minor feature request and it's based on some of the add-ons I already made that have no actual .php files and only contain a single XML. For example I want to create an add-on that changes the look of editor or any other element. To do that I'll have to: Create a template; Create a new...
  8. Freelancer

    Trouble with video file attachments

    I extended the file attachment template to recognize if audio or video files are shown. It adds an html5 player and works great with MP3 audio attachments. Files can be played as an attachment. However I am not able to get .mp4 or any other video files to be shown. The player is displayed but...
  9. CyberAP

    Possible to get node title by id?

    I am wondering is it possible to retrieve node title by referencing its id inside templates?
Top Bottom