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.
I'm also experiencing the same problem, as I'm sure others are. Looking forward to the solution.
Thanks Rod - right next to the snake-bite kit. ![]()
I know I've seen it here somewhere, but can't seem to locate it now........
How and where can I check within Lightroom to determine the version number of a plugin? Or do I need to look elsewhere?
Thanks
Thanks Rod - you're always there when we need you!
I'm wanting to use autoindex in a non-ttg website for purposes other than photo galleries. Do I need ttg-be installed, or will the autoindex folder that I export from lightroom be capable of "stand-alone" operation?
I have a site published with Pages CE4, but I'd like to change the mantle and core width on all pages - I left it set to "auto" when I published, but a fixed width would work better for my situation
Is there a simple way to make the changes to mantle and core width without re-publishing the entire site, or do I need to bite the bullet and just go ahead and make a new installation?
Thanks
Just wanted to let Matt, Ben, Rod and everyone else associated with your product development and support know that I appreciate all of the help and assistance available through this forum. You respond quickly and waste no time locating and fixing any bugs that might show up after a version release. There are very few companies that have the level of commitment to customer service that you do -
AND WE APPRECIATE IT !!!
Most of us are not programmers or computer wizards - we know cameras - not computers.
Thank you all for being here and for being ready to help when we stumble.
Thanks Rod - just what I needed to know. You guys are great!
Is it possible to change the appearance of the page navigation items in a gallery via phplugins?
For instance, if a gallery takes up 3 pages, can I alter the appearance of the navigation bars that appear at the top and bottom of the gallery that have the numbers 1 2 3 and Next/Previous? Either via phplugins or custom CSS?
And if so, what items should I target?
Do these navigation bars originate in a lib file or from ttg-be?
Playing with a test gallery to try to get things working - using Notepad++
No - doesn't appear that variables were declared - my attempt at placing into the head_end function has all of my php code appearing as comments (at least judging by the color code - green). The php is therefore not running, just being printed into the head and ignored.
Back to the drawing board again........
Thanks for the help. I'll be back later I'm sure. ![]()
When writing a php script into phplugins, comparison operators are giving me fits. I have tried escaping them to no avail. As an example, if I write something such as -
<?php if ($pageNum_Names_Pics > 0) { ?>
comparing to see if $pageNum_Names_Pics is greater than zero
the "greater than" comparison closes the "<?php" bracket before getting to the "{ ?>" portion of the evaluation. Escaping the "greater than" comparison as "\>" does not work either.
Need some help on making comparisons with php within phplugins..........
Rod, it does appear that updates are being made. I added a photo and later deleted that photo as a test, and it went as expected. Only problem appears to be that error dialog each time.
Rod I'm getting the same error also, and I DO NOT have CRG. My setup is a basic site from Pages with additions from Stage. Not using Cart on this site although I do have that installed.
Is there any way to apply formatting such as carriage returns and such for an image caption?
Need some help on this -
I understand that you can target SPECIFIC pages created by CE4 PAGES with something like this -
if (G_STYLE == 'CE4-PAGES-HOME') {
Is there a similar way to target SPECIFIC pages created with CE4 STAGE?
I think you're probably right Rod - the error is being reported from my MySQL database system - it's registering that autoindex is sending a query that doesn't match up with data in my system.
I don't see any new or altered database entries or tables on my server. Does Publisher use MySQL or a different system? Whatever system it is, data must be stored in encrypted files/folders within ttg-be (guess).
Okay, thanks Rod.
I'll revisit this thing after a bit. I guess the delimiting issue with using phplugins is just really giving me fits. I definitely want to get it figured out - for exactly the reasons you mention. Think I'll start back with moving the stylesheets via plugins and just take it a step at a time.
Okay - could not get anything to work using phplugins, but since this will not be a normal gallery and is hidden from autoindex, I tried modifying the index folder directly. I published a CE4 Stage gallery as a stand-alone named "MISSING".
To connect with the database, I placed my code directly after this part of index.php - http://65kahoks.com/MISSING/
if (function_exists('ttg_user_load')) {
$void = ttg_user_load( TTG_COMP, TTG_ROOT );
}
?>
<?php
ob_start();
require_once ('../../includes/config.inc.php');
require_once (MYSQL1);
$q = "SELECT DISTINCT classmates.lastName, classmates.firstName, classmates.middleName, classmates.marriedName, classmates.missing, classmates.deceased, class_pic_small.pic_loc AS small_pic, class_pic_large.pic_loc, activities.activity FROM ((classmates INNER JOIN class_pic_small ON classmates.id = class_pic_small.classmates_id) INNER JOIN class_pic_large ON classmates.id = class_pic_large.classmates_id) INNER JOIN activities ON classmates.id = activities.classmates_id WHERE classmates.missing=1 ORDER BY classmates.lastName, classmates.firstName, classmates.middleName";
$r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc));
$row_rs_Missing = mysqli_fetch_assoc($r);
$totalRows_rs_Missing = mysqli_num_rows($r);
?>
That makes a good connection to my database, which is still located above the public_html folder on my server, and is thus outside of hacker's reach for security purposes.
I also added a couple of links to CSS stylesheets immediately before the <!DOCTYPE html> declaration. I had to rework the CSS to more closely resemble the ttg format.
To display the data I added the following code in the <div id="primary-content" class="grid_12 collapse clearfix"> area -
<p style="text-align: center;">We do not have current contact information on these classmates. If you know where or how we can contact them, please <a href="mailto:glen_england@65kahoks.com">email</a> us.</p>
<?php do { ?>
<div class="figure">
<div class="photo">
<a href="<?php echo $row_rs_Missing['pic_loc']; ?>" rel="lightbox[missing]" title="<?php echo $row_rs_Missing['firstName']; ?> <?php echo $row_rs_Missing['middleName']; ?> <?php echo $row_rs_Missing['lastName']; ?> <?php echo $row_rs_Missing['marriedName']; ?>"><img src="<?php echo $row_rs_Missing['small_pic']; ?>" width="105" height="145" /></a>
</div>
<!-- /photo -->
<p><?php echo $row_rs_Missing['firstName']; ?> <?php echo $row_rs_Missing['middleName']; ?> <?php echo $row_rs_Missing['lastName']; ?> <?php echo $row_rs_Missing['marriedName']; ?></p>
</div>
<!-- /figure -->
<?php } while ($row_rs_Missing = mysqli_fetch_assoc($r)); ?>
This successfully prints the images and title tags. Not sure yet how well it will translate to a tablet or phone...........
Sorry - forgot to. http://65kahoks.com/galleries/
Evidently, when I open a connection to my database, the server is detecting that autoindex.php is attempting to send a query also? Just guessing here, but the error message is originating from my database connect script and referring to the autoindex script as the location of the error.
I can't see where it''s causing an actual issue - but I don't know the inner workings of the autoindex.
The site is still in development, so the home page currently is 65kahoks.com/index1.php
Thanks Rod.
When I access the galleries I receive emails concerning an error in autoindex.php at line 129. Here is one of the error messages, the others are essentially identical.
<p>An error occurred in script
'/home1/sixfivka/public_html/lib/autoindex/autoindex.php' on line 129: Undefined
index: value
<br />Date/Time: 5-31-2015 19:48:43
<br /><pre>Array
(
[_dir] => /home1/sixfivka/public_html/galleries/freshman-1961-1962
[_fpath] => /home1/sixfivka/public_html/galleries/
[data] => <?xml version="1.0" encoding="UTF-8"?>
<album>
<access>unlocked</access>
<thumbnail>custom-thumbnails/Freshman.jpg</thumbnail>
<title>Freshman - 1961-1962</title>
<description>Our Freshman Year - Photos from the Kahokian
Yearbook</description>
<url></url>
</album>
[parser] => Resource id #8
[vals] => Array
(
[0] => Array
(
[tag] => ALBUM
[type] => open
[level] => 1
)
[1] => Array
(
[tag] => ACCESS
[type] => complete
[level] => 2
[value] => unlocked
)
[2] => Array
(
[tag] => THUMBNAIL
[type] => complete
[level] => 2
[value] => custom-thumbnails/Freshman.jpg
)
[3] => Array
(
[tag] => TITLE
[type] => complete
[level] => 2
[value] => Freshman - 1961-1962
)
[4] => Array
(
[tag] => DESCRIPTION
[type] => complete
[level] => 2
[value] => Our Freshman Year - Photos from the Kahokian
Yearbook
)
[5] => Array
(
[tag] => URL
[type] => complete
[level] => 2
)
[6] => Array
(
[tag] => ALBUM
[type] => close
[level] => 1
)
)
[_xml] => Array
(
[access] => unlocked
[thumbnail] => custom-thumbnails/Freshman.jpg
[title] => Freshman - 1961-1962
[description] => Our Freshman Year - Photos from the Kahokian
Yearbook
)
[ i ] => 5
)
</pre>
</p>
Yes, the includes folder is above my visible web domain to secure the connection details. (in a level above public_html)
The code for writing to the page is below - but I'm getting no connection to the database evidently, and receiving some weird results on screen. Using the ttg_canvas_top hook was the only way I could get anything to appear on screen.
function ttg_canvas_top( $style, $path ) {
if (G_PATH == 'MISSING') {
echo '
<p align="center">This page will display the missing Class of 1965 members. Press the close button above when you are finished. Click on a photo to view a larger image.</p>
<?php do { ?>
<div class="figure">
<div class="photo">
<a href="<?php echo $row_Names_Pics['pic_loc']; ?>" rel="lightbox[blum]" title="<?php echo $row_Names_Pics['firstName']; ?> <?php echo $row_Names_Pics['middleName']; ?> <?php echo $row_Names_Pics['lastName']; ?> <?php echo $row_Names_Pics['marriedName']; ?> <br />
<?php echo $row_Names_Pics['activity']; ?>"><img src="<?php echo $row_Names_Pics['small_pic']; ?>"></a> </div>
<p><?php echo $row_Names_Pics['firstName']; ?> <?php echo $row_Names_Pics['middleName']; ?> <?php echo $row_Names_Pics['lastName']; ?></p>
</div>
<?php } while ($row_Names_Pics = mysqli_fetch_assoc($Names_Pics)); ?>
<div class="clear"> </div>
';
return false;
} // END
This works in an older website that is at http://65kahoks.com/missing.php - and I've tried to escape all the problem areas when applying it to phplugins - but not getting very far. This is the code to connect to the database and retrieve the data for the page - -
function ttg_head_end ( $style, $path ) {
if (G_PATH == 'MISSING') {
echo '
<?php require_once (../\'includes/config.inc.php\');
require_once (MYSQL);
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "\'" . doubleval($theValue) . "\'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_Names_Pics = 20;
$pageNum_Names_Pics = 0;
if (isset($_GET[\'pageNum_Names_Pics\'])) {
$pageNum_Names_Pics = $_GET[\'pageNum_Names_Pics\'];
}
$startRow_Names_Pics = $pageNum_Names_Pics * $maxRows_Names_Pics;
$q = "SELECT DISTINCT classmates.lastName, classmates.firstName, classmates.middleName, classmates.marriedName, class_pic_small.pic_loc AS small_pic, class_pic_large.pic_loc, activities.activity FROM ((classmates INNER JOIN class_pic_small ON classmates.id = class_pic_small.classmates_id) INNER JOIN class_pic_large ON classmates.id = class_pic_large.classmates_id) INNER JOIN activities ON classmates.id = activities.classmates_id ORDER BY classmates.lastName, classmates.firstName, classmates.middleName";
$query_limit_Names_Pics = sprintf("%s LIMIT %d, %d", $q, $startRow_Names_Pics, $maxRows_Names_Pics);
$Names_Pics = mysqli_query($dbc, $query_limit_Names_Pics) or die(mysqli_error());
$row_Names_Pics = mysqli_fetch_assoc($Names_Pics);
if (isset($_GET[\'totalRows_Names_Pics\'])) {
$totalRows_Names_Pics = $_GET[\'totalRows_Names_Pics\'];
} else {
$all_Names_Pics = mysqli_query($dbc, $q);
$totalRows_Names_Pics = mysqli_num_rows($all_Names_Pics);
}
$totalPages_Names_Pics = ceil($totalRows_Names_Pics/$maxRows_Names_Pics)-1;
$queryString_Names_Pics = "";
if (!empty($_SERVER[\'QUERY_STRING\'])) {
$params = explode("&", $_SERVER[\'QUERY_STRING\']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Names_Pics") == false &&
stristr($param, "totalRows_Names_Pics") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Names_Pics = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Names_Pics = sprintf("&totalRows_Names_Pics=%d%s", $totalRows_Names_Pics, $queryString_Names_Pics);
?>
';
return false;
} // END
Additional note - I'm attempting this with a TTG Stage page that is , except for header, navigation, and footer, a blank page with the block active and the grid disabled.
Is there a way to use phplugins to connect to an existing online database and dynamically populate a gallery with images from the database? I've been struggling with using the ttg_user_load hook to connect the database, and then the ttg_grid_top hook to populate the gallery, but am having no luck with it.