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 Re: Backlight 2 Support » Implement html page into "main_top" » 2019-03-08 01:04:36

You're absolutely right!

This is the working phplugins Code:

function head(){
//echo'<link rel="stylesheet" type="text/css" href="../../Test/css/style.css">';
echo'<link rel="stylesheet" type="text/css" href="../../Test/mapplic/mapplic.css">';
}
	
function scripts() { 
echo'<script type="text/javascript" src="../../Test/js/jquery.mousewheel.js"></script>';
echo'<script type="text/javascript" src="../../Test/js/script.js"></script>';
echo'<script type="text/javascript" src="../../Test/mapplic/mapplic.js"></script>';
echo'<script type="text/javascript" src="../../Test/js/hammer.min.js"></script>';

echo <<<SCRIPT
	<script>
		$(document).ready(function() {
		$('#mapplic').mapplic({
		source: '../../Test/europe.json',
		height: 700,
		sidebar: true,
		minimap: false,
		zoomoutclose: true,
		developer: false,
		search: false,
		fullscreen: false,	
		alphabetic: true,
		maxscale: 7,
		mapfill: true,
		zoommargin: 0
		});
		});
	</script>

SCRIPT;
return false;
}

	
function main_top(){
echo'<div class="map-container">';
echo'<div id="mapplic" class="mapplic-transparent"></div>';
echo'</div>';
}

This is just a quick n dirty way to get an idea how the page could look like (all the files will be moved to a proper location when I'm done).
The next step is to minimize the necessary files (like combine css files ....) but this helped me a lot.

Thank you very much!!!

#2 Backlight 2 Support » Implement html page into "main_top" » 2019-03-07 23:33:47

MoritzCH
Replies: 3

Hi all,

my TTG page is up and running for a few years now and it's time for a revamp. Recently I bought Backlight 2 and set up a few templates. Right now I am playing around with an idea
of a new way to navigate trough my galleries and pictures. I already have a working example and would like to implement the code into the Backlight 2 version using phplugins so the map
(http://backlight2.globetrotter.one/Test/europe.html) will show up on the main column (2 column layout, nav will be removed shortly -- http://backlight2.globetrotter.one/).

This is the code of the working standalone example:

<html>
	<head>
		<!-- Viewport for Responsivity -->
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<link rel="stylesheet" type="text/css" href="mapplic/mapplic.css">
	</head>
	<body>
		<div class="map-container">
			<div id="mapplic" class="mapplic-transparent"></div>
		</div>
		<!-- Scripts -->
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/hammer.min.js"></script>
		<script type="text/javascript" src="js/jquery.mousewheel.js"></script>
		<script type="text/javascript" src="js/script.js"></script>
		<script type="text/javascript" src="mapplic/mapplic.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$('#mapplic').mapplic({
					source: 'europe.json',
					height: 700,
					sidebar: true,
					minimap: false,
					zoomoutclose: true,
					developer: false,
					search: false,
					fullscreen: false,	
					alphabetic: true,
					maxscale: 7,
					mapfill: true,
					zoommargin: 0
				});
			});
		</script>
	</body>
</html>

I tried to use the "function main_top() { }" function but always get an error that the "mapplic" function is not available. Maybe I have to use both (main_top and scripts) functions but yeah, can't get it to work right now hmm
Don't know if anyone can help me but I would appreciate any help I can get.

Thank you in advance!

#3 Re: Backlight Support » Two questions » 2017-07-08 04:00:21

1.) Swap? You mean the position in the navigation part? (If so, go to Designer --> Menu Sets --> Design (for the menu you want to change) --> drag and drop the items where you need them

2.) Backlight --> Manage Users (first page) --> Edit (below admin) --> username


Damn, Rod was 2 seconds faster ^^

#4 Re: General » Thanks for the Pangolin upgrade » 2017-07-08 03:56:32

Agree with Charlie. Pangolin is another huge step forward towards the probably most user friendly software I've ever worked with.
Working out of the box with still enough room to implement your own stuff (custom CSS, PHPlugins, ...)

And the community including the admin / moderator team is giving us fast and pretty nice support for all kind of problems.

Thank you!

#5 Re: Backlight Support » Pangolin Wordpress Dropdown » 2017-07-08 03:51:28

the fix worked like a charm, thank you! smile

#6 Re: Backlight Support » Pangolin Wordpress Dropdown » 2017-07-07 18:06:28

Update

Nevermind! Created a new menu set within backlight and use this for my Wordpress blog.

#7 Backlight Support » Pangolin Wordpress Dropdown » 2017-07-07 16:59:50

MoritzCH
Replies: 3

