4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: thunderstrike on January 03, 2008, 05:24:25 PM
-
Wooooh 8O
I like :)
// Step 1
In top.php file,
in // Rating block -
find:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"
replace:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."&top_list_rating=1&top_list_position=" . $i . "\"
in // Votes block -
find:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"
replace:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."&top_list_votes=1&top_list_position=" . $i . "\"
in // Hits block -
find:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"
replace:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."&top_list_hits=1&top_list_position=" . $i . "\"
in // Downloads block -
find:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"
replace:
".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."&top_list_downloads=1&top_list_position=" . $i . "\"
// Step 2
In details.php file,
find:
if (!$image_id) {
redirect($url);
}
add after:
if (preg_match("/top.php/", $url)) {
if (isset($HTTP_GET_VARS['top_list_rating']) || isset($HTTP_POST_VARS['top_list_rating'])) {
$top_list_rating = (isset($HTTP_GET_VARS['top_list_rating'])) ? intval(trim($HTTP_GET_VARS['top_list_rating'])) : intval(trim($HTTP_POST_VARS['top_list_rating']));
} else {
$top_list_rating = 0;
}
if (isset($HTTP_GET_VARS['top_list_votes']) || isset($HTTP_POST_VARS['top_list_votes'])) {
$top_list_votes = (isset($HTTP_GET_VARS['top_list_votes'])) ? intval(trim($HTTP_GET_VARS['top_list_votes'])) : intval(trim($HTTP_POST_VARS['top_list_votes']));
} else {
$top_list_votes = 0;
}
if (isset($HTTP_GET_VARS['top_list_hits']) || isset($HTTP_POST_VARS['top_list_hits'])) {
$top_list_hits = (isset($HTTP_GET_VARS['top_list_hits'])) ? intval(trim($HTTP_GET_VARS['top_list_hits'])) : intval(trim($HTTP_POST_VARS['top_list_hits']));
} else {
$top_list_hits = 0;
}
if (isset($HTTP_GET_VARS['top_list_downloads']) || isset($HTTP_POST_VARS['top_list_downloads'])) {
$top_list_downloads = (isset($HTTP_GET_VARS['top_list_downloads'])) ? intval(trim($HTTP_GET_VARS['top_list_downloads'])) : intval(trim($HTTP_POST_VARS['top_list_downloads']));
} else {
$top_list_downloads = 0;
}
if (isset($HTTP_GET_VARS['top_list_position']) || isset($HTTP_POST_VARS['top_list_position'])) {
$top_list_position = (isset($HTTP_GET_VARS['top_list_position'])) ? intval(trim($HTTP_GET_VARS['top_list_position'])) : intval(trim($HTTP_POST_VARS['top_list_position']));
} else {
$top_list_position = 0;
}
}
// Step 3
In includes/functions.php file,
find:
global $self_url,
add after (same line):
$top_list_rating, $top_list_votes, $top_list_hits, $top_list_downloads, $top_list_position,
find:
"thumbnail_openwindow" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, 1),
add after:
"top_list_position" => (preg_match("/top.php/", $self_url) && isset($top_list_rating) && $top_list_rating == 1 || isset($top_list_votes) && $top_list_votes == 1 || isset($top_list_hits) && $top_list_hits == 1 || isset($top_list_downloads) && $top_list_downloads == 1 && isset($top_list_position) && $top_list_position > 0) ? true : false,
"lang_top_list_position_title" => $lang['top_list_position_title'],
"lang_top_list_rating" => (isset($top_list_rating) && $top_list_rating == 1 && isset($top_list_position) && $top_list_position > 0) ? preg_replace("/" . $site_template->start . "top_list_position" . $site_template->end . "/siU", $top_list_position, $lang['top_list_rating_position']) : "",
"lang_top_list_votes" => (isset($top_list_votes) && $top_list_votes == 1 && isset($top_list_position) && $top_list_position > 0) ? preg_replace("/" . $site_template->start . "top_list_position" . $site_template->end . "/siU", $top_list_position, $lang['top_list_votes_position']) : "",
"lang_top_list_hits" => (isset($top_list_hits) && $top_list_hits == 1 && isset($top_list_position) && $top_list_position > 0) ? preg_replace("/" . $site_template->start . "top_list_position" . $site_template->end . "/siU", $top_list_position, $lang['top_list_hits_position']) : "",
"lang_top_list_downloads" => (isset($top_list_downloads) && $top_list_downloads == 1 && isset($top_list_position) && $top_list_position > 0) ? preg_replace("/" . $site_template->start . "top_list_position" . $site_template->end . "/siU", $top_list_position, $lang['top_list_downloads_position']) : "",
// Step 4
In lang/english/main.php file,
add in top ?>:
$lang['top_list_position_title'] = "Image position in top list";
$lang['top_list_rating_position'] = "This image is on position: <b>{top_list_position}</b> for ranking.";
$lang['top_list_votes_position'] = "This image is on position: <b>{top_list_position}</b> for votes.";
$lang['top_list_hits_position'] = "This image is on position: <b>{top_list_position}</b> for hits.";
$lang['top_list_downloads_position'] = "This image is on position: <b>{top_list_position}</b> for downloads.";
// Step 5
In templates/your_template/details.html file, design HTML table and use this - way you want:
{if top_list_position}
{if lang_top_list_rating}{lang_top_list_rating}{endif lang_top_list_rating}
{if lang_top_list_votes}{lang_top_list_votes}{endif lang_top_list_votes}
{if lang_top_list_hits}{lang_top_list_hits}{endif lang_top_list_hits}
{if lang_top_list_downloads}{lang_top_list_downloads}{endif lang_top_list_downloads}
{endif top_list_position}
;)
-
I fix full post. ;)
-
;-(((( is not shown!
-
And ... what you use in details.html file ?
-
{if top_list_position}
{if lang_top_list_rating}{lang_top_list_rating}{endif lang_top_list_rating}
{if lang_top_list_votes}{lang_top_list_votes}{endif lang_top_list_votes}
{if lang_top_list_hits}{lang_top_list_hits}{endif lang_top_list_hits}
{if lang_top_list_downloads}{lang_top_list_downloads}{endif lang_top_list_downloads}
{endif top_list_position}
this and I updated main.php
-
You click in top.php file for see image and try this ?
-
@skiemor
... very nice idea ...
@thunderstrike
... and very exelent coding ...
... I tested your modification ... with sucess ...
... you should it published in "Mods & Plugins (Requests & Discussions)" ...
... from there I can move it to "Mods & Plugins (Releases & Support)" with your starter-name ...
-
Works, Thunderstrike, you are the greatest :thumbup: !!!
And quickly realized!!!!
Best Chris.
-
he, some pics are in Top-List of rating, voting, hits and comments ---> should be 4 signs???
-
should be 4 signs???
1 of each for user click image.
-
Hi Thunderstrike, I changed "downloads" to "comments", is that enough? Because not works for comments ;-)
-
Hi Thunderstrike, I changed "downloads" to comments, is that enough? Because not works for comments
Comments is no code in top.php file by Jan. This is right. If need for change name ... you decide for this but is no use and false info to user. :mrgreen:
-
@mawenzi:
Nicky 08:31:26 PM Splitting the topic "Sign Detail-Image if it is in Top-List?" into two topics.
and I get first post.
Thank Nicky.
-
Hi, please help.
In my toplists are:
Rating: don't work - I don't know, whhyyy!!! :cry:
Votes: work
Hits: work
Comments: work
-
Rating: don't work - I don't know, whhyyy!!!
Sigh - is say ? Is do for no work ? :roll:
-
Rating: don't work - I don't know, whhyyy!!!
Sigh - is say ? Is do for no work ? :roll:
Could you check please? What do you need?
-
For you say what is don't work ... is do ? Is say ? Mawenzi is test this and report no problem . . .
-
(http://img517.imageshack.us/img517/7821/eng9tu.gif) ... a translation for lang/deutsch/main.php file ...
(http://img517.imageshack.us/img517/1378/deu8yc.gif) ... eine Übersetzung für die lang/deutsch/main.php Datei ...
$lang['top_list_position_title'] = "Position in Toplist:";
$lang['top_list_rating_position'] = "Dieses Bild ist auf Platz <b>{top_list_position}</b> nach Höhe der Bewertungen.";
$lang['top_list_votes_position'] = "Dieses Bild ist auf Platz <b>{top_list_position}</b> nach Anzahl der Stimmen.";
$lang['top_list_hits_position'] = "Dieses Bild ist auf Platz <b>{top_list_position}</b> nach Anzahl der Hits.";
$lang['top_list_downloads_position'] = "Dieses Bild ist auf Platz <b>{top_list_position}</b> nach Anzahl der Downloads.";
(http://img517.imageshack.us/img517/1378/deu8yc.gif) ... Hinweis :
Die Anzeige der Plätze der Toplist in der Detailseite funktioniert nur über den jeweiligen Link in der Toplist ! Erfolgt der Zugriff auf die Detailseite über einen anderen Link (was eigentlich der Regelfall sein sollte), dann wir an der Stelle nichts angezeigt.
-
Die Anzeige der Plätze der Toplist in der Detailseite funktioniert nur über den jeweiligen Link in der Toplist ! Erfolgt der Zugriff auf die Detailseite über einen anderen Link (was eigentlich der Regelfall sein sollte), dann wir an der Stelle nichts angezeigt.
HTML design is left by gallery master. If need for align lines, create HTML table. ;)
-
... my hint ( "Hinweis" ) has nothing to do with html design ...
... it says only the way of working of this MOD over the links in the toplist and not over other 4images links ...
-
... my hint ( "Hinweis" ) has nothing to do with html design ...
... it says only the way of working of this MOD over the links in the toplist and not over other 4images links ...
Oh ... ok thank for post ...
-
Hi, please help.
In my toplists are:
Rating: don't work - I don't know, whhyyy!!! :cry:
Votes: work
Hits: work
Comments: work
I can't found an error. :evil:
Is there anybody who likes to checking 5 files???? ;-)))))
Chris.
-
Problem fix.
-
As you can see, the pic is marked with "...image_id=363&top_list_rating=1&top_list_position=1", but the line below the title in detail.html is missing.
For votes, hits and comments it works...
I think, it's an error of mine (not code-problem, mawenzi has tested is with success, everything works), but I can't fix this problem.
Best Chris.
-
Perfect :)
main.php for arabic
:flag-sa:
$lang['top_list_position_title'] = "ترتيب الصورة في قائمة افضل الصور";
$lang['top_list_rating_position'] = "هذه الصورة تحتل رقم: <b>{top_list_position}</font> من ناحية الترتيب.";
$lang['top_list_votes_position'] = "هذه الصورة تحتل رقم: <b>{top_list_position}</b> من ناحية التصويت";
$lang['top_list_hits_position'] = "هذه الصورة تحتل رقم: <b>{top_list_position}</b> من ناحية المشاهدات";
$lang['top_list_downloads_position'] = "هذه الصورة تحتل رقم: <b>{top_list_position}</b> من ناحية التحميل";
thanks thunder :)
-
i liked the way u guyz did the mod
but can we do this :
if the image is in the top of the hits ( number 1 )
we dont have to go to the top and click the link to see the words "$lang['top_list_hits_position'
what i want is to be shown auto in the image itself without going to toplist :S
lets assume that we have image called thunder.gif and its the top of hits
and anyone when see thunder.gif he can see "$lang['top_list_hits_position' :D
is that easy :??
and its better to say
this image is 1st in the hits top list
this image is 2nd in the hits top list
and so on
-
i liked the way u guyz did the mod
You guys ?? I only create the MOD and publish. :?
what i want is to be shown auto in the image itself without going to toplist
I no like, sorry. This is slow down gallery.
and its better to say
this image is 1st in the hits top list
this image is 2nd in the hits top list
Easy - you need edit includes/functions.php file in show_image function. ;)
-
Sorry
Quote
i liked the way u guyz did the mod
You guys ?? I only create the MOD and publish.
thanks thunder
include guyz not mean they made this MOD :P i mean the idea was from someone and the coding from u :P
anyway sorry for misunderstanding
-
Ok, is no problem. ;)
-
Hi Thunderstrike, if this installed: [Mod] Search Engine Friendly URLs aka Short URLs
http://www.4homepages.de/forum/index.php?topic=6729.msg29453#msg29453
it can't work, right?
Chris.
-
it can't work, right?
SEO URL MOD is nothing do with my MOD ... why you need work SEO with MOD ? ...