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.
You are not logged in.
Pages: 1
REF http://community.theturninggate.net/vie … hp?id=8430
Daniel Leu, this broke in our BL2 upgrade. I read your 'sticky' in BL2 Support but don't know enough about PHP to get it to work in BL2 without hammering my sites. Can you help?
Tom Szewczuk
I've restored the old custom PHP back
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
Untested, but this is what the new version would look like:
function ttg_crumb( $page_name ) {
echo '<ul class="breadcrumbs"><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/" itemprop="url"><span itemprop="title">Home</span></a></li><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'. $page_name .'</span></li></ul>';
}
function main_top(){
// Add breadcrumbs to non-gallery pages
if ($this->slug == 'about') {
$this->ttg_crumb('About');
} else if ($this->slug == 'contact) {
$this->ttg_crumb('Contact');
} else if ($this->slug == 'search) {
$this->ttg_crumb('Search');
} else if ($this->slug == 'xxxx) {
$this->ttg_crumb('Xxxx');
}
}
Offline
Ben, the snippet you posted fails with error " Something went wrong Unexpected error: syntax error, unexpected 'Contact' (T_STRING) in Myphplugins.php on line 528 Please report error at http://community.theturninggate.net"
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
This updated version works for me:
function ttg_crumb( $page_name ) {
echo '<ul class="breadcrumbs"><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/" itemprop="url"><span itemprop="title">Home</span></a></li><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'. $page_name .'</span></li></ul>';
}
function main_top(){
// Add breadcrumbs to non-gallery pages
if (strtolower($this->slug) == 'about') {
$this->ttg_crumb('About');
} else if (strtolower($this->slug) == 'contact') {
$this->ttg_crumb('Contact');
} else if (strtolower($this->slug) == 'search') {
$this->ttg_crumb('Search');
} else if (strtolower($this->slug) == 'xxxx') {
$this->ttg_crumb('Xxxx');
}
}
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Ben, the snippet you posted fails with error " Something went wrong Unexpected error: syntax error, unexpected 'Contact' (T_STRING) in Myphplugins.php on line 528 Please report error at http://community.theturninggate.net"
Make sure you're starting with the updated phplugins file (backlight.php) from the backlight/custom/phplugins/ folder.
There's some new coding in there that is required for the functions to work.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I'm alittle fuzzy on which custom php file to copy/modify so I tried phplugins-pangolin-sample.php and old backlight.php files. I inserted the following code to the bottom of each which still does not produce breadcrumbs on non-gallery pages. What am I missing??
function ttg_crumb( $page_name ) {
echo '<ul class="breadcrumbs"><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/" itemprop="url"><span itemprop="title">Home</span></a></li><li class="fa_pseudo" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">'. $page_name .'</span></li></ul>';
}
function main_top(){
// Add breadcrumbs to non-gallery pages
if (strtolower($this->slug) == 'about') {
$this->ttg_crumb('About');
} else if (strtolower($this->slug) == 'mycontact') {
$this->ttg_crumb('Contact');
} else if (strtolower($this->slug) == 'rssfeeds') {
$this->ttg_crumb('RSS');
} else if (strtolower($this->slug) == 'sitenews') {
$this->ttg_crumb('Site News');
} else if (strtolower($this->slug) == 'websearch') {
$this->ttg_crumb('Web Search');
} else if (strtolower($this->slug) == 'search') {
$this->ttg_crumb('Search');
}
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
see Daniel’s post on updating to Backlight 2 phplugins files. http://community.theturninggate.net/vie … hp?id=8966
Note the very first code he quotes. The phplugins file must have that.
It's actually been updated to this:
if (defined('BACKLIGHT_HOOK')) {
require_once(realpath(BACKLIGHT_HOOK).'/modules/module-designer/application/helpers/APHPlugins.php');
}
class PHPlugins extends APHPlugins
{
(unless that first part is still only part of the testing stream, in which case, it will be part of the release version very soon)
Anyway, make sure the file you're starting with has all that, otherwise it won't work.
Anyway, the
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Ok folks I almost give up. Would it be too much to actually give me the contents of the whole file the way it's supposed to look like. The only file I have in my custom is okapi sample and that didn't work for work either. I feel I'm missing something very basic.
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
weird. I have no okapi-sample.php file in backlight/custom/phplugins/
I'll email you the default backlight.php file with Daniel's code at the top of the user area. I'll comment out the other sample functions.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
weird. I have no okapi-sample.php file in backlight/custom/phplugins/
I'll email you the default backlight.php file with Daniel's code at the top of the user area. I'll comment out the other sample functions.
phplugins-okapi-sample.php is what I have in custom/phplugins
Thanks Rod, I received the email
Problem: I installed your file into /backlight/custom/phplugins/. When I go to my DarkStarterPage --->Advanced Setup --->PHPlugins --->Include File pull down I don't see the PHP script listed. I went back and moved all except backlight-with-crumbs.php to a save folder and did the select again which displayed all the plugins from before, excluding backlight-with-crumbs.php.
I cleared cache, chmod 755 and update all albums but that didn't fix anything. Any ideas? I have your file installed on my test site.
Last edited by tmszewczuk (2018-09-18 09:06:18)
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
Are you using the current Pangolin-based Dark Starter template? (I don't recall if there was an Okapi version)
the only other thing I can think of is that you're installing the file on one test site and looking for it on another. Is there a chance of that happening?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Are you using the current Pangolin-based Dark Starter temlate? (I don't recall if there was an Okapi version)
the only other thing I can think of is that you're installing the file on one test site and looking for it on another. Is there a chance of that happening?
Location was fixed by repointing the test domain
Script had small error at the end and this was fixed. Breadcrumbs now work!
Thanks much for all the time and the breadcrumbs script!!
*/
} // END
// ****************************************************************************************************
// END USER FUNCTIONS
} ?>
Last edited by tmszewczuk (2018-09-19 05:03:47)
Thomas Szewczuk
Website TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'
Offline
Pages: 1