4images Forum & Community

General / Allgemeines => Chit Chat => Topic started by: V@no on May 12, 2003, 12:37:46 PM

Title: An "Eastern Egg" from Jan? :D
Post by: V@no 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.
Title: An "Eastern Egg" from Jan? :D
Post by: Apollo13 on May 14, 2003, 08:45:57 PM
well how have u find out?
Title: Re: An "Eastern Egg" from Jan? :D
Post by: Vincent on April 06, 2005, 11:18:34 PM
yes nice tip!

vincent
Title: Re: An "Eastern Egg" from Jan? :D
Post by: RoadDogg 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.

Title: Re: An "Eastern Egg" from Jan? :D
Post by: JensF 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???
Title: Re: An "Eastern Egg" from Jan? :D
Post by: martrix 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.
Title: Re: An "Eastern Egg" from Jan? :D
Post by: JensF on April 08, 2005, 12:03:17 AM
Please Post it :)
Title: Re: An "Eastern Egg" from Jan? :D
Post by: martrix 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:
Title: Re: An "Eastern Egg" from Jan? :D
Post by: V@no 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),
Title: Re: An "Eastern Egg" from Jan? :D
Post by: martrix 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)
Title: Re: An "Eastern Egg" from Jan? :D
Post by: V@no 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" ;)
Title: Re: An "Eastern Egg" from Jan? :D
Post by: JensF 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";
Title: Re: An "Eastern Egg" from Jan? :D
Post by: V@no on April 08, 2005, 01:06:34 AM
That's a bug!!!! hehe j/k ;)
Title: Re: An "Eastern Egg" from Jan? :D
Post by: martrix on April 08, 2005, 01:16:05 AM
OMG! (http://photo.overlord.cz/templates/blue_wonder/smiles/doh.gif)
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
Title: Re: An "Eastern Egg" from Jan? :D
Post by: RoadDogg 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 (http://www.4homepages.de/forum/index.php?topic=7142.msg31595#msg31595)

It works on v1.7

EDIT
But not in detail-view  :?
Title: Re: An "Eastern Egg" from Jan? :D
Post by: Vincent on April 09, 2005, 11:07:01 PM
there is this code whats to do with it?

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 : "")),


Title: Re: An "Eastern Egg" from Jan? :D
Post by: V@no on April 09, 2005, 11:45:37 PM
add it into page_header.php
the first line of that code is already in there, just search for it and add the second line.
Title: Re: An "Eastern Egg" from Jan? :D
Post by: Vincent on April 10, 2005, 06:41:37 PM
RoadDogg it works perfect
but why this part of the code - both line have ben already inside!
vincent

Quote
there is this code

Code:
"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 : "")),
Title: Re: An "Eastern Egg" from Jan? :D
Post by: RoadDogg on April 10, 2005, 06:55:34 PM
I don´t know, I just wanted to give the tip that we don´t have to define a new "url_top_cat_images" in page_header.php
Title: Re: An "Eastern Egg" from Jan? :D
Post by: Albert on July 02, 2005, 09:29:08 AM
Is there a way that I could pull out only the Most Viewed picture from the category with a tag.

Example: The tag {mostviewed_cat130}   would bring out only one thumbnail with a link to the details page.

Is this possible?

Cheers,

Albert Abrantes