Feeling a bit stupid I have another problem (something what worked definitely before I messed around with Pangolin).
I created all the templates for the normal page and the Wordpress blog and added a menu within the WP-Admin panel but the dropdown stuff is not working anymore.
When I check the code the sub-menu point is there but won't open on the menu bar -.-

The link is:
http://roadbooks.globetrotter.one/


Could provide credentials if on of the mods would like to have a look into it

Thank you!
Moritz

#8 Re: Backlight Support » multiple sites » 2017-07-07 13:49:35

You can create a new publishing service, choose TTG and insert the new URL smile
Did that too a few days ago

#9 Re: Backlight Support » metadata token in slideshow mode missing » 2017-07-06 18:01:07

Yeah I am talking about Pangolin Album and quite sure I did it (edit the Captions setting and re-publish the metadata only) yesterday.
Gonna try it again when I am back at home.

Thank you!

#10 Backlight Support » metadata token in slideshow mode missing » 2017-07-06 17:44:59

MoritzCH
Replies: 2

Good morning,

I am nearly done converting everything to Pangolin but one last thing seems to kidding me -.- The metadata token {Title} (or even a custom one like "ABCDE") is not displayed while in "Slideshow Mode".
If I enable the metadata in grid view they will be displayed correctly underneath the pictures. I already republished everything without success so I guess I did something wrong.

#11 Re: Backlight Support » Wordpress function (the_posts_navigation()) » 2017-07-05 17:43:48

oh man, I was looking for this function inside the theme folder -.-

As this is a core function I guess there isn't an easy way to rewrite it. Copy the whole php files (in my case loop.php and content.php) and change the parts is the way to go (at least for me).

Thank you!

#12 Backlight Support » Wordpress function (the_posts_navigation()) » 2017-07-05 16:36:30

MoritzCH
Replies: 2

Good morning,

I am struggling creating a child theme for Wordpress (based on Pangolin). What I want to do is to replace this part of the loop.php file:

the_posts_navigation();

with this

<?php if (show_posts_nav()) :?>
<article class="post-navigation">
	<p>
<?php  if(get_previous_posts_link()) { ?>
		<span class="newer-posts"><?php  previous_posts_link( __('Previous', 'wordpress_main') ); ?></span>
<?php  } else { ?>
		<span class="newer-posts no-more-posts"><?php  _e('Previous', 'wordpress_main'); ?></span>
<?php  } ?>
		<span class="post-navigation-divider">/</span>
<?php  if(get_next_posts_link()) { ?>
		<span class="older-posts"><?php  next_posts_link( __('Next', 'wordpress_main') ); ?></span>
<?php  } else { ?>
		<span class="older-posts no-more-posts"><?php  _e('Next', 'wordpress_main'); ?></span>
<?php  } ?>
	</p>
</article>
<?php  endif; // if prev/next links ?>

The code itself is working for me (copied the loop.php file to my child theme folder) but I thought if it would be easier to use the functions.php file to replace it there.
I tried to find the function but I failed. Where is this function declared?

#13 Re: Backlight Support » Box-Shadow @ Pangolin » 2017-07-04 00:58:54

Well to be honest, I don't know if there are many user using a shadow on their page so if you can manage the shadow effect using a custom CSS file it would be fine as well.

In case there will be a higher demand you could think about adding an additional parameter within the backlight admin panel.

thank you very much for your help!
Really appreciate it!

#14 Re: Backlight Support » Box-Shadow @ Pangolin » 2017-07-04 00:25:49

Sent you a mail with my access data. Would be glad if you could take a look into it.

The templates I am working with are labeled with "_Pangolin" at the end wink

Thank you in advance

#15 Re: Backlight Support » Box-Shadow @ Pangolin » 2017-07-04 00:13:13

yeah, exactly that option. I set a max layout width of 1280 and use a resolution of 1920x1080 (browser window is maximized) but there is no shadow

edit
Not a big deal right now, just curios if I made a mistake or if there is something wrong on your side smile

#16 Backlight Support » Box-Shadow @ Pangolin » 2017-07-03 23:59:52

MoritzCH
Replies: 6

Hi,

first at all, another great release with Pangolin!! smile

Just a small thing, is it possible that the "Box-shadow" setting under "Layout" is not working? Tried a few combinations but no success hmm

#17 Re: Backlight Support » Background image for template -all pages » 2017-06-29 14:26:37

strange, can you post the Content of your current css file pls?

#18 Re: Backlight Support » Background image for template -all pages » 2017-06-29 12:11:28

The "/*Background transparent*/" part is wrong, my fault wink

Take a look at my last post and copy the "/*Background transparent*/" from there ... or (as Rod suggested) wait a few days for the update


Edit
change this part in your CSS file

