Probleme de redimmension d'image avec s3slider.js

Redesign038 Messages postés 6 Date d'inscription vendredi 1 octobre 2010 Statut Membre Dernière intervention 3 octobre 2010 - 1 oct. 2010 à 02:35
syndrael Messages postés 2378 Date d'inscription lundi 4 février 2002 Statut Membre Dernière intervention 29 décembre 2012 - 4 oct. 2010 à 08:27
Bonjour j'ai mon blog qui est en pleine construction et j'ai choisi un theme qui a diaporama avec affichage d'article sur ma page d'accueil!
Mon probleme est lorsque j'ecrit un article avec une image elle ne se redimmensionne pas automatiquement sur mon diaporama!
J'ai essayer de modifier le css du script mais rien n'y fait impossible de le faire!

Je suis debutant et ce probleme me depasse!
est ce que quelqu'un peut m'aidait!svp

voici une image de mon blog


mon blog c'est www.redesignstyle.com

Merci

5 réponses

syndrael Messages postés 2378 Date d'inscription lundi 4 février 2002 Statut Membre Dernière intervention 29 décembre 2012 20
1 oct. 2010 à 09:58
.js = Javascript.
As-tu posé la question sur le forum Javascript ? Non..
S.
0
Redesign038 Messages postés 6 Date d'inscription vendredi 1 octobre 2010 Statut Membre Dernière intervention 3 octobre 2010
2 oct. 2010 à 05:45
Merci je l'ai fait.
0
DiabloBros Messages postés 25 Date d'inscription mardi 24 octobre 2006 Statut Membre Dernière intervention 12 novembre 2010
3 oct. 2010 à 06:46
il suffit de créé une classe Css , pour cela , mettre un . (point) devant le nom dans le style , et on l'appel avec class="ResizeImage" dans les option de l'image directement ^^

<html>
<head>
<title>Resize d'image en class Css</title>

<style type="text/css">
<!--
.ResizeImage {
clear: none;
float: none;
height: 200px;
width: 300px;
}
-->
</style></head>



Original 







Modifié





</html>



DiabloBros Was Here...
0
Redesign038 Messages postés 6 Date d'inscription vendredi 1 octobre 2010 Statut Membre Dernière intervention 3 octobre 2010
3 oct. 2010 à 11:18
Je pense que sa ne marche pas!
Voici s3slider.css

#s3slider {
width: 660px; /* important to be same as image width */
height: 283px; /* important to be same as image height */
position: relative; /* important */
overflow: hidden; /* important */
background: #000 none;
}

#s3sliderContent {
width: 660px; /* important to be same as image width or wider */
position: absolute; /* important */
top: 0; /* important */
margin-left: 0; /* important */
}

.s3sliderImage {
float: left; /* important */
position: relative; /* important */
display: none; /* important */
width: 660px;
height: 283px;
}

.s3sliderImage span {
position: absolute; /* important */
font: 10px/15px Arial, Helvetica, sans-serif;
padding: 10px 13px;
right: 0; bottom: 0;
width: 90px !important;
height: 313px;
background-color: #000;
filter: alpha(opacity= 70); /* here you can set the opacity of box with text */
-moz-opacity: 0.7; /* here you can set the opacity of box with text */
-khtml-opacity: 0.7; /* here you can set the opacity of box with text */
opacity: 0.7; /* here you can set the opacity of box with text */
color: #fff;
display: none; /* important */
top: 0;
}
.s3sliderImage span a, .s3sliderImage span a:visited {
font: bold 12px/16px Arial, Helvetica, sans-serif;
color: #fff; text-decoration: none; 
}

.clear {
clear: both;
} 




et voici ma function.php

<?php

define('PADD_THEME_NAME','Matino');
define('PADD_THEME_VERS','1.0');
define('PADD_THEME_SLUG','matino');
define('PADD_GALL_THUMB_W',660);
define('PADD_GALL_THUMB_H',283);
define('PADD_HOME_THUMB_W',115);
define('PADD_HOME_THUMB_H',115);

