Syntax Highlight - Select code language |
OverviewDescriptionThis javascript uses the same pretty-print used in this forum, but with an extra feature: You can set the type of code manually.DemonstrationTechnical limitations› This tutorial is dedicated to the forums powered by Forumotion free forum service› It works with all Forumotion forums' versions InstallationIntroductionGeneral remarks or considerations about the installationCSSIn order to design the style of the resource, you need to go towards Administration Control Panel (ACP) Display CSS & Colors CSS Style Sheet and add append the codes related to your goal.Title and CodeboxChange the title color or codebox format based on the code.You can change properties using
Example: You need to reply to the topic in order to see the code resources With little configuration you can get something like this (based on the current theme of this forum): Remove the default extra borderThe pretty-printed code is displayed with an extra gray border which is very easy to removeYou need to reply to the topic in order to see the code resources Change code font-family or sizeI recommend using the same as in the default code tagYou need to reply to the topic in order to see the code resources Set your own code themeYou can use this as a reference for every span name (str, com, typ...) to change the color of every code part manuallyYou can also make your custom modifications, for example with this you can set the color of the lines when they are hovered:
You need to reply to the topic in order to see the code resources Remove the default ModernBB highlightingThe version modernBB has already integrated a different highlighting. You can just remove it to use the one in this code instead.You have to go to the template
Just before that, you will see these. You should also delete them.
Javascript & jQueryFor the next step you need to go towards Administration Control Panel (ACP) Modules HTML & Javascript Javascript codes management and create a new code - upon verifying that Javascript codes management is enabled.
Javascript CustomizationIn the start of the code you can configurate all this:
Notes
|
This resource belong to this community unless differently stated. No reproduction possible without our agreement, in accordance with article L122-1 of the CPI. |