dopetalk

Technology => SMF Forum Code Modifications => Topic started by: smfadmin on September 27, 2016, 07:26:00 AM

Title: Code / Syntax Highlighting
Post by: smfadmin on September 27, 2016, 07:26:00 AM
http://custom.simplemachines.org/mods/index.php?mod=2925

Installed.

This script highlights syntax in code examples on your forum.
It is very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.
Supported languages: HTML/XML, Javascript, CSS, PHP, Ruby, Perl, Python, C++, C#, Java, SQL, Bash etc.

How to use?

[code]your code[/code]

Features:

You can choose code formatting scheme

You can choose font size within code blocks

Highlighting works automatically: finds blocks of code, detects a language, highlights it — you don't need specify any language

settings: Admin > Configuration > Modifications Settings > Syntax Highlighting



Edit: Updated from 1.1 to 1.4.1

Demo:

Code: [Select]
set -x

# run straight AFTER mirror.sh on Dev

# rsync-live-html
echo "Live HTML directories are now being copied (normal) ..."
rsync -zpaAXPve ssh --exclude-from=/data/exclusions root@mirror:/rsync-live-html-with-delete/ /var/www/html/
rsync -zpaAXPve ssh --exclude-from=/data/exclusions root@forum.drugs-and-users.org:/var/www/html/ /var/www/html/

#
sh      dblivesmf.sh n
#

# fix ownership
chown   -R apache:apache /var/www/html
Title: Re: Code / Syntax Highlighting
Post by: smfadmin on May 11, 2021, 08:10:23 AM
New version is now disabled as I don't like the mods it makes.
SimplePortal 2.3.6 © 2008-2014, SimplePortal