Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slogan plugin
#26
(2015-04-18, 01:58:21)Tyblitz Wrote: The author of Slogans plugin didn't include a second $echo parameter in the get_slogan function (but that's fine, you can use return_slogan)

the code i was looking at at the time had a second param for get_slogan() for echo vs return, and no return_slogan() function.
Reply
#27
(2015-04-18, 01:58:21)Tyblitz Wrote: Almost there:


PHP Code:
<?php if(function_exists('return_slogan') && return_slogan('Announcement')) {
 
 // will evaluate to TRUE if Announcement's text length > 0
 
 echo '<div>' return_slogan('Announcement') . '</div>';
 
 // or: echo '<div>'; get_slogan('Announcement'); echo '</div>';
}?>

The author of Slogans plugin didn't include a second $echo parameter in the get_slogan function (but that's fine, you can use return_slogan)
JFYI (& shameless self-promoting), you can also do this & more with Gs Custom Settings (although not I18n-enabled yet)

Thanks Tyblitz, that seems to work ok for me. Much appreciated and I'll certainly take a look at trying your GS Custom Settings plugin too.
Reply
#28
(2015-04-18, 03:13:02)simplycrazy Wrote:
(2015-04-18, 01:58:21)Tyblitz Wrote: The author of Slogans plugin didn't include a second $echo parameter in the get_slogan function (but that's fine, you can use return_slogan)

the code i was looking at at the time had a second param for get_slogan() for echo vs return, and no return_slogan() function.

I made sure to download and check the source Smile
Reply
#29
(2015-04-18, 07:50:37)Tyblitz Wrote: I made sure to download and check the source Smile

http://get-simple.info/forums/showthread...9#pid35839 is what i was looking at.
Reply
#30
FYI:
I just found that the patch/plugin I posted (that allows using Slogan without I18N), is not compatible with the I18N Search plugin.
Reply
#31
Wink 
(2015-05-02, 18:55:11)Carlos Wrote: FYI:
I just found that the patch/plugin I posted (that allows using Slogan without I18N), is not compatible with the I18N Search plugin.

Lucky for me that the site Carlos helped out with this patch/plugin doesn't use I18n Search :-)
But if a long term solution would be useful to others.
Thanks for the heads-up Carlos.
Reply




Users browsing this thread: 1 Guest(s)