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

XF 1.4 Event forum pointers

Discussion in 'Styling and Customization Questions' started by ge66, Sep 22, 2014.

  1. ge66

    ge66 Active Member

    I have been trying to make a very, very simple event forum, as all 3 calendar add ons doesn’t really suite me.

    In template thread_create find:
    Code:
             <dd><input type="text" name="title" class="textCtrl titleCtrl" id="ctrl_title_thread_create" maxlength="100" autofocus="true"
             placeholder="{xen:phrase thread_title}..." value="{$title}"
             data-liveTitleTemplate="{xen:phrase create_thread}: <em>%s</em>" /></dd>
    
    replace that with:
    Code:
    <dd><xen:if is="{$forum.node_id} == xx">
    <input type="date" name="title" class="textCtrl titleCtrl" id="ctrl_title_thread_create" placeholder="Click to set event start date..." />
    <xen:else />
    <input type="text" name="title" class="textCtrl titleCtrl" id="ctrl_title_thread_create" maxlength="100" autofocus="true" placeholder="{xen:phrase thread_title}..." value="{$title}" data-liveTitleTemplate="{xen:phrase create_thread}: <em>%s</em>" />
    </xen:if>
    </dd>
    It makes you use the date picker to put a date into the title, that then can be sorted if you set forum node xx to sort by title.

    I will be using some custom thread fields to get it to be more of an event forum. You could use permissions if you don’t want user to reply to events. I will probably use Node Language Override by @Waindigo to rephrase post button and others to be more "eventy"

    Is there an easy way to get the date picker inside and merged with the ordinary title so that you can pick a date and write the title and they get into the same form field?
     
  2. ge66

    ge66 Active Member

    You should do similar changes to template thread_edit and thread_edit_title
     

Share This Page