Modifiedcontent
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WP 3.5 messes up jQuery popover positionmod_pagespeed, mentioned in the known issues, is not a factor. Just double-checked with my hosting service.
Forum: Plugins
In reply to: [FeedWordPress] Stop authors from syndicated posts being added as usersSolutions here:
http://wordpress.org/support/topic/stop-authors-of-syndicated-posts-being-added-as-users
I reposted my question to open it up beyond just FeedWordPress, but radgeek‘s solution is FeedWordPress specific.
Forum: Networking WordPress
In reply to: Stop authors of syndicated posts being added as usersThank you so much radgeek!
I haven’t tested it yet, but this looks all pretty straightforward and exactly what I need. All the clues I needed to get started.
It should even be possible to replace JOE DOKES with some kind of variable for the owner of the blog/site where the syndicated post appears. If I can find enough time over the holidays to figure that out I’ll post my solutions here.
Forum: Networking WordPress
In reply to: Stop authors of syndicated posts being added as users> Adding users to … what? You mean showing authors in RSS feeds?
To wp-users in the database.
Not from RSS feeds of course, but from syndicated posts that are added to WP’s own post system, by plugins like FeedWordPress – I think there are others that do the same and other ways this type of ghost members can be created.
Is there a function (?) in WP that adds post authors to the database? Something that checks if an author is in wp-users and add him/her if he/she is not?
Anything I can do a search on, so I can try to come up with a workaround? Maybe a filter (?) to stop FeedWordPress doing add_user or whatever it is?
Or a catch-all solution to make sure that users are NEVER added, except via registration or administrator.
Don’t know where to start with this…
Forum: Fixing WordPress
In reply to: WP 3.5 messes up jQuery popover positionjquery-popover.js adds CSS positioning to the popover with this bit of code:
left: calc.x1, top: calc.y1,In WP 3.5 this is not added to the div, but when I replace calc.x1 and calc.y1 with values like ‘300px’, it is added.
So the problem is before those values are added; WP 3.5 is somehow messing up how calc.x1 and calc.y1 are calculated.
Below follows more relevant preceding code. How does WP 3.5 interfere with that? Can anyone spot it? Is there anything I could just try to rename?
The outerWidth() stuff looks like a likely culprit?
var popovers = []; var _ = { calc_position: function(popover, position) { var data = popover.popover("getData"); var options = data.options; var $anchor = options.anchor ? $(options.anchor) : popover; var el = data.popover; var coordinates = $anchor.offset(); var y1, x1; if(position == 'top') { y1 = coordinates.top - el.outerHeight(); x1 = coordinates.left - el.outerWidth() / 2 + $anchor.outerWidth() / 2; } else if(position == 'right') { y1 = coordinates.top + $anchor.outerHeight() / 2 - el.outerHeight() / 2; x1 = coordinates.left + $anchor.outerWidth(); } else if(position == 'left') { y1 = coordinates.top + $anchor.outerHeight() / 2 - el.outerHeight() / 2; x1 = coordinates.left - el.outerWidth(); } else { //bottom y1 = coordinates.top + $anchor.outerHeight(); x1 = coordinates.left - el.outerWidth() / 2 + $anchor.outerWidth() / 2; } x2 = x1 + el.outerWidth(); y2 = y1 + el.outerHeight(); ret = { x1: x1, x2: x2, y1: y1, y2: y2 }; return ret; }, ... reposition: function() { return this.each(function() { var $this = $(this); var data = $this.popover('getData'); if(data) { var popover = data.popover; var options = data.options; var $anchor = options.anchor ? $(options.anchor) : $this; var coordinates = $anchor.offset(); var position = options.position; if(!(position == 'top' || position == 'right' || position == 'left' || position == 'auto')) position = 'bottom'; var calc; if(position == 'auto') { var positions = ["bottom", "left", "top", "right"]; var scrollTop = $(window).scrollTop(); var scrollLeft = $(window).scrollLeft(); var windowHeight = $(window).outerHeight(); var windowWidth = $(window).outerWidth(); $.each(positions, function(i, pos) { calc = _.calc_position($this, pos); var x1 = calc.x1 - scrollLeft; var x2 = calc.x2 - scrollLeft + options.horizontalOffset; var y1 = calc.y1 - scrollTop; var y2 = calc.y2 - scrollTop + options.verticalOffset; if(x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0) //popover is left off of the screen or above it return true; //continue if(y2 > windowHeight) //popover is under the window viewport return true; //continue if(x2 > windowWidth) //popover is right off of the screen return true; //continue position = pos; return false; }); if(position == 'auto') //position is still auto return; } calc = _.calc_position($this, position); var top = calc.top; var left = calc.left; _.pop_position_class(popover, position); ...Forum: Fixing WordPress
In reply to: WP 3.5 messes up jQuery popover positionjquery-popover adds positioning with inline style on the .popover element. It should look something like this:
<div class="popover popover-top" style="left: 370.767px; top: 140.717px; margin-top: -10px; margin-left: 0px; z-index: 949; display: block;">After upgrading to WordPress 3.5 it looks like this:
<div class="popover popover-top" style="margin-top: -10px; margin-left: 0px; z-index: 949; display: block;">So WP breaks adding that left: …; top: …;
In jquery-popover.js it looks like this:
left: calc.x1, top: calc.y1,Does WP 3.5 introduce something similar that clashes? Could I rename it?
Forum: Fixing WordPress
In reply to: WP 3.5 messes up jQuery popover position@andrew Bartel, I never said it was easy. I am not a PHP/jQuery developer, but am dragged into it because everything in WordPress works backwards. There have been promising attempts like Habari. They don’t get anywhere because of WP’s market dominance.
For example, does WordPress finally have standard registration with just full real name, first name + last name, and email address, like any serious web application since about 2005? Or does everything still revolve around meaningless usernames (“Dear User…”)?
Forum: Fixing WordPress
In reply to: WP 3.5 messes up jQuery popover positionI consistently use var jPopover = jQuery.noConflict(); etc. to avoid conflicts and most jQuery still works after the upgrade. Not convinced that’s it, but I’ll look into it.
I don’t even bother with themes and plugins, because they usually don’t keep up with WordPress constant changes and rules. And I certainly wouldn’t use WP’s awful TwentyTen etc. themes.
It is not jQuery that is busting things; WordPress is screwing up my jQuery. WordPress is not the center of the universe. I’m stuck with it at this point, but WordPress sucks.
If there was a solid, well-architected, standards-based alternative to WP I would switch.
EDIT:
Double-checked. I don’t have my own jquery link in my theme, I already rely on whatever WP provided. It doesn’t look like a javascript error anyway; it’s a positioning issue, probably a CSS conflict somewhere.
Forum: Plugins
In reply to: [FeedWordPress] Stop authors from syndicated posts being added as usersThanks lysofttech. Where can I change those author settings? Somewhere in FeedWordpress? Or in WordPress?
If it is a setting per feed or even per post it is still no good. Would there be a way to set this by default with a filter/function in the theme’s function.php?
What mechanism is ‘creating a new author’? I want to disable that entirely. There should only be registered users/members on the system, no authors created by the system.
“… surpassing all other plugins by far for bloggers wanting to flow posts from sub-blog to main blog”
But it does not make tags truly sitewide/installation-wide – as they should be to begin with imho. It does not solve that problem.
Forum: Themes and Templates
In reply to: get_avatar ignored in one template fileTurned out there was a setting in wp-admin set to not showing avatars.
Forum: Plugins
In reply to: Get the correct table prefix$wpdb->prefix turns out to be wrong. To get just ‘wp_’ or whatever you use as prefix, you have to use this:
$wpdb->base_prefixForum: Fixing WordPress
In reply to: Set default display name format for new usersI have three multisite installations that use the same theme.
In one new users get the username as default display_name, but the other do get Firstname Lastname.
So can you set a default display_name format in wp-admin somewhere?
Forum: Plugins
In reply to: Stupid syntax question: function within if elseCan anyone give a general answer to this?
I can’t get any function within if/else to work, even when I try something basic like this:
if(...) { wp_redirect( home_url() ); exit; } else { ... }I keep getting server/syntax errors – unexpected T_STRING etc. Shouldn’t this just work?
Forum: Plugins
In reply to: Stupid syntax question: function within if elseThanks for your response. Here is more context:
$user_id = $curauth->ID; $title = $curauth->display_name; $domain = network_home_url(); $path = $curauth->user_login; $key = 'primary_blog'; $single = true; $primary_blog = get_user_meta( $user_id, $key, $single); if ($primary_blog == "") { wpmu_create_blog($domain, $path, $title, $user_id); } else if (user_can_for_blog($user_id, $primary_blog, edit_posts )) { echo '<p>Member has site</p>'; }I know the general if else structure, but examples always use echo or ‘some code to execute’. I can’t find any examples with functions with variables.
I have tried ‘return wpmu_create_blog(…’ and other variations. Nothing works. And maybe this is a WP specific thing?