/*Background transparent*/

    .masthead,
    nav,
    .main, .page__main,
    .page__tray[data-position="T1"],
    .page__tray[data-position="T2"] 
        background-color: rgba( 255, 255, 255, 0.5 );
}
/*Background transparent*/

to

/*Background transparent*/

.page__main {
    background-color: rgba(255, 255, 255, 0.5);
}

/*Background transparent*/

#19 Re: Backlight Support » Background image for template -all pages » 2017-06-29 03:56:48

You're right Rod, thank you for the heads-up!

For you this css file should work (and includes your background image)

html, 
body, 
main {
	background: linear-gradient(90deg, #ffffff 50%, #fafafa 50%, #fafafa);
	
	background-color: #000;
	background-image: URL(http://ljdservice.com/backlight/designer/?c=page&a=image&p1=2);
	background-attachment: fixed;
	background-position: center top;
	background-repeat: no-repeat;
	background-size: cover;
    
/*Background transparent*/

.page__main {
    background-color: rgba(255, 255, 255, 0.5);
}

/*Background transparent*/


body {  }

proof (guess this is what you want, right?)
3eMmsjO.png

#20 Re: Backlight Support » Background image for template -all pages » 2017-06-28 15:38:48

I did the same thing a few months ago and code below worked for me.

/*Background transparent*/
main {
	background-color: rgba(1,1,1,0);
}

	.masthead,
	nav,
	.main, .page__main,
	.page__tray[data-position="T1"],
	.page__tray[data-position="T2"] {
		background-color: rgba( 255, 255, 255, 0.5 );
}
/*Background transparent*/

Maybe it need some tweaks for your needs wink

EDIT
You can play with the "0.5" (range 0 to 1) to change the transparency

#21 Re: Backlight Support » Help Creating Pages » 2017-06-22 02:44:35

the new backlight admin panel  (in case you did the installation correctly) is found at "http://www.domain.tld/backlight/". Before you start you I suggest to read and understand the template part as it makes things really easy smile

This it how it should look like
ccd079-1498066957.jpg

In case you read the "wrong" documentation here is the official one --> http://backlight.theturninggate.net/docs/doku.php

Each page needs a template (i.e. 1  coloumn, 2 coloumn --- but you can use the same template for several pages or even albums / album sets)

Matt did a video a while ago and some menu structures may look a bit different now but to get a feeling how backligt works take a look at this video --> https://www.youtube.com/watch?v=jtzGfUiC6kU

#23 Re: Backlight Support » Adding info into the <head> section » 2017-06-14 21:15:19

Depending on what you want to do a custom PHplugins file could be the way to go

--> http://backlight.theturninggate.net/doc … _phplugins

#24 Re: Backlight Support » Highlight Top-Level Gallery » 2017-06-14 18:36:41

You're right, the code is really messy. Now it looks a bit better smile

/* highlight menu item */
function ttg_scripts( $style, $path ) {
$tempURL = explode('/', $_SERVER['REQUEST_URI']);
$tempURL = "/" . $tempURL[1] . "/";
echo "
<script>
	$(function() {
		$(\"ul.menu a[href='\" +". $tempURL ."+ \"']\").addClass('selected').parents('li').children().addClass('selected');
	});
</script>
";
} 
/* highlight menu item */

Thank you, owe you a beer smile (you can get it in Vegas in August if you like or I could fly to SFO ^^)


A sidenote for evey coding addicted user here:
There is a more robust way to get the URL using "parse_url" so the part between function and echo could look like this

// Get current URL
$url = $_SERVER['REQUEST_URI'];
// Extract the path from the URL
$path = parse_url($url, PHP_URL_PATH);
// Separate by forward slashes
$parts = explode('/', $path);
// The part you want is index 1 - the first is an empty string
$result = "/{$parts[1]}/";

I took the way with less coding lines smile

#25 Re: Backlight Support » Highlight Top-Level Gallery » 2017-06-14 13:12:30

Guten Morgen (and in English: Good morning smile )

your code was not working out of the box but I figured something out. It is working for me but I don't know if this the right way.
Maybe someone else could crosscheck it!

my PHPlugins.php

/* mark menu items as selected */
function ttg_scripts( $style, $path ) { ?>
<script>
	$(function() {
		/**/
		<?php
		$url99 = 'http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
		$parts = explode('/', $url99);
		$test = "/" . $parts[3] . "/";
		?>					   
		/**/
		$("ul.menu a[href='" + window.location.pathname + "']").addClass("selected").parents('li').children().addClass('selected');
		$("ul.menu a[href='" + <?php echo $test ?> + "']").addClass("selected").parents('li').children().addClass('selected');
	});
</script>
<?php } ?>

I did declare the variable $test outside the function so unless you use a global variable this couldn't work ^^

Danke dir für deinen Input // thank you for your help!

Board footer

Powered by FluxBB