Beiträge von raphi

    <?php


    /**
    * Slightly Modified Options Framework
    */
    require_once ('admin/index.php');


    if ( ! isset( $content_width ) ) $content_width = 900;


    function at_scripts()
    {
    // Register Scripts
    wp_register_script( 'plugins', get_template_directory_uri() . '/js/plugins.js' );
    wp_register_script( 'custom-script', get_template_directory_uri() . '/js/custom.js' );


    //Enqueue Scripts
    wp_enqueue_script('jquery');
    wp_enqueue_script('plugins');
    wp_enqueue_script( 'custom-script' );


    if ( (!is_admin()) && is_singular() && comments_open() && get_option('thread_comments') ){
    wp_enqueue_script( 'comment-reply' );
    }
    }
    add_action( 'wp_enqueue_scripts', 'at_scripts', 5 );


    // This theme uses wp_nav_menu() in one location.


    add_action( 'init', 'register_my_menus' );


    function register_my_menus() {
    register_nav_menus(
    array(
    'main-menu' => __( 'Main Menu','overlay' )
    )
    );
    }
    add_action( 'init', 'create_my_menus' );
    function create_my_menus(){
    wp_create_nav_menu( 'Main Menu', array( 'slug' => 'main-menu' ) );
    }


    // Custom Post Types.


    add_action('init', 'custom_post_register');


    function custom_post_register() {
    $args = array(
    'label' => __('Portfolio','overlay'),
    'singular_label' => __('Portfolio','overlay'),
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => true,
    'supports' => array('title' , 'thumbnail'),
    );


    $args2 = array(
    'label' => __('Services','overlay'),
    'singular_label' => __('Service','overlay'),
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => true,
    'supports' => array('title' , 'thumbnail','editor'),
    );

    register_post_type( 'portfolio' , $args );
    register_post_type( 'services' , $args2 );
    flush_rewrite_rules( false );
    }


    // This theme uses post thumbnails
    add_theme_support( 'post-thumbnails' );


    // Add default posts and comments RSS feed links to head
    add_theme_support( 'automatic-feed-links' );


    add_image_size( 'portfolio-image', 150, 140, false); // for use on portfolio
    add_image_size( 'service-image', 30, 30, false); // for use on services


    /**
    * Output the favicon
    */
    function at_custom_favicon() {
    global $data;
    if($data['custom_favicon'])
    echo '<link rel="shortcut icon" href="'. $data['custom_favicon'] .'" />' . "\n";
    }
    add_action( 'wp_head', 'at_custom_favicon' );


    function at_tracking_code() {
    global $data;
    if($data['google_analytics'])
    echo stripslashes($data['google_analytics']);
    }
    add_action( 'wp_footer', 'at_tracking_code' );


    add_action( 'wp_head','at_custom_styling' ); // Add custom styling to HEAD


    function at_custom_styling() {


    global $data;

    $output = '';

    // Add CSS to output

    if ($data['background-color']) {
    $output .= 'html {background-color:'.$data['background-color'].'}' . "\n";
    }
    if ($data['custom_bg'])
    $output .= 'html {background-image:url(' . $data['custom_bg'].')}' . "\n";

    if ($data['uploaded_bg'])
    $output .= 'html {background-image:url(' . $data['uploaded_bg'].')}' . "\n";

    if ($data['custom_bg'] && $data['bg_repeat'] && $data['bg_position'])
    $output .= 'html {background-repeat:'.$data['bg_repeat'].'}' . "\n";


    if ($data['custom_bg'] && $data['bg_position'])
    $output .= 'html {background-position:'.$data['bg_position'].'}' . "\n";

    if ($data['custom_bg'])
    $output .= 'html {background-attachment:'.$data['bg_attachment'].'}' . "\n";


    if($data['custom_css']){
    $output .= stripslashes($data['custom_css']) . "\n";
    }
    // Output styles
    if (isset($output) && $output != '') {
    $output = strip_tags($output);
    $output = "<!-- at Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
    echo $output;
    }
    }


    if ( !function_exists('at_remove_autop') ) {


    function at_remove_autop($content) {
    $content = do_shortcode( shortcode_unautop($content) );
    $content = preg_replace( '#^<\/p>|^<br \/>|<p>$#', '', $content );
    return $content;
    }


    }


    add_shortcode('highlight', 'at_highlight');


    function at_highlight($atts, $content = null) {

    $content = at_remove_autop($content);

    $output = '<span>' . $content . '</span>';

    return do_shortcode($output);

    }


    if (!is_admin()) add_action( 'wp_footer','atf_other_javascript' );


    if (!function_exists('atf_other_javascript')) {


    function atf_other_javascript( ) {

    global $data;
    $slides = $data['nivo_slider']; //get the slides array

    $slides_no = count(array_keys($slides),1);

    if ( (is_home() || is_front_page()) && !is_paged() ) {

    $speed = $data['ani_speed'];
    $pause = $data['ani_pause'];
    $slices = $data['ani_slices'];
    $columns = $data['ani_bc'];
    $rows = $data['ani_br'];
    $effect = $data['animation'];
    $arrows = $data['slider_arrows'];
    echo '<script type="text/javascript">
    jQuery(window).load(function() {
    jQuery("#slider").nivoSlider({
    effect:\'' . $effect . '\',
    animSpeed:' . $speed . ', //Slide transition speed
    pauseTime:' .$pause . ',
    slices:' . $slices . ', // For slice animations
    boxCols:' . $columns .', // For box animations
    boxRows:' . $rows .', // For box animations
    pauseOnHover:true,
    directionNav:' . $arrows . ', //Next And Prev
    directionNavHide:true,
    controlNav:true, //1,2,3...
    controlNavThumbs:false,
    captionOpacity:0.7 //Universal caption opacity
    }
    );
    });
    </script>';
    }
    }
    }
    /************* COMMENTS HOOK *************/


    function at_comment( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment; ?>


    <div <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
    <?php echo get_avatar( $comment, $size='40', $default='<path_to_url>' ); ?>
    <div class="comment-info">
    <?php printf( __( '<cite class="fn">%s</cite>' ), get_comment_author_link() ) ?>
    <span><?php printf( __( '%1$s at %2$s', 'shopitpress' ), get_comment_date(), get_comment_time() ) ?></span>
    <?php edit_comment_link( __( '(Edit)', 'shopitpress' ), ' ', '' ) ?>
    </div>
    <?php if ( $comment->comment_approved == '0' ) : ?>
    <em><?php _e( 'Your comment is awaiting moderation.', 'shopitpress' ) ?></em>


    <?php endif; ?>


    <?php comment_text() ?>
    <?php if ( $args['max_depth']!=$depth ):?>
    <div class="reply">
    <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ?>
    </div>
    <?php endif ?>
    </div>
    <?php
    }
    if ( !function_exists('at_pagination') ) {


    function at_pagination($pages = '', $range = 2){

    $showitems = ($range * 2)+1;


    global $paged;
    if(empty($paged)) $paged = 1;


    if($pages == '')
    {
    global $wp_query;
    $pages = $wp_query->max_num_pages;
    if(!$pages)
    {
    $pages = 1;
    }
    }


    if(1 != $pages)
    {
    echo "<div class='pagination'>";
    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>&laquo;</a>";
    if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>&lsaquo;</a>";


    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
    }
    }


    if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>&rsaquo;</a>";
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>&raquo;</a>";
    echo "</div>\n";
    }
    }
    }

    Hallo Zusammen,

    Ich habe mir über Themeforest das Theme Overlay gekauft und heruntergeladen. Doch erscheint bei mir auf der Seite, auf welchem ich das Theme nun installiert habe immer die Meldung

    Code
    [B]Warning: array_keys() expects parameter 1 to be array, string given in [B]/home/raphael1/public_html/wp-content/themes/Overlay/functions.php on line [B]180[/B][/B][/B]

    An was kann dies liegen? Muss ich noch eine Zusätzliche Einstellung vornehmen, bevor ich meine Webseite bearbeiten kann? Besten Dank und freundliche Grüsse, Raphi

    Mein Web unter: raphaelgeiser.ch

    Hallo Zusammen,

    Habe für meine Domain eine Wordpress Theme angepasst für Mobiltelefone. Nur möchte ich , dass die Domain (sprich das Theme) nur über Handy (iphone, Samsung etc) aufrufen kann, jedoch nicht über den Webbrowser des PC. Kann ich dem Webbrowser ein Hinweis unterlegen, dass die Seite nur über ein Handy geöffnet werden kann, jedoch diese Sperre über ein Handy trotzdem problemlos geöffnet werden kann. (Da auch das Design an Mobiltelefonbreite angepasst wurde)

    Betrifft das Theme:
    http://themeforest.net/item/axiamobil…preview/2677648

    Danke für die Hilfe.

    Hallo Zusammen,

    Ich benutze das Theme precision vcard auf wordpress 3. Nun habe ich folgende Frage (meine Seite raphaelgeiser.ch):

    Der Titel, zb "kocht" steht im Menü links (das ist auch IO so), aber rechts wird vom Theme her ein grauer Kasten wie eine Fahne angezeigt, wobei der erste Buchstaben Gross, alle anderen untendran klein sind. Wie kann ich dies ändern dass alle Buchstaben auf einer Zeile sind und den Text horizontal angezeigt wird?

    Danke für die Hilfe....

    Zitat

    Nun, das Script ist alt

    Ah OK, aber als WP Neuling weiss ich nun eider nicht wirklich was ich machen muss damits funktioniert. Viele benutzen leider noch den IE auch wenns schon lange bessere Alternativen gibt.

    Wie und was muss ich am Skript ändern damits funktioniert? Da ich wie besagt Neuling bin und in der Welt der Scripts noch nicht so "gescheit", benötige ich hilfe :neutral:

    Hallo Zusammen,

    Meine Seite raphaelgeiser.ch läuft unter WP und zeigt aber im Internetexplorer einen Scriptfehler. In anderen Browsern wie Firefox, Safari und auf Handybrowsern (Samsung) funktioniert das Ganze. Was ist falsch? Ich wäre für jede Hilfe dankbar, da ich leider nicht mehr weiterweiss und die Seite eigendlich auch auf dem InternetExplorer funktionieren müsste.

    Explorer meldet folgenden Fehler:

    Hallo Zusammen,

    Ich surfe auf Verschiedenen Browsern. Auf allen funktioniert meine Seite (Firefox, Safari) nur auf dem IE. Zeigt es folgenden Fehler:



    Wo liegt das Problem? Ich sehe draus dass mit JavaScript ein Problem besteht, jedoch nicht was, da es auf anderen Browsern richtig angezeigt wird. Kann mir jemand helfen, ich würde mich freuen.