4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Chris on March 11, 2005, 03:20:04 PM
-
This mod outputs a dynamic (ever changing) page title for your web pages. Essentially this adds the clickstream to your page title but without the added HTML markup.
If your site name is defined as "Smith Family Pictures" and you were viewing a details.php page for an image named "Old Bridge" in a subcategory named "Road Trip" which was a subcategory of a top-level "2005 Events" category and your admin control panel setting for "Category delimiter (in category paths)" was defined as "/", your page title would look like this: Smith Family Pictures /2005 Events/Road Trip/Old Bridge
As with any mod, ALWAYS save backup copies of any file you might edit so you can go back to a clean, working version if you encounter any problems.
Open includes/functions.php, locate:
function get_category_path($cat_id = 0, $detail_path = 0) {
global $site_sess, $config, $cat_cache, $url;
$parent_id = 1;
while ($parent_id) {
if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
return false;
}
$parent_id = $cat_cache[$cat_id]['cat_parent_id'];
if (empty($path)) {
if ($detail_path) {
$cat_url = ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id;
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
}
$path = "<a href=\"".$site_sess->url($cat_url)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>";
}
else {
$path = $cat_cache[$cat_id]['cat_name'];
}
}
else {
$path = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"clickstream\">".$cat_cache[$cat_id]['cat_name']."</a>".$config['category_separator'].$path;
}
$cat_id = $parent_id;
} // end while
return $path;
}
Add after:
function get_category_path_nohtml($cat_id = 0) { // MOD: Dynamic page title
global $config, $cat_cache;
$parent_id = 1;
while ($parent_id) {
if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
return false;
}
$parent_id = $cat_cache[$cat_id]['cat_parent_id'];
if (empty($path)) {
$path = $cat_cache[$cat_id]['cat_name'];
}
else {
$path = $cat_cache[$cat_id]['cat_name'].$config['category_separator'].$path;
}
$cat_id = $parent_id;
} // end while
return $path;
}
Open categories.php, locate:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id)."</span>";
Add after:
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id); // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
Change to:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title
));
Open details.php, locate:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
Add after:
$page_title = $config['category_separator'].$lang['home'].$config['category_separator']; // MOD: Dynamic page title
Locate:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
Add after:
$page_title = $config['category_separator'].$lang['lightbox'].$config['category_separator']; // MOD: Dynamic page title
Locate:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
Add after:
$page_title = $config['category_separator'].$lang['search'].$config['category_separator']; // MOD: Dynamic page title
Locate:
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
Add after:
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
Locate:
$clickstream .= $image_name."</span>";
Add after:
$page_title .= $image_name; // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE to:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open index.php, locate:
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
Add after:
$page_title = $config['category_separator'].str_replace("_", " ", ucfirst($template)); // MOD: Dynamic page title
Locate:
$site_template->register_vars("clickstream", $clickstream);
CHANGE to:
$site_template->register_vars(array(
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title
));
On the next line down, locate:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
}
CHANGE this to:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
} else { // MOD: Dynamic page title
$page_title = $config['category_separator'].$lang['home'];
$site_template->register_vars("page_title", $page_title);
}
Locate:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
CHANGE this to:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title
));
Open lightbox.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['lightbox']."</span>";
Add after:
$page_title = $config['category_separator'].$lang['lightbox']; // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open member.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
Add after:
$page_title = $config['category_separator'].$txt_clickstream; // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open register.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['register']."</span>";
Add after:
$page_title = $config['category_separator'].$lang['register']; // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open search.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>";
CHANGE this to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
// $clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>"; // Original code
// MOD: Dynamic page title BLOCK BEGIN
if (!empty($search_id['search_new_images'])) {
if( $search_id['search_new_images'] == 1 )
$txt_clickstream = $lang['new_images'];
else
$txt_clickstream = $lang['new_images_since'];
}
else {
$txt_clickstream = $lang['search'];
}
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].(($search_keywords) ? "<a href=\"".$site_sess->url(ROOT_PATH."search.php")."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'].$search_keywords : $txt_clickstream)."</span>"; // Show search keywords
$page_title = $config['category_separator'].$txt_clickstream;
// MOD: Dynamic page title BLOCK END
Locate:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open top.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$clickstream .= $lang['top_images']."</span>";
CHANGE this to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$page_title = $config['category_separator']; // MOD: Dynamic page title
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title .= get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
}
$clickstream .= $lang['top_images']."</span>";
$page_title .= $lang['top_images']; // MOD: Dynamic page title
Locate:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title
Open templates/default/header.html, locate:
<title>{site_name}</title>
CHANGE this to:
<title>{site_name} {page_title}</title>
IF you are using version 1.7, you are finished STOP HERE
IF you are using version 1.7.1 which has a new template processing engine, you will also need to do the following steps:
Open includes/functions.php, locate:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
$site_template->print_template($site_template->parse_template("error"));
exit;
}
Change this to:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
// MOD: Dynamic page title BLOCK BEGIN
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
// MOD: Dynamic page title BLOCK END
$site_template->print_template($site_template->parse_template("error"));
exit;
}
Open includes/page_header.php, locate:
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
We need to move this logic to each of the top-level php files, so comment out this code by replacing it with:
/********** ORIGINAL
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
**********/
Open categories.php, details.php, index.php, lightbox.php, member.php, postcards.php, register.php, search.php, top.php and locate this line:
$site_template->print_template($site_template->parse_template($main_template));
On a new line ABOVE that line, paste this
// MOD: Dynamic page title BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title BLOCK END
NOTE: There are TWO places inside index.php this needs to be done. All the other PHP files listed above have only ONE.
Revision History:
* Bug fix in includes/functions.php show_error_page() for version 1.7.1
* Added support for version 1.7.1. I do not like the solution as it is a hack but it works.
* Corrected a typo in the edit needed for categories.php
-
Hi,
Great mod, I badly need this. But I need it the other way around, like this:
Old Bridge / Road Trip / 2005 Events / Smith Family Pictures
-Because you see, this way the individual page is going to be ranked higher in search engines, and isn't that what we all want? :D
Thanks, keep me/us posted!!!
-
This was SO already covered before the hacker attack... :roll:
Try using MSN or Yahoo to search the 4homepages.de site for "Dynamic Page Title for v1.7 & v1.7.1". You will find the answer in the search engine's cached pages. I just don't have time to do it right now.
-
@ Chris,
could it be, that you forgot something??
because in the second describtion (of your posting) for Version 1.7.1 you told us, to edit ..., postcards.php, ... but this file we don´t change in the first part??? but all others?? is this correct??
sorry for my bad english, i hope you understood my problem?
cu Tusnelda
-
If you are using 1.7.1 you must follow ALL instructions in BOTH parts
-
If you are using 1.7.1 you must follow ALL instructions in BOTH parts
That´s logical!! but in the first part you don´t make any change in the postcards.php for example at the clickstream, ... and my question now is, is this correct??? because when i will made a postcard i don´t have the "clickstream" in the title!!! as i have in the other pages?!!
cu Tusnelda
-
actualy I think in either of versions u'll get title in postcard.php ;)
but if u look closely on the changes in other files, its not that difficult to figure out what should be done to postcards.php ;)
-
@ Vano :wink:
yes thanks i´ve done this changes and now it works very fine!! Thank you!!
But i have a nother Question to the Page Title,
my counter uses his own page title an now i would give the code from this mod to the counter.
But when i include it which is in the install.txt it doesn´t work?! ***Help***
This is the code:
Include in page_header.php this code:
ob_start();
$chCounter_visible = 0;
$chCounter_status = 'active';
$chCounter_page_title = $page_title;
include( 'path to counter/counter.php' );
$chCounter = ob_get_contents();
ob_end_clean();
I change the page title from PictureGallery to $page_title but it didn´t work.
Did anybody have an idea which i could solve this problem?
Big Thanks Tusnelda
-
$page_title variable is being set at the end of each file, page_header.php being included at the beginning...so, your best bet is enter that code in every "main" .php file :?
-
i so this mod before in the help fourm i think by Jan but let me tel you this chris :D
you are bring the life agian in 4images mod by your work
you can review jan add by searching for clickstream2
-
I know its a minor thing but it is probably better for search engines if titles are formatted like this;
Page Title - Site Name
instead of what this mod currently does
Site Name - Page Title
with images, the image title should appear first, then the category, then the site name, so it is easier for searchers to browse through, and search engines identify a search string at the start of the title, rather than at the end.
-bents
-
I've already done the mod, so i'll write a mod-mod for you. Below is a modification of the "Dynamic Page Title for v1.7 & v1.7.1 modification of 4images". Good luck modding!
Open categories.php, locate:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id)."</span>";
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id); // MOD: Dynamic page title
change to:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id)."</span>";
$page_title = get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
Open details.php, locate:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$page_title = $config['category_separator'].$lang['home'].$config['category_separator']; // MOD: Dynamic page title
change to:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$page_title = $lang['home'].$config['category_separator']; // MOD: Dynamic page title
locate:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
$page_title = $config['category_separator'].$lang['lightbox'].$config['category_separator']; // MOD: Dynamic page title
change to:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
$page_title = $lang['lightbox'].$config['category_separator'] . $page_title; // MOD: Dynamic page title
locate:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
$page_title = $config['category_separator'].$lang['search'].$config['category_separator']; // MOD: Dynamic page title
change to:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
$page_title = $lang['search'].$config['category_separator'] . $page_title; // MOD: Dynamic page title
locate:
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
change to:
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title = get_category_path_nohtml($cat_id).$config['category_separator'] . $page_title; // MOD: Dynamic page title
locate:
$clickstream .= $image_name."</span>";
$page_title .= $image_name; // MOD: Dynamic page title
change to:
$clickstream .= $image_name."</span>";
$page_title = $image_name.$config['category_separator'] . $page_title; // MOD: Dynamic page title
Open index.php, locate:
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$page_title = $config['category_separator'].str_replace("_", " ", ucfirst($template)); // MOD: Dynamic page title
change to:
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$page_title = str_replace("_", " ", ucfirst($template)).$config['category_separator']; // MOD: Dynamic page title
locate:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
} else { // MOD: Dynamic page title
$page_title = $config['category_separator'].$lang['home'];
$site_template->register_vars("page_title", $page_title);
}
change to:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
} else { // MOD: Dynamic page title
$page_title = $lang['home'].$config['category_separator'];
$site_template->register_vars("page_title", $page_title);
}
Open lightbox.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['lightbox']."</span>";
$page_title = $config['category_separator'].$lang['lightbox']; // MOD: Dynamic page title
change to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['lightbox']."</span>";
$page_title = $lang['lightbox'].$config['category_separator']; // MOD: Dynamic page title
Open member.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$page_title = $config['category_separator'].$txt_clickstream; // MOD: Dynamic page title
change to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$page_title = $txt_clickstream.$config['category_separator']; // MOD: Dynamic page title
Open register.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['register']."</span>";
$page_title = $config['category_separator'].$lang['register']; // MOD: Dynamic page title
change to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['register']."</span>";
$page_title = $lang['register'].$config['category_separator']; // MOD: Dynamic page title
Open search.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
// $clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>"; // Original code
// MOD: Dynamic page title BLOCK BEGIN
if (!empty($search_id['search_new_images'])) {
if( $search_id['search_new_images'] == 1 )
$txt_clickstream = $lang['new_images'];
else
$txt_clickstream = $lang['new_images_since'];
}
else {
$txt_clickstream = $lang['search'];
}
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].(($search_keywords) ? "<a href=\"".$site_sess->url(ROOT_PATH."search.php")."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'].$search_keywords : $txt_clickstream)."</span>"; // Show search keywords
$page_title = $config['category_separator'].$txt_clickstream;
// MOD: Dynamic page title BLOCK END
change to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
// $clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>"; // Original code
// MOD: Dynamic page title BLOCK BEGIN
if (!empty($search_id['search_new_images'])) {
if( $search_id['search_new_images'] == 1 )
$txt_clickstream = $lang['new_images'];
else
$txt_clickstream = $lang['new_images_since'];
}
else {
$txt_clickstream = $lang['search'];
}
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].(($search_keywords) ? "<a href=\"".$site_sess->url(ROOT_PATH."search.php")."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'].$search_keywords : $txt_clickstream)."</span>"; // Show search keywords
$page_title = $txt_clickstream.$config['category_separator'];
// MOD: Dynamic page title BLOCK END
Open top.php, locate:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$page_title = $config['category_separator']; // MOD: Dynamic page title
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title .= get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
}
$clickstream .= $lang['top_images']."</span>";
$page_title .= $lang['top_images']; // MOD: Dynamic page title
change to:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title = get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
}
$clickstream .= $lang['top_images']."</span>";
$page_title .= $lang['top_images']; // MOD: Dynamic page title
$page_title .= $config['category_separator']; // MOD: Dynamic page title
Open templates/default/header.html, locate:
<title>{site_name} {page_title}</title>
change to:
<title>{page_title} {site_name}</title>
This should work, good luck!!!
-bents
-
NOTE: By placing the parsing of the header and footer to the very end of every file, the show_error_page() function does not show the header and footer data when an error occurs. The show_error_page function expects that the header and footer has been parsed before it has been called.
-bents
-
NOTE: By placing the parsing of the header and footer to the very end of every file, the show_error_page() function does not show the header and footer data when an error occurs. The show_error_page function expects that the header and footer has been parsed before it has been called.
-bents
i just saw this with the login page with a wrong password
how can we correct this?
-
u could try add
include(ROOT_PATH.'includes/page_header.php');
at the begining of the function and include(ROOT_PATH.'includes/page_footer.php');
at the end (above exit;)
-
2 Vano: this solution don't working
-
not working HOW?
-
Clickstream included in header not shown.
-
There is a lot to edit. Recheck your steps VERY carefully. You must have missed something
It's supposed to be {page_title}
anyway and not clickstream...
-
I'm understand. But clickstream and page title shown on all pages, exept error page
-
You never said anything about the error page. You said
Clickstream included in header not shown.
And there is no clickstream information for the error page. That is why there is nothing shown.
-
had no problems - thanks!
-
Chris, in functions.php you can see this function:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
$site_template->print_template($site_template->parse_template("error"));
exit;
}
I mean, what when this function is working you don't have any info in page_title and clickstream (if clickstream is placed in header.html). For default template clickstream is working well...
-
I'm still confused. What exactly do you expect to appear?
<title>{site_name} Error</title> :?:
Then change that code to:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"page_title" => $config['category_separator'].$lang['error'],
"random_image" => ""
));
$site_template->print_template($site_template->parse_template("error"));
exit;
}
-
not working HOW?
Hi Vano,
I think he means, that the error page is shown without code out of the header- and footer-template, if you try to log in with an invalid username- and password-kombination. header- and footer-template is not included, so the error page appears incomplete. this ist a result of this mod (first post in this thread), if you activate the old code at page_header.php again, the page is displayed correct again.
Any solutions?
All the best
Juergen
-
Thank you for the explanation. Now I understand what's going on. I'll update the original post with the patch that fixes this
Please test it though as I just don't have the time to do so tonight.
-
How can i display this in my title:
Now I see: / MAIN-CATEGORY / SUB-CATEGORY / PICTURE NAME
I want to see this: PICTURE NAME | SUB-CATEGORY | MAIN-CATEGORY
And I want to change the slash (/) in this |
Who can help me,
A long time ago there was a description, but then came the Forum-Crash
Thanks for your help
-
Anybody can help me?
How can i display this in my title:
Now I see: / MAIN-CATEGORY / SUB-CATEGORY / PICTURE NAME
I want to see this: PICTURE NAME | SUB-CATEGORY | MAIN-CATEGORY
And I want to change the slash "/" in this "|"
Who can help me,
A long time ago there was a description, but then came the Forum-Crash
Thanks for your help
----
Hallo wer kann mir helfen
-
No one out there, who can help me???
-
This Mod works perfect ..... great !!!
Many thanks :) :) :)
joehoe !!!!
www.avatarcorner.com
-
fotograf74
you can easily change it in the admin :
Zeichen zur Trennung der Kategorien in den Kategoriepfaden (I dont know how its called in the english admin, I think "category separator" or so.
change / to: - and thats it.
the "-" will appear in the clickstream and in the title.
dp
-
Hello
Only 2 questions regarding this mode:
1. Is possible to print on the title search string like: " keyword / search / site_title " ?
2. On 2 different sites the same happens on http://mysite.com/member.php?action=uploadform&cat_id=nn
on the title is printed
...a href="./categories.php?cat_id=nn" class="clickstream">category_title</a> / Upload Image / Site_title...
Could somebody help me?
On The rest of pages the dinamic title page works well.
Thanks.
-
bump !!! :oops:
-
Hi Chris
This Mod works perfect ... great !!! :)
Many thanks
coooool
Steffen
-
Okay that mod works, but what I have to do when I installed the guestbook http://www.4homepages.de/forum/index.php?topic=7409.0?
What must I change in the guestbook.php?
PLZ help :|
-
I have same question, I have installed the Memberlist MOD, but I get only this : Gallery name / should be Gallery name / Memberlist
-
I have installed this for ver 1.7 .. Can someone check my site and see if it is working as expected.
www.iphotovideo.com
Thanks
Binu
-
I have same question, I have installed the Memberlist MOD, but I get only this : Gallery name / should be Gallery name / Memberlist
Figured it out
in memberlist.php
find:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$clickstream .= $lang['lang_userlist_title'];
$clickstream .= $config['category_separator'].$lang['lang_userlist_page'].$page."</span>";
add after:
$page_title = $config['category_separator'].$lang['lang_userlist_title'].$config['category_separator'].$lang['lang_userlist_page'].$page; // MOD: Dynamic page title
find:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
replace:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"lang_userlist_title" => $lang['lang_userlist_title'],
find:
$site_template->print_template($site_template->parse_template($main_template));
add before:
// MOD: Dynamic page title BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title BLOCK END
-
Okay that mod works, but what I have to do when I installed the guestbook http://www.4homepages.de/forum/index.php?topic=7409.0?
What must I change in the guestbook.php?
PLZ help :|
I haven't tried that by myself (don't know if it's working), but try this!
in guestbook.php
find:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']
."<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=showcomments")."\">".$lang['guestbook']."</a>".$config['category_separator'].$txt_clickstream."</span>";
add after:
$page_title = $config['category_separator'].$lang['guestbook']; // MOD: Dynamic page title
find:
$site_template->register_vars(array(
"contents" => $contents,
"guestbook_comments" => $comments,
"lang_sign_my_guestbook" => $lang['sign_my_guestbook'],
"msg" => $msg,
"clickstream" => $clickstream
));
replace:
$site_template->register_vars(array(
"contents" => $contents,
"guestbook_comments" => $comments,
"lang_sign_my_guestbook" => $lang['sign_my_guestbook'],
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title
));
find:
$site_template->print_template($site_template->parse_template($main_template));
add before:
// MOD: Dynamic page title BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title BLOCK END
-
Yeah this works fine!
THANKS! THANKS! THANKS! THANKS! THANKS! THANKS! THANKS! THANKS! THANKS!
-
Sorry but something is wrong :?
I made changes by bentleykf and now it should be e.g.
Picture Name / Sub-Category / Main-Category / HP-Title but it is
Picture Name / Main-Category / Sub-Category / Home / HP-Title
Something I have mixed !?!?? I have changed the details.php ones more but it still looks like before...
Please help again :oops:
-
To reverse the order of categories, change the following line in the get_category_path_nohtml function in includes/functions.php from:
$path = $cat_cache[$cat_id]['cat_name'].$config['category_separator'].$path;
To:
$path = $path . $config['category_separator'] . $cat_cache[$cat_id]['cat_name'];
Jasmine
-
Yeah! That´s it!
Thank you very much! :lol:
-
Okay, another MOD another problem :oops:
I have installed the PMv2 MOD - now I tried to change the pm.php but I don´t know what I have to change :
I tried this:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".$lang['pm_short']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$page_title = $config['category_separator'].$lang['lang_pm'].$config['category_separator'].$lang['lang_pm'].$page; // MOD: Dynamic page title
And add this:
"clickstream" => $clickstream,
"msg" => get_msg($msg),
"content" => $content,
"title" => $title
));
// MOD: Dynamic page title BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title BLOCK END
I think it´s no wunder that it won´t work :roll: PLZ help help help help :mrgreen:
-
is it possible that server restrictions prevents this mod to work ?
i moved to another server with two sites, and mod doesn't work any more.
I also added the "internal caching for images 1.7" mod, and inserted the template engine from 1.7.1 into 1.7....
maybe this is causing the problem ?
:roll:
-
Maybe <- thats the best possible solution you could get for as much information about the problem as you've provided ;)
-
it was the template engine from 1.7.1 that was causing the Dynamic title problem in 1.7
-
My gallery did not work after all changes :cry:
Can anybody put modified files in archive (zip/rar) and send me ones via e-mail: goto-1@355.copi.ru
Thank you.
Sincerely yours,
Arthur.
-
Hello
Only 2 questions regarding this mode:
1. Is possible to print on the title search string like: " keyword / search / site_title " ?
2. On 2 different sites the same happens on http://mysite.com/member.php?action=uploadform&cat_id=nn
on the title is printed
...a href="./categories.php?cat_id=nn" class="clickstream">category_title</a> / Upload Image / Site_title...
Could somebody help me?
On The rest of pages the dinamic title page works well.
Thanks.
Hello
I can`t imagine nobody knows about these questions. Please, if someone can figure out how to print on the title line Search_keyword \ ... \ Site_title - help me.
The second question i`ve solved by removing {header} from template and adding all head info needed, on the member.html template.
Beside this, want to say you, this small problems can`t shadow the great image of 4 images script.
Thanks all for it and best regards!
-
Sorry but something is wrong :?
I made changes by bentleykf and now it should be e.g.
Picture Name / Sub-Category / Main-Category / HP-Title but it is
Picture Name / Main-Category / Sub-Category / Home / HP-Title
Something I have mixed !?!?? I have changed the details.php ones more but it still looks like before...
Please help again :oops:
Does someone knows how to get rid of the "/ Home /" - part in the title ?
( you only see this if you go to a picture, no "home" part in title when you go to categories )
thx
-
Sorry but something is wrong :?
I made changes by bentleykf and now it should be e.g.
Picture Name / Sub-Category / Main-Category / HP-Title but it is
Picture Name / Main-Category / Sub-Category / Home / HP-Title
Something I have mixed !?!?? I have changed the details.php ones more but it still looks like before...
Please help again :oops:
Does someone knows how to get rid of the "/ Home /" - part in the title ?
( you only see this if you go to a picture, no "home" part in title when you go to categories )
thx
Assuming you're talking about the clickstream from your details.php file,
look for :
$page_title = $config['category_separator'].$lang['home'].$config['category_separator']; // MOD: Dynamic page title
replace with :
//$page_title = $config['category_separator'].$lang['home'].$config['category_separator']; // MOD: Dynamic page title
(uncomment it). ;)
-
yes, that's it.
thx a lot :!:
-
I've tried this mod too but can't make it work. I've got 4images 1.7.1. I checked twice all steps and I didn't miss anything.
I'm not sure what I'm doing wrong...
-
I've tried this mod too but can't make it work.
Precision. :roll:
-
No, honestly. I've done everything as instructed. I've gor other mods running on my web without any problems.
I don't know why it's not working. Maybe the server is doing it...
-
ok
-
Hello!
Attached, you can find a diff against the 1.7.1 files. This diff can easily applied by running:
patch -p1 < mod-dynamic-page-title_4images-1.7.1.patch.txt
You can find the patch also on my homepage at http://alexander.skwar.name/4images-patches/mod-dynamic-page-title_4images-1.7.1.patch
For me, that's a lot easier to read than those plain text commands and also a lot less error prone...
-
This is a great mod ..... i installed without any problems :lol: :mrgreen:
-
Hallo
Der MOD läuft super :D
Hat vielleicht jemand eine Idee wie ich es hinbekomme, dass bei der Bildsuche nach Eingabe eines Suchbegriffes im Titel nicht nur das Wort "Bildsuche" sondern auch der entsprechende Suchbegriff steht.
Freue mich über Vorschläge.
Grüsse aus Hamburg
Steffen
-
This is also a great mod :lol:
I installed with no problems :D
-
Hello!
Attached, you can find a diff against the 1.7.1 files. This diff can easily applied by running:
patch -p1 < mod-dynamic-page-title_4images-1.7.1.patch.txt
You can find the patch also on my homepage at http://alexander.skwar.name/4images-patches/mod-dynamic-page-title_4images-1.7.1.patch
For me, that's a lot easier to read than those plain text commands and also a lot less error prone...
hello
askwar pls write change code :( ?
-
Hey!
Almost everything works.
Only one little problem: When I click on "UPLOAD IMAGE" my title is something like
site name | <a href="cattegories.php?cat_id=xx class="clickstream">cattegory name<a href="cattegories.php?cat_id=yy class="clickstream">new
Im sure members.php is modified correctly
:|
-
I know this mos is for v1.7 & v1.7.1
but i want to tell that the page title not changing in v1.7.2
maby there is someone who know how it's working on 1.7.2 :D
(update to v1.7.2) :D
I hope you understand my english :lol:
-
this mod in version 1.7.2 works fine
but then UPLOAD PHOTO title = <a href="./categories.php?cat_id=711" class="clickstream">[18] Âå÷åðèíêè</a> | Çàãðóçèòü ôîòî | Ñîëíå÷íîãîðñêàÿ ôîòîãàëåðåÿ
:lol:
-
And how about to improve the descripcion added automaticaly to the meta tags?!?!?! and keywrods in the header
-
I am having the same problem with ver 1.7.1 ....
i think there is a bug or it is conflicting with upload function.... or [Mod] Search Engine Friendly URLs aka Short URLs
any solution from the gurus.. (vano).. :wink:
this mod in version 1.7.2 works fine
but then UPLOAD PHOTO title = <a href="./categories.php?cat_id=711" class="clickstream">[18] Âå÷åðèíêè</a> | Çàãðóçèòü ôîòî | Ñîëíå÷íîãîðñêàÿ ôîòîãàëåðåÿ
:lol:
-
Is this MOD possible with the new version 1.7.2 ?
Do I have to make changes to use it with this script version?
-
I found a solution for this bug:
in member.php find:
$txt_clickstream = "";
if ($cat_id && isset($cat_cache[$cat_id])) {
$txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$txt_clickstream .= $lang['user_upload'];
replace with:
$txt_clickstream = "";
if ($cat_id && isset($cat_cache[$cat_id])) {
$txt_clickstream .= get_category_path_nohtml($cat_id, 1).$config['category_separator'];
}
$txt_clickstream .= $lang['user_upload'];
Hey!
Almost everything works.
Only one little problem: When I click on "UPLOAD IMAGE" my title is something like
site name | <a href="cattegories.php?cat_id=xx class="clickstream">cattegory name<a href="cattegories.php?cat_id=yy class="clickstream">new
Im sure members.php is modified correctly
:|
-
Hey thanks :)
It works now perfect
TIP: code should be replace in 2 places in member.php
-
also bei mir läuft das nicht. habe v. 1.7.2 und alle änderungen gemacht aber der Titel ist immernoch der selbe.
www.brasilien-entdecken.de/bilder/
with me that does not run.
have v. 1.7.2 and all changes made however the title is always still the same.
please help
-
also bei mir läuft das nicht. habe v. 1.7.2 und alle änderungen gemacht aber der Titel ist immernoch der selbe.
www.brasilien-entdecken.de/bilder/
with me that does not run.
have v. 1.7.2 and all changes made however the title is always still the same.
please help
In your header.html file edit:
<title>Brasilien entdecken - individuell und hautnah erleben</title>
to
<title>{site_name} {page_title}</title>
-
thanks. but this is not the problem.
if you come from www.brasilien-entdecken.de -> you see a framset. right is the content.
if you come direct www.brasilien-entdecken.de/bilder/ -> the browser only show the iframe on top (navigation)
another idea?
-
I didn't understand the last question.
Try and edit this file http://www.brasilien-entdecken.de/templates/7dana/header.html
And lets see if that works.
-
my header.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{site_name} {page_title}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<link rel="stylesheet" href="{template_url}/style.css" />
<script language="javascript" type="text/javascript">
<!--
function opendetailwindow() {
window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
}
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) {
alert("© Copyright by {site_name}");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button==2 || event.button == 3)) {
alert("© Copyright by {site_name}");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// -->
</script>
</head>
<body bgcolor="#C2C377" link="#333333" vlink="#333333">
<div id="unterseite" style="position:absolute; width:803px; height:268px; z-index:6; left: 0px; top: 0px; visibility: visible"><iframe name=unterseite
src="../unterseite_nav.htm" frameborder=0 height=268 width=803 scrolling=no></iframe></div>
-
my header.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{site_name} {page_title}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<link rel="stylesheet" href="{template_url}/style.css" />
<script language="javascript" type="text/javascript">
<!--
function opendetailwindow() {
window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
}
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) {
alert("© Copyright by {site_name}");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button==2 || event.button == 3)) {
alert("© Copyright by {site_name}");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// -->
</script>
</head>
<body bgcolor="#C2C377" link="#333333" vlink="#333333">
<div id="unterseite" style="position:absolute; width:803px; height:268px; z-index:6; left: 0px; top: 0px; visibility: visible"><iframe name=unterseite
src="../unterseite_nav.htm" frameborder=0 height=268 width=803 scrolling=no></iframe></div>
Thats not the same header as I posted a link to
-
this is interesting because I have 7dana template as well, and it doesn't work for me either as I have mentioned on a previous page.
my header.html in 7dana has the correct line:
<title>{site_name} {page_title}</title>
and still it doesn't work.
Could the template be a problem maybe?
Because it seems we are only 2 people who have problem with it and we both have the same template.
-
RE: artistichideaway
wow. nice galery and it works by you !!! and you hava the same 7dana template.
why does it work at one time with you? what did you change?
RE: BartAfterDark
what you see in the browser is the code of the frameset and not the realy the header.html.
the header is an include-file and only php and this would not parse or can show in this sight.
-
RE: artistichideaway
wow. nice galery and it works by you !!! and you hava the same 7dana template.
why does it work at one time with you? what did you change?
Oh, it works now, yes, you are right. It must have been the google. It took almost a month to update my links in google and I thought it wasn't working.
The links look great now. :lol:
So everything's fine...thanks.
-
why does it work at one time with you? what did you change?
i dont understand you. with you google helped?
-
Since you are using frameset on your site, only title of the parent (main) frame will be visible on the browser.
And only with some javascript you might be able change it (aka copy title from a child page).
Its nothing to do with a template you are using.
-
thanks for all. it works.
where can i modifiy the pfad "Home/Städte/Arraial do cabo" -> it have no blank.
when i search to "/" and "category" i found nothing
-
thanks for all. it works.
where can i modifiy the pfad "Home/Städte/Arraial do cabo" -> it have no blank.
when i search to "/" and "category" i found nothing
I think that is a little bug of the 4images version 1.7.2 that the blanks that you add in the ACP are removed by updating the ACP again. Add in ACP "Settings" to
"Category delimiter (in category paths)" -> /
bye Konradin
-
thanks. work great.
-
hmm i would like to have in detail.php
Photo Titel ¦ category ¦ Keywords
thanks for any help!
vincent
-
hmm i would like to have in detail.php
Photo Titel ¦ category ¦ Keywords
thanks for any help!
vincent
Category separator: " ¦ " or " ¦ " (look here for special chairs (german) http://www.mediaevent.de/tutorial/sonderzeichen.html)
-
@konradin
it is not the separator which is important but to have them in this order it could also be a / \ ¦ | but photo titel - category - keywords
sincerly
vincent
hmm i would like to have in detail.php
Photo Titel ¦ category ¦ Keywords
thanks for any help!
vincent
Category separator: " ¦ " or " ¦ " (look here for special chairs (german) http://www.mediaevent.de/tutorial/sonderzeichen.html)
-
Hey thanks :)
It works now perfect
TIP: code should be replace in 2 places in member.php
I've got a better solution... my previous fix was not proper ... it was also taking out the hyperlink from the clickstream.
Find (3 times):
$txt_clickstream = "";
Replace ALL with:
$txt_clickstream = "";
$txt_clickstream_t = "";
Next Find ALL lines starting with (9 times):
$txt_clickstream = get_category_path(
Duplicate that line and make following changes in the duplicated line:
$txt_clickstream_t = get_category_path_nohtml(
Now Find ALL lines starting with (9 times):
$txt_clickstream .= $lang
Duplicate that line and make following changes in the duplicated line:
$txt_clickstream_t .= $lang
Lastly Find:
$page_title = $config['category_separator'].$txt_clickstream;
Replace with:
$page_title = $config['category_separator'].$txt_clickstream_t;
That's it.. hope it works for all..
-
I've applied this MOD successfully on v.1.7 (thanks for a great MOD btw!) but in v.1.7.2 it doesn't seem to work. I've checked and rechecked all the code that needed to be changed and followed all the steps to the tee, but I keep on getting this (http://www.photoalbum.co.za/mockup/) on the index page & any category page. When selecting anything else tho, it works 100% - any ideas? I'd appreciate some guidance here :)
-
Open includes/page_header.php, locate:
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
We need to move this logic to each of the top-level php files, so comment out this code by replacing it with:
/********** ORIGINAL
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
**********/
Hi,
I'm using 1.7.2 version. When I replace the code at above, sub pages work fine but index.php template to spoil. How can I fix this problem? Help please...
-
perhaps by doing the next step? :roll:
-
perhaps by doing the next step? :roll:
I'm sure, I done all steps.. :roll:
-
I'm having exactly the same problem as sanitarium - followed all the steps 100%, sub-pages works 100% but index.php breaks with some error relating to template.php (see here: http://www.photoalbum.co.za/mockup/ )
-
index.php breaks with some error relating to template.php
1) "some error" is absolutly not helpfull, next time quote the exact error message not just give a link to the site.
2) your case is an error in the template. the number of {if ...} tags must match number of {endif ...}.
-
1) "some error" is absolutly not helpfull, next time quote the exact error message not just give a link to the site.
Hi V@no, apologies for not putting in the actual error in my post :oops: ; will do so in future when posting.
Thanks for the help; I was missing {if categories} in my header.html file, only had the {endif categories} in there - its all working 100% now - thanks again! :D
-
I made changes by bentleykf and now it should be e.g.
Picture Name / Sub-Category / Main-Category / HP-Title but it is
Picture Name / Main-Category / Sub-Category / Home / HP-Title
Does someone knows how to get rid of the "/ Home /" - part in the title ?
( you only see this if you go to a picture, no "home" part in title when you go to categories )
thx
I added this mod to show categories and details just fine.
However - now my home page says "HOME / Home Page Title"
How do I get rid of "HOME" on the index page? (not Home Page Title)
Curious,
Terry
-
I added this mod to show categories and details just fine.
However - now my home page says "HOME / Home Page Title"
How do I get rid of "HOME" on the index page? (not Home Page Title)
Through trial and error I found this is the answer my own question:
Comment out in index.php:
// $page_title = $lang['home'].$config['category_separator'];
I hope that was right. Seems to work! :)
T
-
does this mod help with SEO?
Please anybody guide me weather this mod will work with 1.7.3 and is it worth installing to get better search engine optimisation .. i mean with google and other SE?
-
Will the instructions work for 1.7.2 ?
-
I have updated all the files as expained . I am running 1.7.2
I am getting this error
Fatal error: Call to undefined function: get_category_path_nohtml() in /home/needfuls/public_html/main/details.php on line 512
Here is my code after changing
$page_title = $config['category_separator'].$lang['search'].$config['category_separator']; // MOD: Dynamic page title
}
else {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title
}
I also got this error when accessing a category
Fatal error: Call to undefined function: get_category_path_nohtml() in /home/needfuls/public_html/main/categories.php on line 166
-
I have updated all the files as expained .
No, you didnt. The very first step is where you made the misstake.
-
Thanks for pointing that out :wink: I cannot believe I missed that.
Anyways I uploaded everything and I am not getting any errors. However I am not seeing any
page titles . I am using the "wallpaper" template. I changed the header.html code to
<title>{site_name} {page_title}</title>
However nothing is happening it is just as before with the site name in the browser.
-
Perhaps something else you missed? ;)
-
LOL :D I just went back through and do not see anything. I went step by step .
I changed both the default header and the wallpaper header.
Can't think of anything else it could be.
Have any ideas ?
After a while of looking the code starts to run together :)
-
Ok, I re loaded all fresh files then started over. Still the samething. Nothing has changed.
I do not get anything in the browser title but the website name no matter what page I am on.
I am using the wallpaper template is that the problem. I cannot see where it would be.
What is going on does anyone know ?
-
No one has any idea what is going on ? I have triple checked everything.
-
I have triple checked everything.
Works for me. Restore your original files and try again.
T
-
I have the same problem, Im using the template wallpaper and the version 1.7.2
the url is http://fake-images.com
if you see, i have some test of categories and images, but try to enter to register and see the title, it gets the title of the last category
on index it has the title with the first category
what could be the problem?
-
In index.php find:
if (!empty($template)) {
Insert above:$page_title = $lang['home'];
-
Thanks for your help v@no, I tried what you said but doesn't seems to work,
do you know what else could be the problem? is this because I have the version 1.7.2 ?
-
Will a version of this come out for 1.7.3?
This was the best mod I had before upgrading.
Curious,
T
-
just for the record, i do all steps of this mod until the STOP HERE and it works now for v 1.7.3
:? 8)
I think i don't really need to know why ha!, cuz it works now
-
Thanks, I hope it really works with 1.7.3 like you said.`
-
Thanks for this truly time intensive but well worth it [mod], it works like a charm!
Best wishes,
Kimmy
-
Thanks for this truly time intensive but well worth it [mod], it works like a charm!
What version of 4images are you using?
T
-
Thanks for this truly time intensive but well worth it [mod], it works like a charm!
What version of 4images are you using?
T
1.7.2
Best wishes,
Kimmy
-
is it compatible with 1.7.3 ?
-
is it compatible with 1.7.3 ?
Yes 8)
-
and compatible with 1.7.4 (till stop here)
-
Hello al.
I modify the acp setting for sitename. "Home/category/imagename" its have no blank.
and clickstream "Home/category/imagename"
Like this:
Home / category / imagename
how to fix?
note: php4.4.4 on centos 4.4
4images 1.7.4
thanks.
-
Hi all!
I am using version 1.7.1
My question:
I would like to have a pic as category seperator.
But if I use a pic-link in the category seperator in options of the admin panel
then my title shows incorrect path.
So my question to the coders is:
Is it possible to have a pic (like an arrow e.g.) in the clickstream and also having a correct page title :?:
That would be very nice.
-
please rewrite this mod 1.7.4 versiyon. Doesn't work 1.7.4 please update
-
This mod works fine in 1.7.4 version
but fix this code!
with follow problems
-spam words not with name separate **** in admin control panel
-view not correct <a href= in user control panel and others
find in includes/functions.php
}
$text = str_replace("[hr]", "<hr>", $text);
}
$text = replace_url($text);
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
$text = str_replace("\n", "<br />", $text);
$text = str_replace("\\'", "'", $text);
$text = str_replace("\\\"", """, $text);
return replace_badwords(stripslashes($text));
}
and replace
}
$text = str_replace("[hr]", "<hr>", $text);
}
if ($html !== 2) {
$text = nl2br(trim($text));
$text = replace_url($text);
}
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
$text = replace_badwords($text);
}
$text = str_replace("\n", "<br />", $text);
$text = str_replace("\\'", "'", $text);
$text = str_replace("\\\"", """, $text);
return $text;
}
-
Hey... I think you´ve got it!
But I can´t try it now :( when I upgrade to 1.7.4 I´ll do it!
THX man!
-
so is it working with 1.7.4
-
i tryed it on my 1.7.4 its not working :(
-
This works fine for me on 1.7.4
Follow the instructions on page 1 of this thread, and stop when it says "stop for 1.7"
Many thanks for this essential mod. Might be worth including this as standard in the next version? SEO is very important these days :)
-
This mod works fine in 1.7.4 version
but fix this code!
with follow problems
-spam words not with name separate **** in admin control panel
-view not correct <a href= in user control panel and others
find in includes/functions.php
}
$text = str_replace("[hr]", "<hr>", $text);
}
$text = replace_url($text);
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
$text = str_replace("\n", "<br />", $text);
$text = str_replace("\\'", "'", $text);
$text = str_replace("\\\"", """, $text);
return replace_badwords(stripslashes($text));
}
and replace
}
$text = str_replace("[hr]", "<hr>", $text);
}
if ($html !== 2) {
$text = nl2br(trim($text));
$text = replace_url($text);
}
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
$text = replace_badwords($text);
}
$text = str_replace("\n", "<br />", $text);
$text = str_replace("\\'", "'", $text);
$text = str_replace("\\\"", """, $text);
return $text;
}
Bro i dont find this in my functions.php can u see my functions.php i am attaching my file wid this reply
-
@ __G__
I don not think it is your file cause I do not have that code either in my functions.php
-
so how would it work with 1.7.4 :(
-
I am also using 1.7.4 , its also not working for me on all pages except index . I could find the text in functions.php
please let us know how did you ?
Thanks
Tulip
-
Hallo!
Hier die einfachste Methode um den Titel der Seiten dynamisch zu erzeugen:
finde in templates/default/header.html
<title>{site_name}</title>
und ersetze durch
<title>{site_name} / <?php echo strip_tags($clickstream); ?></title>
Fertig.
-
All credit goes Chris. Thats what i need! THX.
note: perfectly works in 1.7.4 :)
-
works very smoothly for me on 1.7.4! :D
-
Mod Arbeitet PERFECT! :) Danke
nur das habe ich nicht so ganz verstanden...
This mod works fine in 1.7.4 version
but fix this code!
with follow problems
-spam words not with name separate **** in admin control panel
-view not correct <a href= in user control panel and others
find in includes/functions.php
Gruß! Martin
-
working perfect on 1.7.4 :D
-
Hi all,
Mod arbeitet gut!
Mit 1.7.4 sogar
m.a
-
Hi Leute,
da ich nicht besonders fit auf dem Gebiet bin - gibt es eine Möglichkeit für 1.7.4 alles fertig modifiziert herunterzuladen?
Danke schon mal!
Gruß MannohneVerfallsdatum
-
Hallo MannohneVerfallsdatum,
die einfachste Methode ist es, dass egoplawi geschrieben hat!
m.a
Hallo!
Hier die einfachste Methode um den Titel der Seiten dynamisch zu erzeugen:
finde in templates/default/header.html
<title>{site_name}</title>
und ersetze durch
<title>{site_name} / <?php echo strip_tags($clickstream); ?></title>
Fertig.
-
Hi m.a,
danke für den Tipp!
Aber warum dann der ganze Aufwand, wenn es auch viel einfacher geht?
Gruß MannohneVerfallsdatum
-
Hallo m.a,
die einfache Methode hat leider einen gewaltigen Schönheitsfehler. Es wird nicht nur der eigentliche Seitentitel angezeigt, sondern alle Pfande z.B. Seitentitel / Home / Kategoriename / Unterseitentitel und das ist leider überhaupt nicht suchmaschinentauglich. Gibt es vielleicht noch eine einfache Lösung, die besser ist? Mit der Standartlösung komme ich nicht zurecht, da ich das Modifizieren nicht so ganz hinkriege oder gibt es die modifizierten Dateien hier igendwo zum Upload?
Danke!
Gruß MannohneVerfallsdatum
-
Hallo !
Warum ist das nicht SuMa tauglich?
Google mag meine Seite recht gerne: http://www.google.de/search?hl=de&q=+site%3Apunksy.com&btnG=Google-Suche&meta= (http://www.google.de/search?hl=de&q=+site%3Apunksy.com&btnG=Google-Suche&meta=)
Wo siehst du dabei die Gefahr?
M.f.G.
Egoplawi
-
Hi Egoplawi,
da muss ich Ivan recht geben. Ein sehr wichtiger Rankingfaktor ist ein besucherfreundlicher Titel. Besser ist: Z.B. wenn ich mich auf der Seite Kategorie Tiere befinde, dass als Titel nur Tiere ausgeben wird bzw. dass nur von der jeweiligen Seite der Titel erstellt wird. Ohne Home usw. ist die ganze Sache wesentlich benutzerfreundlicher. Du solltest Dich mal in die Lage eines Blinden versetzen, dann wirst Du das besser nachvollziehen können.
Gruß MannohneVerfallsdatum
-
Hallo!
Danke für die Infos. Das kann ich nachvollziehen. Schaue mir das ab morgen genauer an.
M.f.G.
Egoplawi
-
Hi guys,
It works well on 1.7.4 :)
I ve installed [MOD] Multi-Language support for any text and Paths are appearing exactly like this for me with "[...]" language translation:
SITE NAME \ [french]CATEGORY NAME [english]CATEGORY NAME \ [french]IMAGE NAME [english]IMAGE NAME
i.e : multilang($image_row['image_name']),
Hmmm...is there a way to exclude this 'function' multilang(...) from appearing on header.html???
-
Should post like say:
[MOD] Multi-Language support for any text
Wrong topic. :mrgreen:
-
die einfache Methode hat leider einen gewaltigen Schönheitsfehler. Es wird nicht nur der eigentliche Seitentitel angezeigt, sondern alle Pfande z.B. Seitentitel / Home / Kategoriename / Unterseitentitel und das ist leider überhaupt nicht suchmaschinentauglich. Gibt es vielleicht noch eine einfache Lösung, die besser ist? Mit der Standartlösung komme ich nicht zurecht, da ich das Modifizieren nicht so ganz hinkriege oder gibt es die modifizierten Dateien hier igendwo zum Upload?
Ich habe das bei mir so gelöst....
<title>
<?php
$page_title = strip_tags($clickstream);
$page_title = str_replace("Home / ","",$page_title);
$page_title = str_replace(" / "," - ",$page_title);
echo $page_title; php?> - {site_name}
</title>
Funktioniert super...
-
doesn't work in 1.7.4 have blank pages
please update for this version
-
I have tested on 4images 1.7.4 and it work very well!
-
I test too and is work good. No do last step for page_header.php (for header and footer). 4images is now in template for header and footer. No from page_header. ;)
-
How do I change this from showing:
Site Name / Category / Sub-Category / Title
to
Title / Sub-Category / Category / Site Name
?
I know it's probably here in functions.php but I can't figure out the right format:
$path = $cat_cache[$cat_id]['cat_name'].$config['category_separator'].$path;
Terry
-
helpppp... i have an error page :(
Parse error: syntax error, unexpected T_IF in /home/myuser/public_html/includes/functions.php on line 1
just information, i m using template Iceberg...is that ok for this mod ?
i was followed all insctruction in page 1 on the first thread....please help :(
i use 4images Version 1.7.4
thanks...
Rgds
-
Is this mod also usable for the actual version? I make an Update right now...
-
Hello,
Because it is running with version 1.7.4, it should also go with 1.7.6
nobby
-
Hello,
Who can put please file of mod 1.7.6 includes/functions.php
or show what you need to make any changes to the code?
Please Help ?
-
How do I change this from showing:
Site Name / Category / Sub-Category / Title
to
Title / Sub-Category / Category / Site Name
?
I know it's probably here in functions.php but I can't figure out the right format:
$path = $cat_cache[$cat_id]['cat_name'].$config['category_separator'].$path;
Terry
Bump?
T
-
die einfache Methode hat leider einen gewaltigen Schönheitsfehler. Es wird nicht nur der eigentliche Seitentitel angezeigt, sondern alle Pfande z.B. Seitentitel / Home / Kategoriename / Unterseitentitel und das ist leider überhaupt nicht suchmaschinentauglich. Gibt es vielleicht noch eine einfache Lösung, die besser ist? Mit der Standartlösung komme ich nicht zurecht, da ich das Modifizieren nicht so ganz hinkriege oder gibt es die modifizierten Dateien hier igendwo zum Upload?
Ich habe das bei mir so gelöst....
<title>
<?php
$page_title = strip_tags($clickstream);
$page_title = str_replace("Home / ","",$page_title);
$page_title = str_replace(" / "," - ",$page_title);
echo $page_title; php?> - {site_name}
</title>
Funktioniert super...
thanks a lot...
i did it with just small code add on <title> its work great
thaks once again :)
-
how to install it:
<title>
<?php
$page_title = strip_tags($clickstream);
$page_title = str_replace("Home / ","",$page_title);
$page_title = str_replace(" / "," - ",$page_title);
echo $page_title; php?> - {site_name}
</title>
in 1.7.6 ?
p.s. set in header.html but in the end:
Home - My Images - My site
but as that was:
My Images - My site
?
sorry for my English
Help :?
-
Please help us to understand the code ? :?
-
p.s. set in header.html but in the end:
Home - My Images - My site
but as that was:
My Images - My site
Hi, du hast wohl My Site im ACP (Controll Center von 4images) unter EInstellungen - Name der Galerie angegeben......
Wenn da etwas anderes stehen soll, dann ändere entweder die Einstellungen von 4images oder aber du nimmst {site_name} einfach raus :-)
Gruß
Ingo
-
i did everything on [MOD] Dynamic Page Title for v1.7 & v1.7.1.
i use 1.7.6
every page title and description ok but;
postcards.php is same as home page title and description, how can we fix this?
http://www.picturesx.net
my postcard.php code is
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: postcards.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.6 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
if (isset($HTTP_GET_VARS[URL_POSTCARD_ID]) || isset($HTTP_POST_VARS[URL_POSTCARD_ID])) {
$postcard_id = (isset($HTTP_GET_VARS[URL_POSTCARD_ID])) ? trim($HTTP_GET_VARS[URL_POSTCARD_ID]) : trim($HTTP_POST_VARS[URL_POSTCARD_ID]);
}
else {
$postcard_id = 0;
}
if ($action == "") {
$action = ($postcard_id) ? "showcard" : "createcard";
}
if (isset($HTTP_GET_VARS['modifycard']) || isset($HTTP_POST_VARS['modifycard'])) {
$action = "modifycard";
}
$main_template = ($action == "createcard" || $action == "modifycard") ? "postcard_create" : (($action == "previewcard") ? "postcard_create" : "postcard_send");
include(ROOT_PATH.'includes/page_header.php');
$sendprocess = 0;
if ($action != "showcard") {
$sql = "SELECT i.cat_id, i.image_name, i.image_media_file, i.image_thumb_file, c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_id = $image_id";
$image_row = $site_db->query_firstrow($sql);
if (!$image_row) {
redirect($url);
}
$cat_id = $image_row['cat_id'];
$image_row['user_name'] = $image_row[$user_table_fields['user_name']];
if (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id) || !check_permission("auth_sendpostcard", $cat_id)) {
redirect($url);
}
}
if ($action == "sendcard") {
$expiry = time() - 60 * 60 * 24 * POSTCARD_EXPIRY;
$sql = "DELETE FROM ".POSTCARDS_TABLE."
WHERE (postcard_date < $expiry)";
$site_db->query($sql);
$bg_color = un_htmlspecialchars(trim($HTTP_POST_VARS['bg_color']));
$border_color = un_htmlspecialchars(trim($HTTP_POST_VARS['border_color']));
$font_color = un_htmlspecialchars(trim($HTTP_POST_VARS['font_color']));
$font_face = un_htmlspecialchars(trim($HTTP_POST_VARS['font_face']));
$sender_name = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_name']));
$sender_email = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_email']));
$recipient_name = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_name']));
$recipient_email = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_email']));
$headline = un_htmlspecialchars(trim($HTTP_POST_VARS['headline']));
$message = un_htmlspecialchars(trim($HTTP_POST_VARS['message']));
$message = strip_tags($message);
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";
$back_url = (!empty($HTTP_POST_VARS['back_url'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['back_url']))) : $site_sess->url(ROOT_PATH."index.php", "&");
$postcard_id = get_random_key(POSTCARDS_TABLE, "postcard_id");
$current_time = time();
if ($captcha_enable_postcards && !captcha_validate($captcha)) {
$msg .= (($msg != "") ? "<br />" : "").$lang['captcha_required'];
$action = "previewcard";
$main_template = "postcard_preview";
} else {
$sql = "INSERT INTO ".POSTCARDS_TABLE."
(postcard_id, image_id, postcard_date, postcard_bg_color, postcard_border_color, postcard_font_color, postcard_font_face, postcard_sender_name, postcard_sender_email, postcard_recipient_name, postcard_recipient_email, postcard_headline, postcard_message)
VALUES
('$postcard_id', $image_id, $current_time, '$bg_color', '$border_color', '$font_color', '$font_face', '$sender_name', '$sender_email', '$recipient_name', '$recipient_email', '$headline', '$message')";
$result = $site_db->query($sql);
if ($result) {
$postcard_url = $script_url."/postcards.php?".URL_POSTCARD_ID."=".$postcard_id;
include(ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_to(stripslashes($recipient_email));
$site_email->set_from(stripslashes($sender_email), stripslashes($sender_name));
$site_email->set_subject($lang['send_postcard_emailsubject']);
$site_email->register_vars(array(
"sender_name" => stripslashes($sender_name),
"sender_email" => stripslashes($sender_email),
"recipient_name" => stripslashes($recipient_name),
"postcard_url" => stripslashes($postcard_url),
"postcard_send_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
"site_name" => $config['site_name']
));
$site_email->set_body("postcard_message", $config['language_dir']);
$site_email->send_email();
$msg .= $lang['send_postcard_success'];
$msg .= "<br /><a href=\"".$back_url."\">".$lang['back_to_gallery']."</a>";
$action = "showcard";
}
else {
$msg = $lang['general_error'];
$action = "previewcard";
$main_template = "postcard_preview";
}
}
}
if ($action == "showcard") {
$expiry = time() - 60 * 60 * 24 * POSTCARD_EXPIRY;
$sql = "DELETE FROM ".POSTCARDS_TABLE."
WHERE (postcard_date < $expiry)";
$site_db->query($sql);
if (!$postcard_id){
redirect("index.php");
}
else {
$sql = "SELECT p.postcard_id, p.image_id, p.postcard_date, p.postcard_bg_color, p.postcard_border_color, p.postcard_font_color, p.postcard_font_face, p.postcard_sender_name, p.postcard_sender_email, p.postcard_recipient_name, p.postcard_recipient_email, p.postcard_headline, p.postcard_message, i.image_name, i.cat_id, i.image_media_file, i.image_thumb_file
FROM (".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i)
WHERE p.postcard_id = '$postcard_id' AND p.image_id = i.image_id";
$image_row = $site_db->query_firstrow($sql);
if (!$image_row) {
show_error_page($lang['invalid_postcard_id']);
}
else {
$image = get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, 1);
$thumbnail = get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode);
$image_name_link = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\">".format_text($image_row['image_name'])."</a>";
$site_template->register_vars(array(
"image" => $image,
"thumbnail" => $thumbnail,
"image_name_link" => $image_name_link,
"bg_color" => format_text($image_row['postcard_bg_color'], 2),
"border_color" => format_text($image_row['postcard_border_color'], 2),
"font_color" => format_text($image_row['postcard_font_color'], 2),
"font_face" => format_text($image_row['postcard_font_face'], 2),
"sender_name" => format_text($image_row['postcard_sender_name'], 2),
"sender_email" => format_text($image_row['postcard_sender_email'], 2),
"recipient_name" => format_text($image_row['postcard_recipient_name'], 2),
"recipient_email" => format_text($image_row['postcard_recipient_email'], 2),
"headline" => format_text($image_row['postcard_headline'], 2),
"message" => format_text($image_row['postcard_message'], 0)
));
}
}
}
if ($action == "previewcard") {
$error = 0;
$bg_color = un_htmlspecialchars(trim($HTTP_POST_VARS['bg_color']));
$border_color = un_htmlspecialchars(trim($HTTP_POST_VARS['border_color']));
$font_color = un_htmlspecialchars(trim($HTTP_POST_VARS['font_color']));
$font_face = un_htmlspecialchars(trim($HTTP_POST_VARS['font_face']));
$sender_name = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_name']));
$sender_email = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_email']));
$recipient_name = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_name']));
$recipient_email = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_email']));
$headline = un_htmlspecialchars(trim($HTTP_POST_VARS['headline']));
$message = un_htmlspecialchars(trim($HTTP_POST_VARS['message']));
$back_url = (!empty($HTTP_POST_VARS['back_url'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['back_url']))) : $site_sess->url(ROOT_PATH."index.php", "&");
if ($sender_name == "" || $sender_email == "" || $recipient_name == "" || $recipient_email == "" || $headline == "" || $message == "") {
$msg .= $lang['lostfield_error'];
$error = 1;
}
if (($sender_email != "" && !check_email($sender_email)) || ($recipient_email != "" && !check_email($recipient_email))) {
$msg .= (($msg != "") ? "<br />" : "").$lang['invalid_email_format'];
$error = 1;
}
if (!$error) {
$main_template = "postcard_preview";
$image = get_media_code($image_row['image_media_file'], $image_id, $cat_id, $image_row['image_name'], $mode, 1);
$thumbnail = get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_id, $cat_id, $image_row['image_name'], $mode);
$site_template->register_vars(array(
"image" => $image,
"thumbnail" => $thumbnail,
"image_name" => format_text($image_row['image_name']),
"url_postcard" => $site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_id),
"bg_color" => format_text(stripslashes($bg_color), 2),
"border_color" => format_text(stripslashes($border_color), 2),
"font_color" => format_text(stripslashes($font_color), 2),
"font_face" => format_text(stripslashes($font_face), 2),
"sender_name" => format_text(stripslashes($sender_name), 2),
"sender_email" => format_text(stripslashes($sender_email), 2),
"recipient_name" => format_text(stripslashes($recipient_name), 2),
"recipient_email" => format_text(stripslashes($recipient_email), 2),
"headline" => format_text(stripslashes($headline), 2),
"message" => format_text(stripslashes($message), 0),
"message_hidden" => format_text(stripslashes($message), 2),
"image_id" => $image_id,
"lang_sender" => $lang['sender'],
"lang_recipient" => $lang['recipient'],
"lang_edit_postcard" => $lang['edit_postcard'],
"lang_send_postcard" => $lang['send_postcard'],
"back_url" => format_text($back_url),
"lang_captcha" => $lang['captcha'],
"lang_captcha_desc" => $lang['captcha_desc'],
"captcha_postcards" => (bool)$captcha_enable_postcards
));
}
else {
$action = "createcard";
$main_template = "postcard_create";
$sendprocess = 1;
}
}
if ($action == "createcard" || $action == "modifycard") {
if (!$sendprocess) {
$bg_color = "";
$border_color = "";
$font_color = "";
$font_face = "";
$sender_name = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : "";
$sender_email = ($user_info['user_level'] != GUEST) ? $user_info['user_email'] : "";
$recipient_name = "";
$recipient_email = "";
$headline = "";
$message = "";
}
if ($action == "modifycard") {
$bg_color = un_htmlspecialchars(trim($HTTP_POST_VARS['bg_color']));
$border_color = un_htmlspecialchars(trim($HTTP_POST_VARS['border_color']));
$font_color = un_htmlspecialchars(trim($HTTP_POST_VARS['font_color']));
$font_face = un_htmlspecialchars(trim($HTTP_POST_VARS['font_face']));
$sender_name = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_name']));
$sender_email = un_htmlspecialchars(trim($HTTP_POST_VARS['sender_email']));
$recipient_name = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_name']));
$recipient_email = un_htmlspecialchars(trim($HTTP_POST_VARS['recipient_email']));
$headline = un_htmlspecialchars(trim($HTTP_POST_VARS['headline']));
$message = un_htmlspecialchars(trim($HTTP_POST_VARS['message']));
$message = strip_tags($message);
}
$image = get_media_code($image_row['image_media_file'], $image_id, $cat_id, $image_row['image_name'], $mode, 1);
$thumbnail = get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_id, $cat_id, $image_row['image_name'], $mode);
$site_template->register_vars(array(
"image" => $image,
"thumbnail" => $thumbnail,
"image_name" => format_text($image_row['image_name']),
"lang_bg_color" => $lang['bg_color'],
"bg_color" => $bg_color,
"lang_border_color" => $lang['border_color'],
"border_color" => $border_color,
"lang_font_color" => $lang['font_color'],
"font_color" => $font_color,
"lang_font_face" => $lang['font_face'],
"font_face" => $font_face,
"image_id" => $image_id,
"lang_sender" => $lang['sender'],
"lang_recipient" => $lang['recipient'],
"lang_email" => $lang['email'],
"lang_name" => $lang['name'],
"lang_headline" => $lang['headline'],
"lang_message" => $lang['message'],
"lang_preview_postcard" => $lang['preview_postcard'],
"url_postcard" => $site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_id),
"sender_name" => format_text(stripslashes($sender_name), 2),
"sender_email" => format_text(stripslashes($sender_email), 2),
"recipient_name" => format_text(stripslashes($recipient_name), 2),
"recipient_email" => format_text(stripslashes($recipient_email), 2),
"headline" => format_text(stripslashes($headline), 2),
"message" => format_text(stripslashes($message), 2),
"lang_send_postcard" => $lang['send_postcard'],
"back_url" => format_text(stripslashes($url), 2)
));
}
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
if ($mode == "lightbox" && !empty($user_info['lightbox_image_ids'])) {
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php")."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id."&mode=".$mode)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
}
elseif ($mode == "search" && !empty($session_info['search_id'])) {
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1")."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id."&mode=".$mode)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
}
else {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
}
$clickstream .= $lang['send_postcard']."</span>";
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
));
$site_template->print_template($site_template->parse_template($main_template));
// MOD: Dynamic page title BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title BLOCK END
include(ROOT_PATH.'includes/page_footer.php');
?>
-
Im getting ready to do this on 1.7.6... can you tell me will it have any affec ton the sitemap and does it also have any positive effect on SEO or is it only eye candy for the site user?
for 1.7.6 do we do the 1.7.1 or the 1.7.0 version? SOmeone earlier said the 1.7.0 version until it tells you too stop.. can this be true?
-
@AntiNSA2
certainly it will place a positive effect on your Site ranking in search engines.
i am also waiting for Chris's reply as i want to use it on the new 1.7.7 version, just wana ask is it compatible or have to make some changes
-
This modification is compatible
Look: http://www.4homepages.de/forum/index.php?topic=24888.0
-
Thank You Benny :)
I will give it a try now
-
I am using 4images 1.7.7 on my site
i followed the steps for 1.7 successfully but when i tried to follow the next step for 1.71
Where we are told to do it for the new versions
IF you are using version 1.7, you are finished STOP HERE
i was unable to locate the lines in includes/page_header.php
what should i do now?
shall i stop here?
or i have to follow the last steps as well without editing page_header.php?
on the 10th page of this thread Thunderstrike said that, "
I test too and is work good. No do last step for page_header.php (for header and footer). 4images is now in template for header and footer. No from page_header. ;)
Which one is the last step
-
I Help You:
Send me your: includes/functions.php
Send me your: includes/page_header.php
And this Files:
categories.php, details.php, index.php, lightbox.php, member.php, postcards.php, register.php, search.php, top.php
I will be the same, the instructions on 1.7.7 rewrite, so that everyone can use it!
-
I will be the same, the instructions on 1.7.7 rewrite, so that everyone can use it!
Thank you Benny!
-
:flag-de: Deutsch
Diese Mod gibt einen dynamischen (ständig wechselnden) Seitentitel für deine Web-Seite aus.
Es erweitert das HTMl Markup {clickstream}, dadurch muss kein weiterer Code verwendet werden!
Wenn deine Seite "Meine Seite" heisst und du schaust dir eine Detailsseite an wo das Bild den Name "Alte Brücke" in der Subkategorie "Brücken" beinhaltet, dann wird das ganze im Seitentitel so ausgegeben:
Meine Seite / Brücken / Alte Brücke
Die Originale Modifikatiion stammt von: Chris
Link: http://www.4homepages.de/forum/index.php?topic=6613.msg29010#msg29010
Ich habe diese Modifikation an die Version 1.7.7 angepasst und mit deutscher und englischer Anleitung versehen!
:flag-en: English
This mod outputs a dynamic (ever changing) page title for your web pages. Essentially this adds the clickstream to your page title but without the added HTML markup.
If your site name is defined as "Smith Family Pictures" and you were viewing a details.php page for an image named "Old Bridge" in a subcategory named "Road Trip" which was a subcategory of a top-level "2005 Events" category and your admin control panel setting for "Category delimiter (in category paths)" was defined as "/", your page title would look like this:
Smith Family Pictures /2005 Events/Road Trip/Old Bridge
The originals Modifikatiion comes from: Chris
Link: http://www.4homepages.de/forum/index.php?topic=6613.msg29010#msg29010
I did this modification to the adapted version 1.7.7 and with German and English instructions!
:arrow: Installation - Step by Step
Step 1
Open includes/functions.php, locate:
Öffne includes/functions.php, suche:
function get_category_path($cat_id = 0, $detail_path = 0) {
global $site_sess, $config, $cat_cache, $url;
$parent_id = 1;
while ($parent_id) {
if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
return false;
}
$parent_id = $cat_cache[$cat_id]['cat_parent_id'];
if (empty($path)) {
if ($detail_path) {
$cat_url = ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id;
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
}
$path = "<a href=\"".$site_sess->url($cat_url)."\" class=\"clickstream\">".format_text($cat_cache[$cat_id]['cat_name'], 2)."</a>";
}
else {
$path = format_text($cat_cache[$cat_id]['cat_name'], 2);
}
}
else {
$path = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"clickstream\">".format_text($cat_cache[$cat_id]['cat_name'], 2)."</a>".$config['category_separator'].$path;
}
$cat_id = $parent_id;
} // end while
return $path;
}
Add after:
Darunter einfügenr:
function get_category_path_nohtml($cat_id = 0) { // MOD: Dynamic page title 1.7.7
global $config, $cat_cache;
$parent_id = 1;
while ($parent_id) {
if (!isset($cat_cache[$cat_id]['cat_parent_id'])) {
return false;
}
$parent_id = $cat_cache[$cat_id]['cat_parent_id'];
if (empty($path)) {
$path = $cat_cache[$cat_id]['cat_name'];
}
else {
$path = $cat_cache[$cat_id]['cat_name'].$config['category_separator'].$path;
}
$cat_id = $parent_id;
} // end while
return $path;
}
Locate:
Suche:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
$site_template->print_template($site_template->parse_template("error"));
exit;
}
Change this to:
Ändere das in:
function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
// MOD: Dynamic page title 1.7.7 BLOCK END
$site_template->print_template($site_template->parse_template("error"));
exit;
}
Step 2
Open categories.php, locate:
Öffne categories.php, suche:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id)."</span>";
Add after:
Füge darunter ein:
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id); // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
Change to:
Ändere in:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title 1.7.7
));
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
On a new Line Add above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 3
Open details.php, locate:
Öffne details.php, suche:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
Add after:
Füge darunter:
$page_title = $config['category_separator'].$lang['home'].$config['category_separator']; // MOD: Dynamic page title 1.7.7
Locate:
Suche
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
Add after:
Füge darunter:
$page_title = $config['category_separator'].$lang['lightbox'].$config['category_separator']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
Add after:
Füge darunter:
$page_title = $config['category_separator'].$lang['search'].$config['category_separator']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
Add after:
Füge darunter:
$page_title = $config['category_separator'].get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$clickstream .= $image_name."</span>";
Add after:
Füge darunter:
$page_title .= $image_name; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE to:
Ändere in:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 4
Open index.php, locate:
Öffne index.php, suche:
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
Add after:
Füge darunter:
$page_title = $config['category_separator'].str_replace("_", " ", ucfirst($template)); // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars("clickstream", $clickstream);
CHANGE to:
Ändere in:
$site_template->register_vars(array(
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title 1.7.7
));
On the next line down, locate:
Direkt danach kommen zwei weitere Zeilen, suche:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
}
CHANGE this to:
Ändere das in:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
} else { // MOD: Dynamic page title 1.7.7
$page_title = $config['category_separator'].$lang['home'];
$site_template->register_vars("page_title", $page_title);
}
Locate:
Suche:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
CHANGE this to:
Ändere das in:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title // MOD: Dynamic page title 1.7.7
));
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 5
Open lightbox.php, locate:
Öffne lightbox.php, suche
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['lightbox']."</span>";
Add after:
Füge darunter:
$page_title = $config['category_separator'].$lang['lightbox']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
Ändere das in:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 6
Open member.php, locate:
Öffne member.php, suche:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
Add after:
Füge darunter:
$page_title = $config['category_separator'].$txt_clickstream; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
Ändere das in:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 7
Open register.php, locate:
Öffne register.php, suche:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['register']."</span>";
Add after:
Füge darunter:
$page_title = $config['category_separator'].$lang['register']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
Ändere das in:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 8
Open search.php, locate:
Öffne search.php, suche:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>";
CHANGE this to:
Ändere das in:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
// $clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>"; // Original code
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
if (!empty($search_id['search_new_images'])) {
if( $search_id['search_new_images'] == 1 )
$txt_clickstream = $lang['new_images'];
else
$txt_clickstream = $lang['new_images_since'];
}
else {
$txt_clickstream = $lang['search'];
}
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].(($search_keywords) ? "<a href=\"".$site_sess->url(ROOT_PATH."search.php")."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'].$search_keywords : $txt_clickstream)."</span>"; // Show search keywords
$page_title = $config['category_separator'].$txt_clickstream;
// MOD: Dynamic page title 1.7.7 BLOCK END
Locate:
Suche:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
Ändere das in:
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 9
Open top.php, locate:
Öffne top.php, suche:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$clickstream .= $lang['top_images']."</span>";
CHANGE this to:
Ändere das in:
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a title=\"".$lang['home']."\" href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$page_title = $config['category_separator']; // MOD: Dynamic page title 1.7.7
if ($cat_id && isset($cat_cache[$cat_id])) {
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$page_title .= get_category_path_nohtml($cat_id).$config['category_separator']; // MOD: Dynamic page title 1.7.7
}
$clickstream .= $lang['top_images']."</span>";
$page_title .= $lang['top_images']; // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
CHANGE this to:
Ändere das in:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => $page_title, // MOD: Dynamic page title 1.7.7
Locate:
Suche:
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 10
Open postcard.php, locate:
Öffne postcard.php, suche
$site_template->print_template($site_template->parse_template($main_template));
Add on a new Line above:
Füge in einer neuen Zeile darüber:
// MOD: Dynamic page title 1.7.7 BLOCK BEGIN
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
// MOD: Dynamic page title 1.7.7 BLOCK END
Step 11
Open templates/default/header.html, locate:
Öffne templates/default/header.html, suche:
<title>{prepend_head_title}{site_name}</title>
CHANGE this to:
Ändere das in:
<title>{prepend_head_title}{site_name}{page_title}</title>
-
Thank you Benny for being so FAST at files editing :wink:
You did it just on the right time. :D
-
Hello,
that I have gladly done so.
I hope that this guide also contains no errors.
If you find errors, then please contact me.
-
Bravo man
its working like a Charm everywhere :D
i can see now titles like this
detail page : Andover - mysite.com / Nature & Scenic Wallpaper / Lakes / Andover
index page : mysite.com / home
sub Category page : Harry Potter - mysite.com / Movie & TV Wallpapers / Harry Potter
Category page : Movie & TV Wallpapers - mysite.com / Movie & TV Wallpapers
Top images page : mysite.com / Top images
Registration page : mysite.com / Registration
User profile page : mysite.com / User profile
now just a small kind of tweaking is still left if some how re-order the titles to such nature
detail page : Andover - Lakes / Nature & Scenic Wallpaper / mysite.com
index page : home / mysite.com
sub Category page : Harry Potter - / Harry Potter / Movie & TV Wallpapers / mysite.com
Category page : Movie & TV Wallpapers - Movie & TV Wallpapers / mysite.com
Top images page : Top images / mysite.com
Registration page : Registration /mysite.com
User profile page : User profile /mysite.com
then it will be perfect
-
The code, I can not change. If I change the code, I have also indicated their support.
However, I do not know really how to do this that I would have time for me to see!
-
Thanks anyways. Benny you did a great job.
we can go on gladly with these titles as well :D
cheers
-
Hello, this mod looks very interesting to me http://www.4homepages.de/forum/index.php?topic=6729.0 ,
but I work with and this 4images 1.7.6,
As I said here, but it did not work http://www.4homepages.de/forum/index.php?topic=6613.msg136222#msg136222 .
What is really required for version 1.7.6
Thank you very much and sorry for my English :?
-
This definitely works with 1.7.6
-
I can say the above mod most recently posted for 1.7.7 does not work. Going back to the first page to see if it will work for 1.7.6.
-
The modification works!
I did the modification for me to run and it was confirmed that it works!
-
The modification works!
I did the modification for me to run and it was confirmed that it works!
Can I understand you correctly, you did the steps on the first page for 1.7 and 1.7.1 and everything worked with out any alterations from the steps in the first page for 1.7.6?
-
in my 1.7.6 I have not this code in page_header.php
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
Ok it works if you go to stop here. Now Im going to try to get the image listed first....
-
Show me please your Page_Header.php file!
-
I got it, I am going to try to rearrange the order of the title to get the image name first. I know there are directions at the beginning of this thread.. I am just a little curious about if they fixed the error reporting issue... If the steps include that fix or not... will report back as soon as I am finished trying.
I agree everything works well with this and rearranging the name to the beginning also works well on 1.7.6
-
When I use this mod, I am seeing the following in the header code:
<title>Guangzhou Flower Festival p1 / The Life Photography. See The World.</title>
Isnt it bad to have / in the title code? How can I remove that?
-
If I am honest, then I do not know where this error comes. I have this error in my gallery not. Occurs because the error always occur?
-
does anyone else get this error? I know this is a popular mod?
-
how to display Autor $user_firstname $user_lastname in title on details and profile page?
http://www.4homepages.de/forum/index.php?topic=18257.0
-
Here is my page_header.php & I also don't have too.
I am using 1.7.7
-
:( :( :( :( :( :( :( No Support :( :( 8O 8O :(
-
Hello
Please someone has solution for this ?
Regards
-
Thank you for the subject
-
:( :( :( :( :( :( :( No Support :( :( 8O 8O :(
Excuse me, but keep to my instructions. In 1.7.7 don´t must be changed the page_header.php
-
Hello,
How to remove "/" that appears in the title pages?
-
can we use "," on the place of "/" ?
-
Does this dynamic page title (http://www.4homepages.de/forum/index.php?topic=6613.0) HELP in a good way for SEO purpose? will google search engine shows pages tittle with "/" ??
-
hai,
going to update 1.7.7 to 1.7.9, should i have to edit whole files again?
-
thanks for such a nice MOD..
well on my site i'm only using {page_title} without {site_name}
now the problem is that it shows "/" before the title begins.. i want to remove that..
-
hello anybody know the solution??? :roll: