public
Description: The kick ass (non-commercial) home for musicians and their music
Homepage: http://alonetone.com
Clone URL: git://github.com/sudara/alonetone.git
redo the nav for forums, fix the bot reporting
sudara (author)
Tue Jul 01 11:14:00 -0700 2008
commit  bb1ac3b11fa6c097eacfb450f6297b82eadb5e0f
tree    9770d5e793082ef64e8727702de79e4296839b6b
parent  7ffb901bd02b5b679258f23de464c079d98d401b
...
203
204
205
206
207
208
209
210
 
211
212
...
203
204
205
 
206
207
208
 
209
210
211
0
@@ -203,10 +203,9 @@ class AssetsController < ApplicationController
0
       :track_owner=> @asset.user,
0
       :source => @referer,
0
       :ip => request.remote_ip) unless bot?
0
- logger.warn("BOT LISTEN: "+ request.remote_ip + request.user_agent) if bot?
0
   end
0
   
0
   def bot?
0
- @@valid_listeners.detect{ |listener| request.user_agent.downcase.include? listener} == nil
0
+ (@@valid_listeners.detect{ |listener| request.user_agent.downcase.include? listener} == nil) || (request.user_agent.downcase.include?('bot'))
0
   end
0
 end
...
1
2
 
3
4
5
...
8
9
10
11
 
12
13
14
...
91
92
93
 
 
 
 
 
94
...
1
2
3
4
5
6
...
9
10
11
 
12
13
14
15
...
92
93
94
95
96
97
98
99
100
0
@@ -1,5 +1,6 @@
0
 class ForumsController < ApplicationController
0
   before_filter :admin_required, :except => [:index, :show]
0
+ before_filter :set_forum_tab
0
 
0
   # GET /forums
0
   # GET /forums.xml
0
@@ -8,7 +9,7 @@ class ForumsController < ApplicationController
0
     session[:forums_page] = nil
0
 
0
     @forums = Forum.ordered
0
-
0
+ @page_title = 'alonetone Forums'
0
     respond_to do |format|
0
       format.html # index.html.erb
0
       format.xml { render :xml => @forums }
0
@@ -91,4 +92,9 @@ class ForumsController < ApplicationController
0
       format.xml { head :ok }
0
     end
0
   end
0
+
0
+ protected
0
+ def set_forum_tab
0
+ @tab = "forums"
0
+ end
0
 end
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ class UsersController < ApplicationController
0
   rescue_from NoMethodError, :with => :user_not_found
0
 
0
   def index
0
- @page_title = "Musicians and Listeners: #{params[:sort] ? params[:sort].titleize : ''}"
0
+ @page_title = "#{params[:sort] ? params[:sort].titleize+' - ' : ''} Musicians and Listeners"
0
     @tab = 'browse'
0
     @users = User.paginate_by_params(params) unless params[:sort] == 'map'
0
     flash[:info] = "Want to see your pretty face show up here?<br/> Edit <a href='#{edit_user_path(current_user)}'>your profile</a>" unless current_user = :false || current_user.has_pic?
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@
0
             <%= link_to 'alonetone forums', forums_path %> <span class="arrow">&rarr;</span> <%= @forum.name %>
0
     <% end %>
0
 
0
- <% @page_title = 'alonetone forums - ' + @forum.name %>
0
+ <% @page_title = @forum.name+ ' forum'%>
0
 
0
     <% content_for :extras do %>
0
       <%= pluralize @forum.topics.size, 'topics' %>,
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@
0
 <html xmlns="http://www.w3.org/1999/xhtml">
0
   <head>
0
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
0
- <title><%= @page_title || 'alonetone, a damn fine home for musicians. Upload mp3s and share your music.' %> - alonetone</title>
0
+ <title><%= @page_title || 'alonetone, a damn fine home for musicians' %> - alonetone</title>
0
     <%= stylesheet_link_tag 'reset','typography', 'layout', 'nav', 'flash', 'tracks','playlists','tabs','facebox','alonetone','forums', :cache => 'alonetone-v2'%>
0
     <%= stylesheet_link_tag 'ie6' if request.env['HTTP_USER_AGENT'] and request.env['HTTP_USER_AGENT'].include? "MSIE 6.0" %>
