当前位置: 首页>>代码示例>>PHP>>正文


PHP plog_tr函数代码示例

本文整理汇总了PHP中plog_tr函数的典型用法代码示例。如果您正苦于以下问题:PHP plog_tr函数的具体用法?PHP plog_tr怎么用?PHP plog_tr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了plog_tr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: plogger_stats_count_total_comments

function plogger_stats_count_total_comments()
{
    $query = "SELECT COUNT(*) AS \"n\" FROM \"" . PLOGGER_TABLE_PREFIX . "comments\" WHERE approved = 1";
    $result = run_query($query);
    $num_comments = $result->fetch()['n'];
    echo $num_comments . ' ';
    echo $num_comments == 1 ? plog_tr('comment') : plog_tr('comments');
}
开发者ID:BogusCurry,项目名称:plogger-pdo,代码行数:8,代码来源:theme_functions.php

示例2: plogger_stats_count_total_comments

function plogger_stats_count_total_comments()
{
    $query = "SELECT COUNT(*) AS `n` FROM `" . PLOGGER_TABLE_PREFIX . "comments` WHERE approved = 1";
    $result = run_query($query);
    $num_comments = mysqli_result($result, 0, 'n');
    echo $num_comments . ' ';
    echo $num_comments == 1 ? plog_tr('comment') : plog_tr('comments');
}
开发者ID:nadams810,项目名称:ploto,代码行数:8,代码来源:theme_functions.php

示例3: generate_pagination_view_menu

function generate_pagination_view_menu()
{
    $java = 'document.location.href = \'' . $_SERVER["PHP_SELF"] . '?' . '&entries_per_page=\'+this.options[this.selectedIndex].value';
    $possible_values = array("5" => 5, "10" => 10, "20" => 20, "50" => 50);
    $output = plog_tr('Entries per page') . ' <select onchange="' . $java . '" name="entries_per_page">';
    foreach ($possible_values as $key => $value) {
        if ($_SESSION['entries_per_page'] == $key) {
            $output .= "<option value=\"{$value}\" selected='selected'>{$key}</option>";
        } else {
            $output .= "<option value=\"{$value}\">{$key}</option>";
        }
    }
    $output .= '</select>';
    return $output;
}
开发者ID:alanhaggai,项目名称:plogger,代码行数:15,代码来源:plog-feedback.php

示例4: generate_breadcrumb_admin

function generate_breadcrumb_admin($level, $id = 0)
{
    switch ($level) {
        case 'collections':
            $breadcrumbs = '<strong>' . plog_tr('Collections') . '</strong>';
            break;
        case 'albums':
            $collection = get_collection_by_id($id);
            $collection_name = SmartStripSlashes($collection['name']);
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; <strong>' . $collection_name . '</strong>';
            break;
        case 'pictures':
            $album = get_album_by_id($id);
            $album_link = SmartStripSlashes($album['name']);
            $collection_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=albums&amp;id=' . $album['parent_id'] . '">' . SmartStripSlashes($album['collection_name']) . '</a>';
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<strong>' . $album_link . '</strong>';
            break;
        case 'comments':
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "pictures` WHERE `id`='" . $id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $picture_link = '<strong>' . SmartStripSlashes(basename($row['path'])) . '</strong>';
            $album_id = $row['parent_album'];
            $collection_id = $row['parent_collection'];
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "albums` WHERE `id`='" . $album_id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $album_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=pictures&amp;id=' . $album_id . '">' . SmartStripSlashes($row['name']) . '</a>';
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "collections` WHERE `id`='" . $collection_id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $collection_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=albums&amp;id=' . $collection_id . '">' . SmartStripSlashes($row['name']) . '</a>';
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . $album_link . ' &raquo; ' . $picture_link . ' - ' . '<strong>' . plog_tr('Comments') . ':</strong>';
            break;
        default:
            $breadcrumbs = '<strong>' . plog_tr('Collections') . '</strong>';
    }
    return "\n\t\t" . '<div id="breadcrumb_links">' . $breadcrumbs . '</div>';
}
开发者ID:joshuasiler,项目名称:Rebuilding-Together,代码行数:39,代码来源:plog-manage.php

