4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Nicky on September 03, 2008, 08:45:33 PM

Title: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: Nicky on September 03, 2008, 08:45:33 PM
Hi all,

from a long time some1 wanted this mod.

Demo: http://www.nicky.net/4test/details.php?image_id=23 or http://gallery.krugozor.ru/img6143.html (Text above the image: Фото 28 из 32)

look for text : Image 4 from 21
number 4 is the number of the image in category depence on the sort method you did in the settings for you gallery
number 21 is the number of images in that category or from your lightbox or from your search result

4images user SAD http://www.4homepages.de/forum/index.php?action=profile;u=4778
provided to me how he did it, on this way SAD, THANK YOU.

okay here we go:
changed files:
./details.php
./lang/english/main.php
./templates/default/details.html

1.)
open ./details.php
search for

Code: [Select]
if (!$in_mode || empty($sql)) {
  $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1 AND cat_id = $cat_id
          ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
}
$result = $site_db->query($sql);

add BELOW
Code: [Select]
$all_image_number = $site_db->get_numrows($result);
same file

search for
Code: [Select]
$site_template->register_vars(array(
  "next_image_id" => $next_image_id,
  "next_image_name" => $next_image_name,

add BELOW

Code: [Select]
  "curr_image_number" => $act_key+1,
  "all_image_number" => $all_image_number,
  "lang_curr_image_number" => $lang['curr_image_number'],
  "lang_all_image_number" => $lang['all_image_number'],

2.)  :flag-en:
open ./lang/english/main.php

add BEFORE
Code: [Select]
?>
Code: [Select]
$lang['curr_image_number'] = "Image";
$lang['all_image_number'] = "from";

:flag-de: ONLY for german users
open ./lang/deutsch/main.php
and add this
Code: [Select]
$lang['curr_image_number'] = "Bild";
$lang['all_image_number'] = "von";


3.)
open ./templates/default/details.html

search for
Code: [Select]
                  </b>{endif msg}
add BELOW
Code: [Select]
                  <div align="center"><b>{lang_curr_image_number} {curr_image_number} {lang_all_image_number} {all_image_number}</b></div>
SAD, thx again for sharing this code!

ALL others, have phun!
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: SAD on September 04, 2008, 09:30:27 AM
Если что - обращайтесь.
Чем могу - помогу :)
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: yesme on February 14, 2009, 05:31:36 AM
Hi there,

Thank you for the mod. I have successfully installed it to my 4images.

But, may I know how do you create the bb-code into like that (see screenshot below) ?? Please help me with the scripts.

I know the mod is already released at http://www.4homepages.de/forum/index.php?topic=17912.0 (details page) but I do not know how to simplified or make it simple like that.

Thank you.
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: __G__ on February 14, 2009, 06:02:13 AM
thank you nicky & sad works great with 4images 1.7.6
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: V@no on February 14, 2009, 07:33:38 AM
use this in details.html template:
Code: (Template) [Select]
<?php
global $image_id;
?>

[gallery]<?=$image_id?>[/gallery]
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: yesme on February 14, 2009, 12:23:20 PM
V@no, you are too advanced. I cannot catch up.

Where to put the scripts? I have install UploadInfo in details page. How to substitute that?

Thanks.

UPDATES:

After I checked the function of the codes in the krugozor.ru the codes is used for the forum NOT for comment. I thought it is use for comment. I want it to be use in the comment because the existed mod using quite long codes e.g http://http..../data/.....[/img]]htt.../details.php?....(http://http..../data/.....) (http://htt.../details.php?....[IMG)

It is possible to simplify like that?

Thanks!
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: www.katzen.ag on August 07, 2010, 10:23:25 AM
Hello!,

almost perfect but i have a problem. It shows just "pictuse x from" and not "picture x from x" I'm using version 1.71
(http://www.katzen.ag/images/test/Capture.JPG)
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: V@no on August 07, 2010, 04:28:43 PM
are you sure you added new line below and not above in step 1?
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: www.katzen.ag on August 07, 2010, 06:54:52 PM
My fault... the problem is I made so much modifications...however... now it works. Thank you.

Hakan
Title: Re: [MOD] Image x from x on details page / Bild x von x auf details seite
Post by: Jan-Lukas on January 03, 2012, 08:55:27 PM
1.7.10  :thumbup: