4images Forum & Community
General / Allgemeines => Chit Chat => Topic started 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.
-
well how have u find out?
-
yes nice tip!
vincent
-
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.
-
Cool, is there a way to have a Link in any Categorie to click and then see the Top Pics???
-
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.
-
Please Post it :)
-
Step 1.
open ./includes/page_header.php
and find
"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:
"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:
$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:
<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:
-
I think this line:
"url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php?cat_id={cat_id}"),
shoud be: "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php?cat_id=".$cat_id),
-
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)
-
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" ;)
-
Hi,
1.7 Users do this
change in main.php
"lang_top_cat_images" => "Category TOP 10";
to
$lang['lang_top_cat_images'] = "Category TOP 10";
-
That's a bug!!!! hehe j/k ;)
-
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
-
I did it that way:
includes/page_header.php
there is this 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 : "")),
SEARCH
"lang_top_images" => $lang['top_images'],
Add below
"lang_top_cat_images" => $lang['top_cat_images'],
lang/YOURLANGUAGE/main.php
SEARCH
$lang['top_images'] = "Top Bilder";
ADD below
$lang['top_cat_images'] = "Top Kategoriebilder";
I added this
<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 :?
-
there is this code whats to do with it?
includes/page_header.php
there is this 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 : "")),
-
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.
-
RoadDogg it works perfect
but why this part of the code - both line have ben already inside!
vincent
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 : "")),
-
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
-
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