cjbottaro
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: category as a subdomain?There seems to be a defunct plugin for this… any solution for WP 3.0?
Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] [Plugin: SyntaxHighlighter Evolved] HTML entitiesOk, something really weird is going on. I think my WordPress install just got into a weird state.
So when I preview that example code, it looks messed up for me, but then I updated the post and it looked fine. Then I previewed it again after the update and it still looked fine.
So I thought maybe it’s the initial preview before you publish that is messed up. So I made a new post to test it… and everything worked fine. Ugh, frustrating. Computers (and computer programs) are supposed to be deterministic… ??
I guess it could be a multitude of things… the Blogger importer pulling in posts incorrectly, maybe it was the way I copied and pasted the code, dunno.
Anyway, sorry for wasting your time.
Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] [Plugin: SyntaxHighlighter Evolved] HTML entitiesHere’s a pastie for better formatting: https://pastie.org/1039668
Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] [Plugin: SyntaxHighlighter Evolved] HTML entitiesThat’s strange. That example is working for me now too. Maybe I was seeing a cached version of the page or something. Can you try this one?
[ruby]
module ActiveRecord
module Associations
module ClassMethodsdef construct_finder_sql_for_association_limiting(options, join_dependency)
scope = scope(:find) || {}
order = [options[:order], scope[:order]].compact.join(', ')# Only join tables referenced in order or conditions since this is particularly slow on the pre-query.
tables_from_conditions = conditions_tables(options)
tables_from_order = order_tables(options)
all_tables = tables_from_conditions + tables_from_order
distinct_join_associations = all_tables.uniq.map{|table|
join_dependency.joins_for_table_name(table)
}.flatten.compact.uniqis_distinct = !options[:joins].blank? || include_eager_conditions?(options, tables_from_conditions) || include_eager_order?(options, tables_from_order)
sql = "SELECT "
if is_distinct
sql << connection.distinct("#{connection.quote_table_name table_name}.#{primary_key}", order)
else
sql << primary_key
end
sql << " FROM #{connection.quote_table_name table_name} "if is_distinct
sql << distinct_join_associations.collect(&:association_join).join
add_joins!(sql, options, scope)
endadd_conditions!(sql, options[:conditions], scope)
add_group!(sql, options[:group], scope)if order and is_distinct
connection.add_order_by_for_association_limiting!(sql, :order => order)
else
add_order!(sql, options[:order], scope)
endadd_limit!(sql, options, scope)
return sanitize_sql(sql)
endend
end
end
[/ruby]Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] [Plugin: SyntaxHighlighter Evolved] HTML entitiesSure thing…
[code]
require 'rubygems'
require 'activesupport'
dt = DateTime.now
puts dt.to_f
# => 1240455468.91318
t = YAML.load(dt.to_yaml)
puts t.class.name
# => Time
puts t.to_f
# => 1240455468.0
[/code]Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] [Plugin: SyntaxHighlighter Evolved] HTML entitiesI am using the HTML editor. I even disabled the visual editor in my profile settings.
Thanks for the help.