Former Member
inherit
guest@proboards.com
222576
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 8:28:04 GMT -8
Is there a plugin that moves the 'go to previous thread, next thread' option in the action button somewhere else ? i know there's one for the cog options. thank you whoever you are !!
|
|
Former Member
inherit
guest@proboards.com
225992
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 10:21:58 GMT -8
You don't need a plugin for this.
simply add the following to your template, which can be found at: layout_templates->thread
Add this markup anywhere you see fit.
<div class='button-group' data-group="thread-views"> <button type='button' data-thread-view="previous">previous</button> <button type='button' data-thread-view="next">next</button> </div> <!-- prev/next thread buttons -->
and add the following script to the bottom of the template
<script> (function($, proboards){ var viewThread = function(){
// remove items from action menu $('.control-bar .select_menu_list > li.view').remove();
// setup the buttons and bind a click handler var buttons = $('[data-group]'); buttons.on('click', 'button', function(e){ var target = $(e.currentTarget); var route = (target.data('thread-view') === 'previous') ? 'previous_thread' : 'next_thread'; var thread_id = proboards.data('thread_id'); return window.location = proboards.route(route, { thread_id: thread_id }) });
}; $(viewThread); })(jQuery, proboards) </script>
|
|
Former Member
inherit
guest@proboards.com
222576
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 10:42:37 GMT -8
You don't need a plugin for this. simply add the following to your template, which can be found at: layout_templates->threadAdd this markup anywhere you see fit. <div class='button-group' data-group="thread-views"> <button type='button' data-thread-view="previous">previous</button> <button type='button' data-thread-view="next">next</button> </div> <!-- prev/next thread buttons -->
and add the following script to the bottom of the template <script> (function($, proboards){ var viewThread = function(){
// remove items from action menu $('.control-bar .select_menu_list > li.view').remove();
// setup the buttons and bind a click handler var buttons = $('[data-group]'); buttons.on('click', 'button', function(e){ var target = $(e.currentTarget); var route = (target.data('thread-view') === 'previous') ? 'previous_thread' : 'next_thread'; var thread_id = proboards.data('thread_id'); return window.location = proboards.route(route, { thread_id: thread_id }) });
}; $(viewThread); })(jQuery, proboards) </script> thank you !! edit: goldenbeatz.uk/posts/recent could u make it disappear from recent posts pls ? it's in the action bar at the top.
|
|
Former Member
inherit
guest@proboards.com
225992
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 11:15:05 GMT -8
I'm not logged in so I can't see that action bar. sorry.
|
|
Former Member
inherit
guest@proboards.com
222576
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 11:54:28 GMT -8
I'm not logged in so I can't see that action bar. sorry. sorry, you don't have to be logged in. it goes to a null page, but the rest works just fine.
|
|
Former Member
inherit
guest@proboards.com
225992
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 12:22:40 GMT -8
That's very odd. I will look into it.
The normal behavior for that is a "Next Thread Attempt" failure dialog. some reason it is not working for the recent/posts
edit: actually those are recent posts, the buttons link to threads. So it can just remove the buttons for that route
Simply edit the html as follows
{if $[route.name] == 'thread'} <div class='button-group' data-group="thread-views"> <button type='button' data-thread-view="previous">previous</button> <button type='button' data-thread-view="next">next</button> </div> <!-- prev/next thread buttons --> {/if}
|
|
Former Member
inherit
guest@proboards.com
222576
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 12:29:58 GMT -8
That's very odd. I will look into it.
The normal behavior for that is a "Next Thread Attempt" failure dialog. some reason it is not working for the recent/posts edit: actually those are recent posts, the buttons link to threads. So it can just remove the buttons for that route o ok ... how do i do that pls ?
|
|
Former Member
inherit
guest@proboards.com
225992
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 12:40:46 GMT -8
previous comment has the correct markup
|
|
Former Member
inherit
guest@proboards.com
222576
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 12:42:26 GMT -8
previous comment has the correct markup brilliant thank you ! it worked just fine. thank you philip
|
|
Former Member
inherit
guest@proboards.com
225992
0
Dec 4, 2024 16:32:56 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jun 30, 2017 12:47:39 GMT -8
no worries man.
|
|