示例5: plog_tr

				<input accesskey="b" onclick="var k=document.getElementsByName(\'new_album_name\');k[0].focus()" type="radio" name="destination_radio" value="new" ' . $new_album . ' style="margin-bottom: -1px;" />
				<label for="destination_radio" class="strong" style="display: inline;">' . plog_tr('Create a New Al<em>b</em>um') . '</label>
				<label for="new_album_name">' . plog_tr('New Album Name:') . '</label>
				<input type="text" name="new_album_name" id="new_album_name" value="' . ucfirst($new_album_name) . '" onclick="var k=document.getElementsByName(\'destination_radio\');k[1].checked=true;" />
				<label for="collections_menu">' . plog_tr('In collection:') . '</label>
				' . generate_collections_menu() . '
			</p>

			<p class="no-margin-bottom"><input class="submit" type="submit" name="upload" value="' . plog_tr('Import') . '" /></p>
		</div><!-- /import -->';
            $output .= "\n\t</form>";
            if (!isset($_GET['nojs'])) {
                $key_arr = join(",\n\t\t\t", $keys);
                $output .= "\n\n\t" . '<script type="text/javascript">';
                $output .= "\n\t\t" . 'var importThumbs=[' . "\n\t\t\t";
                $output .= $key_arr;
                $output .= "\n\t\t" . '];';
                $output .= "\n\t\t" . 'requestImportThumb();' . "\n\t</script>\n";
            }
        }
    }
}
$output_error = "\n\t" . '<h1>' . plog_tr('Import') . '</h1>

	<p class="actions width-700">' . sprintf(plog_tr('Before you can begin importing images to your gallery, you must create at least <strong>one collection</strong> AND <strong>one album</strong> within that collection. Move over to the <a title="Manage" style="font-weight: bold;" href="%s">Manage</a> tab to begin creating your organizational structure'), 'plog-manage.php') . '</p>';
$num_albums = count_albums();
if ($num_albums > 0) {
    display($output, 'import');
} else {
    display($output_error, 'import');
}
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:plog-import.php

示例6: plogger_get_thumbnail_nav

            ?>
		<div class="clearfix">
<?php 
            echo plogger_get_thumbnail_nav();
            ?>
		</div><!-- /clearfix -->
<?php 
        }
        ?>

<?php 
        echo plogger_display_comments();
    }
} else {
    ?>
		<div id="no-pictures-msg">
			<h2><?php 
    echo plog_tr('Not Found');
    ?>
</h2>
			<p><?php 
    echo plog_tr('Sorry, but the image that you requested does not exist.');
    ?>
</p>
		</div><!-- /no-pictures-msg -->
	<?php 
}
?>
	</div><!-- /big-picture-container -->
<?php 
plogger_get_footer();
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:picture.php

示例7: plogger_download_checkbox

        ?>
 <?php 
        echo plogger_download_checkbox(plogger_get_picture_id());
        ?>
</span>
					</div><!-- /tag -->
				</li><!-- /thumbnail -->
<?php 
    }
    ?>
			</ul><!-- /slides -->
<?php 
} else {
    ?>
			<div id="no-pictures-msg">
				<h2><?php 
    echo plog_tr('Search Results');
    ?>
</h2>
				<p><?php 
    echo plog_tr('Sorry, but there are no images that matched your search terms.');
    ?>
</p>
			</div><!-- /no-pictures-msg -->
<?php 
}
?>
		</div><!-- /thumbnail-container -->

<?php 
plogger_get_footer();
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:search.php

示例8: plogger_get_album_description

</span>
				<p class="description"><?php 
        echo plogger_get_album_description();
        ?>
</p>
			</div><!-- /collection -->
<?php 
    }
    ?>
		</div><!-- /collections -->

<?php 
} else {
    ?>
		<div id="no-pictures-msg">
			<h2><?php 
    echo plog_tr('No Albums');
    ?>
</h2>
			<p><?php 
    echo plog_tr('Sorry, but there are no images or albums in this collection yet.');
    ?>
</p>
		</div><!-- /no-pictures-msg -->

<?php 
}
?>
	</div><!-- /thumbnail-container clearfix -->
<?php 
plogger_get_footer();
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:collection.php

示例9: substr

