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.

#551 Re: Backlight 2 Support » Use of PHP Includes Viable? » 2018-11-10 15:51:31

This is what I'm using. As you see, I tried with relative and absolute file paths.

<?php
/*
 *	TTG Core Elements "PHPlugins" User Hooks v1.2 - initialization mainline
...
 */

function user_load($style, $path) {...}

if (defined('BACKLIGHT_HOOK')) {...}

// v1
include("dlp_common.php"); 

// v2
include(realpath(BACKLIGHT_HOOK) . "/custom/phplugins/dlp_common.php"); 

class PHPlugins extends APHPlugins {...}
?>

#552 Re: Backlight 2 Support » Updated Module Notifications » 2018-11-10 08:37:57

youloveben wrote:

Is there any way to get notifications for updates to /backlight/admin/list_modules/?

An email or something along the line of https://ifttt.com/applets/193786p-websi … ifications would be cool.

The best way is to follow http://theturninggate.net/blog/

youloveben wrote:

Further, can PHPlugins hook into IFTTT? Are there any examples of this in use?

Hmm... what action do you have in mind?

#555 Re: CE4 Gallery » Help with Gallery Error » 2018-11-10 05:13:21

Looks like this is a new site or install. Why don't you start with Backlight 2? It is so much easier....

#556 Re: General » TTG CE3 and PHP 7(.2) » 2018-11-10 05:10:32

Just wondering... wouldn't it be easier just to move on to Backlight 2?

#557 Re: General » TTG CE3 and PHP 7(.2) » 2018-11-10 00:25:53

markharris wrote:

I have the same problem, with hundreds of legacy galleries using CE4, many of them standalone, so hard to even find them.
So if anyone has a good code fix, I (and presumably many others) would be super grateful.

This problem is related to CE3. Please open a new ticket if you have a problem with CE4.

#558 Re: Backlight 2 Support » Install error » 2018-11-09 09:05:42

From http://backlight.theturninggate.net/doc … acklight_2

Delete or move aside everything from within /backlight except for /backlight/data and /backlight/custom. Make sure to leave any gallery folders untouched.

#559 Re: Backlight Support » Solved: Some trouble switching to https » 2018-11-09 08:34:10

powerfulphotography wrote:

I don't seem to have Backlight > Admin > Upgrade Album Files. with my version of TTG Backlight version: 1.2.3

Go to the backlight admin page, then there is a section called Special Links.

#560 Re: Backlight Support » Solved: Some trouble switching to https » 2018-11-09 07:48:20

powerfulphotography wrote:

That has worked a treat thank you, is there any way that https can be forced to activate if someone used an old http link?

This is what the code does. For my host, I had to edit Backlight > Admin > Settings > Advanced Settings and add this code to the .htaccess section and then perform Backlight > Admin > Upgrade Album Files.

#561 Re: Backlight Support » Solved: Some trouble switching to https » 2018-11-09 02:38:05

This is what I'm using and I have it as a separate section (eg, not merged with the other IfModule section):

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTPS} off
	RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

#562 Re: General » TTG CE3 and PHP 7(.2) » 2018-11-09 01:33:06

If you can't revert back to a lower php version, then I might move ahead to migrate to Backlight 2.  Your site looks rather straightforward so that shouldn't be too difficult.

Backlight 2 can directly migrate CE4 based publisher created albums. I don't think upgrading from CE3 is supported. But CE4 can upgrade a CE3 album to CE4.

I would buy Backlight 2 and then send Matt an email and asking him for a copy of CE4 so you can upgrade your albums from CE3. That's all you do with CE4. Afterwards, you can upgrade this CE4 album to Backlight 2 and your album structure and photos are ready.

#563 Re: Backlight 2 Support » Install error » 2018-11-08 16:27:53

mhayes5254 wrote:

I only see "okapi-core 2.0.0". Is that it?

No, it is called Okapi Web Modules. It is the last row.

#564 Re: Backlight 2 Support » Install error » 2018-11-08 15:57:42

Did you install the okapi modules (Backlight > Admin > Backlight Modules > Okapi Web Modules)?

#565 Re: Backlight 2 Support » Converted Backlight to Backlight 2: 2 Issues » 2018-11-08 15:17:38

Thank you, Charles. You can remove guest admin. I missed that you are still using okapi based modules. It looks like there is a bug with okapi that doesn't properly set the custom.css include. I can repro this on my test setup.

Since you are using phplugins, you can add it on your own:

function head( ) {
	// custom.css workaround
	echo '<link rel="stylesheet" href="/backlight/custom/css/custom.css" />';
}

But I would strongly urge you to upgrade to Pangolin based templates. This is where all the fun is and custom.css works there smile

#566 Re: Backlight 2 Support » Converted Backlight to Backlight 2: 2 Issues » 2018-11-08 12:47:05

I believe this is a simple setup problem. So there is no need to dig into the code and modify things. If you have changed any files in /backlight/modules/, please do a reinstall of all modules using the module manager.

You don't have to post your guest-admin password here in the forum. It is sufficient if you share it with Rod, Matt and/or me by email or direct message.

#567 Re: Backlight 2 Support » Converted Backlight to Backlight 2: 2 Issues » 2018-11-08 07:55:45

Sorry to sound like a broken record: Can you enable guest admin so one can have a closer look at your settings (Backlight > Users >Guest Admin)?

