patricioqb
Forum Replies Created
-
Update:
I create a filter to get the events from the main blog directly from the SQL:
add_filter('em_events_get_sql','pat_em_sql',$sql); function pat_em_sql($sql){ $orig = $sql; $sql = "(".$orig.") UNION (".preg_replace('/wp_\d{1,2}_/','wp_',$sql).")"; return $sql; }The problem, of course, is permalinks not working for the “outside” events in a sub-blog.
Yes.
Right now, I am just playing to trying to get the main blog events in all sub-blogs:
add_filter('em_events_get_default_search','em_from_main_blog',1,2); add_filter('em_calendar_get_default_search','em_from_main_blog',1,2); function em_from_main_blog($searches){ $searches['blog'] = 1; echo "<pre>"; var_dump($searches); echo "</pre>"; return $searches; }That seems to work fine, but when I do
var_dump($sql) on em_events_get_sql, it is still fetching for the current blog.
It is not working. If I print_r the arrays, it seems is rewriting the blog key in the array, but it is not doing anything.
If I print the SQL query, it is still quering for the tables of the current blog and not the main blog (or both, which is what I want).
Hi Marcus. Thank you for your response.
I followed your tutorial and I understood it, but I can’t find how to do what I need from that.
Is there a way to change the default scope or something like that? I only would need to add “OR blog_id = 1” or something like that 🙂
Forum: Plugins
In reply to: add_action right after <body> tagThanks, I think that will work 🙂
Forum: Plugins
In reply to: add_action right after <body> tagI have the same problem. I need to insert a div just after the body tag for a plugin.
If someone has the solution, please let us know (:
Forum: Themes and Templates
In reply to: Caption doesn’t work in new postsThank you!
I realized the plugin SH-Autolink Super was the problem.Forum: Themes and Templates
In reply to: Caption doesn’t work in new postsYeah, I tried, but it doesn’t work neither. It looks the same.
Forum: Themes and Templates
In reply to: Caption doesn’t work in new postsI know, it’s doesn’t, but it has.
This is the code of the image:
[caption id="attachment_563" align="aligncenter" width="295" caption="Foto de archivo de J.K. Rowling"]<img src="http://www.redfluharrypotter.com.ar/redflu/wp-content/uploads/jk-rowling-20080625-428819.jpg" alt="Foto de archivo de J.K. Rowling" title="Foto de archivo de J.K. Rowling" width="295" height="340" class="size-full wp-image-563" />[/caption]Forum: Installing WordPress
In reply to: How exactly is WordPress.com done?WordPress.com uses MU Wordpres (Multi Users WordPress).
You can download here:
Forum: Fixing WordPress
In reply to: Fatal Error – HELP!Try to go to the Phpmyadmin of your server, and change the selected theme…
Forum: Installing WordPress
In reply to: CSS Issue?That is because the full path (of every file) is in localhost.
Try to change the URL in the Wp-Admin (I dont remember right now if you can do that), or in the PhpMyAdmin.
You shouldn’t install entering by localhost, but the domain…
Sorry for my poor english 🙁
Forum: Everything else WordPress
In reply to: Character CountThe strlen() function in PHP will count the character of a string.
Try to do something like strlen($postvar).
Forum: Fixing WordPress
In reply to: Newbie Needing HelpYou are welcome 🙂
Forum: Fixing WordPress
In reply to: Transfer from WordPress to WordPressWhen you go to Export, select All in the Author field.
Maybe that is the problem…