MyBB Tutorials

Giving a Code Number to MyBB Code Boxes

Submitted by Novruz, , Thread ID: 127073

Thread Closed
Novruz
Newbie
Level:
0
Reputation:
0
Posts:
19
Likes:
0
Credits:
0
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

kuttysoft
Member
Level:
1
Reputation:
4
Posts:
148
Likes:
6
Credits:
0
17-04-2019, 09:28 PM
#2
please update sample image sir how to its working ...
[Image: signature.jpg]

Users browsing this thread: 2 Guest(s)