Commits

Eugene MechanisM committed 270767b

Smile image files removed, added image sprite instead and css for it. also changed settings.py to new smiles markup

Comments (0)

Files changed (17)

djangobb_forum/settings.py

 
 # SMILE Extension
 SMILES_SUPPORT = get('DJANGOBB_SMILES_SUPPORT', True)
-EMOTION_SMILE = get('DJANGOBB_EMOTION_SMILE', '<img src="%sdjangobb_forum/img/smilies/smile.png" />' % settings.STATIC_URL)
-EMOTION_NEUTRAL = get('DJANGOBB_EMOTION_NEUTRAL', '<img src="%sdjangobb_forum/img/smilies/neutral.png" />' % settings.STATIC_URL)
-EMOTION_SAD = get('DJANGOBB_EMOTION_SAD', '<img src="%sdjangobb_forum/img/smilies/sad.png" />' % settings.STATIC_URL)
-EMOTION_BIG_SMILE = get('DJANGOBB_EMOTION_BIG_SMILE', '<img src="%sdjangobb_forum/img/smilies/big_smile.png" />' % settings.STATIC_URL)
-EMOTION_YIKES = get('DJANGOBB_EMOTION_YIKES', '<img src="%sdjangobb_forum/img/smilies/yikes.png" />' % settings.STATIC_URL)
-EMOTION_WINK = get('DJANGOBB_EMOTION_WINK', '<img src="%sdjangobb_forum/img/smilies/wink.png" />' % settings.STATIC_URL)
-EMOTION_HMM = get('DJANGOBB_EMOTION_HMM', '<img src="%sdjangobb_forum/img/smilies/hmm.png" />' % settings.STATIC_URL)
-EMOTION_TONGUE = get('DJANGOBB_EMOTION_TONGUE', '<img src="%sdjangobb_forum/img/smilies/tongue.png" />' % settings.STATIC_URL)
-EMOTION_LOL = get('DJANGOBB_EMOTION_LOL', '<img src="%sdjangobb_forum/img/smilies/lol.png" />' % settings.STATIC_URL)
-EMOTION_MAD = get('DJANGOBB_EMOTION_MAD', '<img src="%sdjangobb_forum/img/smilies/mad.png" />' % settings.STATIC_URL)
-EMOTION_ROLL = get('DJANGOBB_EMOTION_ROLL', '<img src="%sdjangobb_forum/img/smilies/roll.png" />' % settings.STATIC_URL)
-EMOTION_COOL = get('DJANGOBB_EMOTION_COOL', '<img src="%sdjangobb_forum/img/smilies/cool.png" />' % settings.STATIC_URL)
+EMOTION_SMILE = get('DJANGOBB_EMOTION_SMILE', '<span class="smiley smile"></span>')
+EMOTION_NEUTRAL = get('DJANGOBB_EMOTION_NEUTRAL', '<span class="smiley neutral"></span>')
+EMOTION_SAD = get('DJANGOBB_EMOTION_SAD', '<span class="smiley sad"></span>')
+EMOTION_BIG_SMILE = get('DJANGOBB_EMOTION_BIG_SMILE', '<span class="smiley big_smile"></span>')
+EMOTION_YIKES = get('DJANGOBB_EMOTION_YIKES', '<span class="smiley yikes"></span>')
+EMOTION_WINK = get('DJANGOBB_EMOTION_WINK', '<span class="smiley wink"></span>')
+EMOTION_HMM = get('DJANGOBB_EMOTION_HMM', '<span class="smiley hmm"></span>')
+EMOTION_TONGUE = get('DJANGOBB_EMOTION_TONGUE', '<span class="smiley tongue"></span>')
+EMOTION_LOL = get('DJANGOBB_EMOTION_LOL', '<span class="smiley lol"></span>')
+EMOTION_MAD = get('DJANGOBB_EMOTION_MAD', '<span class="smiley mad"></span>')
+EMOTION_ROLL = get('DJANGOBB_EMOTION_ROLL', '<span class="smiley roll"></span>')
+EMOTION_COOL = get('DJANGOBB_EMOTION_COOL', '<span class="smiley cool"></span>')
 SMILES = ((r'(:|=)\)', EMOTION_SMILE), #:), =)
           (r'(:|=)\|',  EMOTION_NEUTRAL), #:|, =| 
           (r'(:|=)\(', EMOTION_SAD), #:(, =(
           (r':rolleyes:', EMOTION_ROLL),
           (r':cool:', EMOTION_COOL)
          )
-SMILES = get('DJANGOBB_SMILES', SMILES)
+SMILES = get('DJANGOBB_SMILES', SMILES)

djangobb_forum/static/djangobb_forum/css/smilies.css

+.smiley:before{content:"";position:relative;top:2px;float:left;width:16px;height:16px;margin:0 0.5em 0 0;background:url(../img/smileys.png) 0 99px no-repeat;}
+.smiley.right:before{float:right;margin:0 0 0 0.5em;}
+.smiley.mad:before{background-position:0px 0px}
+.smiley.yikes:before{background-position:0px -16px}
+.smiley.wink:before{background-position:0px -32px}
+.smiley.neutral:before{background-position:0px -48px}
+.smiley.sad:before{background-position:0px -64px}
+.smiley.big_smile:before{background-position:0px -80px}
+.smiley.smile:before{background-position:0px -96px}
+.smiley.hmm:before{background-position:0px -112px}
+.smiley.lol:before{background-position:0px -128px}
+.smiley.roll:before{background-position:0px -144px}
+.smiley.emoticon-smile:before{background-position:0px -160px}
+.smiley.cool:before{background-position:0px -176px}
+.smiley.tongue:before{background-position:0px -192px}
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smileys.png

Added
New image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/big_smile.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/cool.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/emoticon-smile.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/hmm.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/lol.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/mad.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/neutral.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/roll.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/sad.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/smile.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/tongue.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/wink.png

Removed
Old image
Add a comment to this file

djangobb_forum/static/djangobb_forum/img/smilies/yikes.png

Removed
Old image

djangobb_forum/templates/djangobb_forum/base.html

 	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 	
 	{% set_theme_style request.user %}
-
+        <link rel="stylesheet" href="{{ STATIC_URL }}djangobb_forum/css/smilies.css" />
 	<link rel="alternate" type="application/atom+xml" href="{% url djangobb:forum_posts_feed %}" title="{% trans "Latest posts on forum" %}" />
 	<link rel="alternate" type="application/atom+xml" href="{% url djangobb:forum_topics_feed %}" title="{% trans "Latest topics on forum" %}" />
 
 </div>
 </div>
 </body>
-</html>
+</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.