if ($is_admin !== false) {
    $config['baseurl'] = substr($config['baseurl'], 0, $is_admin);
}
$config['theme_url'] = $config['gallery_url'] . 'plog-content/themes/' . basename($config['theme_dir']) . '/';
$config['charset'] = 'utf-8';
$config['version'] = 'VERSION: 1.0-PDO';
// Charset set with HTTP headers has higher priority than that set in HTML head section
// Since some servers set their own charset for PHP files, this should take care of it
// and hopefully doesn't break anything
if (!headers_sent()) {
    header('Content-Type: text/html; charset=' . $config['charset']);
}
$query = "SELECT * FROM \"" . PLOGGER_TABLE_PREFIX . "thumbnail_config\"";
$result = run_query($query);
if ($result->rowCount() == 0) {
    die(plog_tr('No thumbnail config information in the database.'));
}
$prefix_arr = array(1 => 'small', 2 => 'large', 3 => 'rss', 4 => 'thumbnav');
while ($row = $result->fetch()) {
    $thumbnail_config[$row['id']] = array('type' => $prefix_arr[$row['id']], 'size' => $row['max_size'], 'timestamp' => $row['update_timestamp'], 'disabled' => $row['disabled'], 'resize_option' => $row['resize_option']);
}
// Add the new theme preview thumbnail array
$thumbnail_config[5] = array('type' => 'theme', 'size' => 150, 'timestamp' => 0, 'disabled' => 0, 'resize_option' => 3);
// Debugging functions
function display_uservariables()
{
    foreach ($config as $keys => $values) {
        echo "{$keys} = {$values}<br />";
    }
}
function trace($output, $echo = true)
开发者ID:BogusCurry,项目名称:plogger-pdo,代码行数:31,代码来源:plog-load-config.php

示例10: formatFujifilmData

