Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-03-13 07:12:15

scott_walton
Member
Registered: 2014-05-26
Posts: 14

Temporary Message Banner

Hi,
Does Backlight2 have the ability to add a temporary message banner somewhere at the top of the home page where you can place a message? I've seen this on many sites but can't find how to do it in Backlight2. This is the kind of temporary message that you can choose to appear and then the user can X it out if they don't want to see it. Would be a thin area, just one row of text high and you might use it to add a message highlighting something that's important but temporary and of course you could easily change the text and you could have a hyper link in that text. Thanks for any help!

Offline

#2 2020-03-13 07:29:05

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Temporary Message Banner

Backlight has a Cookie acceptance notice that you can set to pop up at either the top or bottom of the page. And you can customize the language used in that.

But there isn't a setting for any other such window to pop up.

there may be a way to do it with phplugins though.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2020-03-13 10:20:16

scott_walton
Member
Registered: 2014-05-26
Posts: 14

Re: Temporary Message Banner

Thanks for mentioning that Rod. I just took a look at that but it really covers up most of the masthead. I was hoping for something more subtle. Thanks for the input.

Offline

#4 2020-03-13 10:52:16

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Temporary Message Banner

You can change the size with custom css.

otherwise, look into some javascript options. You can include scripts on your site by using the scripts() hook function in phplugins.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2020-03-14 03:55:51

scott_walton
Member
Registered: 2014-05-26
Posts: 14

Re: Temporary Message Banner

Thank you again Rod!

Offline

#6 2020-03-14 07:29:05

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Temporary Message Banner

Hi Rod,

Just to confirm - can you add more than one script in the scripts() hook function or are you limited to only only script bein able to be run in there...

Cheers,
Chumby

Offline

#7 2020-03-14 07:48:44

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Temporary Message Banner

you can add as many as you like. Just make sure they're all in one scripts hook:

function scripts () {
echo'
<script>
   .......script 1....
</script>
<script>
   .......script 2....
</script>
<script>
   .......script 3....
</script>
';
}

If there are any single quotes in the scripts, they'll need to be escaped:  \'

There's also an alternate way of adding scripts to the scripts hook where you don't need to escape single quotes. see the phplugins-pangolin-sample.php file for an example.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2020-03-14 09:33:13

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Temporary Message Banner

Cheers Rod

Offline

Board footer

Powered by FluxBB