Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

[SOLVED] Yt Shortcodes plugin change defaults
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: [SOLVED] Yt Shortcodes plugin change defaults

[SOLVED] Yt Shortcodes plugin change defaults 10 years, 11 months ago #15521

  • tomroguk
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
Hi all, tried searching but couldn't find anything related.

The Yt Shortcodes plugin is great for things like blockquotes etc. I am fine editing these individually, but I would like to set a default style:

[quote width="auto" align="none" border="#666" color="#666" title="SOMEONE_FAMOUS_TITLE"]ADD_CONTENT_HERE[/quote] 


Setting the color and font colour etc.

I've opened plugins/system/ytshortcodes/includes/shortcodes-prepa.php

And found:
# Block Quote Block
add_shortcode('quote', 'blockquoteShortcode');
function blockquoteShortcode($atts, $content = null){
	extract(shortcode_atts(array(
		"title" => '',
		"align" => 'none',
		'border'=>'#666',
		'color'=>'#666',
		'width'=>'auto',
	), $atts));
	$source_title = (($title != '') ? "<small>".$title. "</small>" : '');
	return '<blockquote class="yt-boxquote pull-'. $align.'" style="width:'.$width.';border-color:'.$border.';color:'.$color.'">' . $content . $source_title. '</blockquote>';
}


I have updated the settings to this:

# Block Quote Block
add_shortcode('quote', 'blockquoteShortcode');
function blockquoteShortcode($atts, $content = null){
	extract(shortcode_atts(array(
		"title" => '',
		"align" => 'none',
		'border'=>'#0066cc',
		'color'=>'#0066cc',
		'width'=>'auto',
	), $atts));
	$source_title = (($title != '') ? "<small>".$title. "</small>" : '');
	return '<blockquote class="yt-boxquote pull-'. $align.'" style="width:'.$width.';border-color:'.$border.';color:'.$color.'">' . $content . $source_title. '</blockquote>';
}


But when I add in the shortcode it still has the original settings for the color etc.

Am I looking in the wrong file or does something else need to be updated before my changes will take effect?

Thanks all
The topic has been locked.

Re: Yt Shortcodes plugin change defaults 10 years, 11 months ago #15541

Dear Tom Rogers,

Please go to your_site\plugins\system\ytshortcodes\ytshortcodes.php and find:
'blockquote' => array(
				'name'		=> "Blockquote",
				'desc'		=> "Blockquote",
				'syntax'	=> "[quote width=\'auto\' align=\'none\' border=\'#000\' color=\'#666\' title=\'SOMEONE_FAMOUS_TITLE\']ADD_CONTENT_HERE[/quote]",
				'image'		=> "blockquote.png"
			),

=>

'blockquote' => array(
				'name'		=> "Blockquote",
				'desc'		=> "Blockquote",
				'syntax'	=> "[quote width=\'auto\' align=\'none\' border=\'#0066cc\' color=\'#0066cc\' title=\'SOMEONE_FAMOUS_TITLE\']ADD_CONTENT_HERE[/quote]",
				'image'		=> "blockquote.png"
			),


Thanks!
The topic has been locked.

Re: Yt Shortcodes plugin change defaults 10 years, 11 months ago #15560

  • tomroguk
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
Thanks SA Anh that was exactly what I was looking for.
Much appreciated!
This can be marked as solved.
The topic has been locked.
  • Page:
  • 1
Time to create page: 0.20 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes