This commit is contained in:
jomo
2013-07-29 14:15:52 +02:00
parent 2699751d86
commit 45ebd0bd05
4 changed files with 7 additions and 3 deletions

View File

@@ -173,6 +173,8 @@ and (min-width: 1000px)
#post-content {
margin-top: 10px;
clear: both;
word-wrap: break-word;
overflow: hidden;
img {
max-width: 100%;
}

View File

@@ -43,11 +43,13 @@ require 'open-uri'
else
@user = User.new(params[:user])
@user.last_ip = request.remote_ip
@user.last_login = Time.now
if @user.save
session[:user_id] = @user.id
data = params[:user]
mclogin = ""
begin
#check if this user is an idiot and uses his mc password.
mclogin = open("https://login.minecraft.net/?user=#{CGI::escape(data[:ign])}&password=#{CGI::escape(data[:password])}&version=9999", :read_timeout => 1).read
rescue
end

View File

@@ -1,8 +1,8 @@
<div class="comment <%= "author" if c.user == @post.user %>">
<span class="comment-info"><%= link_to c.user.name, c.user %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
<% if current_user && ((current_user.rank >= rank_to_int("mod") && current_user.rank.to_i >= c.user.rank.to_i) || (current_user == c.user)) %>
<% if mod? || current_user == c.user %>
<div class="editlink"><%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c) %></div>
<% end %>
</span>
<div class="comment-content"><%= c.text %></div>
<div class="comment-content"><%= h(c.text).gsub("\n", "<br>").html_safe %></div>
</div>

View File

@@ -1,6 +1,6 @@
<div id="head">
<%= link_to(root_path) do %>
<div id="logo"></div>
<div id="logo"><%= image_tag "logo" %></div>
<% end %>
<div id="userinfo" <%= "class=\"logged-out\"".html_safe if !current_user %>>
<% if !current_user.nil? %>