MyBB Tutorials

Giving a Code Number to MyBB Code Boxes

Submitted by Novruz, , Thread ID: 127073

Thread Closed
02-04-2019, 06:27 AM
#1
This modification will enumerate the lines of code inserted between the [code *] [/ code *] and
PHP Code:
[/ php *] tags in the "DVZ Code tag plugin" styleI would like to ask you to name the producer when sharing it on a different siteeg Modification MakerNovruz
[img]http://i.hizliresim.com/EDZMnA.png[/img]


[spoiler]Admin KPThemes and templatesTemplatesTemplate set of the theme you're using> Postbit Templates> postbit> add the following codes to the bottom
[php]<script>$('
code').html('<table>'+$.map($('code').text().split('\n'), function(t, i){
  return '
<tr><td>'+(i+1)+'</td><td>'+t+'</td></tr>';
}).join('')+'
</table>');</script> 

Admin KP> Themes and templates> Use theme> global.css> Advanced editing> add the following codes at the bottom.


PHP Code:
.codeblock{
  
background:#f5f2f0;!important
}

code table {
  
font-family courier;
  
padding2px;
}

code table td:nth-child(1) {
  
color:#777;
  
border-right1px solid #ccc;
}

code::-webkit-scrollbar{
  
background#e3e3e3;
  
width:initial;
  
border-left1px solid grey;
}


code::-webkit-scrollbar-thumb {
  
backgrounddarkgrey
}

code::-webkit-scrollbar-thumb:hover {
  
backgroundgrey


[/spoiler]
[/php]

RE: Giving a Code Number to MyBB Code Boxes

#2
please update sample image sir how to its working ...
[Image: signature.jpg]

Users browsing this thread: 1 Guest(s)