0
         <%= '<meta name="robots" content="noindex,nofollow" />' unless request.host =~ /^http:\/\/alonetone.com|^alonetone.com/ %>
...
23
24
25
 
 
 
26
27
...
23
24
25
26
27
28
29
30
0
@@ -23,4 +23,7 @@
0
   </li>  
0
   
0
   <% end %>
0
+ <li id='forums'>
0
+ <%= link_to ' ', forums_path, :title => 'browse all artists on alonetone', :class => "tab#{' active' if @tab == 'forums' }" %>
0
+ </li>
0
 </ul>
0
\ No newline at end of file
...
26
27
28
29
30
 
 
31
32
33
...
26
27
28
 
 
29
30
31
32
33
0
@@ -26,8 +26,8 @@ a#logo
0
   :top 0px
0
   :left 50px
0
   :height 80px
0
- :width 730px
0
-
0
+ :width 830px
0
+ :background none
0
 #wrapper
0
   :position relative
0
   :margin 0
...
22
23
24
25
26
 
 
27
28
 
29
30
 
31
32
33
34
35
 
 
 
 
 
36
37
38
39
40
41
 
 
42
43
 
 
 
 
 
44
45
46
47
48
49
 
 
50
51
 
 
 
 
 
52
53
54
55
 
 
 
56
57
 
 
 
 
 
 
 
58
59
60
 
 
 
 
 
61
...
22
23
24
 
 
25
26
27
 
28
29
 
30
31
 
 
32
 
33
34
35
36
37
38
39
 
 
 
 
40
41
42
 
43
44
45
46
47
48
49
 
 
 
 
50
51
52
 
53
54
55
56
57
58
59
60
 
61
62
63
64
 
65
66
67
68
69
70
71
72
 
73
74
75
76
77
78
79
0
@@ -22,38 +22,56 @@ ul#nav
0
       :display block
0
       :margin 0
0
       :height 74px
0
- :width 150px
0
- :background url(../images/buttons/nav.png) no-repeat 0px 0px
0
+ :width 120px
0
+ :background transparent url(../images/buttons/nav.png) no-repeat 0px 0px
0
     &#home
0
- :margin-right 71px
0
+ :margin-right 70px
0
       a
0
- :width 150px
0
+ :width 112px
0
         :background-position 0px 0px
0
- &.active
0
- :background-position -150px 0px
0
         &:hover
0
- :background-position -300px 0px
0
+ :background-position -224px 0px
0
+ &.active
0
+ :background-position -112px 0px
0
+ &:hover
0
+ :background-position -112px 0px
0
     &#browse
0
       a
0
- :width 204px
0
- :background-position -450px 0px
0
- &.active
0
- :background-position -654px 0px
0
+ :width 124px
0
+ :background-position -336px 0px
0
         &:hover
0
- :background-position -858px 0px
0
+ :background-position -582px 0px
0
+ &.active
0
+ :background-position -459px 0px
0
+ &:hover
0
+ :background-position -459px 0px
0
     &#upload
0
       a
0
- :background-position -1062px 0px
0
- :width 124px
0
- &.active
0
- :background-position -1186px 0px
0
+ :background-position -706px 0px
0
+ :width 123px
0
         &:hover
0
- :background-position -1310px 0px
0
+ :background-position -952px 0px
0
+ &.active
0
+ :background-position -830px 0px
0
+ &:hover
0
+ :background-position -830px 0px
0
     &#your_stuff
0
       a
0
         :width 145px
0
- :background-position -1434px 0px
0
+ :background-position -1074px 0px
0
+ &:hover
0
+ :background-position -1364px 0px
0
         &.active
0
- :background-position -1579px 0px
0
+ :background-position -1219px 0px
0
+ &:hover
0
+ :background-position -1219px 0px
0
+ &#forums
0
+ a
0
+ :width 130px
0
+ :background-position -1509px 0px
0
         &:hover
0
- :background-position -1724px 0px
0
\ No newline at end of file
0
+ :background-position -1769px 0px
0
+ &.active
0
+ :background-position -1639px 0px
0
+ &:hover
0
+ :background-position -1639px 0px
0
\ No newline at end of file

Comments

    No one has commented yet.