AsraiLight
Forum Replies Created
-
Forum: Plugins
In reply to: [10Web Social Post Feed] [“error”,”(#4) Application request limit reached”]Hi, I am getting this same error with a brand new plugin install, version 1.0.37. I can’t create my first Facebook feed because of it. Is there any way to fix it?
Forum: Fixing WordPress
In reply to: CHOWN – uploads folder vs. SFTP access*By “root level,” I mean the base WordPress install…where index.php, wp-content, etc. live.
Forum: Networking WordPress
In reply to: Subsite images not showing up in 3.5.1OK, I found a method that works. I’m not sure if it’s the most elegant, but at least in my particular case, with a custom media upload folder, this is functioning.
I changed my code from this:
$first_img = '/'.THEME_PATH . '/inc/timthumb.php?src='.$src.'&h='.$hsize.'&w='.$wsize.'&zc=1&a='.$align.'&try-permalink=true';
To this:
$result = strstr($src, 'assets');
$first_img = '/' . THEME_PATH . '/inc/timthumb.php?src='.$result.'&h='.$hsize.'&w='.$wsize.'&zc=1&a='.$align.'&try-permalink=true';This essentially grabs the
$src
variable, which has been defined in timthumb.php, and removes the sub-directory URL for the sub-site before it returns the image upload folder.I’m now having an issue with the image getting cached and not refreshing properly, but I’m guessing that has more to do with the pagespeed optimization that is installed on my domain rather than Timthumb and WordPress.
Forum: Plugins
In reply to: [Widgets on Pages] Need to make the link to wop.css relative, not absoluteThank you, I changed line 285 to this:
echo "<link rel='stylesheet' id='wop-css' href='/wp-content/plugins/widgets-on-pages/wop.css' type='text/css' media='all' />";
And it worked perfectly. Is this something that can be changed in an upcoming version? I know that I’ll have to make this change again when I update the plugin, when and if there is an update.
Perhaps using my own CSS is the best way to go, though.
Forum: Networking WordPress
In reply to: Subsite images not showing up in 3.5.1So no one knows how to fix timthumb in WordPress multisite 3.5.1? I’ve found plenty of references on how to fix it in earlier versions of WordPress, but not this one. I’m not even sure where to start.
Forum: Networking WordPress
In reply to: "Home" link not working on subsitesI use the built-in WP menu setup to make my navigation, and use a static front page. No matter what that static front page is, the link in the menu to go to it takes the user to the base URL rather than the subsite’s sub-directory.
Unfortunately I inherited this custom theme, and have to edit it. From what I can tell, the theme sends any link to the front static page to “/”, which redirects back to the base URL instead.
I’m just not sure where, in the theme files, I would find the menu. Once I do, what would be the proper link to send the home page link to, rather than “/”?
Forum: Networking WordPress
In reply to: Subsite images not showing up in 3.5.1I figured that was the case, but how do I fix it? What is the proper way for the theme to call timthumb in the case of subsites?
This is how my theme is calling it now in the header:
EDIT (now with the full function):
function get_thumb($wsize = '300', $hsize = '200', $src, $wrap, $align = 'c'){<br /> global $post;<br /> $theimage = '';<br /> if (!$src) {<br /> $src = wp_get_attachment_url( get_post_thumbnail_id($post->ID ) );<br /> }<br /> $first_img = '/'.THEME_PATH . '/inc/timthumb.php?src='.$src.'&h='.$hsize.'&w='.$wsize.'&zc=1&a='.$align.'&try-permalink=true';<br /> if($wrap){<br /> if (get_post_thumbnail_id($post->ID )) {<br /> if(get_post_meta($post->ID, 'link', true)) {<br /> $theimage = '<a>ID, 'link', true).'" target="_blank">';<br /> }<br /> $theimage .= '<img src="'.$first_img.'" />';<br /> if(get_post_meta($post->ID, 'link', true)) {<br /> $theimage .= '</a>';<br /> }<br /> }<br /> }else{<br /> $theimage = $first_img;<br /> }<br /> return $theimage;<br /> }
Forum: Networking WordPress
In reply to: Subsite images not showing up in 3.5.1Well, after a bit of trial and error and trying different RewriteRule formats, I finally stumbled on one that works. I added this to my .htaccess file:
RewriteRule ^([_0-9a-zA-Z-]+/)assets/sites/(.*)$ assets/sites/$2 [L]
Now images that show up in posts are working beautifully. Unfortunately, the images that are called through the theme with timthumb are not working, which seems to be a common issue.
I’ve seen some code that can be added to the theme’s functions.php file from older versions of WordPress, which deals with the /files and /blogs.dir directories. But since 3.5.1 (and my particular settings) don’t deal with those directories, how can I fix this timthumb issue? I would think that the new RewriteRule would have fixed it already, but apparently not.
I’ll just post a new thread about this. I still wish I knew why the site was saying it was over a month old when it wasn’t, though.
I know, I changed the default upload folder to assets, and changed the permalink structure. It’s preferred for our needs, and for our custom theme. Doesn’t multisite account for this type of customization?
OK, I set up my network using sub-domains, then changed the wp-config based on your recommendation (thanks Ipstenu). I used the settings for the .htaccess that WP gives me, from Site Admin > Settings > Network Setup:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]Now I’m getting what appears to be a pretty common error: the images aren’t showing up in my subsites. They’re uploading correctly to
example.com/assets/sites/#/image.jpg
, but won’t show up even in the media gallery. The links for the images are set toexample.com/test/assets/sites/#/image.jpg
, so if I remove the /test/ part of the URL, the images in the subsites display correctly. This error happens independently of the theme, and with all of my plugins disabled.From what I understand, I need to add a RewriteRule to my .htaccess in order for these images to display properly. I just can’t find the right syntax, and all of the other examples I’m seeing online aren’t working for my particular case. Most are for WP 3.0, not 3.5.1. Does anyone know off the top of their head what the correct RewriteRule would be?
I have to change the .htaccess file too as well then, don’t I?
Forum: Plugins
In reply to: Transferring Data from one form to anotherI am actually having the exact same issue…did you ever solve your problem?
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Replace Same Name File After UploadThanks very much for this, it is quite helpful. Can you share how you are locking it down to prevent a breach in security?
Forum: Plugins
In reply to: [Shortcodes Pro] Why can't I echo or print?Figured out this particular problem…the dashes in my variables were causing the issue. (Which is odd, because I’ve seen others use code with dashes in their variable. Must be bad syntax.)
Anyway, it would still be nice to be able to echo or print with this. Is it just not possible with shortcodes? A limitation of the WordPress code, perhaps?