James Edmonston
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 3.3.1 — media uploader still not fixedIt probably wouldn’t, but the default limit is quite low.
Forum: Fixing WordPress
In reply to: Every page is "Not Found" except for the home pageThe .htaccess might have been cached on your system.
Glad it’s working now.
Forum: Fixing WordPress
In reply to: 3.3.1 — media uploader still not fixedIt’s probably just the default limit in WordPress.
Try adding
php_value upload_max_filesize 10M
andphp_value memory_limit 64M
to .htaccess.**EDIT – Alternatively, you could try https://www.theinfopreneur.net/usefull/how-to-increase-your-upload-limit-in-wordpress/.
Forum: Fixing WordPress
In reply to: Every page is "Not Found" except for the home pageThe site seems to be working after those changes. ??
Try using the ‘All in One SEO Pack’ plugin. Have used it at work a few times and it seems to do the trick.
Forum: Fixing WordPress
In reply to: Notice: wp_register_script was called incorrectlyPost the source of the file that is causing the errors – will allow us to debug and find the problem.
Thanks.
Forum: Fixing WordPress
In reply to: Every page is "Not Found" except for the home pageIn WP Admin – go to the Permalinks settings and check if it says anything about not being able to write to .htaccess. Thanks.
Yeah, the first lot of HTML will allow any user to upload a file.
I haven’t ever had to make it upload to a different directory to be honest, I’ll take a look – there will be a way to do it, just can’t say for sure how complicated it is.
**EDIT – What’s the page ID of the page that the form is included on? There’s a quick way that I’ll be able to do it specifically for that page.
**EDIT 2 – The following should do the trick:
if($page->ID==1) $dir = WP_CONTENT_DIR . '/the-folder-you-want-them-to-go-to';
That goes in /wp-includes/functions.php in the
wp_upload_dir()
function, after the$main_override
variable.Just change the 1 to whatever the page ID is.
You can include the jQuery anywhere. You can give it its own file (as I do) and include it like so:
<script type="text/javascript" src="<?php echo get_bloginfo('template_url'); ?>/js/jquery.upload.js"></script>
The above assumes that the file is called ‘jquery.upload.js’ and is in a folder called ‘js’ in your theme’s folder.
Or you can just include it above the HTML:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery('#upload_image_button').click(function() { formfield = jQuery('#upload_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#image').val(imgurl); tb_remove(); } }); </script>
Completely forgot about that bit, apologies. As follows:
<input type="text" name="image" id="image" value="Whatever you want the default to be" <?php if(!is_user_logged_in) echo 'disabled="disabled"'; ?> /> <input type="button" id="upload_image_button" value="Upload Image" <?php if(!is_user_logged_in) echo 'disabled="disabled"'; ?> />
The above should disable the inputs if they aren’t logged in.
Forum: Fixing WordPress
In reply to: Custom submit page with categories on checkboxCould be the fact that you’ve put the name into an array, but there’s no values in the array ([]).
Just as a tip, instead of
action="<?php echo(get_permalink($post->ID)); ?>"
useaction="<?php $_SERVER['REQUEST_URI']; ?>"
.Another tip, you don’t have to do
$i = $i+1
, you can use$i++
.Forum: Themes and Templates
In reply to: Customizing My footer TextHave a look in index.php, may be in there.
A list of the files that it’s displaying would be useful, though.
Forum: Fixing WordPress
In reply to: Every page is "Not Found" except for the home pageIn your FTP browser, go to the folder that WordPress is installed at and look around for some permission settings (or, on the level above you may need to right click on the folder and go from there).
You should understand what I mean with the 777 in chmod once you’ve got that far.
The HTML:
<input type="text" name="image" id="image" value="Whatever you want the default to be" /> <input type="button" id="upload_image_button" value="Upload Image" />
The jQuery:
jQuery(document).ready(function() { jQuery('#upload_image_button').click(function() { formfield = jQuery('#upload_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#image').val(imgurl); tb_remove(); } });
Bearing in mind that you’ll need jQuery for this to work.
With that in mind:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Forum: Fixing WordPress
In reply to: Every page is "Not Found" except for the home pageSounds like your .htaccess file isn’t writeable (or doesn’t even exist). Try making the root of your WordPress install writeable through your FTP (777 in chmod).
Forum: Fixing WordPress
In reply to: Can't seem to upload a pluginOk, that probably means that your plugins directory isn’t writeable.
If you have FTP access, go to /wp-content and make the plugins folder in there writeable (777 in chmod).
Also, if there isn’t one there: create it and make it writeable.