0
class ApplicationController < ActionController::Base
0
-# # Filters added to this controller will be run for all controllers in the application.
0
-# # Likewise, all the methods added will be available for all controllers.
0
-# class ApplicationController < ActionController::Base
0
-# include AuthenticatedSystem
0
-# before_filter :login_from_cookie
0
-# caches_action :site_index, :footer_content
0
-# def cache_action?(action_name)
0
-# !logged_in? && controller_name.eql?('application') && params[:format].blank?
0
-# def action_fragment_key(options)
0
-# url = url_for(options).split('://').last
0
-# url = (url =~ /^.*\/$/) ? "#{url}index" : url
0
-# if AppConfig.closed_beta_mode
0
-# before_filter :beta_login_required, :except => [:teaser]
0
-# redirect_to home_path and return if current_user
0
-# render :layout => 'beta'
0
-# redirect_to :controller => 'application', :action => 'site_index', :format => 'rss'
0
-# render :layout => false
0
-# @posts = Post.find_recent(:limit => 16)
0
-# @rss_title = "Curbly Recent Posts"
0
-# respond_to do |format|
0
-# format.html { get_additional_homepage_data }
0
-# render_rss_feed_for(@posts, { :feed => {:title => "#{AppConfig.community_name} Recent Posts", :link => recent_url},
0
-# :item => {:title => :title, :link => :link_for_rss, :description => :post, :pub_date => :created_at}
0
-# get_recent_footer_content
0
-# render :partial => 'shared/footer_content' and return
0
-# def homepage_features
0
-# @homepage_features = HomepageFeature.find_features
0
-# @homepage_features.shift
0
-# render :partial => 'homepage_feature', :collection => @homepage_features and return
0
-# current_user && current_user.admin? ? true : access_denied
0
-# if @user = User.find(params[:user_id] || params[:id])
0
-# @is_current_user = (@user && @user.eql?(current_user))
0
-# unless logged_in? || @user.profile_public?
0
-# flash.now[:error] = "This user's profile is not public. You'll need to create an account and log in to access it."
0
-# redirect_to :controller => 'sessions', :action => 'new'
0
-# flash.now[:error] = "Please log in."
0
-# redirect_to :controller => 'sessions', :action => 'new'
0
-# def require_current_user
0
-# @user ||= User.find(params[:user_id] || params[:id] )
0
-# unless admin? || (@user && (@user.eql?(current_user)))
0
-# redirect_to :controller => 'sessions', :action => 'new' and return false
0
-# def popular_tags(limit = nil, order = ' tags.name ASC', type = nil)
0
-# sql = "SELECT tags.id, tags.name, count(*) AS count
0
-# WHERE tags.id = taggings.tag_id "
0
-# sql += " AND taggings.taggable_type = '#{type}'" unless type.nil?
0
-# sql += " GROUP BY tag_id"
0
-# sql += " ORDER BY #{order}"
0
-# sql += " LIMIT #{limit}" if limit
0
-# Tag.find_by_sql(sql).sort{ |a,b| a.name.downcase <=> b.name.downcase}
0
-# def get_recent_footer_content
0
-# @recent_clippings = Clipping.find_recent(:limit => 10)
0
-# @recent_photos = Photo.find_recent(:limit => 10)
0
-# @recent_comments = Comment.find_recent(:limit => 13)
0
-# @popular_tags = popular_tags(30, ' count DESC')
0
-# def get_additional_homepage_data
0
-# @sidebar_right = true
0
-# @homepage_features = HomepageFeature.find_features
0
-# @homepage_features_data = @homepage_features.collect {|f| [f.id, f.public_filename(:large) ] }
0
-# @active_users = User.find_by_activity({:limit => 5, :require_avatar => false})
0
-# @featured_writers = User.find_featured
0
-# @featured_posts = Post.find_featured
0
-# @topics = Topic.find(:all, :limit => 5, :order => "replied_at DESC")
0
-# @active_contest = Contest.get_active
0
-# @popular_posts = Post.find_popular({:limit => 10})
0
-# @popular_polls = Poll.find_popular(:limit => 8)
0
\ No newline at end of file
0
\ No newline at end of file
Comments
No one has commented yet.