I lost my translation, you need to create fields for translation. I means only in User Submitted Posts
Solved image display problem.
Show images in User Submitted posts
In loop.php add
<?php echo do_shortcode(‘[gallery size= thumbnail]‘); ?>
After the 2nd occurance of
<?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘twentyten’ ) ); ?>
In Single Post.php add
<?php echo do_shortcode(‘[gallery size= thumbnail]‘); ?>
After
get_header(); ?>
Now I have another problem. If you set USP to say, upload 4 images, the Add another image link still remains once 4 images have been selected. How do I get it to vanish?
legalmax, unfortunately the plugin doesn’t do that by default, but it would be possible to grab the HTML code for one of the inputs (from the web page), and then repeat it only as many times as needed in the ‘submission-form.php’ file (or the classic version, whichever you are using).
Jeff ta 4 that. I can live with it but another prob.
If I don’t upload an image then I get an error message saying code is wrong.
Make sure that your settings are “0” for minimum number of images, and that other fields match up with their settings.
Hey Jeff,
Jumping on this train. My images don’t even seem to be uploading. I’m getting a success back, but when I look in my public_html/doc_root/wp-content/uploads directory, nothing has been added.
Any thoughts?
Nevermind. My dimensions were set too low.
Jeff,
Tried all sorts of settings – still no luck. Keep getting
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/etc/wp-content/plugins/user-submitted-posts/user-submitted-posts.php on line 280
Warning: Cannot modify header information – headers already sent by (output started at /home/etc/wp-content/plugins/user-submitted-posts/user-submitted-posts.php:280) in /home/etc/wp-includes/pluggable.php on line 881
Hi legalmax, it’s difficult to diagnose without looking at it.. which I would be glad to do if you would like. Just send login infos to me via my contact form: http://perishablepress.com/contact/
You could also try commenting out the following code in either submission-form-classic.php or submission-form.php (whichever you are using):
session_start();
$title = $_SESSION['title'];
$content = $_SESSION['content'];
$authorName = $_SESSION['authorName'];
$authorUrl = $_SESSION['authorUrl'];
$tags = $_SESSION['tags'];
$captcha = $_SESSION['captcha'];
$category = $_SESSION['category'];
legalmax, I tried responding to your email but it got kicked back as undeliverable..
Jeff, Tried commenting out but no luck.
Hmm not sure what to tell you, but I’m still glad to look at the setup and try to help. Just need access to the settings page and should be able to better diagnose the issue.
That images is upload on post but not “Insert to post” automaticly.
In this case im set upload only 1 image can upload by them (user submit post).
Then to show image automaticly im using this php code to call automatickly on they post.
<a href="<?php the_permalink() ?>"><img src="<?php
global $post;
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_mime_type' => 'image', 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts($args);
if ($attachments) {
foreach ( $attachments as $attachment ) {
// Method #1: Allows you to define the image size
$src = wp_get_attachment_image_src( $attachment->ID, "attached-image");
if ($src) {echo $src[-1];}
// Method #2: Would always return the "attached-image" size
echo $attachment->guid;
}
}
?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"></img></a>
P.S : insert in your current themes single.php
OPTIONAL: more easy insert this php code after install plugin add injection and php code widget, after activated ad injection and php code widget, put this code USING AD INJECTION