Author Topic: An "Eastern Egg" from Jan? :D  (Read 17322 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
An "Eastern Egg" from Jan? :D
« on: May 12, 2003, 12:37:46 PM »
I was messing with top.php today and found very nice "not published" feature. we can show top images not fof all images, but for a specific category, by adding cat_id=XX in the address, like this: top.php?cat_id=XX where XX is nuber of category.
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 Apollo13

  • Addicted member
  • ******
  • Posts: 1.093
    • View Profile
An "Eastern Egg" from Jan? :D
« Reply #1 on: May 14, 2003, 08:45:57 PM »
well how have u find out?

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: An "Eastern Egg" from Jan? :D
« Reply #2 on: April 06, 2005, 11:18:34 PM »
yes nice tip!

vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: An "Eastern Egg" from Jan? :D
« Reply #3 on: April 07, 2005, 01:01:45 AM »
interessant

jetzt fehlt nur noch ein Link, den man ins Navigationsmenü einbauen und so aufrufen kann {url_top_cat} und dann halt immer die aktuelle Kategorie auswählt.

For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: An "Eastern Egg" from Jan? :D
« Reply #4 on: April 07, 2005, 11:11:48 AM »
Cool, is there a way to have a Link in any Categorie to click and then see the Top Pics???
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: An "Eastern Egg" from Jan? :D
« Reply #5 on: April 07, 2005, 01:12:49 PM »
Yes, there is - I use that on my page :) with a link like "Category TOP 10" ...reminds me, that I wanted to translate this on my page :)
Go to a category and you'll see a link in the saying "TOP 10 této kategorie" and that's it.

As soon as I'll have access to my source-files I'll post it here... unless somebody won't do that faster ;)


BTW: TNX V@no for discovering that.
MAяTRIX


Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: An "Eastern Egg" from Jan? :D
« Reply #6 on: April 08, 2005, 12:03:17 AM »
Please Post it :)
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: An "Eastern Egg" from Jan? :D
« Reply #7 on: April 08, 2005, 12:24:16 AM »
Step 1.

open ./includes/page_header.php
and find

Code: [Select]
  "url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
  "url_top_images" => $site_sess->url(ROOT_PATH."top.php"),

ad below:

Code: [Select]
  "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php?cat_id=".$cat_id),
  "lang_top_cat_images" => $lang['lang_top_cat_images'],

Step 2.

open ./lang/yourlanguage/main.php
at the end, just before ?> add this:

Code: [Select]
$lang['lang_top_cat_images'] = "Category TOP 10";
Step 3.

and in categories.html (or also details.html I think anywhere else it will return cat_id=0) where you wish to have the link add this:
Code: [Select]
<a href="{url_top_cat_images}">{lang_top_cat_images}</a>
that's easy, isn't it?  :)

well, sure - your not yet finished :wink: you have to save the files and upload these  :wink:
MAяTRIX


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: An "Eastern Egg" from Jan? :D
« Reply #8 on: April 08, 2005, 12:29:12 AM »
I think this line:
Code: [Select]
  "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php?cat_id={cat_id}"),shoud be:
Code: [Select]
  "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php?cat_id=".$cat_id),
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 martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: An "Eastern Egg" from Jan? :D
« Reply #9 on: April 08, 2005, 12:47:40 AM »
Thank you for bugtracking  8)

I guess you're right, but even my wrong version works fine for me :)

What speaks against "my solution"? (just to learn smt new)
MAяTRIX


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: An "Eastern Egg" from Jan? :D
« Reply #10 on: April 08, 2005, 01:02:13 AM »
that's because u'r using v1.7 :)
your version might (probably) not work on v1.7.1 ;) remmember? "the tags must be registered before parsing a template" ;)
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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: An "Eastern Egg" from Jan? :D
« Reply #11 on: April 08, 2005, 01:03:16 AM »
Hi,

1.7 Users do this

change in main.php

Code: [Select]
"lang_top_cat_images" => "Category TOP 10";
to

Code: [Select]
$lang['lang_top_cat_images'] = "Category TOP 10";
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: An "Eastern Egg" from Jan? :D
« Reply #12 on: April 08, 2005, 01:06:34 AM »
That's a bug!!!! hehe j/k ;)
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 martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: An "Eastern Egg" from Jan? :D
« Reply #13 on: April 08, 2005, 01:16:05 AM »
OMG!
I guess I have to go to bed   :roll:

Next time I'll change the posting procedure from
1) post "mod" 2) go sleepin'
to
1) get some sleep 2) think if I'm awake enough 3) think again if I'm really awake 4) drink a huge cup of coffee 5) post the "mod" :wink:

No Jens - it's not only for 1.7 users it's a typo caused by mental absence whilst typing...

I replaced both...

Danke Jens, спасибо V@no and good night  :D
MAяTRIX


Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: An "Eastern Egg" from Jan? :D
« Reply #14 on: April 08, 2005, 10:34:15 AM »
I did it that way:

includes/page_header.php

there is this code
Code: [Select]
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
  "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php".(($cat_id && preg_match("/categories.php/", $self_url)) ? "?".URL_CAT_ID."=".$cat_id : "")),

SEARCH
Code: [Select]
"lang_top_images" => $lang['top_images'],
Add below
Code: [Select]
  "lang_top_cat_images" => $lang['top_cat_images'],
lang/YOURLANGUAGE/main.php

SEARCH
Code: [Select]
$lang['top_images'] = "Top Bilder";
ADD below
Code: [Select]
$lang['top_cat_images'] = "Top Kategoriebilder";
I added this
Code: [Select]
<a href="{url_top_cat_images}">{lang_top_cat_images}</a><br />
in my user_loginform.html -> klick

It works on v1.7

EDIT
But not in detail-view  :?
For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages