Changeset 339:d05821b70742


Ignore:
Timestamp:
Apr 4, 2011 1:56:16 PM (2 years ago)
Author:
slav0nic <slav0nic0@…>
Branch:
default
Message:

replaced bbmarkup by postmarkup; pygments optional required (highlight.js was removed); Postmarkup required! Hope that it safe and stable now.

Files:
1 added
42 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • djangobb/djangobb_forum/forms.py

    r306 r339  
    1010from django.utils.translation import ugettext as _ 
    1111 
     12from postmarkup import render_bbcode 
     13 
    1214from djangobb_forum.models import Topic, Post, Profile, Reputation, Report, \ 
    1315    Forum, Attachment, TZ_CHOICES, PRIVACY_CHOICES 
    14 from djangobb_forum.markups import bbmarkup 
    1516from djangobb_forum import settings as forum_settings 
    1617from djangobb_forum.util import convert_text_to_html 
  • djangobb/djangobb_forum/templates/forum/base.html

    r330 r339  
    3535 
    3636    <!-- Highlightjs goodies --> 
    37         <script type="text/javascript" src="{{ MEDIA_URL }}forum/js/highlight.pack.js"></script> 
    38         <script type="text/javascript"> 
    39                 hljs.initHighlightingOnLoad(); 
    40         </script> 
    41         <link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}forum/css/hljs_styles/djangobb.css" /> 
     37        <link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}forum/css/pygments.css" /> 
    4238        {% if highlight_word %} 
    4339                <script type="text/javascript" src="{{ MEDIA_URL }}forum/js/jquery.highlight-3.pack.js"></script> 
  • djangobb/djangobb_forum/templates/forum/post_preview.html

    r211 r339  
    11<head> 
    2 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}forum/css/hljs_styles/phpbb_blue.css" /> 
    3 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}forum/css/hljs_styles/djangobb.css" /> 
     2<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}forum/css/pygments.css" /> 
    43</head> 
    5 <script type="text/javascript" src="{{ MEDIA_URL }}forum/js/highlight.pack.js"></script> 
    6 <script type="text/javascript"> 
    7         hljs.initHighlightingOnLoad(); 
    8 </script> 
     4<body> 
    95{{ data|safe }} 
     6</body> 
  • djangobb/djangobb_forum/util.py

    r333 r339  
    44import re 
    55from HTMLParser import HTMLParser 
     6from postmarkup import render_bbcode 
    67try: 
    78    import markdown 
     
    2223 
    2324from djangobb_forum import settings as forum_settings 
    24 from djangobb_forum.markups import bbmarkup 
    2525 
    2626#compile smiles regexp 
     
    191191        """ 
    192192 
    193         def __init__(self, func, tags=('a', 'code')): 
     193        def __init__(self, func, tags=('a', 'pre', 'span')): 
    194194            HTMLParser.__init__(self) 
    195195            self.func = func 
     
    292292def convert_text_to_html(text, markup): 
    293293    if markup == 'bbcode': 
    294         text = bbmarkup.bbcode(text) 
     294        text = render_bbcode(text) 
    295295    elif markup == 'markdown': 
    296296        text = markdown.markdown(text, safe_mode='escape') 
  • extras/optional-requirements.txt

    r316 r339  
    33whoosh 
    44south>=0.7.2 
     5pygments 
    56-e git://github.com/jtauber/django-mailer.git#egg=django-mailer 
  • extras/requirements.txt

    r316 r339  
    44django-haystack>=1.1.0 
    55-e hg+http://bitbucket.org/benoitc/django-authopenid#egg=django-authopenid 
     6-e svn+http://postmarkup.googlecode.com/svn/trunk/#egg=postmarkup 
Note: See TracChangeset for help on using the changeset viewer.