Simple Post Thumbnails Plugin Wordpress
Last Updated: Jul 23 2010 20:58, Started by
mauricioshogun
, Jul 23 2010 19:13
·
0
#1
Posted 23 July 2010 - 19:13
Salut, ma chinui de 2 zile cu acest plugin wordpress Simple Post Thumbnails , cand vreau sa fac upload la o poza nu imi arata poza pe post, ei au descriere care suna cam asa.
1. Make sure that your host has the GD graphics extension for PHP enabled. 2. Upload the plugin file to your wp-plugins/ folder. 3. Go the plugin management page and activate the plugin. 4. Add the p75GetThumbnail(int $postID, [int $width, [int $height, [string $fileType]]]) function to your theme to get the URL of a thumbnail and p75GetOriginalImage(int $postID) to get the URL to the original image. 5. Go to Settings > Thumbnail Options to configure default values for the plugin. Acum unde trebuie sa adaug eu p75GetThumbnail(int $postID, [int $width, [int $height, [string $fileType]]]) ? Sunt incepator in php si nu stiu cum sa fac sa mearga pluginul, am mare nevoie de el. Adresa de download a plugin-ului este http://downloads.wor...mbnails.1.5.zip Multumesc !!! |
#2
Posted 23 July 2010 - 19:21
'post thumbnails' sunt parte din WordPress 2.9 si mai sus. nu ai nevoie de plugin pt asta.
citeste aici: http://markjaquith.w...umbnail-images/ |
#3
Posted 23 July 2010 - 19:27
unu, on 23rd July 2010, 17:21, said: 'post thumbnails' sunt parte din WordPress 2.9 si mai sus. nu ai nevoie de plugin pt asta. citeste aici: http://markjaquith.w...umbnail-images/ |
#5
Posted 23 July 2010 - 19:33
unu, on 23rd July 2010, 17:32, said: pune un link catre tema. |
#6
Posted 23 July 2010 - 19:40
ok, daca esti sigur ca acea tema foloseste acel plugin, nu ar trebui sa ai nevoie sa faci vreo modificare la cod. pur si simplu activezi pluginul si adaugi acel 'thumbnail' cand editezi un articol.
|
#7
Posted 23 July 2010 - 19:44
unu, on 23rd July 2010, 17:40, said: ok, daca esti sigur ca acea tema foloseste acel plugin, nu ar trebui sa ai nevoie sa faci vreo modificare la cod. pur si simplu activezi pluginul si adaugi acel 'thumbnail' cand editezi un articol. |
#8
Posted 23 July 2010 - 19:51
sterge acel director.
din cate stiu, 'timthumb' (script-ul folosit de acest plugin) iti creeaza automat directorul pt cache. daca il faci tu, scriptul s-ar putea sa nu aiba permisiunea sa scrie in el (depinde de setarile serverului). |
#9
Posted 23 July 2010 - 19:54
unu, on 23rd July 2010, 17:51, said: sterge acel director. din cate stiu, 'timthumb' (script-ul folosit de acest plugin) iti creeaza automat directorul pt cache. daca il faci tu, scriptul s-ar putea sa nu aiba permisiunea sa scrie in el (depinde de setarile serverului). |
#10
Posted 23 July 2010 - 20:03
sterge directorul, adauga un thumbnail, da un refresh la site, apoi ce ai pe server si vezi daca a aparut acel director. daca nu, inseamna ca problema e la permisiuni.
|
|
#11
Posted 23 July 2010 - 20:10
unu, on 23rd July 2010, 18:03, said: sterge directorul, adauga un thumbnail, da un refresh la site, apoi ce ai pe server si vezi daca a aparut acel director. daca nu, inseamna ca problema e la permisiuni. |
#12
Posted 23 July 2010 - 20:17
incearca chmod 777 pe directorul cache
ai grija sa nu-l stergi, doar schimba-i permisiunile |
#13
Posted 23 July 2010 - 20:23
unu, on 23rd July 2010, 18:17, said: incearca chmod 777 pe directorul cache ai grija sa nu-l stergi, doar schimba-i permisiunile #4. Add the p75GetThumbnail(int $postID, [int $width, [int $height, [string $fileType]]]) function to your theme to get the URL of a thumbnail and p75GetOriginalImage(int $postID) to get the URL to the original image. unde trebuie bagat? si cum? lasa-mi un id de messenger sau da-mi mesaj cu el daca poti, mersi <?php include_once (TEMPLATEPATH . '/functions/optionsadd.php'); ?> <?php function p75_add_admin() { add_menu_page("Video Flick", "Video Flick", 'edit_themes', basename(__FILE__), 'p75_admin', "http://www.press75.c...om/favicon.ico"); } function p75_admin() { if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>Video Flick Options Saved.</strong></p></div>'; ?> <!-- begin show-hide --> <script src="<?php bloginfo('template_url'); ?>/functions/jquery.js" type="text/javascript"></script> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/functions/optionstyles.css" type="text/css" media="screen" /> <?php include (TEMPLATEPATH . '/functions/containers.php'); ?> <!-- end show-hide --> <div class="wrap"> <div style="margin-left:0px;"> <form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?> <fieldset name="general_options" class="options"> <div class="firstoptiondiv"> <h2 class="options"><a href="#" id="site-style-toggle">Site Style Selection</a></h2> <p>Use these options to select between different theme styles.</p> <div id="site-style"> <?php include (TEMPLATEPATH . '/functions/forms/site-styles.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <div class="optiondiv"> <h2 class="options"><a href="#" id="site-logo-toggle">Site Logo Configuration</a></h2> <p>Use these options to cutomize your logo, or select a standard text based logo.</p> <div id="site-logo"> <?php include (TEMPLATEPATH . '/functions/forms/site-logo.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <div class="optiondiv"> <h2 class="options"><a href="#" id="head-ad-toggle">Header Advertisement (Top Right) 468x60</a></h2> <p>This is the primary advertisement for the Video Flick theme displayed in the to right portion of the site header.</p> <div id="head-ad"> <?php include (TEMPLATEPATH . '/functions/forms/head-advertisement.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <div class="optiondiv"> <h2 class="options"><a href="#" id="sidebar-ads-toggle">Sidebar Advertisement (Mid Sidebar) 125x125</a></h2> <p>These are the 4 sidebar advertisements found within the Video Flick sidebar displayed on all pages.</p> <div id="sidebar-ads"> <?php include (TEMPLATEPATH . '/functions/forms/sidebar-advertisements.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <div class="optiondiv"> <h2 class="options"><a href="#" id="featured-side-toggle">Featured Items (Sidebar)</a></h2> <p>Use these options to configure Featured Items found within the sidebar. These can be configured for whatever you want. e.g. "Daily Specials"</p> <div id="featured-side"> <?php include (TEMPLATEPATH . '/functions/forms/featured-side.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <div class="optiondiv"> <h2 class="options"><a href="#" id="analytics-toggle">Google Analytics Configuration (Optional)</a></h2> <p>Use these options to configure Google Analytics integration.</p> <div id="analytics"> <?php include (TEMPLATEPATH . '/functions/forms/analytics.php'); ?> <p class="submit"><input type="submit" name="Submit" value="Save Options" /></p> </div> </div> <input type="hidden" name="action" value="update" /> <input type="hidden" name="page_options" value="<?php include (TEMPLATEPATH . '/functions/optionsreg.php'); ?>" /> </fieldset> <p class="submit"><input type="submit" name="Submit" value="Save All Options" /></p> </form> </div> </div> <?php } add_action('admin_menu', 'p75_add_admin'); ?> <?php function get_thumbnail($postID) { if( function_exists('p75GetThumbnail') ) { $thumbnail = p75GetThumbnail($postID); return $thumbnail ? $thumbnail : get_bloginfo('template_url') . '/images/default-thumb.png'; } return ""; } function get_video($postID) { if( function_exists('p75GetVideo') ) { $video = p75GetVideo($postID); return $video ? "<div class='video'>" . $video . "</div>" : ""; } return ""; } ?> <?php function the_title2($before = '', $after = '', $echo = true, $length = false) { $title = get_the_title(); if ( $length && is_numeric($length) ) { $title = substr( $title, 0, $length ); } if ( strlen($title)> 0 ) { $title = apply_filters('the_title2', $before . $title . $after, $before, $after); if ( $echo ) echo $title; else return $title; } } ?> <?php add_filter('comments_template', 'legacy_comments'); function legacy_comments($file) { if(!function_exists('wp_list_comments')) : // WP 2.7-only check $file = TEMPLATEPATH . '/legacy.comments.php'; endif; return $file; } ?> <?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<div id="%1$s" class="widgetblock %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); ?> ASTA E FISIERUL FUNCTIONS.PHP |
#14
Posted 23 July 2010 - 20:33
ai deja p75GetThumbnail() mai sus. permisiunile sunt buba. daca zici ca imaginile sunt in cache/, serverul e prost configurat...
vezi daca poti accesa una din pozele din acel director din browser |
#15
Posted 23 July 2010 - 20:36
unu, on 23rd July 2010, 18:33, said: ai deja p75GetThumbnail() mai sus. permisiunile sunt buba. daca zici ca imaginile sunt in cache/, serverul e prost configurat... vezi daca poti accesa una din pozele din acel director din browser |
|
#16
Posted 23 July 2010 - 20:58
daca ar fi, n-ar trebui sa poti vedea nici pozele in browser. cam ciudat...
eu zic sa lasi plugin-ul ala si sa folosesti functiile din wordpress. e destul de simplu, inlocuiesti: if( function_exists('p75GetThumbnail') ) { $thumbnail = p75GetThumbnail($postID); return $thumbnail ? $thumbnail : get_bloginfo('template_url') . '/images/default-thumb.png'; } return "";cu return get_the_post_thumbnail($postID); iar la inceputul fisierului adaugi: <?php add_theme_support( 'post-thumbnails' ); ?>marimea o setezi din settings -> media. iar poza o adaugi tot de pe pagina de unde editezi articolul. s-ar putea sa ai nevoie sa faci schimbari si in alte fisiere, de ex. index.php... posteaza sursa si iti zic daca trebuie Edited by unu, 23 July 2010 - 21:00. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users