MyBB Hacks

Full Version: Events Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
http://www.beatdj.net/foros/Thread-Anime...http://www.beatdj.net/foros/Thread-Anime-Festival-Deluxe-

why op's 1st post is not showed, but yes the 2nd post? (made by hulk.bryman)
hmm updated to 1.6.4 from .63
and installed a new template

showthread didn't had {$first_post} on it

it's fixed
Good tutorial!  I have a forum that deals with samples and contests, so I need a plugin that makes the timing of each contest. This plugin is pretty good but I would prefer to have an integration with the calendar and something that warns when a contest is about to expire.

How can I make the filter page?

Thank you very much in advance
(08-09-2012 09:54 PM)nier3 Wrote: [ -> ]I would prefer to have an integration with the calendar and something that warns when a contest is about to expire.
This is not integrated with calendar.
Is there any chance to use NewPoints with this XThreads application ? (eg: Entry fee)
how can we upgrade this to 1.8?

i can't figure out how to do it.
Works great in 1.8.4

Thanks!

edit: Is there a way to add an image option (e.g. from URL or PC upload while creating the new thread) that shows up in the thread listing on the left of the event information?
Experimental:

From this thread: http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php (thanks nier3 and Lee!), we'll try to make this goes a bit (not much) further.

This time we'll try to integrate it to MyBB calendar in one way. What I mean by the "one way" is the main control is MyBB thread, not the calendar event.

The ideas that tried to be implemented by this experimental are:
  • For creating an event, we choose MyBB thread, since it has more rich contents than the MyBB calendar (attachments, custom thread fields, discussion and etc).
  • Editing the thread will edit the event.
  • Editing the event from calendar (if forced) will redirect to edit the thread.
  • It bypass the calendar permissions, so it'll uses the forum permissions. Therefore it is better if we use a specific calendar for this.
  • There is a link on each event to view the thread.
  • It uses a single type of event.
  • There is still a possibilities to create normal events on the calendar. These normal events will use the calendar permissions.
  • Deleting thread will delete the event.
  • Soft deleting and unapproved thread will make the event as unapproved event.
  • Restoring and approving thread will make the event as approve event.
  • Some other features like displaying the upcoming events on index page.

Here is how to set it up:
Note that this is a basic set up. We still can add more custom thread fields and create new templates as usual.
  • Create a new calendar specified for the XThreads Event forum.
  • Create a new forum for the XThreads Event forum.
  • Create custom thread fields:
    • Event date
      • Title: Date
        Modify it as our needs. Use {$GLOBALS['threadfields']['e_date']} for displaying it anywhere inside the forumdisplay_thread template.
      • Key: e_date
        Modify it as our needs
      • Applicable Forums: Select our XThreads Events forum
      • Editable by / Required Field?: Everyone (required)
      • Maximum Text Length: 10
        Enough for dd-mm-YYYY
      • Text Mask Filter:

        Code:
        ^(0?[1-9]|[12]\d|3[01])\-(0?[1-9]|1[012])\-((?:19|20)\d\d)$

        We'll use dd-mm-YYYY format

      • Input Formatter:

        Code:
        <?=strtotime({VALUE})?>

      • Custom Modify Error:

        Code:
        <setvar e_date>explode('-',{VALUE})</setvar>
        <if !checkdate($tplvars['e_date'][1],$tplvars['e_date'][0],$tplvars['e_date'][2]) then>The date you supplied is not valid</if>

        Date validation

      • Use Custom Input HTML: Yes
        Input Field HTML:

        Code:
        <input type="text" class="textbox"{NAME_PROP}{MAXLE​​N_PROP}{WIDTH_PROP_SIZE}{TABINDE​X​_PROP}{REQUIRED_PROP} value="<if {VALUE} && !$mybb->input['my_post_key'] then><?=my_date('d-m-Y',{VALUE})?><else>{VALUE}</if>" id="datepicker" style="position: relative; z-index: 10000;" />
        <link type="text/css" rel="stylesheet" href="cache/css/jquery-ui.min.css" />
        <script src="cache/js/jquery-ui.min.js"></script>
        <script>
        	$(function(){$('#datepicker').datepicker({dateFormat:'dd-mm-yy',autoSize:true});});
        </script>

        Note that we use jQuery UI datepicker. Please modify it as our needs.

      • Display Format:

        Code:
        <?=my_date('d-m-Y',{VALUE})?>

      • Filtering Mode: Exact match
      • Underlying Data Type: Integer (unsigned, usually 32 bit)
    • Event description
      We'll use this description as the event description on the calendar event
      • Title: Event Description
        Modify it as our needs. Use {$GLOBALS['threadfields']['e_desc']} for displaying it anywhere inside the forumdisplay_thread template.
      • Key: e_desc
        Modify it as our needs
      • Applicable Forums: Select our XThreads Events forum
      • Editable by / Required Field?: Everyone (required)
      • Maximum Text Length: 200
        Modify it as our needs
  • Install the plugin (attached). Try it on our test board.

Forumdisplay:
[attachment=1038]

Calendar:
[attachment=1039]

Calendar events (custom events (created from the XThreads Events forum) mixed with default event (created from the calendar)):
[attachment=1040]

Single calendar custom event (the "Read More" is link to the thread):
[attachment=1041]

Single default event (still use the calendar permissions):
[attachment=1042]

Index:
[attachment=1043]

Since I'm not a coder, please don't expect much from this experimental.
Hey RateU, I'm trying to add a template condition to this application so if the event date is over a box will appear stating that the event is no longer available.

I'm trying something like this but it's not working:

Code:
<if $GLOBALS['threadfields']['fin_month']-$GLOBALS['threadfields']['fin_day']-$GLOBALS['threadfields']['fin_year'] <= $datenow then>CONTENT IN HERE</if>

Subtracting the day from the month isn't going to do you any good.
Use mktime instead

Code:
<if mktime(0,0,0,$GLOBALS['threadfields']['fin_month'],$GLOBALS['threadfields']['fin_day'],$GLOBALS['threadfields']['fin_year']) <= time() then>CONTENT IN HERE</if>

(04-03-2017 04:08 PM)ZiNgA BuRgA Wrote: [ -> ]Subtracting the day from the month isn't going to do you any good.
Use mktime instead

Code:
<if mktime(0,0,0,$GLOBALS['threadfields']['fin_month'],$GLOBALS['threadfields']['fin_day'],$GLOBALS['threadfields']['fin_year']) <= time() then>CONTENT IN HERE</if>


Thanks Yumi that worked wonderfully.
[Image: 687474703a2f2f692e696d6775722e636f6d2f31...687474703a2f2f692e696d6775722e636f6d2f317370774f68]
Pages: 1 2 3 4
Reference URL's