delicjous
08-25-2019, 09:00 PM
I made a mod for this in the past, but I decide to make it compatible with cloud.
Installinstructions:
Just create a template and hook it to footer_before_body_end.
-Create a template: /admincp/template.php?do=modify& -> choose action dropdown -> Add new template.
Hook it to footer_before_body_end: /admincp/hook.php? Create new hook at the bottom, choose the mentioned hook and put the name of the template into "Template Name".
Fill the template with the following code:
<style>
.deli-crneto li {
font-size:15px;
margin-bottom:5px;
line-height:16px;
}
.deli-crneto #btnConfirmDialogYes {
display:none;
}
.deli-crneto .delicnt_cat {
background-color:lightgray;
}
</style>
<script>
function delinewthreadpopup(){var a=openConfirmDialog({title:vBulletin.phrase.get("create_new_topic"),message:vBulletin.phrase.get("loading")+"...",width:500,dialogClass:"deli-crneto loading",buttonLabel:{noLabel:vBulletin.phrase.get("cancel")}});vBulletin.AJAX({call:"/ajax/api/node/fetchChannelNodeTree",data:{parentid:2,depth:5,pagenum:1,perpage:150},s uccess:function(e){$(".deli-crneto").removeClass("loading"),$(".dialog-content .message",a).html('<ul class="crneto_list"></ul>'),$.each(e.channels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;1==a.category?$(".crneto_list").append('<li class="depth_'+a.depth+' delicnt_cat">'+a.title+"</li>"):$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'"> '+a.title+"</a></li>"),void 0!==a.subchannels&&$.each(a.subchannels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'">    '+a.title+"</a></li>"),void 0!==a.subchannels&&$.each(a.subchannels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'">      '+a.title+"</a></li>")})})})},error:vBulletin.ajaxtools.logAjaxError,ap i_error:vBulletin.ajaxtools.logApiError})}$("#delicreatenewthread").click(function(e){e.preventDefault(),delinewthre adpopup()});
</script>
Now you could place a button everywhere you want like that:
<button id="delicreatenewthread" class="b-button b-button--special" type="submit">Create a new Thread</button>
You could also use every other html-tags. Just put the id on it: id="delicreatenewthread"
It is just an example but ready to use.
Installinstructions:
Just create a template and hook it to footer_before_body_end.
-Create a template: /admincp/template.php?do=modify& -> choose action dropdown -> Add new template.
Hook it to footer_before_body_end: /admincp/hook.php? Create new hook at the bottom, choose the mentioned hook and put the name of the template into "Template Name".
Fill the template with the following code:
<style>
.deli-crneto li {
font-size:15px;
margin-bottom:5px;
line-height:16px;
}
.deli-crneto #btnConfirmDialogYes {
display:none;
}
.deli-crneto .delicnt_cat {
background-color:lightgray;
}
</style>
<script>
function delinewthreadpopup(){var a=openConfirmDialog({title:vBulletin.phrase.get("create_new_topic"),message:vBulletin.phrase.get("loading")+"...",width:500,dialogClass:"deli-crneto loading",buttonLabel:{noLabel:vBulletin.phrase.get("cancel")}});vBulletin.AJAX({call:"/ajax/api/node/fetchChannelNodeTree",data:{parentid:2,depth:5,pagenum:1,perpage:150},s uccess:function(e){$(".deli-crneto").removeClass("loading"),$(".dialog-content .message",a).html('<ul class="crneto_list"></ul>'),$.each(e.channels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;1==a.category?$(".crneto_list").append('<li class="depth_'+a.depth+' delicnt_cat">'+a.title+"</li>"):$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'"> '+a.title+"</a></li>"),void 0!==a.subchannels&&$.each(a.subchannels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'">    '+a.title+"</a></li>"),void 0!==a.subchannels&&$.each(a.subchannels,function(e,a){var t=pageData.baseurl+"/new-content/"+e;$(".crneto_list").append('<li class="depth_'+a.depth+'"><a href="'+t+'">      '+a.title+"</a></li>")})})})},error:vBulletin.ajaxtools.logAjaxError,ap i_error:vBulletin.ajaxtools.logApiError})}$("#delicreatenewthread").click(function(e){e.preventDefault(),delinewthre adpopup()});
</script>
Now you could place a button everywhere you want like that:
<button id="delicreatenewthread" class="b-button b-button--special" type="submit">Create a new Thread</button>
You could also use every other html-tags. Just put the id on it: id="delicreatenewthread"
It is just an example but ready to use.