Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter picking_functions

    (@picking_functions)

    It’s a shame for a plugin like this not to have it, bravo! If you need anything else, I am here, dealing with exact same project and problems, trying alot of plugins and options. Once you finish, you should really redesign a website πŸ™‚

    Thread Starter picking_functions

    (@picking_functions)

    If the plugin is Multisite compatible, add a metabox somwhere to Hide Options for Subsites. I am talking from designers perspective, I am not a dev, so this maybe sounds strange.

    Anyway, aim is the same. Give Multisite managers a possibility to run your plugin on let’s say 200 subsites but restrict those 200 subsite Administrators (only super_admin) an access to edit options or delete ads.

    This way any monetisations network would prosper easily, for example, selling websites as hosted solution with AdSense installed and so on. Just dont give a subsite administrator an option to delete super_admin’s Ads. Because those are free accounts.

    just change that line of index.php into this, without point mark before “/wordpress”. They need to update instructions.

    require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );

    Hey brackec,

    In WordPress 3.7.1 thigs are little different. Here is what you need to do, remove the point mark before “/blog…” and you’ll be ok:

    change this

    require( dirname( __FILE__ ) . β€˜./blog/wp-blog-header.php’ );

    into this

    require( dirname( __FILE__ ) . β€˜/blog/wp-blog-header.php’ );

    Thread Starter picking_functions

    (@picking_functions)

    I have managed to solve this. Simply by trying to upload and replace corrupted functions.php file again…

    Thank you very much for your support, keesiemeijer!

    Thread Starter picking_functions

    (@picking_functions)

    It is renamed, and “twentyeleven” is still there.

    Thread Starter picking_functions

    (@picking_functions)

    And yes, uploading fresh copy of the theme and replacing those files, didn’t help either. I thought it would recover it, whatever it may be. Very strange..

    Thread Starter picking_functions

    (@picking_functions)

    I have renamed “twentyeleven” folder in “lamp” and thigs are the same.
    I have renamed “lamp” in “twentyeleven”, still the same. Even now I don’t have a “lamp” folder name. Check it out? Whatever I try, still get the same parse error..

    Thread Starter picking_functions

    (@picking_functions)

    Thread Starter picking_functions

    (@picking_functions)

    Thank you for your reply. I have tried both of solutions, but still no luck. Nothing changes.

    Here is the code of the functions.php file in question:

    <?php
    /* Load the tfuse class. */
    require_once( TEMPLATEPATH . '/library/tfuse.php' );
    
    /* Initialize the tfuse framework. */
    $tfuse = new tfuse();
    $tfuse->init();
    
    define( 'PREFIX', $tfuse->prefix );
    
    @$style = $_GET['color'];
    
    $styles_directory = get_template_directory()."/styles/";
    $styles_directory_uri = get_template_directory_uri()."/styles/";
    
    if( is_file( $styles_directory . $style .'.css' ) ) { 
    
    	//update_option(PREFIX.'_alt_stylesheet',$style.".css");
    	setcookie(PREFIX . '_style_demo', $style.".css", time()+3600, '/');
    }
    
    if( !empty($_GET['bg']) && is_file( get_template_directory().'/images/'.esc_attr($_GET['bg']) ) )
    {
        @setcookie(PREFIX . '_style_demo', esc_attr($_GET['bg']), time()+3600*60, '/');
    }
    # This sets the HTML Editor as default #
    add_filter( 'wp_default_editor', create_function('', 'return "html";') );
    
    add_filter('themefuse_shortcodes', 'do_shortcode');
    add_filter('widget_text', 'do_shortcode');
    
    //add_theme_support( 'post-thumbnails' );
    
    // Disable Admin Bar for all users
    add_filter('show_admin_bar', '__return_false');
    
    function improved_trim_excerpt($text) {
    	$raw_excerpt = $text;
    	if ( '' == $text ) {
    		$text = get_the_content('');
    
    		$text = strip_shortcodes( $text );
    
    		$text = apply_filters('the_content', $text);
    		$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
    		$text = str_replace(']]>', ']]>', $text);
    		$text = strip_tags($text, '<a>');
    		$excerpt_length = apply_filters('excerpt_length', 25);
    		$excerpt_more = apply_filters('excerpt_more', ' ...' . '');
    		$words = explode(' ', $text, $excerpt_length + 1);
    		if (count($words) > $excerpt_length) {
    			array_pop($words);
    			$text = implode(' ', $words);
    			$text = $text . $excerpt_more;
    		}
    	}
    	return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
    }
    
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'improved_trim_excerpt');
    
    $_settings = get_option('newsletter_settings') ? get_option('newsletter_settings') : array();
    
    function add_email( $email ){
    
    	global $_settings;
    
    	$emails = explode(",", $email);
    	$valid_emails = array();
    	$unique_emails = array();
    
    	foreach($emails as $mail){
    		if ( is_email(trim($mail)) ) $valid_emails[] = trim($mail);
    	}
    
    	if ( empty($valid_emails) ) return false;
    
    	$valid_emails_string = implode(",", $valid_emails);
    	if ( !empty($_settings['newsletter_emails']) ) $valid_emails_string = ',' . $valid_emails_string;
    
    	$_settings['newsletter_emails'] .= $valid_emails_string;
    	$unique_emails = explode(",", $_settings['newsletter_emails']);
    	$unique_emails = array_unique($unique_emails);
    
    	$_settings['newsletter_emails'] = implode(",", $unique_emails);
    	_save_settings_todb();
    
    	return true;
    }
    
    function _save_settings_todb($form_settings = '')
    {
    	global $_settings;
    
    	if ( $form_settings <> '' ) {
    		unset($form_settings['newsletter_settings_saved']);
    
    		$emails = $_settings['newsletter_emails'];
    
    		$_settings = $form_settings;
    		$_settings['newsletter_emails'] = $emails;
    	}
    	update_option('newsletter_settings', $_settings);
    }
    
    if ( isset($_POST['newsletter']) ) add_email( $_POST['newsletter'] );
    
    if (!function_exists('tfuse_comment_reply')) {
    	function tfuse_comment_reply() {
    		if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
    	}
    }
    add_action('get_header', 'tfuse_comment_reply');
    
    ?>
Viewing 10 replies - 1 through 10 (of 10 total)