#568 Re: Backlight 2 Support » Documentation on multi-language support » 2018-11-08 07:16:34

eckart-bartnik wrote:

For example, how do I add EN or DE on top of my page to choose the language?

Once you add and enable a second language in backlight > admin > list_languages, the language selector automatically appears.

#570 Re: Backlight 2 Support » PHP Startup error message » 2018-11-08 00:25:52

tgalex wrote:

I checked and they did a system wide php upgrade on Monday.  Would that have changed the APIkey?

The API number the log refers to is not the API Key used with Lr. It looks like they have not upgraded all modules to their selected PHP version. Did you bring this issue up with them? That's something your host has to fix.

You should be able to set your old PHP version using the cpanel.

#571 Re: Backlight 2 Support » Converted Backlight to Backlight 2: 2 Issues » 2018-11-07 12:19:03

charking wrote:
rod barbee wrote:
charking wrote:

I converted from Backlight to Backlight 2 yesterday. My web site is functioning properly except for two issues:

1. I use a background image on all my web pages; the code for this is included in custom.css. It is not appearing on my web pages, so the link to this code has been broken somehow in the conversion process.



My website: charleskinghorn.com

Charles

your page template isn't using any custom css. Make sure your custom css file is uploaded to /backlight/custom/css and that the page template is using it.
in your template, take a look under Advanced Setup > Extensibility : Custom CSS. Enable Custom CSS and choose your file.

Hi, Rod.

My custom.css coding is in \public_html\backlight\custom\css. Also in that directory is theturninggate.css.

I have checked all my page templates, and under Advanced Customization the Custom Stylesheet is enabled and the custom.css file is included. The Include File dropdown list includes theturninggate.css, so I must be pointing to the right directory.

I cannot find your "Advanced Setup > Extensibility : Custom CSS" headings, so possibly I'm missing something and looking in the wrong place.

Charles

Since you were able to select your custom.css file, you looked at the location Rod was pointing to. But your pages don't include your custom.css. Can you enable guest admin so one can have a closer look at your settings (Backlight > Users >Guest Admin)?

#572 Re: Backlight 2 Support » Converted Backlight to Backlight 2: 2 Issues » 2018-11-07 12:10:07

charking wrote:
Daniel Leu wrote:

Hmm... your slideshow is a video. So maybe this has to do with the following https://developers.google.com/web/updat … cy-changes

I would change your slideshow to a regular BL2 based slideshow instead of using a video based slideshow.

Hi, Daniel.

What is a BL2 based slideshow?

Charles

http://backlight.theturninggate.net/doc … n_vegas_fs

#573 Re: General » Contact page copy deletion » 2018-11-07 05:07:55

pkriner wrote:

Hey Rod,

I did that before I posted.  In my Contact page all copy areas are blank.  I scrolled through them to insure there was no other text, but this Loren text still shows up.

Http://nuwaveimaging.com

P.

This is not by chance part of your contact form (http://nuwaveimaging.com/backlight/admi … act_forms/) or your page template (http://nuwaveimaging.com/backlight/desi … templates/)? It looks like you don't have the same page template for all your pages.

#574 Re: Backlight 2 Customization » PHP Wordpress posts » 2018-11-06 15:59:53

Matthew wrote:

Hi Jon,

These days, I think the WP REST API is probably the way to go for this stuff. It was first packaged into Wordpress in the 4.7 release. Here's an example. This function will get five posts from your blog.

function main_top() {
  $curl = curl_init();
  curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'http://yourdomain.com/blog/wp-json/wp/v2/posts',
    CURLOPT_USERAGENT => 'User Agent X'
  ));
  $posts = curl_exec($curl);
  curl_close($curl);

  $posts = json_decode($posts, true);
  if(is_array($posts)){
    echo '<ul>';
    for ( $i = 0; $i < 5; $i++ ) {
      if (isset($posts[$i])) {
        echo '<li><a target="_blank" href="' . $posts[$i]['link'] . '">' . $posts[$i]['title']['rendered'] . '</a></li>';
      }
    }
    echo '</ul>';
  }

  return false;
} // END /**/

Resources:

cURL:
https://stackoverflow.com/questions/277 … n-http-get

PHP 5 For Loops:
https://www.w3schools.com/php/php_looping_for.asp

Convert and Loop through JSON with PHP
https://jonsuh.com/blog/convert-loop-th … s-objects/

WP REST API Handbook:
https://developer.wordpress.org/rest-api/reference/

And you can visit the URL in the code above to view the post data, so that you can see how to pick it apart.

You should also install the JSON Formatter extension for Chrome:
https://github.com/callumlocke/json-formatter

Wow, that's cool! I'm currently using the RSS feed to get the latest blog posts. But this is way easier. Thank you for sharing!

Jon, to get the link to the thumbnail, have a look at https://medium.com/@dalenguyen/how-to-g … 023b9896c6

#575 Re: Backlight 2 Customization » PHP Wordpress posts » 2018-11-05 06:04:00

Daniel Leu wrote:

Hi Jon,

With Bl2, phplugins are now class based. Did you implement the changes listed at http://community.theturninggate.net/vie … hp?id=8966. Otherwise could you please post the entire function you use? Thanks!


Best

I added your code to my site and I get the same error...

Board footer

Powered by FluxBB