4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on June 08, 2003, 07:41:58 AM
-
This little addon will make category link in the clickstream (on details.php page) pointing on the page where the image is.
Lets try explain one more time with an example ;)
Lets say u click on an image from "random image", then, u can see in the clickstream path of that image ( Home / cat name / subcat name / image name )
then, u click on category name in the clickstream ( subcat name ). It will open categories.php page on first page, but to find where was that image u might need go next page, then maybe next and next and next... I found this little bit anoying, so this mod will help with that "problem" - it will open categories.php page on page where the image is ( categories.php?cat_id=xx&page=xx )
Step 1.
Open /details.php
Find:unset($image_id_cache);
Add before:$cur_page = ceil((array_search($image_id, $image_id_cache) + 1) / $perpage);
Step 1.2.
Find:$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
Replace with:$clickstream .= get_category_path($cat_id, 1, $cur_page).$config['category_separator'];
Step 2.
Open /includes/functions.php
Find:function get_category_path($cat_id = 0, $detail_path = 0) {
Replace with:function get_category_path($cat_id = 0, $detail_path = 0, $page = 0) {
Step 2.2a original
I leave this "version" of Step 2.2a so u have a chose ;)
Personaly I'd suggest use Step 2.2b by effemmess
Find: if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
}
Replace with: if ($page > 1) {
$cat_url .= "&".URL_PAGE."=".$page;
}else{
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
}
}
Step 2.2b by effemmess
Find: return $path;
Add before: if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">page ".$page."</a>";
}
Demo:
http://gallery.vano.org/5686
(click at category name in top-left corner)
-
works like a charm. Great idea!
-
Excellent. It's annoyed me too and I meant to look into it but didn't have the time.
Thanks!
-
:D Useful Mod!!!
Thx V@no
-
Thank you V@no this is very usefull Mod!
Is it possible to have an extra link on the detail Page which brings you directly to the page where the thumbnail image is. This would be some kind of an extract from the clickstream on the detail Page.
Example
Clickstream: Home / cat name / subcat name / image name
Extra Link to: subcat name
For Your Demo this would be:
http://come.no-ip.com/categories.php?cat_id=6&page=64
Any Idea, how this could be done?
Thank you, Romeo
-
Hi all,
I have little addon to v@no´s addon:
If you would to have the clickstream in the form as
Home / cat name / subcat name / page2 / image name
then you must do the following in addition to (after!) v@no´s steps:
Step 3.1.
Open /includes/functions.php
Find:
$cat_url .= "&".URL_PAGE."=".$page;
Replace with:
$pagereg= "&".URL_PAGE."=".$page;
Step 3.2
Find:
return $path;
Add before:
if ($page>1){
$path=$path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$pagereg)."\" class=\"clickstream\">"."Seite ".$page."</a>";
}
greetz
effemmess
-
exelent! great idea! :D :idea:
added to my site too ;)
P.S. with your modifications, u dont even need do Step 2.2
u can simply add your modifications like this: if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">page ".$page."</a>";
}
-
Alright, now I'm confused. I already implemented this mod when it was posted.
What do I have to change to include the changes from effemmess and V@no :?: I can't get this to work.
<cough> Maybe edit the original post? :wink:
-
ok, I've added it to the original post.
I left old Step 2.2., so ppl who already installed it, could restore the changes.
-
If anyone would like to see this clickstream in categories.php
Home / cat name / subcat name / Page2
Open categories.php
Find:
$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>";
Replace with:
$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, ($page > 1), $page)."</span>";
-
Hi,
I have a new addon to my addon of v@no´s addon..., :D
and a question to discuss.
First the addon:
If you want it in your language you must do following:
In Step 2.2. by effemmess
do not add:
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">page ".$page."</a>";
}
but
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
}
Step 2.3. by effemmess
Find:
global $site_sess, $config, $cat_cache, $url;
Replace:
global $site_sess, $config, $cat_cache, $url,$lang;
Step 3. by effemmess
Open /lang/.../main.php
Add wherever you want after <?
and before ?>
this
$lang['page'] = "Seite"; // or whatever you want (e.g. straniza :-) )
That´s all.
--------------------------
And now the question:
If I do not do
if ($page > 1) {
$extension= "&".URL_PAGE."=".$page;
}else{
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
}
}
and in consequence if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$extension."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
}
the value of $regs[1] == $page and in consequence the subcat hasn´t the link to page1. In v@no´s demolink it´s okay, but why??? :?:
Here is my complete not functioning function get_category_path
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0) { //nicht i.O.
global $site_sess, $config, $cat_cache, $url, $lang;
$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
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
}
return $path;
}
And here is my complete at my site functioning function get_category_path
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0) { // i.O.
global $site_sess, $config, $cat_cache, $url, $lang;
$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 ($page > 1) {
$cat_url_ext = "&".URL_PAGE."=".$page;
}
else{
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
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url.$cat_url_ext)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>";
}
return $path;
}
Has anybody (v@no) an idea? :?: :?
cu
-
I have a new addon to my addon of v@no´s addon..., :D
LMAO :lol: good one ;)
actualy I cheated...:D ;)
I have modifyed the function, so, it wont show link for / page 2 when u are browsing categories, and only show as a link from details.php
I think would be better if I just show u my function:function get_category_path($cat_id = 0, $detail_path = 0, $page = 0, $page_details = 0) {
global $site_sess, $config, $cat_cache, $url, $lang;
$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 && ($page > 1 || $page_details)) {
$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
if ($page > 1){
$pagereg = "&".URL_PAGE."=".$page;
$page = ($page_details) ? "<a href=\"".$site_sess->url($cat_url.$pagereg)."\" class=\"clickstream\">".$lang['lang_userlist_page'].$page."</a>" : $lang['lang'].$page;
$path = $path.$config['category_separator'].$page;
}
return $path;
}
then, in details.php I changed call function to this: $clickstream .= get_category_path($cat_id, 1, $cur_page, 1).$config['category_separator'];
and in categories.php to this:$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, 1, $page)."</span>";
P.S. not sure why this happend, but sometimes when I enter in details.php, both / cat_name / and / page 2 / have link with &page=2
-
I know why and I already fixed it yesterday. :wink:
I'll post what I did in a few minutes.
-
Well somebody can put all the correct steps in only one post :?
i´m feeling :evil: :!: :idea: :lol:
-
i´m feeling :evil: :!: :idea: :lol:
ah, no, its not good when Xwall feels :evil:.... 8O
;) j/k
lets way for Chris. but for now, u can do:
1) steps from 1 to 2.1 and chose step 2.2. from either of two in the original post
2) do "version" from my post above. (it's compleate mod there just search in details.php and categories.php for $clickstream find very simular to the one u need change it ;))
-
P.S. not sure why this happend, but sometimes when I enter in details.php, both / cat_name / and / page 2 / have link with &page=2
ok, I figured out when this happend and why:
it happends when I enter in details page from categories.php with page=xx
so, to solve this problem, in my lattest code replace if (!empty($regs[1]) && $regs[1] != 1) {
with: if (!empty($regs[1]) && $regs[1] != 1 && !$page_details) {
-
Sorry, I'm stuck on something at work and can't do the post now. I'll try to do it tonight.
-
Okay, here's what I can contribute.
V@no: The reason sometimes you have $page=2 on category name from details.php is because the variable $url in the function get_category_path() stores the referer URL, not the current URL. So that affects this line:
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
since the while loop is executing one more time than before the mod (for the page number)
Next post is my complete version of this mod.
P.S.: You can use print_r to output variable information. It's a great php built-in function that's useful for testing/debugging. For example:
print_r($regs);
might output something like this:Array (
-
Here is the clickstream I set up with this version of the mod. Note that all bold items would be a clickable link. When CategoryName is bold, the link would take you to page 1 for that category.
Clickstream from categories.php while on page 1
Home | CategoryName
Clickstream from categories.php while on page 2 or higher
Home | CategoryName | Page 4
Clickstream from details.php when image is on page 1
Home | CategoryName | ImageName
Clickstream from details.php when image is on page 2 or higher
Home | CategoryName | Page 4 | ImageName
:wink: Looks like V@no and I took a similar approach with the addition of another parameter for get_category_path()
1. Open includes/functions.php
1.1 Locate
function get_category_path($cat_id = 0, $detail_path = 0)
Replace with:
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0, $category_path = 0) {
1.2 Locate:
if (!empty($regs[1]) && $regs[1] != 1) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
Replace with:
if (!empty($regs[1]) && $regs[1] != 1 && $page == 0) {
$cat_url .= "&".URL_PAGE."=".$regs[1];
}
1.3 Locate:
return $path;
Insert before:
if ($page > 1){
$path .= $config['category_separator'];
if( $detail_path && !$category_path )
$path .= "<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">Page ".$page."</a>";
else
$path .= "Page ".$page."</a>";
}
2. Open details.php
Locate:
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
Replace with:
$clickstream .= get_category_path($cat_id, 1, $cur_page).$config['category_separator'];
3. Open categories.php
$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>";
Replace with:
$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, ($page > 1), $page, 1)."</span>";
Note: This makes clickstream a little inconsistent because lightbox.php has the potential to span multiple pages. So does member.php. In fact, I did a quick search and here are the files that use get_category_path()
$ find . -name "*.php" -print -exec grep get_category_path {} \;
./admin/admin_functions.php
./admin/admin_global.php
./admin/backup.php
./admin/categories.php
./admin/checkimages.php
./admin/comments.php
./admin/email.php
./admin/home.php
./admin/images.php
./admin/index.php
./admin/progress.php
./admin/resizer.php
./admin/settings.php
./admin/stats.php
./admin/templates.php
./admin/thumbnailer.php
./admin/usergroups.php
./admin/users.php
./admin/validateimages.php
./categories.php
$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>";
./config.new.php
./details.php
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
./download.php
./global.php
./includes/auth.php
./includes/constants.php
./includes/db_field_definitions.php
./includes/db_mysql.php
./includes/db_utils.php
./includes/email.php
./includes/functions.php
function get_category_path($cat_id = 0, $detail_path = 0) {
./includes/image_utils.php
./includes/page_footer.php
./includes/page_header.php
./includes/paging.php
./includes/search_utils.php
./includes/sessions.php
./includes/template.php
./includes/upload.php
./includes/upload_definitions.php
./includes/zip.php
./index.php
./install.php
./lang/deutsch/admin.php
./lang/deutsch/install.php
./lang/deutsch/main.php
./lang/english/admin.php
./lang/english/install.php
./lang/english/main.php
./lang/french/admin.php
./lang/french/install.php
./lang/french/main.php
./lang/spanish/admin.php
./lang/spanish/install.php
./lang/spanish/main.php
./lightbox.php
./login.php
./logout.php
./member.php
$txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
$txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
$txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
$txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
$txt_clickstream = get_category_path($image_row['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'];
$txt_clickstream = get_category_path($image_row['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'];
$txt_clickstream = get_category_path($image_row['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'];
$txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
$txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
./phpinfo.php
./postcards.php
$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'];
./register.php
./search.php
./top.php
$clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
./config.php
-
very nice, Chris!
but I didnt get this part:
Note: This makes clickstream a little inconsistent because lightbox.php has the potential to span multiple pages. So does member.php.
what were u talking about?
what lightbox has with get_category_path() ?
all it add in clickstream is name "lighbox" that's all...
-
Exactly my point. If you have 3 pages of images stored in your lightbox and you click on an image from page 2, you only get:
Home | Light Box
and there's no easy way to get:
Home | Light Box | Page 2
-
Exactly my point. If you have 3 pages of images stored in your lightbox and you click on an image from page 2, you only get:
Home | Light Box
and there's no easy way to get:
Home | Light Box | Page 2
ah oh uh now I got it...
and u are right, its not easy to do...
-
Hi ladies and gentlemen,
do I have an addon for the addon of the addon to the addon ... ???
Yes!!! :D
But first my version of our function:
function get_category_path($cat_id = 0, $detail_path = 0, $page = 0, $page_details = 0) { // V3 by effemmess
global $site_sess, $config, $cat_cache, $url, $lang;
$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;
/* imo we do not need this, because we do later our own page-handling...
if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
printf($regs[1]."<br />");
if (!empty($regs[1]) && $regs[1] != 1 && !$page_details) {
$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
$pagereg = "&".URL_PAGE."=".$page;
$page = ($page_details) ? "<a href=\"".$site_sess->url($cat_url.$pagereg)."\" class=\"clickstream\">".$lang['page']." ".$page."</a>" : $lang['page']." ".$page;
$path = $path.$config['category_separator'].$page;
return $path;
}
clickstream in categories.php:
$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, 1, $page)."</span>";
clickstream in details.php:
$clickstream .= get_category_path($cat_id, 1, $cur_page, 1).$config['category_separator'];
It produces following:
Clickstream from categories.php while on page 1
Home | CategoryName | Page 1
Clickstream from categories.php while on page 2 or higher
Home | CategoryName | Page 4
Clickstream from details.php when image is on page 1
Home | CategoryName | Page 1 | ImageName
Clickstream from details.php when image is on page 2 or higher
Home | CategoryName | Page 4 | ImageName
Note that all bold items are clickable, the categorie-items are links to page 1.
Imo this is the best solution...what do you think. :roll:
@Xwall
How do you feel now? :D
And now:
In all other php-files with paging you can do following:
before $clickstream="..." add
$page= (empty($page)) ? 1 :$page;
and edit the clickstream-row!
for example in lightbox.php:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$clickstream.= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php")."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
$clickstream.= $lang['page']." ".$page."</span>";
cu and good night...mhhh only 2,5 h to sleep... :(
effemmess
PS: you can show, how it looks at: http://www.auf-einem-blick.de
bye
-
Thank you V@no this is very usefull Mod!
Is it possible to have an extra link on the detail Page which brings you directly to the page where the thumbnail image is. This would be some kind of an extract from the clickstream on the detail Page.
Example
Clickstream: Home / cat name / subcat name / image name
Extra Link to: subcat name
From me the same question.
But I would like to have the link "hidden" under a button (picture).
(http://test.totaaldigitaal.nl/clickstream.jpg)
Piet
-
Is it possible to have an extra link on the detail Page which brings you directly to the page where the thumbnail image is. This would be some kind of an extract from the clickstream on the detail Page.
Example
Clickstream: Home / cat name / subcat name / image name
Extra Link to: subcat name
I have the same need. Can anybody help me?
-
And now:
In all other php-files with paging you can do following:
before $clickstream="..." add
$page= (empty($page)) ? 1 :$page;
and edit the clickstream-row!
for example in lightbox.php:
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$clickstream.= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php")."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
$clickstream.= $lang['page']." ".$page."</span>";
I have install the Multi Lightbox Box. What must i change to have this function in lightbox (see on which site i am)???
The Original from the Multi Lightbox Mod
/*
MOD MULTI-LIGHTBOXES
START REPLACE
*/
}
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
/*
MOD MULTI-LIGHTBOXES
END REPLACE
*/
-
Thank you V@no this is very usefull Mod!
Is it possible to have an extra link on the detail Page which brings you directly to the page where the thumbnail image is. This would be some kind of an extract from the clickstream on the detail Page.
Example
Clickstream: Home / cat name / subcat name / image name
Extra Link to: subcat name
I need the same, or only the extra link. Is this possible?
editet: I found what I need here: http://www.4homepages.de/forum/index.php?topic=2683.msg70658#msg70658
-
Excellent!
Exactly what I was looking for.
-
BTW, I noticed that this feature doesn't really work on searched pictures.
Eg. if search for something (or press the "new images" for say) and you detail an image, this mod will take you back to the start, not the page you were in. :)
Any thoughts on that?
-
Ok, i installed this mod but now i have this url-s from clickstrean: categories.php?cat_id=19&page=4&page=4 and can`t figure out what is wrong...
Could somebody enlight me?
Thanks.
-
You must have installed two versions of Step 2.2
You should use only one of them.
P.S. I've updated original post and added color to these steps, should be less confusing now :)
-
You must have installed two versions of Step 2.2
You should use only one of them.
P.S. I've updated original post and added color to these steps, should be less confusing now :)
Thanks for fast replay, Vano
Just want to let you know i`ve reversed to backup and installed again, now it printed on the page (clickstream) page 2 / page 2 with same in the url.
Now, for a while i`ve decided not to use this MOD.
Thank you.
-
Just what I was looking for! Excellent =D I found the clickstream page thing annoying too. I prefer the first method though. I tried the second one and it just didn't.. look that good heh.
-
wow thats really nice mod :)
-
hi
show me one error in details.php line 176
$cur_page = ceil((array_search($image_id, $image_id_cache) + 1) / $perpage);
this is the error message
Warning: array_search() [function.array-search]: Wrong datatype for second argument in C:\AppServ\www\encanto\details.php on line 176
used MySQL 5.0.27
-
Is no mySQL error. Is PHP error. What PHP version you use ?
-
hi
used PHP Version 5.2.5
thank
-
Hallo zusammen,
wollte mal fragen, ob es auch möglich ist einfach unter dem Bild in der Navigationsleite (Bild vorwärts, Bild zurück) in details.php einen Link "zurück zur Übersicht" zu erschaffen, zusätzlich zum Pfad der oben angezeigt wird ? Der sollte dann auf die aktuelle Unterseite gehen von der der Besucher gekommen ist (auch wenn er vorher vll schon 1, 2 Fotos ausgewählt hat). Wenn man im Browser zurück klickt erscheint nämlich immer die Fehlermeldung, dass die Seite nicht mehr aktuell ist..
Vielen Dank für eure Hilfe !!
-
erstens würde ich Bild zurück / Bild vor über und unter dem Bild einfügen
...und außerdem den Clickstream in die Tabelle einfügen
dann kommst du ja automatisch immer in die jeweilige Kategorie/Unterkategorie (die wird ja im Clickstream angezeigt) oder eben sogar noch mehr Ebenen höher, ganz nach belieben
in details.html vor:
<div align="center">
{image}
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr valign="top">
<td class="row2"> {if prev_image_name}{lang_prev_image}<br />
<b><a href="{prev_image_url}">{prev_image_name}</a></b>
<!-- <br /><br /><a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a> -->
{endif prev_image_name} </td>
<td align="right" class="row2"> {if next_image_name}{lang_next_image}<br />
<b><a href="{next_image_url}">{next_image_name}</a></b>
<!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
{endif next_image_name}</td>
</tr>
</table>
</td>
</tr>
</table>
einfügen
(kannst du dir einrichten, wie du möchtest)
-
Hi at first thanks for that great mod...It works nearly perfectly. I have installed the Google friendly urls. Now there is a problem if i use the orginal code.
in functions.php i change the code to:
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$cat_url."&page=".$page."\" class=\"clickstream\">Seite ".$page."</a>";
no it works but the format is:
categories.php?cat_id=1&page=2 and not k_catname_1.html?page=2
i know i have to use:
.$site_sess->url but if i do this the url categories.php?cat_id=1&page=2 looks so: k_1.2.
I hope someone have an idea;) thanks
-
Which exactly google friendly url are you referring to?
-
i used that mod:
http://www.4homepages.de/forum/index.php?topic=17598.0
-
Did you actually try use 2.2b version without any extra modifications? it should work just fine...
-
Yes i have try 2.2b...But there the url looks like this:
k1.2.html
and thats wrong my functions.php look so:
function get_category_path($cat_id = 0, $detail_path = 0, $page = 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
if ($page > 1){
$path = $path.$config['category_separator']."<a href=\"".$site_sess->url($cat_url."&".URL_PAGE."=".$page)."\" class=\"clickstream\">page ".$page."</a>";
}
return $path;
}
-
Sorry, it's a bug in the mod you've mentioned. Perhaps the author of that mod can assist you or this already was covered in the replies of that mod somewhere...
-
Works Great :D
-
nice mod..
can anybody tell how to fix the link on "Page #"
In my case..
Home / Category / Sub-Cat / Page 6
everything is fine but page 6 link is wrong.. it is something like "cat#.6.htm" where 6 is page number.
thanks
-
and what is it supposed to be?
-
sorry for the bad explanation
the original link is
http://www.my-site.com/wallpapers/cat-automobiles-3.htm?page=6
while in clickstream it directs to
http://www.my-site.com/wallpapers/cat3.6.htm
which does not exist..
-
Which SEO mod you've installed? and is it the "original" mod or modified version from replies?
-
.htaccess from here
http://www.4homepages.de/forum/index.php?topic=17598.0
and session.php from here
http://www.4homepages.de/forum/index.php?topic=6729.0
-
That is one your problems, you should do both changes from the same mod..
-
now i'm running both .htaccess and session.php of this thread "http://www.4homepages.de/forum/index.php?topic=17598.0" but even then my problem is not solved, still same not working hyperlink on page is coming.. please help me out.. Thanks
-
Try this:
http://www.4homepages.de/forum/index.php?topic=17598.msg147338#msg147338
P.S. any further questions regarding this issue, please reply to the SEO mod ;)
-
Worked like a charm.. you made my day :D
Thanks alot :)