• [MOD] Image x from x on details page / Bild x von x auf details seite 5 0 5 1
Currently:  

Author Topic: [MOD] Image x from x on details page / Bild x von x auf details seite  (Read 22236 times)

0 Members and 1 Guest are viewing this topic.

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
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!
« Last Edit: September 04, 2008, 09:14:14 AM by Nicky »
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline SAD

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Туристические ФотоАльбомы
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #1 on: September 04, 2008, 09:30:27 AM »
Если что - обращайтесь.
Чем могу - помогу :)
Sergey


Offline yesme

  • Jr. Member
  • **
  • Posts: 61
  • Yes for 4images!
    • View Profile
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #2 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.
Love 4images! @--^-----

Offline __G__

  • Sr. Member
  • ****
  • Posts: 286
    • View Profile
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #3 on: February 14, 2009, 06:02:13 AM »
thank you nicky & sad works great with 4images 1.7.6

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #4 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]
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline yesme

  • Jr. Member
  • **
  • Posts: 61
  • Yes for 4images!
    • View Profile
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #5 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?....

It is possible to simplify like that?

Thanks!
« Last Edit: February 14, 2009, 12:45:14 PM by yesme »
Love 4images! @--^-----

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #6 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
KatzenAG - das grosse Katzenportal im Internet

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #7 on: August 07, 2010, 04:28:43 PM »
are you sure you added new line below and not above in step 1?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #8 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
KatzenAG - das grosse Katzenportal im Internet

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.288
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Image x from x on details page / Bild x von x auf details seite
« Reply #9 on: January 03, 2012, 08:55:27 PM »
1.7.10  :thumbup:
Danke Harald