template syntax

  1. 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...
  2. 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>...
  3. 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...
  4. CyberAP

    PHP min() function alternative in templates?

    Is there any way to have something similar to min() function in PHP but in templates?
  5. 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...
  6. 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...
  7. CyberAP

    Possible to get node title by id?

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