function formatFujifilmData($type, $tag, $intel, $data)
{
    if ($type == "ASCII") {
    } else {
        if ($type == "URATIONAL" || $type == "SRATIONAL") {
            $data = bin2hex($data);
            if ($intel == 1) {
                $data = intel2Moto($data);
            }
            $top = hexdec(substr($data, 8, 8));
            $bottom = hexdec(substr($data, 0, 8));
            if ($bottom != 0) {
                $data = $top / $bottom;
            } else {
                if ($top == 0) {
                    $data = 0;
                } else {
                    $data = $top . "/" . $bottom;
                }
            }
            if ($tag == "1011") {
                //FlashStrength
                $data = $data . " EV";
            }
        } else {
            if ($type == "USHORT" || $type == "SSHORT" || $type == "ULONG" || $type == "SLONG" || $type == "FLOAT" || $type == "DOUBLE") {
                $data = bin2hex($data);
                if ($intel == 1) {
                    $data = intel2Moto($data);
                }
                $data = hexdec($data);
                if ($tag == "1001") {
                    //Sharpness
                    if ($data == 1) {
                        $data = plog_tr("Soft");
                    } else {
                        if ($data == 2) {
                            $data = plog_tr("Soft");
                        } else {
                            if ($data == 3) {
                                $data = plog_tr("Normal");
                            } else {
                                if ($data == 4) {
                                    $data = plog_tr("Hard");
                                } else {
                                    if ($data == 5) {
                                        $data = plog_tr("Hard");
                                    } else {
                                        $data = plog_tr("Unknown") . ": " . $data;
                                    }
                                }
                            }
                        }
                    }
                }
                if ($tag == "1002") {
                    //White Balance
                    if ($data == 0) {
                        $data = plog_tr("Auto");
                    } else {
                        if ($data == 256) {
                            $data = plog_tr("Daylight");
                        } else {
                            if ($data == 512) {
                                $data = plog_tr("Cloudy");
                            } else {
                                if ($data == 768) {
                                    $data = plog_tr("DaylightColor-fluorescence");
                                } else {
                                    if ($data == 769) {
                                        $data = plog_tr("DaywhiteColor-fluorescence");
                                    } else {
                                        if ($data == 770) {
                                            $data = plog_tr("White-fluorescence");
                                        } else {
                                            if ($data == 1024) {
                                                $data = plog_tr("Incandescense");
                                            } else {
                                                if ($data == 3840) {
                                                    $data = plog_tr("Custom");
                                                } else {
                                                    $data = plog_tr("Unknown") . ": " . $data;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                if ($tag == "1003") {
                    //Color
                    if ($data == 0) {
                        $data = plog_tr("Chroma Saturation Normal(STD)");
                    } else {
                        if ($data == 256) {
                            $data = plog_tr("Chroma Saturation High");
                        } else {
                            if ($data == 512) {
//.........这里部分代码省略.........
开发者ID:nadams810,项目名称:ploto,代码行数:101,代码来源:fujifilm.php

示例11: plogger_get_header

<?php

plogger_get_header();
?>

		<div id="thumbnail-container">

			<div id="error-404">
				<h2><?php 
echo plog_tr('404 - Not Found');
?>
</h2>
				<p><?php 
echo plog_tr('We are sorry, but the page that you are looking for does not exist. You might try using the <strong>Search</strong> feature to locate the image or album you are looking for.');
?>
</p>
			</div><!-- /error-404 -->

		</div><!-- /thumbnail-container -->

<?php 
plogger_get_footer();
开发者ID:nadams810,项目名称:ploto,代码行数:22,代码来源:404.php

示例12: plog_tr

                echo plog_tr('There was an error with the MySQL connection') . '!';
            }
            // If no errors, tell the user their login and password and link them to the login
            if (empty($errors)) {
                echo "\n\t" . '<h1>' . plog_tr('Plogger Install Complete') . '</h1>';
                echo "\n\n\t" . '<p class="info width-700">' . plog_tr('You have successfully installed Plogger!') . '<br /><br />';
                echo "\n\t" . sprintf(plog_tr('Your username is %s and your password is %s'), '<strong>' . $_SESSION['install_values']['admin_username'] . '</strong>', '<strong>' . $_SESSION['install_values']['admin_password'] . '</strong>');
                echo '</p>';
                if (is_open_perms(PLOGGER_DIR . 'plog-content/')) {
                    echo "\n\n\t" . '<p class="actions width-700">' . sprintf(plog_tr('You can now CHMOD the %s directory back to 0755'), '<strong>plog-content/</strong>') . '.</p>';
                }
                echo "\n\n\t" . '<form action="index.php?r=plog-options.php" method="post">';
                echo "\n\t\t" . '<p><input class="submit" type="submit" name="login" value="' . plog_tr('Log In') . '" /></p>';
                echo "\n\t" . '</form>' . "\n";
                unset($_SESSION['plogger_config']);
                unset($_SESSION['install_values']);
            } else {
                // Else display the errors
            }
        }
    }
} else {
    // Otherwise it's installed
    echo '<p>' . plog_tr('Plogger is already installed') . '.</p>';
}
close_db();
close_ftp();
?>

</body>
</html>
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:_install.php

示例13: plog_tr

				<!--
				if (document.images) {
					slides.set_image(document.images.slideshow_image);
					slides.textid = "picture_caption"; // optional
					slides.imagenameid = "image_name"; // optional
					slides.update();
					slides.play();
				}
				//-->
			</script>

<?php 
} else {
    ?>
			<div id="no-pictures-msg">
				<h2><?php 
    echo plog_tr('No Images');
    ?>
</h2>
				<p><?php 
    echo plog_tr('Sorry, but there are no images in this album to create a slideshow with.');
    ?>
</p>
			</div><!-- /no-pictures-msg -->
<?php 
}
?>

		</div><!-- /thumbnail-container -->
<?php 
plogger_get_footer();
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:slideshow.php

示例14: cleanup_files

function cleanup_files($files, $folders)
{
    global $config;
    $output = array();
    $errors = array();
    // Delete the files first
    foreach ($files as $file) {
        if (file_exists($file)) {
            if (kill_file($file)) {
                $output[] = plog_tr('Plogger found and deleted the file') . ': ' . $file;
            } else {
                $errors[] = plog_tr('Plogger could not delete the file') . ': ' . $file;
            }
        }
    }
    // Remove the folders since there should be no files in them
    foreach ($folders as $folder) {
        if (file_exists($folder)) {
            if (kill_dir($folder)) {
                $output[] = plog_tr('Plogger found and deleted the folder') . ': ' . $folder;
            } else {
                $errors[] = plog_tr('Plogger could not delete the folder') . ': ' . $folder;
            }
        }
    }
    return array('errors' => $errors, 'output' => $output);
}
开发者ID:joshuasiler,项目名称:Rebuilding-Together,代码行数:27,代码来源:install-functions.php

示例15: plog_tr

    // Display gallery stats only if at collection level
    ?>
	<div id="stats"><?php 
    echo plog_tr('This gallery contains');
    ?>
 <?php 
    echo plogger_stats_count_total_collections();
    ?>
, <?php 
    echo plogger_stats_count_total_albums();
    ?>
, <?php 
    echo plogger_stats_count_total_pictures();
    ?>
, <?php 
    echo plog_tr('and');
    ?>
 <?php 
    echo plogger_stats_count_total_comments();
    ?>
.</div>

<?php 
}
?>
	<div id="link-back"><?php 
echo plogger_link_back();
?>
</div>

</div><!-- /plog-wrapper -->
开发者ID:nadams810,项目名称:ploto,代码行数:31,代码来源:footer.php


注:本文中的plog_tr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。