dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse

This website has run out of funding so feel free to contribute if you can afford it (see footer)

Author Topic: Code / Syntax Highlighting  (Read 3161 times)

Offline smfadmin (OP)

  • SMF (internal) Site
  • Administrator
  • Jr. Member
  • *****
  • Join Date: Dec 2014
  • Location: Management
  • Posts: 133
  • Reputation Power: 0
  • smfadmin has hidden their reputation power
  • Last Login:October 29, 2023, 06:02:36 AM
  • Supplied Install Member
Code / Syntax Highlighting
« 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
« Last Edit: May 11, 2021, 08:09:08 AM by smfadmin »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
measure twice, cut once

Offline smfadmin (OP)

  • SMF (internal) Site
  • Administrator
  • Jr. Member
  • *****
  • Join Date: Dec 2014
  • Location: Management
  • Posts: 133
  • Reputation Power: 0
  • smfadmin has hidden their reputation power
  • Last Login:October 29, 2023, 06:02:36 AM
  • Supplied Install Member
Re: Code / Syntax Highlighting
« Reply #1 on: May 11, 2021, 08:10:23 AM »
New version is now disabled as I don't like the mods it makes.
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
measure twice, cut once

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal