AntoineM (Créer un compte)

Toutes mes réponses sur les forums

15 sujets de 31 à 45 (sur un total de 122)
  • Auteur
    Messages
  • en réponse à : [Résolu] theme-functions.php #951926
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Et voici pon « main.php »
    à la ligne 7 il y a

    require_once(dirname(dirname(__FILE__)) . « /includes/custom-styles.php »);

    N est ce pas la kil fo faire une modif?

    <?php
    // Loading files for frontend

    // Loading Default values
    require_once(dirname(__FILE__) . « /defaults.php »);
    // Loading function that generates the custom css
    require_once(dirname(dirname(__FILE__)) . « /includes/custom-styles.php »);

    // Loading the admin files

    if( is_admin() ) {
    // Loading the settings arrays
    require_once(dirname(__FILE__) . « /settings.php »);
    // Loading the callback functions
    require_once(dirname(__FILE__) . « /admin-functions.php »);
    // Loading the sanitize funcions
    require_once(dirname(__FILE__) . « /sanitize.php »);
    // Loading color scheme presets
    include(dirname(__FILE__) . « /schemes.php »);
    }

    // Getting the theme options and making sure defaults are used if no values are set
    function parabola_get_theme_options() {
    global $parabola_defaults;
    $optionsParabola = get_option( ‘parabola_settings’, $parabola_defaults );
    $optionsParabola = array_merge((array)$parabola_defaults, (array)$optionsParabola);
    return $optionsParabola;
    }

    $parabolas= parabola_get_theme_options();
    foreach ($parabolas as $key => $value) {
    ${« $key »} = $value ;
    }

    // Hooks/Filters
    add_action(‘admin_init’, ‘parabola_init_fn’ );
    add_action(‘admin_menu’, ‘parabola_add_page_fn’);
    add_action(‘init’, ‘parabola_init’);

    $parabolas= parabola_get_theme_options();

    // Registering and enqueuing all scripts and styles for the init hook
    function parabola_init() {
    //Loading Parabola text domain into the admin section
    load_theme_textdomain( ‘parabola’, get_template_directory_uri() . ‘/languages’ );
    }

    // Creating the parabola subpage
    function parabola_add_page_fn() {
    $page = add_theme_page(‘Parabola Settings’, ‘Parabola Settings’, ‘edit_theme_options’, ‘parabola-page’, ‘parabola_page_fn’);
    add_action( ‘admin_print_styles-‘.$page, ‘parabola_admin_styles’ );
    add_action(‘admin_print_scripts-‘.$page, ‘parabola_admin_scripts’);

    }

    // Adding the styles for the Parabola admin page used when parabola_add_page_fn() is launched
    function parabola_admin_styles() {
    wp_register_style( ‘jquery-ui-style’,get_template_directory_uri() . ‘/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css’ );
    wp_enqueue_style( ‘jquery-ui-style’ );
    wp_register_style( ‘parabola-admin-style’,get_template_directory_uri() . ‘/admin/css/admin.css’ );
    wp_enqueue_style( ‘parabola-admin-style’ );
    // codemirror css markup
    wp_register_style(‘cryout-admin-codemirror-style’,get_template_directory_uri() . ‘/admin/css/codemirror.css’ );
    wp_enqueue_style(‘cryout-admin-codemirror-style’);
    }

    // Adding the styles for the Parabola admin page used when parabola_add_page_fn() is launched
    function parabola_admin_scripts() {
    // The farbtastic color selector already included in WP
    //wp_register_script(‘farbtastic-wp’,get_template_directory_uri() . ‘/admin/js/accordion-slider.js’, array(‘jquery’) );
    //wp_enqueue_script(‘cryout_accordion’);
    wp_enqueue_script(‘farbtastic’);
    wp_enqueue_style( ‘farbtastic’ );

    //Jquery accordion and slider libraries alreay included in WP
    wp_enqueue_script(‘jquery-ui-accordion’);
    wp_enqueue_script(‘jquery-ui-slider’);
    wp_enqueue_script(‘jquery-ui-tooltip’);
    // For backwards compatibility where Parabola is installed on older versions of WP where the ui accordion and slider are not included
    if (!wp_script_is(‘jquery-ui-accordion’,$list=’registered’)) {
    wp_register_script(‘cryout_accordion’,get_template_directory_uri() . ‘/admin/js/accordion-slider.js’, array(‘jquery’) );
    wp_enqueue_script(‘cryout_accordion’);
    }
    // For the WP uploader
    if(function_exists(‘wp_enqueue_media’)) {
    wp_enqueue_media();
    }
    else {
    wp_enqueue_script(‘media-upload’);
    wp_enqueue_script(‘thickbox’);
    wp_enqueue_style(‘thickbox’);
    }
    // The js used in the admin
    wp_register_script(‘cryout-admin-js’,get_template_directory_uri() . ‘/admin/js/admin.js’ );
    wp_enqueue_script(‘cryout-admin-js’);
    // codemirror css markup
    wp_register_script(‘cryout-admin-codemirror-js’,get_template_directory_uri() . ‘/admin/js/codemirror.min.js’ );
    wp_enqueue_script(‘cryout-admin-codemirror-js’);
    }

    // The settings sectoions. All the referenced functions are found in admin-functions.php
    function parabola_init_fn(){

    register_setting(‘parabola_settings’, ‘parabola_settings’, ‘parabola_settings_validate’);

    /**************
    sections
    **************/

    add_settings_section(‘layout_section’, __(‘Layout Settings’,’parabola’), ‘cryout_section_layout_fn’, __FILE__);
    add_settings_section(‘header_section’, __(‘Header Settings’,’parabola’), ‘cryout_section_header_fn’, __FILE__);
    add_settings_section(‘presentation_section’, __(‘Presentation Page’,’parabola’), ‘cryout_section_presentation_fn’, __FILE__);
    add_settings_section(‘text_section’, __(‘Text Settings’,’parabola’), ‘cryout_section_text_fn’, __FILE__);
    add_settings_section(‘appereance_section’,__(‘Color Settings’,’parabola’) , ‘cryout_section_appereance_fn’, __FILE__);
    add_settings_section(‘graphics_section’, __(‘Graphics Settings’,’parabola’) , ‘cryout_section_graphics_fn’, __FILE__);
    add_settings_section(‘post_section’, __(‘Post Information Settings’,’parabola’) , ‘cryout_section_post_fn’, __FILE__);
    add_settings_section(‘excerpt_section’, __(‘Post Excerpt Settings’,’parabola’) , ‘cryout_section_excerpt_fn’, __FILE__);
    add_settings_section(‘featured_section’, __(‘Featured Image Settings’,’parabola’) , ‘cryout_section_featured_fn’, __FILE__);
    add_settings_section(‘socials_section’, __(‘Social Media Settings’,’parabola’) , ‘cryout_section_social_fn’, __FILE__);
    add_settings_section(‘misc_section’, __(‘Miscellaneous Settings’,’parabola’) , ‘cryout_section_misc_fn’, __FILE__);

    /*** layout ***/
    add_settings_field(‘parabola_side’, __(‘Main Layout’,’parabola’) , ‘cryout_setting_side_fn’, __FILE__, ‘layout_section’);
    add_settings_field(‘parabola_sidewidth’, __(‘Content / Sidebar Width’,’parabola’) , ‘cryout_setting_sidewidth_fn’, __FILE__, ‘layout_section’);
    add_settings_field(‘parabola_mobile’, __(‘Responsiveness’,’parabola’) , ‘cryout_setting_mobile_fn’, __FILE__, ‘layout_section’);

    /*** presentation ***/
    add_settings_field(‘parabola_frontpage’, __(‘Enable Presentation Page’,’parabola’) , ‘cryout_setting_frontpage_fn’, __FILE__, ‘presentation_section’);
    add_settings_field(‘parabola_frontposts’, __(‘Show Posts on Presentation Page’,’parabola’) , ‘cryout_setting_frontposts_fn’, __FILE__, ‘presentation_section’);
    add_settings_field(‘parabola_frontslider’, __(‘Slider Settings’,’parabola’) , ‘cryout_setting_frontslider_fn’, __FILE__, ‘presentation_section’);
    add_settings_field(‘parabola_frontslider2’, __(‘Slides’,’parabola’) , ‘cryout_setting_frontslider2_fn’, __FILE__, ‘presentation_section’);
    add_settings_field(‘parabola_frontcolumns’, __(‘Presentation Page Columns’,’parabola’) , ‘cryout_setting_frontcolumns_fn’, __FILE__, ‘presentation_section’);
    add_settings_field(‘parabola_fronttext’, __(‘Extras’,’parabola’) , ‘cryout_setting_fronttext_fn’, __FILE__, ‘presentation_section’);

    /*** header ***/
    add_settings_field(‘parabola_hheight’, __(‘Header Height’,’parabola’) , ‘cryout_setting_hheight_fn’, __FILE__, ‘header_section’);
    add_settings_field(‘parabola_himage’, __(‘Header Image’,’parabola’) , ‘cryout_setting_himage_fn’, __FILE__, ‘header_section’);
    add_settings_field(‘parabola_siteheader’, __(‘Site Header’,’parabola’) , ‘cryout_setting_siteheader_fn’, __FILE__, ‘header_section’);
    add_settings_field(‘parabola_logoupload’, __(‘Custom Logo Upload’,’parabola’) , ‘cryout_setting_logoupload_fn’, __FILE__, ‘header_section’);
    add_settings_field(‘parabola_headermargin’, __(‘Header Content Spacing’,’parabola’) , ‘cryout_setting_headermargin_fn’, __FILE__, ‘header_section’);
    add_settings_field(‘parabola_favicon’, __(‘FavIcon Upload’,’parabola’) , ‘cryout_setting_favicon_fn’, __FILE__, ‘header_section’);

    /*** text ***/
    add_settings_field(‘parabola_fontfamily’, __(‘General Font’,’parabola’) , ‘cryout_setting_fontfamily_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_fonttitle’, __(‘Post Title Font ‘,’parabola’) , ‘cryout_setting_fonttitle_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_fontside’, __(‘Widget Title Font’,’parabola’) , ‘cryout_setting_fontside_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_sitetitlefont’, __(‘Site Title Font’,’parabola’) , ‘cryout_setting_sitetitlefont_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_menufont’, __(‘Main Menu Font’,’parabola’) , ‘cryout_setting_menufont_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_fontheadings’, __(‘Headings Font’,’parabola’) , ‘cryout_setting_fontheadings_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_textalign’, __(‘Force Text Align’,’parabola’) , ‘cryout_setting_textalign_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_paragraphspace’, __(‘Paragraph spacing’,’parabola’) , ‘cryout_setting_paragraphspace_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_parindent’, __(‘Paragraph Indent’,’parabola’) , ‘cryout_setting_parindent_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_headingsindent’, __(‘Headings Indent’,’parabola’) , ‘cryout_setting_headingsindent_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_lineheight’, __(‘Line Height’,’parabola’) , ‘cryout_setting_lineheight_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_wordspace’, __(‘Word Spacing’,’parabola’) , ‘cryout_setting_wordspace_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_letterspace’, __(‘Letter Spacing’,’parabola’) , ‘cryout_setting_letterspace_fn’, __FILE__, ‘text_section’);
    add_settings_field(‘parabola_letterspace’, __(‘Uppercase Text’,’parabola’) , ‘cryout_setting_uppercasetext_fn’, __FILE__, ‘text_section’);

    /*** appereance ***/

    add_settings_field(‘parabola_sitebackground’, __(‘Background Image’,’parabola’) , ‘cryout_setting_sitebackground_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_generalcolors’, __(‘General’,’parabola’) , ‘cryout_setting_generalcolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_accentcolors’, __(‘Accents’,’parabola’) , ‘cryout_setting_accentcolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_titlecolors’, __(‘Site Title’,’parabola’) , ‘cryout_setting_titlecolors_fn’, __FILE__, ‘appereance_section’);

    add_settings_field(‘parabola_menucolors’, __(‘Main Menu’,’parabola’) , ‘cryout_setting_menucolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_topmenucolors’, __(‘Top Menu’,’parabola’) , ‘cryout_setting_topmenucolors_fn’, __FILE__, ‘appereance_section’);

    add_settings_field(‘parabola_contentcolors’, __(‘Content’,’parabola’) , ‘cryout_setting_contentcolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_frontpagecolors’, __(‘Presentation Page’,’parabola’) , ‘cryout_setting_frontpagecolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_sidecolors’, __(‘Sidebar Widgets’,’parabola’) , ‘cryout_setting_sidecolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_widgetcolors’, __(‘Footer Widgets’,’parabola’) , ‘cryout_setting_widgetcolors_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_linkcolors’, __(‘Links’,’parabola’) , ‘cryout_setting_linkcolors_fn’, __FILE__, ‘appereance_section’);

    add_settings_field(‘parabola_caption’, __(‘Caption Border’,’parabola’) , ‘cryout_setting_caption_fn’, __FILE__, ‘appereance_section’);
    add_settings_field(‘parabola_metaback’, __(‘Meta Area Background’,’parabola’) , ‘cryout_setting_metaback_fn’, __FILE__, ‘appereance_section’);

    /*** graphics ***/

    add_settings_field(‘parabola_breadcrumbs’, __(‘Breadcrumbs’,’parabola’) , ‘cryout_setting_breadcrumbs_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_pagination’, __(‘Pagination’,’parabola’) , ‘cryout_setting_pagination_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_menualign’, __(‘Menu Alignment’,’parabola’) , ‘cryout_setting_menualign_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_triangles’, __(‘Triangle Accents’,’parabola’) , ‘cryout_setting_triangles_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_image’, __(‘Post Images Border’,’parabola’) , ‘cryout_setting_image_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_contentlist’, __(‘Content List Bullets’,’parabola’) , ‘cryout_setting_contentlist_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_pagetitle’, __(‘Page Titles’,’parabola’) , ‘cryout_setting_pagetitle_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_categetitle’, __(‘Category Titles’,’parabola’) , ‘cryout_setting_categtitle_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_tables’, __(‘Hide Tables’,’parabola’) , ‘cryout_setting_tables_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_backtop’, __(‘Back to Top button’,’parabola’) , ‘cryout_setting_backtop_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_comtext’, __(‘Text Under Comments’,’parabola’) , ‘cryout_setting_comtext_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_comclosed’, __(‘Comments are closed text’,’parabola’) , ‘cryout_setting_comclosed_fn’, __FILE__, ‘graphics_section’);
    add_settings_field(‘parabola_comoff’, __(‘Comments off’,’parabola’) , ‘cryout_setting_comoff_fn’, __FILE__, ‘graphics_section’);

    /*** post metas***/
    add_settings_field(‘parabola_postcomlink’, __(‘Post Comments Link’,’parabola’) , ‘cryout_setting_postcomlink_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_postdatetime’, __(‘Post Date/Time’,’parabola’) , ‘cryout_setting_postdatetime_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_postauthor’, __(‘Post Author’,’parabola’) , ‘cryout_setting_postauthor_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_postcateg’, __(‘Post Category’,’parabola’) , ‘cryout_setting_postcateg_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_postmetas’, __(‘Meta Bar’,’parabola’) , ‘cryout_setting_postmetas_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_posttag’, __(‘Post Tags’,’parabola’) , ‘cryout_setting_posttag_fn’, __FILE__, ‘post_section’);
    add_settings_field(‘parabola_postbook’, __(‘Post Permalink’,’parabola’) , ‘cryout_setting_postbook_fn’, __FILE__, ‘post_section’);

    /*** post exceprts***/
    add_settings_field(‘parabola_excerpthome’, __(‘Home Page’,’parabola’) , ‘cryout_setting_excerpthome_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerptsticky’, __(‘Sticky Posts’,’parabola’) , ‘cryout_setting_excerptsticky_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerptarchive’, __(‘Archive and Category Pages’,’parabola’) , ‘cryout_setting_excerptarchive_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerptwords’, __(‘Number of Words for Post Excerpts ‘,’parabola’) , ‘cryout_setting_excerptwords_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_magazinelayout’, __(‘Magazine Layout’,’parabola’) , ‘cryout_setting_magazinelayout_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerptdots’, __(‘Excerpt suffix’,’parabola’) , ‘cryout_setting_excerptdots_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerptcont’, __(‘Continue reading link text ‘,’parabola’) , ‘cryout_setting_excerptcont_fn’, __FILE__, ‘excerpt_section’);
    add_settings_field(‘parabola_excerpttags’, __(‘HTML tags in Excerpts’,’parabola’) , ‘cryout_setting_excerpttags_fn’, __FILE__, ‘excerpt_section’);

    /*** featured ***/
    add_settings_field(‘parabola_fpost’, __(‘Featured Images as POST Thumbnails ‘,’parabola’) , ‘cryout_setting_fpost_fn’, __FILE__, ‘featured_section’);
    add_settings_field(‘parabola_fauto’, __(‘Auto Select Images From Posts ‘,’parabola’) , ‘cryout_setting_fauto_fn’, __FILE__, ‘featured_section’);
    add_settings_field(‘parabola_falign’, __(‘Thumbnails Alignment ‘,’parabola’) , ‘cryout_setting_falign_fn’, __FILE__, ‘featured_section’);
    add_settings_field(‘parabola_fsize’, __(‘Thumbnails Size ‘,’parabola’) , ‘cryout_setting_fsize_fn’, __FILE__, ‘featured_section’);
    add_settings_field(‘parabola_fheader’, __(‘Featured Images as HEADER Images ‘,’parabola’) , ‘cryout_setting_fheader_fn’, __FILE__, ‘featured_section’);

    /*** socials ***/
    add_settings_field(‘parabola_socials1’, __(‘Link nr. 1′,’parabola’) , ‘cryout_setting_socials1_fn’, __FILE__, ‘socials_section’);
    add_settings_field(‘parabola_socials2’, __(‘Link nr. 2′,’parabola’) , ‘cryout_setting_socials2_fn’, __FILE__, ‘socials_section’);
    add_settings_field(‘parabola_socials3’, __(‘Link nr. 3′,’parabola’) , ‘cryout_setting_socials3_fn’, __FILE__, ‘socials_section’);
    add_settings_field(‘parabola_socials4’, __(‘Link nr. 4′,’parabola’) , ‘cryout_setting_socials4_fn’, __FILE__, ‘socials_section’);
    add_settings_field(‘parabola_socials5’, __(‘Link nr. 5′,’parabola’) , ‘cryout_setting_socials5_fn’, __FILE__, ‘socials_section’);
    add_settings_field(‘parabola_socialshow’, __(‘Socials display’,’parabola’) , ‘cryout_setting_socialsdisplay_fn’, __FILE__, ‘socials_section’);

    /*** misc ***/
    add_settings_field(‘parabola_iecompat’, __(‘Internet Explorer Compatibility Tag’,’parabola’) , ‘cryout_setting_iecompat_fn’, __FILE__, ‘misc_section’);
    add_settings_field(‘parabola_copyright’, __(‘Custom Footer Text’,’parabola’) , ‘cryout_setting_copyright_fn’, __FILE__, ‘misc_section’);
    add_settings_field(‘parabola_customcss’, __(‘Custom CSS’,’parabola’) , ‘cryout_setting_customcss_fn’, __FILE__, ‘misc_section’);
    add_settings_field(‘parabola_customjs’, __(‘Custom JavaScript’,’parabola’) , ‘cryout_setting_customjs_fn’, __FILE__, ‘misc_section’);

    }

    // Display the admin options page
    function parabola_page_fn() {
    // Load the import form page if the import button has been pressed
    if (isset($_POST)) {
    parabola_import_form();
    return;
    }
    // Load the import form page after upload button has been pressed
    if (isset($_POST)) {
    parabola_import_file();
    return;
    }

    // Load the presets page after presets button has been pressed
    if (isset($_POST)) {
    parabola_init_fn();
    parabola_presets();
    return;
    }

    if (!current_user_can(‘edit_theme_options’)) {
    wp_die( __(‘Sorry, but you do not have sufficient permissions to access this page.’,’parabola’) );
    }?>

    <?php
    if ( isset( $_GET ) ) {
    echo « 

    « ;
    echo _e(‘Parabola settings updated successfully.’,’parabola’);
    echo « 

    « ;
    }
    ?>

    Checking jQuery functionality…
    If this message remains visible after the page has loaded then there is a problem with your WordPress jQuery library. This can have several causes, including incompatible plugins.
    The Parabola Settings page cannot function without jQuery.

    <input class="button" name="parabola_settings[parabola_submit]" type="submit" style="float:right;" value=" » />
    <input class="button" name="parabola_settings[parabola_defaults]" id="parabola_defaults" type="submit" style="float:left;" value=" » />


    Parabola v by Cryout Creations

    <input type="submit" class="button" value=" » />

    <input type="submit" class="button" value=" » />

    <input type="submit" class="button" id="presets_button" value=" » />

    <?php
    $parabola_news = fetch_feed( array( ‘http://www.cryoutcreations.eu/cat/parabola/feed/&rsquo;) );
    if ( ! is_wp_error( $parabola_news ) ) {
    $maxitems = $parabola_news->get_item_quantity( 10 );
    $news_items = $parabola_news->get_items( 0, $maxitems );
    }
    ?>

      <?php if ( $maxitems == 0 ) : echo '

    • ‘ . __( ‘No news items.’, ‘parabola’ ) . ‘
    • ‘; else :
      foreach( $news_items as $news_item ) : ?>

    • <a class="news-header" href='get_permalink() ); ?>’>get_title() ); ?>

      get_date(‘ j F Y, H:i’); ?>

      get_description() ),40,’…’) ; ?>

      <a class="news-read" href='get_permalink() ); ?>’>Read more »

    var reset_confirmation =  »;

    function startfarb(a,b) {
    jQuery(b).css(‘display’,’none’);
    jQuery(b).farbtastic(a).addtitle({id: a});

    jQuery(a).click(function() {
    if(jQuery(b).css(‘display’) == ‘none’) {
    jQuery(b).parents(‘div:eq(0)’).addClass(‘ui-accordion-content-overflow’);
    jQuery(b).css(‘display’,’inline-block’).hide().show(150);
    }
    });

    jQuery(document).mousedown( function() {
    jQuery(b).hide(300, function(){ jQuery(b).parents(‘div:eq(0)’).removeClass(‘ui-accordion-content-overflow’); });
    // todo: find a better way to remove class after the fade on IEs
    });
    }

    function tooltip_terain() {
    jQuery(‘#accordion small’).parent(‘div’).append(‘<img src="/images/icon-tooltip.png » />‘).
    each(function() {
    //jQuery(this).children(‘a.tooltip’).attr(‘title’,jQuery(this).children(‘small’).html() );
    var tooltip_info = jQuery(this).children(‘small’).html();
    jQuery(this).children(‘.tooltip’).tooltip({content : tooltip_info});
    jQuery(this).children(‘.tooltip’).tooltip( « option », « items », « a » );
    //jQuery(this).children(‘.tooltip’).tooltip( « option », « show », « false »);
    jQuery(this).children(‘.tooltip’).tooltip( « option », « hide », « false »);
    jQuery(this).children(‘small’).remove();
    if (!jQuery(this).hasClass(‘slmini’) && !jQuery(this).hasClass(‘slidercontent’) && !jQuery(this).hasClass(‘slideDivs’)) jQuery(this).addClass(‘tooltip_div’);
    });
    }

    function coloursel(el){
    var id = « # »+jQuery(el).attr(‘id’);
    jQuery(id+ »2″).hide();
    var bgcolor = jQuery(id).val();
    if (bgcolor <= "#666666") { jQuery(id).css('color','#ffffff'); } else { jQuery(id).css('color','#000000'); };
    jQuery(id).css(‘background-color’,jQuery(id).val());
    }

    function vercomp(ver, req) {
    var v = ver.split(‘.’);
    var q = req.split(‘.’);
    for (var i = 0; i < v.length; ++i) {
    if (q.length == i) { return true; } // v is bigger
    if (parseInt(v) == parseInt(q)) { continue; } // nothing to do here, move along
    else if (parseInt(v
    ) > parseInt(q)) { return true; } // v is bigger
    else { return false; } // q is bigger
    }
    if (v.length != q.length) { return false; } // q is bigger
    return true; // v = q;
    }

    // farbtastic title addon function
    (function($){
    $.fn.extend({
    addtitle: function(options) {
    var defaults = {
    id:  »
    }
    var options = $.extend(defaults, options);
    return this.each(function() {
    var o = options;
    var title = jQuery(o.id).attr(‘title’);
    if (title===undefined) { } else { jQuery(o.id+’2′).children(‘.farbtastic’).append(‘‘+title+’‘); }
    });
    }
    });
    })(jQuery);

    jQuery(document).ready(function(){
    //var _jQueryVer = parseFloat(‘.’+jQuery().jquery.replace(/./g,  »)); // jQuery version as float, eg: 0.183
    //var _jQueryUIVer = parseFloat(‘.’+jQuery.ui.version.replace(/./g,  »)); // jQuery UI version as float, eg: 0.192
    //if (_jQueryUIVer >= 0.190) {
    if (vercomp(jQuery.ui.version, »1.9.0″)) {
    tooltip_terain();
    jQuery(‘.colorthingy’).each(function(){
    id = « # »+jQuery(this).attr(‘id’);
    startfarb(id,id+’2′);
    });
    } else {
    jQuery(« #main-options »).addClass(‘oldwp’);
    setTimeout(function(){jQuery(‘#parabola_slideType’).trigger(‘click’)},1000);
    jQuery(‘.colorthingy’).each(function(){
    id = « # »+jQuery(this).attr(‘id’);
    jQuery(this).on(‘keyup’,function(){coloursel(this)});
    coloursel(this);
    });
    // warn about the old partially unsupported version
    jQuery(« #jsAlert »).after(« 

    Parabola has detected you are running an older version of WordPress (jQuery) and will be running in compatibility mode. Some features may not work correctly. Consider updating your WordPress to the latest version.

    « );
    }
    });
    jQuery(‘#jsAlert’).hide();

    <?php } // parabola_page_fn()
    ?>

    en réponse à : [Résolu] theme-functions.php #951925
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    En fait j au un « functions.php » dans le theme parent
    et un « functions.php » ds le theme enfant.
    L’ intégrale de mon « functions.php » enfant

    <?php
    /*
    * Functions file
    * Calls all other required files
    * PLEASE DO NOT EDIT THIS FILE IN ANY WAY
    *
    * @package parabola
    */

    // variable for theme version
    define (« PARABOLA_VERSION », »1.3.4″);

    require_once(dirname(__FILE__) . « /admin/main.php »); // Load necessary admin files

    //Loading include files

    require_once( get_stylesheet_directory() . « /includes/theme-functions.php »); // Misc functions

    ?>

    Et la j’ai le message d erreur ci-dessus!?!
    Je suis sur de rater kelke chose mais quoi???? Je vs l avais dit, quelques heures:boulet:

    en réponse à : [Résolu] theme-functions.php #951922
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Bon, ai essayé les 2 syntaxes et invariablement :

    Warning: require_once(/homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/includes/custom-styles.php) [function.require-once]: failed to open stream: No such file or directory in /homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/admin/main.php on line 7

    Fatal error: require_once() [function.require]: Failed opening required ‘/homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/includes/custom-styles.php’ (include_path=’.:/usr/lib/php5′) in /homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/admin/main.php on line 7

    Donc un pb sur le fichier main.php (ce fichier est bien présent dans le dossier

    Pour info : le « functions.php » de mon « theme parent »

    <?php
    /*
    * Functions file
    * Calls all other required files
    * PLEASE DO NOT EDIT THIS FILE IN ANY WAY
    *
    * @package parabola
    */

    // variable for theme version
    define (« PARABOLA_VERSION », »1.3.4″);

    require_once(dirname(__FILE__) . « /admin/main.php »); // Load necessary admin files

    //Loading include files

    require_once( get_stylesheet_directory() . « /includes/theme-functions.php »); // Misc functions

    en réponse à : [Résolu] theme-functions.php #951921
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Ok, merci!
    Donc je recrée l arborescence des dossiers/fichiers dans le theme enfant.
    Impatient d essayer tout ça, vais me liberer le + vite possible et tester!

    Il y a t il un moyen simple de vérifier que le « theme-functions.php » est operationnel?
    A+, vous tiens informé!

    en réponse à : [Résolu] theme-functions.php #951919
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Bjr et… merci, je vais essayer cette nuit 🍺
    Donc et avant d’y passer quelques heures!?!…
    1 Dans le dossier de mon thème enfant, je crée un fichier « theme-functions.php » avec juste :
    <

    ?php

    ?>

    -dedans j y mettrais mes modifs-

    2 Dans le dossier de mon thème enfant, je crée un fichiers « functions.php » avec la modif ci-dessus
    <

    ?php
    require_once(dirname(__FILE__) . « /includes/theme-functions.php »); // Misc functions
    ?>

    Je peut y aller?
    Ah, ces 2 fichiers, je les met à la racine du dossier « theme-enfant » (le « theme-functions.php » original est dans un sous-dossier « includes » du theme parent…)?
    De toute façon, avant de triturer ces fichiers vais faire copie des originaux et si plus rien ne marche, je les remets, non?
    Bon après-midi…

    en réponse à : [Résolu] theme-functions.php #951917
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Bsr noaneo, en fait c pas tant de changer le footer qui m interesse, c surtout le fonctionnement des fichiers du theme enfant!

    Car quand je fé une modif ds le « theme-functions.php » parent, la modif marche,
    cette meme modif ds le « theme-functions.php » enfant, pas de modif, donc le fichier du theme enfant est inopérant. c cela mon pb!

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947543
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Bjr, un petit up, donc il y aurait il quelqu’un pour m aider à comprendre et mettre en place ce code Lien
    sur monWP+WooCommerce?

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947542
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Cameo172, bsr. Belles photos!
    Que voulez vs dire par « pas mal de programmation »?
    Le résultat en effet est pas mal!

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947540
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Ok donc je crois que j’ai trouvé ici une soluce.

    Il y a l’explication sur cette page:
    Lien

    Quelqu’un pour m aider à mettre en place cette soluce?
    Merci.

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947538
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Merci LumDeLune. Donc je renonce à faire des galeries avec Nexcellent?
    Et je fais pour chaque image un produit???
    Ok mais c un énorme boulot de saisie, non?

    Faire des galerie avec Nexcellent c assez automatisé et si mon système avait eu des chances de fonctionner j imaginais moins de boulot se saisie…

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947536
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    oups erreur….
    C pour cela que je crée un produit pour chaque type de tirage mais donc dans ce ccas, le client doit pouvoir remplir un champ qui contient le N° de l image.

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947535
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Oui c serait l idéal, MAIS je fais mais galeries avec Nexcellent Gallery (voir 1er post) et ne sais pas comment intégrer Woocommerce, cad de faire en sorte que chaque image soit un produit.
    C pour cel

    en réponse à : Woo-commerce + Nexcellent Gallery = vente photo? #947534
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Bjr, après quelques heures de recherche, je suis arrivé au résultat suivant :
    Choix de la solution 2 (rien trouvé pour la 1, même si je suis persuadé que cela est possible:()
    Donc dans les templates du thème XooCommerce, il y a la page card.php

    j’ai dupliqué la ligne 36:

    <th class="product-price"></th>

    et les lignes 90 à94:

    <td class="product-price">
    cart->get_product_price( $_product ), $cart_item, $cart_item_key );
    ?>
    </td>

    Vous pouvez voir le résultat ici:
    Lien

    On peut donc voir 2 fois l’ « attribut » PRIX.

    Peut on faire en sorte que cette attribut soit « remplacé » par un champ à remplir qui serait mémorisé dans ma commande.
    Merci.
    Le code entier de la page card.php



    .product-name {
    background-color: #FFFFFF;
    }





    <form action="cart->get_cart_url() ); ?> » method= »post »>



    <table class="shop_table cart" cellspacing="0">
    <thead>
    <tr>
    <th class="product-remove"> </th>
    <th class="product-thumbnail"> </th>
    <th class="product-name"></th>
    <th class="product-price"></th>
    <th class="product-price"></th>
    <th class="product-quantity"></th>
    <th class="product-subtotal"></th>
    </tr>
    </thead>
    <tbody>


    cart->get_cart() as $cart_item_key => $cart_item ) {
    $_product = apply_filters( ‘woocommerce_cart_item_product’, $cart_item[‘data’], $cart_item, $cart_item_key );
    $product_id = apply_filters( ‘woocommerce_cart_item_product_id’, $cart_item[‘product_id’], $cart_item, $cart_item_key );

    if ( $_product && $_product->exists() && $cart_item[‘quantity’] > 0 && apply_filters( ‘woocommerce_cart_item_visible’, true, $cart_item, $cart_item_key ) ) {
    ?>
    <tr class=" »>

    <td class="product-remove">
    <?php
    echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a href="%s" class="remove" title="%s">×</a>‘, esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), __( ‘Remove this item’, ‘woocommerce’ ) ), $cart_item_key );
    ?>
    </td>

    <td class="product-thumbnail">
    get_image(), $cart_item, $cart_item_key );

    if ( ! $_product->is_visible() )
    echo $thumbnail;
    else
    printf( ‘<a href="%s">%s</a>‘, $_product->get_permalink(), $thumbnail );
    ?>
    </td>

    <td class="product-name">
    is_visible() )
    echo apply_filters( ‘woocommerce_cart_item_name’, $_product->get_title(), $cart_item, $cart_item_key );
    else
    echo apply_filters( ‘woocommerce_cart_item_name’, sprintf( ‘<a href="%s">%s</a>‘, $_product->get_permalink(), $_product->get_title() ), $cart_item, $cart_item_key );

    // Meta data
    echo WC()->cart->get_item_data( $cart_item );

    // Backorder notification
    if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item[‘quantity’] ) )
    echo ‘<p class="backorder_notification">‘ . __( ‘Available on backorder’, ‘woocommerce’ ) . ‘</p>‘;
    ?>
    </td>



    <td class="product-price">
    cart->get_product_price( $_product ), $cart_item, $cart_item_key );
    ?>
    </td>



    <td class="product-price">
    cart->get_product_price( $_product ), $cart_item, $cart_item_key );
    ?>
    </td>

    <td class="product-quantity">
    is_sold_individually() ) {
    $product_quantity = sprintf( ‘1 ‘, $cart_item_key );
    } else {
    $product_quantity = woocommerce_quantity_input( array(
    ‘input_name’ => « cart[{$cart_item_key}][qty] »,
    ‘input_value’ => $cart_item[‘quantity’],
    ‘max_value’ => $_product->backorders_allowed() ?  » : $_product->get_stock_quantity(),
    ), $_product, false );
    }

    echo apply_filters( ‘woocommerce_cart_item_quantity’, $product_quantity, $cart_item_key );
    ?>
    </td>

    <td class="product-subtotal">
    cart->get_product_subtotal( $_product, $cart_item[‘quantity’] ), $cart_item, $cart_item_key );
    ?>
    </td>
    </tr>

    <tr>
    <td colspan="6" class="actions">

    cart->coupons_enabled() ) { ?>
    <div class="coupon">

    <label for="coupon_code">:</label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder=" » /> <input type="submit" class="button" name="apply_coupon" value=" » />



    </div>


    <input type="submit" class="button" name="update_cart" value=" » /> <input type="submit" class="checkout-button button alt wc-forward" name="proceed" value=" » />




    </td>
    </tr>


    </tbody>
    </table>



    </form>

    <div class="cart-collaterals">







    </div>

    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Les mots clefs dans NexGenG sert à filtrer les billets.

    ??? je vais aller prendre un complément d infos sur ces terme, « filtrer les billets »…. Billet=Article? Page?

    en réponse à : WordPress et galerie photo… Pensée philosophique! Experts bienvenus. #931938
    AntoineM
    Participant
    Chevalier WordPress
    173 contributions

    Vous n’avez pas déjà posé la question ailleurs ?

    Non il ne me semble pas…

    À remarquer que de nombreuses extensions proposent d’ajouter mots-clefs aux médias WP et la recherche devrait fonctionner pour ceux-là – du moins des modules de recherches qui prendraient en charge les taxonimies.

    La quelque chose m’échappe: via Nextcellent Gallery, je met des mots clés à mes images… Mais comment faire pour que le module de recherche les prenne en compte???

15 sujets de 31 à 45 (sur un total de 122)