define('PADD_THEME_PATH',get_theme_root() . DIRECTORY_SEPARATOR . PADD_THEME_SLUG);
define('PADD_FUNCT_PATH',PADD_THEME_PATH . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR);

automatic_feed_links();
remove_action('wp_head','wp_generator');
remove_action('wp_print_styles','pagenavi_stylesheets');

if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '
',
'after_widget' => '

',
'before_title' => '',
'after_title' => '

',
));
}

require PADD_FUNCT_PATH . 'library.php';

require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'socialnetwork.php';
require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'advertisement.php';
require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'widgets.php';
require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'input' . DIRECTORY_SEPARATOR . 'input-option.php';
require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'input' . DIRECTORY_SEPARATOR . 'input-socialnetwork.php';
require PADD_FUNCT_PATH . 'classes' . DIRECTORY_SEPARATOR . 'input' . DIRECTORY_SEPARATOR . 'input-advertisement.php';

require PADD_FUNCT_PATH . 'defaults.php';

require PADD_FUNCT_PATH . 'administration' . DIRECTORY_SEPARATOR . 'functions.php';





/********************************************/
/**** Functions used for hooking filters ****/
/********************************************/

/**
 * Alters the rendering of the list of pages.
 *
 * @param string $string
 * @return string
 */
function padd_theme_alter_list_pages($string) {
$string = str_replace(array("\n","\r","\t"),'', $string);

$pattern = array('/]*>/','/<\/ul[^<>]*>/');
$replace = array('','');
$string = preg_replace($pattern,$replace,$string);
$pattern = array('/[' . get_category_link($cat_id) . ' ' . get_the_category_by_ID($cat_id) . ']';
if ('' != (get_category_children($cat_id))) {
echo '';
wp_list_categories('hide_empty=0&title_li=&child_of=' . $cat_id);
echo '';
}
echo '</li>';
}
}

/**
 * Renders the list of recent comments.
 *
 * @global object $wpdb
 * @global array $comments
 * @global array $comment
 * @param int $limit
 */
function padd_theme_recent_comments($limit=5) {
global $wpdb, $comments, $comment;

if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) {
$comments $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved '1' ORDER BY comment_date_gmt DESC LIMIT $limit");
wp_cache_add( 'recent_comments', $comments, 'widget' );
}
echo '';
if ( $comments ) :
foreach ( (array) $comments as $comment) :
echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '['. get_comment_link($comment->comment_ID) . ' ' . get_the_title($comment->comment_post_ID) . ']') . '</li>';
endforeach;
endif;
echo '';
}

/**
 * Renders the content of the teaser.
 * 
 * @param int $max_char
 * @param string $more_link_text
 * @param string $stripteaser
 * @param string $more_file
 */
function padd_theme_content($max_char=450,$more_link_text='',$stripteaser=0,$more_file='') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
if (!empty($content)) {
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
}
if (strlen($_GET['p']) > 0) {
echo "";
echo $content;
echo "

";
} else if (strlen($content)>$max_char) {
$content = substr($content,0,$max_char);
echo "";
echo $content;
echo "...";
echo "

";
} else {
echo "";
echo $content;
echo "

";
}
}

function padd_theme_get_content($max_char=200,$more_link_text='',$stripteaser=0,$more_file='') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
if (!empty($content)) {
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
}
if (strlen($_GET['p']) > 0) {
$content = "" . $content . "

";
} else if (strlen($content)>$max_char) {
$content = substr($content,0,$max_char);
$content = "" . $content . "...

";
} else {
$content = "" . $content . "

";
}
return $content;
}


/**
 * Capture the first image from the post.
 * @global object $post
 * @global object $posts
 * @return string
 */
function padd_theme_capture_first_image($p=null) {
$firstImg = '';
if (empty($p)) {
global $post, $posts;
$firstImg = '';
ob_start(); ob_end_clean();
$output = preg_match_all('//i', $post->post_content, $matches);
$firstImg = $matches[1][0];
} else {
$output = preg_match_all('//i', $p->post_content, $matches);
$firstImg = $matches[1][0];
}
return $firstImg;
}


