Web CMS Designs: Forums
 

 
Post new topic Reply to topic
Message
Display posts from previous:       
PostPosted: Mon May 21, 2012 10:57 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 104
Location: Texas

View user's profile Send private message Visit poster's website
Took a little longer than expected to style out a highlighting theme, so thought I would share for those who are interested. Intended for use with Highlight JS

http://softwaremaniacs.org/soft/highlight/en/


As well as with the PHPBB2 integration for RavenNuke which can be previewed at:
http://www.facebook.com/AdvancedBBCodeBoxForRavenNuke
and live in action at http://trickedoutnews.com/ftopict-250.html
and downloaded at: http://trickedoutnews.com/download-file-121.html


Pojoaque style


A southwest inspired code highlighting theme, as seen below. Either copy the CSS and background-image below, or just grab the full download at the bottom of the post. Enjoy Smile

css Code:
/*


Pojoaque Style by Jason Tate
web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
Based on Solarized Style from ethanschoonover.com/solarized (c) Jeremy Hull

*/

pre code {
display: block; padding: 0.5em;
color: #DCCF8F;
background: url("pageback33.jpg") repeat scroll left top #181914;
}

pre .comment,
pre .template_comment,
pre .diff .header,
pre .doctype,
pre .lisp .string,
pre .javadoc {
color: #586e75;
font-style: italic;
}

pre .keyword,
pre .css .rule .keyword,
pre .winutils,
pre .javascript .title,
pre .method,
pre .addition,
pre .css .tag,
pre .lisp .title {
color: #B64926;
}

pre .number,
pre .command,
pre .string,
pre .tag .value,
pre .phpdoc,
pre .tex .formula,
pre .regexp,
pre .hexcolor {
color: #468966;
}

pre .title,
pre .localvars,
pre .function .title,
pre .chunk,
pre .decorator,
pre .builtin,
pre .built_in,
pre .lisp .title,
pre .identifier,
pre .title .keymethods,
pre .id {
color: #FFB03B;
}

pre .attribute,
pre .variable,
pre .instancevar,
pre .lisp .body,
pre .smalltalk .number,
pre .constant,
pre .class .title,
pre .parent,
pre .haskell .label {
color: #b58900;
}

pre .css .attribute {
color: #b89859;
}

pre .css .number,pre .css .hexcolor{
color: #DCCF8F;
}

pre .css .class {
color: #d3a60c;
}

pre .preprocessor,
pre .pi,
pre .shebang,
pre .symbol,
pre .diff .change,
pre .special,
pre .keymethods,
pre .attr_selector,
pre .important,
pre .subst,
pre .cdata {
color: #cb4b16;
}

pre .deletion {
color: #dc322f;
}

pre .tex .formula {
background: #073642;
}
pageback33.jpg
 Description:
background image used in style
 Filesize:  1.16 KB
 Viewed:  10860 Time(s)

pageback33.jpg

Pojoaque.7z
 Description:
7Z file: Pojoaque style for Highlight JS Code Highlighter

Download
 Filename:  Pojoaque.7z
 Filesize:  1.97 KB
 Downloaded:  265 Time(s)
Pojoaque.zip
 Description:
ZIP file: Pojoaque style for Highlight JS Code Highlighter

Download
 Filename:  Pojoaque.zip
 Filesize:  2.05 KB
 Downloaded:  288 Time(s)
spasticdonkeywebcmsdesigns


Last edited by spasticdonkey on Tue May 22, 2012 5:29 am; edited 2 times in total 
PostPosted: Tue May 22, 2012 3:39 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 104
Location: Texas

View user's profile Send private message Visit poster's website
Just some examples of language specific highlighting using Highlight JS and the Advanced BBCode Box integration for RavenNuke.
python Code:
@requires_authorization

def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1) or None

class SomeClass:
pass
ruby Code:
class A < B; def self.create(object = User) object end end

class Zebra; def inspect; "X#{2 + self.object_id}" end end

module ABC::DEF
include Comparable

# @param test
# @return [String] nothing
def foo(test)
Thread.new do |blockvar|
ABC::DEF.reverse(:a_symbol, :'a symbol' + 'test' + test)
end.join
end

def [](index) self[index] end
def ==(other) other == self end
end

anIdentifier = an_identifier
Constant = 1
perl Code:
# loads object

sub load
{
my $flds = $c->db_load($id,@_) || do {
Carp::carp "Can`t load (class: $c, id: $id): '$!'"; return undef
};
my $o = $c->_perl_new();
$id12 = $id / 24 / 3600;
$o->{'ID'} = $id12 + 123;
$o->{'PAPA'} = $flds->{'PAPA'};
#$o->{'SHCUT'} = $flds->{'SHCUT'};
my $p = $o->props;
my $vt;
$string =~ m/^sought_text$/;
$items = split //, 'abc';
for my $key (keys %$p)
{
if(${$vt.'::property'}) {
$o->{$key . '_real'} = $flds->{$key};
tie $o->{$key}, 'CMSBuilder::Property', $o, $key;
} else {
$o->{$key} = $flds->{$key};
$o->kill();
}
}
$o->save if delete $o->{'_save_after_load'};
return $o;
}

foreach my $num (0..$#array) {
# something
}
php Code:
if ( !defined('MODULE_FILE') )

{
die("You can't access this file directly...");
}
if (!isset($popup) OR ($popup != "1")) {
$module_name = basename(dirname(__FILE__));
require_once("modules/".$module_name."/nukebb.php");
}
else
{
$phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'common.'.$phpEx);
include_once("modules/Forums/includes/bbcode.php");
include_once("modules/Forums/includes/functions_post.php");
apache Code:
# -------------------------------------------

# Only process if mod_expires is installed
# For faster load times cache certain types of files for specific amount of time
# You should adjust these settings based upon your caching requirements
# -------------------------------------------
<IfModule mod_expires.c>
ExpiresActive On
# ExpiresDefault A86400
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/css "access plus 5 minutes"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/plain "access plus 15 minutes"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType video/x-flv "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
# ExpiresByType text/html "access plus 5 minutes"
ExpiresByType text/javascript "access plus 5 minutes"
ExpiresByType application/x-javascript "access plus 5 minutes"
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl|html)$">
#no cache for php files, cgi files, pl files, html files.
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
</IfModule>
spasticdonkeywebcmsdesigns
 
PostPosted: Fri Aug 01, 2014 5:46 pm
Reply with quote Back to top
somchayzz
Newbie
Newbie
Joined: Aug 01, 2014
Posts: 2

View user's profile Send private message
I read that I felt as I read this post Ee Ah simplification. I like it a lot I'm eager to bring the value of this great babble to post again.
 
PostPosted: Fri Aug 01, 2014 7:57 pm
Reply with quote Back to top
chiwanaan
Newbie
Newbie
Joined: Aug 01, 2014
Posts: 2

View user's profile Send private message
Advantage of the above occurrences, this made ??me think a lot, really.
 
Post new topic Reply to topic Web CMS Designs Forum Index RavenNuke Tweaks and Tips
Your AccountNew Members
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2008 phpBB Group
 
 
Raven PHP Scripts