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 2018-09-25 20:33:55

post@trulsellefsen.no
Member
Registered: 2015-01-17
Posts: 37

Text above and below Galleria slideshow

I have inserted the slideshow above the Page Copy at my frontpage and want a text heading above the slideshow
See: https://britogtruls.no/

In Rods tips page "How about text above and below a gallery?" I have seen a way to do this with thumbnails, but it seems to not work with my slideshow. I have tried to put my text into the Album Copy - above the gallery.

Is there a solution for this?

Last edited by post@trulsellefsen.no (2018-09-25 20:35:58)

Offline

#2 2018-09-25 22:37:07

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

Re: Text above and below Galleria slideshow

It's working for me: http://backlight-2-100.barbeephoto.com/ … irst-test/

The jQuery isn't in your page source, plus there's no page text anyway.
Be sure you're using the proper phplugins syntax as it's changed since Backlight 1
http://community.theturninggate.net/vie … hp?id=8966

And don't use your existing BL1 phplugins file. There is new code for Backlight 2. Start with the backlight.php phplugins file found in /backlight/custom/phplugins/. Delete or comment out the example functions and put your code in the user area. Be sure to remove the arguments from ($style, $path) to simply ()

I've updated that post: http://ttg-tips-and-tricks.barbeephoto. … a-gallery/


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 2018-09-26 03:03:03

post@trulsellefsen.no
Member
Registered: 2015-01-17
Posts: 37

Re: Text above and below Galleria slideshow

Is there a guide on how to use jQuery in Backlight? I have never used it before...

Offline

#4 2018-09-26 03:18:35

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Text above and below Galleria slideshow

Following code adds some text at the top of the page before any galleries or page copy text. If you like to have some text on another page, just use the respective slug in the string comparison. There is no need to use jQuery.

function main_top( ){
	// Add some specific text to the home page above the gallery slideshow
	if (strtolower($this->slug) == 'home') {
		echo '<h1>Welcome</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam placerat magna id elit auctor, a commodo tellus mollis. Fusce enim augue, dictum vitae erat vel, volutpat scelerisque mi. Quisque ornare fringilla mi vel fringilla. Phasellus nisl erat, vestibulum at est ullamcorper, accumsan congue lorem. Pellentesque placerat, erat ac porta egestas, magna ante sollicitudin sapien, tristique pellentesque metus metus in lectus. Nulla ut dui vel purus semper sodales id nec magna. Duis at lorem felis. In hac habitasse platea dictumst.
</p>
			';
	}

}

Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#5 2018-09-26 22:21:27

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

Re: Text above and below Galleria slideshow

But if you want to add text on a page by page basis, use jQuery and wrap your text in the indicated classes.

There is no guide for jQuery specific to Backlight. Just use one of the many books on jQuery, the oficial docs: https://api.jquery.com , or try an online course from a source like Lynda.com.


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

Offline

#6 2018-09-26 23:32:15

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Text above and below Galleria slideshow

rod barbee wrote:

But if you want to add text on a page by page basis, use jQuery and wrap your text in the indicated classes.

There is no guide for jQuery specific to Backlight. Just use one of the many books on jQuery, the oficial docs: https://api.jquery.com , or try an online course from a source like Lynda.com.

Rod, my code already targets a page. In the example code, it is the home page.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#7 2018-09-27 02:24:45

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

Re: Text above and below Galleria slideshow

I was thinking “per album” actually, like if you needed specific text in different albums then it would be easier to enter that in the actual album text than needing to edit a phplugins file.


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 2018-09-27 02:35:21

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Text above and below Galleria slideshow

rod barbee wrote:

I was thinking “per album” actually, like if you needed specific text in different albums then it would be easier to enter that in the actual album text than needing to edit a phplugins file.

If you have to add a lot of text to different albums, it is definitely easier using the album settings than having to edit phplugins all the time.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#9 2018-09-27 02:55:35

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

Re: Text above and below Galleria slideshow

Rereading the original post, I finally caught up to the fact this is an album inserted in a page. In that case, any text entered in the album copy wouldn’t appear on the page anyway.

I’ve not tried entering text in the page copy that I wished to have appear above or below the inserted album. If you don’t want to use phplugins, then try entering the text in the page copy rather than the album copy.


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

Offline

#10 2018-09-27 03:51:33

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Text above and below Galleria slideshow

rod barbee wrote:

I’ve not tried entering text in the page copy that I wished to have appear above or below the inserted album. If you don’t want to use phplugins, then try entering the text in the page copy rather than the album copy.

It works as expected. I have added some text in my home page's 'Pallet 01 Copy' and it appears on my page.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#11 2018-09-27 04:50:17

post@trulsellefsen.no
Member
Registered: 2015-01-17
Posts: 37

Re: Text above and below Galleria slideshow

I used a modified version of Daniels code, as I wanted the text to apear above the album at the home page ("forside" in norwegian):
function masthead_secondary_bottom()
{
    // Add some specific text to the home page above the gallery slideshow
    if (strtolower($this->slug) == 'forside') {
        echo '<h4 style="text-align: center;"><span style="color: #ffcc00;">Nye utstillinger:</span></h4>
        ';
    }

    return true;
}

May be I study jQuery at a later point...

Thanks for help both of you smile

Last edited by post@trulsellefsen.no (2018-09-27 04:50:33)

Offline

#12 2018-09-27 05:08:24

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Text above and below Galleria slideshow

Happy it works smile


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

Board footer

Powered by FluxBB