function padd_featured_posts() {
wp_reset_query(); 
$featured = get_option(PADD_THEME_SLUG . '_featured_cat_id','1');
$count = get_option(PADD_THEME_SLUG . '_featured_cat_limit');
query_posts('showposts=' . $count . '&cat=' . $featured);
$padd_scrp = get_theme_root_uri() . '/' . PADD_THEME_SLUG . '/functions/thumb/thumb.php?';
$i = 1;
?>



<?php while (have_posts()) : the_post(); ?>
<?php $customfields = get_post_custom(); ?>
<?php
$img = isset($customfields['paddimage-gallery'][0]) ? $customfields['paddimage-gallery'][0] : '';
$src = get_permalink();
if (empty($img)) {
$img = padd_theme_capture_first_image();
if (empty($img)) {
$imgpath = $padd_image_def;
} else {
$imgpath = $padd_scrp . 'src=' . $img . '&amp;w=' . PADD_GALL_THUMB_W . '&amp;h=' . PADD_GALL_THUMB_H . '&amp;zc=1';
}
} else {
$imgpath = $padd_scrp . 'src=' . $img . '&amp;w=' . PADD_GALL_THUMB_W . '&amp;h=' . PADD_GALL_THUMB_H . '&amp;zc=1';
}
?>
<li class="s3sliderImage" id="featured-<?php echo $i; ?>">
[<?php the_permalink(); ?> " alt="" />]
 [<?php the_permalink(); ?> <?php the_title(); ?>] 
<?php padd_theme_content(280); ?>
</li>
<?php $i++; ?>
<?php endwhile; ?>
 





<?php
wp_reset_query();
}

function padd_tm_generate_button() {
    global $post;
    $url  = '';
    if (get_post_status($post->ID) == 'publish') {   
        $url = get_permalink();
    } 
    
    $button = '
'.
                  '<script type="text/javascript">
                    tweetmeme_url = \'' . $url . '\';';
                        
    if (get_option('tm_source')) {
        $button .'tweetmeme_source \'' . urlencode(get_option('tm_source')) . '\';';
    } 
    
    $button .= '
    </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
';

    return $button;}

function padd_related_posts($post_ID) {
$enabled = get_option(PADD_THEME_SLUG . '_rp_enable');
if ($enabled) {

$tag_ids = array();
$cat_ids = array();

$tags = wp_get_post_tags($post_ID);
foreach($tags as $tag) {
$tag_ids[] = $tag->term_id;
}

$cats = get_the_category($post_ID);
if ($cats) {
foreach($cats as $cat) {
$cat_ids[] = $cat->term_id;
}
}

$args = array(
'post__not_in' => array($post_ID),
'showposts' => intval(get_option(PADD_THEME_SLUG . '_rp_max',5)),
'caller_get_posts' => 1
); 
if (!empty($tag_ids) && get_option(PADD_THEME_SLUG . '_consider_tags','1') === '1') {
$args['tag__in'] = $tag_ids;
}
if (!empty($cat_ids) && get_option(PADD_THEME_SLUG . '_consider_categories','1') === '1') {
$args['category__in'] = $cat_ids;
}

$rp_query = new wp_query($args);

if ($rp_query->have_posts()) {
echo '';
while ($rp_query->have_posts()) {
$rp_query->the_post();
?>
<li>[<?php the_permalink() ?> "><?php the_title(); ?>]</li>
<?php
}
echo '';
} else {
echo 'There are no related posts on this entry.

';
}
} else {
echo 'Related posts has been disabled.

';
}

}

function padd_theme_credits() {
do_action(__FUNCTION__);
}










0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
syndrael Messages postés 2378 Date d'inscription lundi 4 février 2002 Statut Membre Dernière intervention 29 décembre 2012 20
4 oct. 2010 à 08:27
Soit tu étires ton image manuellement et tu l'intégres à la place de celle qui n'est pas redimensionnée, soit tu l'étires avec JQuery en changeant les attributs de la balise.. mais à moins de vraiment vouloir le faire en PHP (c'est possible mais pas pertinent), cette question n'est pas une question de PHP.
S.
0
Rejoignez-nous