Thread dot menu move

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

Hello,

I use the calendar add-on from AndyB.
The function "Add to Calendar" is very hidden in its own thread (Via the points menu and calendar menu).
How can I place this button differently?


6mBkVb.jpg
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Should it be in each foren thread at the top, or just in specific sections?
 

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

View previous replies…

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

bl4d33You mean like this:

Blok.png


Create a new template modification:

Find: <xf:if is="$thread.canWatch()">
Replace:
<xf:if is="{$thread.user_id} == {$xf.visitor.user_id} AND {{ $xf.visitor.hasPermission('calendar', 'addRemoveOwn') }}">
<xf:button href="{{ link('threads/calendar-menu', $thread) }}" class="button--link">
{{ phrase('calendar_calendar_menu') }}
</xf:button>
<xf:elseif is="{{ $xf.visitor.hasPermission('calendar', 'addRemoveAll') }}" />
<xf:button href="{{ link('threads/calendar-menu', $thread) }}" class="button--link">
{{ phrase('calendar_calendar_menu') }}
</xf:button>
</xf:if>
$0

Blok.jpg
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Great! That work. Thank you!

" An additional check statement should be added" --- Please guide me.
bl4d33or like this:

Blok.png


Just quick and dirty, because I'm currently on phone.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

That would be great too! How do I make it only show up in a specific forum?
Thank you until then - you are the xenforo master :-D
bl4d33Here the new template modification:

Template modification type: Public
Template: thread_view
Modification key: CalendarMenu

Search type: Simple replacement
Find:
PHP:
<xf:if is="$thread.canWatch()">

Replace:
PHP:
                    <xf:if is="$forum.node_id==17 AND (({$thread.user_id} == {$xf.visitor.user_id} AND {{ $xf.visitor.hasPermission('calendar', 'addRemoveOwn') }}) OR {{ $xf.visitor.hasPermission('calendar', 'addRemoveAll') }})">
                            <div class="buttonGroup-buttonWrapper">
                                <xf:button class="button--link menuTrigger" data-xf-click="menu" aria-expanded="false" aria-haspopup="true" title="{{ phrase('calendar_calendar_menu') }}">{{ phrase('calendar_calendar_menu') }}</xf:button>
                                <div class="menu" data-menu="menu" aria-hidden="true">
                                    <div class="menu-content">
                                        <h4 class="menu-header">{{ phrase('more_options') }}</h4>
                                                <a href="{{ link('threads/calendar-add', $thread) }}" data-xf-click="overlay" class="menu-linkRow">{{ phrase('calendar_calendar_add') }}</a>
                                                <a href="{{ link('threads/calendar-add-recurring-weekly', $thread) }}" data-xf-click="overlay" class="menu-linkRow">{{ phrase('calendar_calendar_add_recurring_weekly') }}</a>
                                                <a href="{{ link('threads/calendar-add-recurring-monthly', $thread) }}" data-xf-click="overlay" class="menu-linkRow">{{ phrase('calendar_calendar_add_recurring_monthly') }}</a>
                                                <a href="{{ link('threads/calendar-add-recurring-yearly', $thread) }}" data-xf-click="overlay" class="menu-linkRow">{{ phrase('calendar_calendar_add_recurring_yearly') }}</a>
                                                <a href="{{ link('threads/calendar-remove', $thread) }}" data-xf-click="overlay" class="menu-linkRow">{{ phrase('calendar_calendar_remove') }}</a>                                                
                                    </div>
                                </div>
                            </div>
                    </xf:if>
                    $0

This will now display the menu only under Node 17 (forum.node_id==17) and need to be adapted to your needs.

Possible enhancement would be to add an extra option to select the forum where it should be visible, also the redirects might want to be changed, so that it redirects back to the thread in the most cases, not for remove single line entry.

Blok.png
 

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

It should only appear in the forum "I'm going fishing - who's coming?" forum.
And it should appear in every thread.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

Is it possible to enter the date for the calendar directly under the rich text editor? This would automatically insert the thread into the calendar.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Is it possible to enter the date for the calendar directly under the rich text editor? This would automatically insert the thread into the calendar.
bl4d33do not understand in which editor do you mean?
 

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

Hi BattleKing
Thank you again! I will test this.

Members need to create a thread and only then can an appointment be added using the "Add to Calendar" button.
It would be cool if during the creation of the thread the members can add an appointment.




EyBVCL.jpg
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Hi BattleKing
Thank you again! I will test this.

Members need to create a thread and only then can an appointment be added using the "Add to Calendar" button.
It would be cool if during the creation of the thread the members can add an appointment.




EyBVCL.jpg
bl4d33This would be an enhancement and would take some time, idea is good.
 
View previous replies…

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Yes. I think the members don't understand that otherwise and the calendar remains empty.
bl4d33possibly a developer request should be raised and I guess the implementation will not be free of charge
 

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

Or if this is not possible, you would have to pop up a hint for the member to manually add the appointment to the calendar. It would be cool if this happened automatically and the date entry in the thread was obligatory.
 

bl4d33

Member
Registered
Joined
Nov 18, 2021
Messages
15
Points
3

Reputation:

Can you possibly organise the latest version of this add-on calendar for me?
 
Top