Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter John

    (@johnstevenspendleton)

    back up again, did a restore

    Thread Starter John

    (@johnstevenspendleton)

    ugh I just fed up my whole site I am now getting this error:

    Fatal error: Call to undefined function add_shortcode() in /homepages/46/d89996492/htdocs/jpportfolio/wp-includes/shortcodes.php on line 454

    I even replace the old php page from the original template download. Any suggestions? F!

    Thread Starter John

    (@johnstevenspendleton)

    Okay you just went over my head 🙂 I found the exact code that you suggested. But could not figure it out. the code is below. The Href code is down towards the bottom. Any chance you can help me out to edit code? I would then need to know what the variable and value would be for the button shortcode as well . Any help would be hugely appreciated. I have been at this for days now. I can save the php page in case I need to update the theme.

    /*
    **	Button Shortcode
    */
    if(!function_exists('rockthemes_shortcode_make_button')){
    	function rockthemes_shortcode_make_button($atts, $content=null){
    		extract( shortcode_atts( array(
    			"icon_align"=>"left",
    			"icon_size"=>"",
    			"icon_title"=>"",
    			"button_align"=>"",
    			"button_size"=>"",
    			"button_color"=>"",
    			"button_flat"=>"no",
    			"button_shape"=>"",
    			"button_wrap"=>"",
    			"button_link_target"=>"",
    			"link_url"=>"",
    			"link_id"=>"",
    			"link_is_tax"=>"",
    			"tax_name"=>"",
    			"icon_class"=>"",
    			"icon_url"=>""
    		), $atts ) );
    
    		wp_enqueue_style('quasar-buttons',  F_WAY.'/css/buttons.css', '','', 'all');
    		//wp_enqueue_script('quasar-buttons', F_WAY.'/js/buttons.js', array('jquery'));
    
    		$link_active = false;
    		$link_html = '';
    		$link_icon_html = '';
    
    		if($link_url !== 'false'){
    			$link_html = $link_url;
    			$link_active = true;
    		}elseif($link_id !== 'false'){
    			if($link_is_tax !== 'false'){
    				$tax = get_category_by_slug($link_id);
    				if(!$tax){
    					$tax = get_term_link($link_id,$tax_name);
    				}else{
    					$tax = get_category_link($tax);
    				}
    				$link_html = $tax;
    			}else{
    				$link_html = get_permalink($link_id);
    			}
    			$link_active = true;
    		}
    
    		$button_is_else_flat = 'button';
    		if($button_flat == 'yes') $button_is_else_flat = 'button-flat';
    		if($button_color !== '') $button_is_else_flat .= '-'.$button_color;
    
    		$icon_html = '';
    		$icon_used = false;
    
    		if($icon_class != ''){
    			$icon_html = ' <i class="'.$icon_class.' '.$icon_size.'"></i> ';
    			$icon_used = true;
    		}elseif($icon_url != ''){
    			$icon_html = ' <img src="'.$icon_url.'" /> ';
    			$icon_used = true;
    		}
    
    		$return = '';
    
    		$button_align_html = '';
    
    		if($button_align !== 'block'){
    			$button_align_html  = ' float:'.$button_align.';';
    		}elseif($button_align === 'block'){
    			$button_align_html  = ' display:'.$button_align.';';
    		}
    
    		if($button_wrap == 'yes'){
    			if($button_align === 'block'){
    				$return .= '<span class="button-wrap" style="display:block;">';
    			}else{
    				$return .= '<span class="button-wrap">';
    			}
    		}
    
    		$button_large_style = '';
    
    		if($button_size === 'button-large'){
    			$button_large_style = ' padding:15px;';
    		}
    
    		$return .= '
    		<a href="'.$link_html.'"
    		'.($button_link_target == "_blank" ? 'target="_blank"' : '').'
    		style="'.$button_align_html.$button_large_style.'"
    		class="escapea button
    		'.($button_shape != "" ? $button_shape." " : ""). '
    		'.$button_is_else_flat. '
    		'.$button_size. '
    		">
    		'.($icon_align == "left" ? $icon_html : '').'
    		'.$content.'
    		'.($icon_align == "right" ? $icon_html : '').'
    		';
    
    		if($button_wrap == 'yes') $return .= '</span>'; //Close button wrap span
    
    		return $return;
    	}
    }

    Thread Starter John

    (@johnstevenspendleton)

    That is the code that I started out with.So below is the reason for my attempted hack.

    My issue is that I want to launch the Prettyphoto lightbox so that I can show the larger images. The button short-code that is provided by the template does not allow me to make that call rel=”prettyPhoto”

    I asked them to help me out and they told me since it was not a “feature” of the template that they could not spend time on it. Not really what I wanted to hear. I need to update the shortcode.php file so that I can activate the PrettyPhoto light box. I am sure I could do this with some help. Any chance you could steer me in the right direction?

    Thread Starter John

    (@johnstevenspendleton)

    The username and password to my site are both: johnpendleton

    The single quotes did not work for me. I now have a question mark instead of an image. Any more suggestions?

    John

    (@johnstevenspendleton)

    Emlovesjewelry is “1 and 1” your web host? I am getting the exact same error

Viewing 6 replies - 16 through 21 (of 21 total)