4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: SLL on May 25, 2003, 10:32:40 PM

Title: [Mod] Mini-Top
Post by: SLL on May 25, 2003, 10:32:40 PM
Quote
Mini-Top MOD for 4images - Image Gallery Management System.

Version:      1.0

Author:       Silly Little Lamer (sll@dalnet.ru) and V@no (http://gallery.vano.org)

Description:

This Mod shows additional table on the first (and/or any other page) of your gallery, with the thumbnail of one winner from each category most rated, voted, commented, viewed and downloaded.

Installation Level:    Easy
Installation Time:      5 Minutes

Files To Edit:       2

   /index.php
   /lang/english/main.php

download: http://faces.dalnet.ru/files.php?id=5&l=english (http://faces.dalnet.ru/files.php?id=5&l=english)

If you receive errors after installing this mod, try download package from the attachment below and replace mini_top.php from it
Title: [Mod] Mini-Top
Post by: Bomba on May 26, 2003, 12:32:07 AM
awesome!!!
didn't tryed yet but im sure i will :)

thanks
would it be possible to show this mini top outside gallery? and if possible on another site and server

thanks
Title: [Mod] Mini-Top
Post by: toto1 on May 26, 2003, 09:04:39 AM
very good
just one error :

include/ index.php  no files

files index.php in the root

 :D  :D
Title: [Mod] Mini-Top
Post by: LoOpP on May 26, 2003, 10:42:44 AM
great MOD thxxx
Title: [Mod] Mini-Top
Post by: Lucifix on May 26, 2003, 02:13:54 PM
im am stupid or what... i cant find index.php file in includes directory  :oops:
Title: [Mod] Mini-Top
Post by: Lucifix on May 26, 2003, 02:15:56 PM
ups didnt see toto1 post...
Title: [Mod] Mini-Top
Post by: Bomba on May 26, 2003, 03:18:59 PM
would it be possible to show random top images from each section on this mini top?
i mean, this shows always the same pic, only the #1 of each top section and i think it would be nice to show each time page loads a different pic from that top, one of the top 10 of each top section.

possible?
thanks
Title: [Mod] Mini-Top
Post by: lakeside on May 26, 2003, 05:43:30 PM
This is a good easy mod, though what I've found by using the top rated image mod (different mod from this one), is that since it's always in the same position, it gets more attention, thus it always stays at the top because more people see it.  I think this will end up doing that as well unless you've got an extremely active visitor base.  So far I've only got around 58 registered users, but have plenty of hits to the site, but since my putting up the mod that has the top image, the one where you can choose to have it display by votes, ratings, hits, comments etc.  The image has never changed, that is to say it keeps getting more votes, more comments because it is seen the most.

Just an observation.
Title: [Mod] Mini-Top
Post by: www.girls-on-bikes.com on May 30, 2003, 10:02:21 AM
Would just like to add by saying this is a great mod, and was very easy to install, took no time at all.

Great job!  :D
Title: Mini Top Datei
Post by: sammy on May 30, 2003, 12:42:09 PM
womit mu ich die download datei ffnen, bekomme nur Hyroglyphen..
Title: Re: [Mod] Mini-Top
Post by: ib41 on June 01, 2003, 10:58:42 PM
Very nice hack, but the INSTRUCTIONS seriously needs to be UPDATED

 :?
Title: [Mod] Mini-Top
Post by: SLL on June 01, 2003, 11:16:09 PM
:twisted:  Instructions!?!?!   To add ONE line to the index.php and THREE the language text???
Title: Re: [Mod] Mini-Top
Post by: V@no on June 01, 2003, 11:22:23 PM
Quote from: ib41
Very nice hack, but the INSTRUCTIONS seriously needs to be UPDATED

 :?
what's wrong with the instructions? more easier way to install this MOD only when somebody else install it for u....:lol:
Title: Re: [Mod] Mini-Top
Post by: ib41 on June 02, 2003, 12:06:09 AM
Quote from: V@no
Quote from: ib41
Very nice hack, but the INSTRUCTIONS seriously needs to be UPDATED

 :?
what's wrong with the instructions? more easier way to install this MOD only when somebody else install it for u....:lol:


Install doc failed to mention/correct :  :twisted:

Files To Edit:  2
actually 3 as later it mentions "OPEN    /template/xxxx/home.html"


   /includes/index.php
index.php is NOT in includes but ROOT


no mention of mini_top_bit_alt.html in the install DOC and where to put it ( would confuse n00bs  :?  )
Title: More translations requested
Post by: fanncy pants on June 02, 2003, 12:40:37 PM
Nice hack!  I have more than the english and deutch languages installed at my gallery, therefore am looking for translations to the code below in spanish, italian, french, portuguese, chinese, japanese, and swedish, if available.  Thanks!



Code: [Select]


/lang/english/main.php

//-----------------------------------------------------
//--- Mini-Top ----------------------------------------
//-----------------------------------------------------

$lang['mini_top_title'] = "Hot-Shots";
$lang['mini_top_hits'] = "Most viewed";
$lang['mini_top_rating'] = "Most rated";
$lang['mini_top_downloads'] = "Most downloaded";
$lang['mini_top_comments'] = "Most commented";
$lang['mini_top_votes'] = "Most voted";

[/code]
Title: Re: [Mod] Mini-Top
Post by: Lord Nite on June 10, 2003, 11:28:03 AM
Quote from: ib41

no mention of mini_top_bit_alt.html in the install DOC and where to put it ( would confuse n00bs  :?  )


The mini_top_bit_alt.html template is an alternate way to show the mini top stats.

Examples:
mini_top_bit.html: http://come.no-ip.com
mini_top_bit_alt.html: http://gallery.nitetek.com
Title: Error MINI-TOP with templates of vierstra.com
Post by: excitex2 on June 23, 2003, 09:43:50 PM
Regards,
Sorry for my English one, I do not speak it because of it use a translator of the net.
I have installed MINI-TOP MOD and it works very well, but besides I have several languages installed in order that the users use that of his(its) language.
 The proble is the following one: When I use a language different from that of beginning, desconfigura them <table>. In a language they go out smaller, in others bigger.
Someone knows why this happens(passes) and how it is solved?
Thank you in yours time
Excitex2
Title: Re: More translations requested
Post by: ACmonKey on June 26, 2003, 06:01:58 PM
Quote from: fanncy pants
Nice hack!  I have more than the english and deutch languages installed at my gallery, therefore am looking for translations to the code below in spanish, italian, french, portuguese, chinese, japanese, and swedish, if available.  Thanks!



Code: [Select]


/lang/english/main.php

//-----------------------------------------------------
//--- Mini-Top ----------------------------------------
//-----------------------------------------------------

$lang['mini_top_title'] = "Hot-Shots";
$lang['mini_top_hits'] = "Most viewed";
$lang['mini_top_rating'] = "Most rated";
$lang['mini_top_downloads'] = "Most downloaded";
$lang['mini_top_comments'] = "Most commented";
$lang['mini_top_votes'] = "Most voted";

[/code]



Spanish here ;)

/lang/spanish/main.php

//-----------------------------------------------------
//--- Mini-Top ----------------------------------------
//-----------------------------------------------------

$lang['mini_top_title'] = "Mas popular";
$lang['mini_top_hits'] = "Mas visto";
$lang['mini_top_rating'] = "Mejor evaluado";
$lang['mini_top_downloads'] = "Mas descargado";
$lang['mini_top_comments'] = "Mas comentado";
$lang['mini_top_votes'] = "Mas votado";

I'm sure there will be some Spanish people who will say that there are better translations but Spanish is a very "complicated" language were there are several words for the same meaning.

For example in Top Votes you can say: Mas votado OR Mas calificado OR Mas puntuado.
Really just depends on what you like best and the rest of the translations of your website. If you already have Rating translated then use the same word.
Title: [Mod] Mini-Top
Post by: Bomba on June 27, 2003, 04:08:29 AM
portuguese here:

Code: [Select]
$lang['mini_top_title'] = "As Mais Populares";
$lang['mini_top_hits'] = "Mais vista";
$lang['mini_top_rating'] = "Melhor votao";
$lang['mini_top_downloads'] = "Mais downloads";
$lang['mini_top_comments'] = "Mais comentada";
$lang['mini_top_votes'] = "Mais votada";
Title: Re: [Mod] Mini-Top
Post by: disparos on March 13, 2005, 09:14:32 AM
I have installed this MOD and it works, thanks for the work!!! :wink:

But now I get this notices:

Code: [Select]
Notice: Constant GET_CACHES already defined in /home/disparos/public_html/culos/mini_top.php on line 3

Notice: Constant ROOT_PATH already defined in /home/disparos/public_html/culos/mini_top.php on line 4

Notice: Undefined variable: additional_sql in /home/disparos/public_html/culos/mini_top.php on line 26

Notice: Undefined variable: selection_cutoff in /home/disparos/public_html/culos/mini_top.php on line 29

Notice: Undefined variable: additional_sql in /home/disparos/public_html/culos/mini_top.php on line 26

Notice: Undefined variable: selection_cutoff in /home/disparos/public_html/culos/mini_top.php on line 29

Notice: Undefined variable: additional_sql in /home/disparos/public_html/culos/mini_top.php on line 26

Notice: Undefined variable: selection_cutoff in /home/disparos/public_html/culos/mini_top.php on line 29

Notice: Undefined variable: additional_sql in /home/disparos/public_html/culos/mini_top.php on line 26

Notice: Undefined variable: selection_cutoff in /home/disparos/public_html/culos/mini_top.php on line 29

What's wrong???
Title: Re: [Mod] Mini-Top
Post by: centopeia on April 04, 2005, 11:54:36 PM
Well, this is not a conventional way of solving problems (this is more like a quick and dirt), but to correct those errors, just change the first lines of the mini_top.php to look like these.

Your errors shoud disapear.


//define('GET_CACHES', 1);
//define('ROOT_PATH', './');

$additional_sql="";
$selection_cutoff=0;

Regards,

Jos
Title: Re: [Mod] Mini-Top
Post by: JensF on May 07, 2005, 10:30:34 PM
Hi there,

what must i do to have 4 images not 3 in the Mini Top???

In my Image Settings in ACP i have Image table cells to 3. And now i have it for the Mini Top.

But for the Mini Top i will have 4...to see all Tops....



See it on my Page...click the Signature.
Title: Re: [Mod] Mini-Top
Post by: V@no on May 07, 2005, 10:37:22 PM
in mini_top.php replace
Code: [Select]
$num_of_cells = $config['image_cells'];with
Code: [Select]
$num_of_cells = 4;
Title: Re: [Mod] Mini-Top
Post by: JensF on May 07, 2005, 11:02:52 PM
Thanks for this.....
Title: Re: [Mod] Mini-Top
Post by: kindian on July 11, 2005, 01:33:12 AM
Hi

How do I put each photo inside a table (3 tables)? Instead of them all inside of the same table?

thanks
Title: Re: [Mod] Mini-Top
Post by: megalomania on July 13, 2005, 06:24:12 PM
ola,

i have installed the "mini-top mod" and it works fine.
but in my case, the mini-top only makes sense in the subcategories, instead of the home-temlate.

my problem is, that after editing the template "categories.html", it won't show the mini-top.
although "This Mod shows additional table on the first (and/or any other page) of your gallery, with the thumbnail of one winner from each category ..."
is mentioned in the the install.doc.

Could please someone help me to find a solution?
Title: Re: [Mod] Mini-Top
Post by: kindian on July 14, 2005, 02:47:18 PM
I have 3 rating shown on my mini-top ("Most voted"; "Most voted" and "Most viewed").

Now how do I put "Most commented" instead of "Most viewed".

someone can help?
Title: Re: [Mod] Mini-Top
Post by: V@no on July 14, 2005, 02:52:06 PM
I have 3 rating shown on my mini-top ("Most voted"; "Most voted" and "Most viewed").

Now how do I put "Most commented" instead of "Most viewed".

someone can help?
its already there, but I dont think its working properly...
this lines are not correct (IMO):
Code: [Select]
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
 $selection_alt = array('votes DESC', 'rating DESC', 'name ASC', 'name ASC', 'name ASC');

should be:
Code: [Select]
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
 $selection_alt = array('votes DESC', 'rating DESC', 'hits DESC', 'comments DESC', 'downloads DESC');
Title: Re: [Mod] Mini-Top
Post by: kindian on July 14, 2005, 05:25:09 PM
It worked. Thanks man  :mrgreen:
Title: Re: [Mod] Mini-Top - Hack : Mini-Top in all categories
Post by: chri{Bi} on August 28, 2005, 12:08:41 PM
Quote
my problem is, that after editing the template "categories.html", it won't show the mini-top.
although "This Mod shows additional table on the first (and/or any other page) of your gallery, with the thumbnail of one winner from each category ..."
is mentioned in the the install.doc.

 :D here is a way to add mini-top in for categories:

 :arrow: 3 files to edit from 4images root (install : less than 5 min) :

categories.php
mini_top.php
<your_template>/categories.html

--- BEGIN ---

STEP 1:
open categories.php and find:
Quote
//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------

add just before :
Code: [Select]
//-------------------------------------------[ [Mod] Mini-Top ]
include(ROOT_PATH.'mini_top.php'); //---[ Mod] Mini-Top - ADD for Mini-top in categories]
//-------------------------------------------[/[Mod] Mini-Top ]

STEP 2 :
open mini_top.php and find:
Quote
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {

add just before :
Code: [Select]
$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : ""; //---[ [Mod] Mini-Top - ADD for Mini-top in categories]
STEP 2.1 :
still in mini_top.php and find (warning : sql query):
Quote
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

and replace by :
Code: [Select]
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
$cat_match_sql
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

STEP 3 :
open in your template categories.php and find :

Quote
{cat_description} (Hits: {cat_hits})
<hr size="1" />

add after:
Code: [Select]
<!-- [ Mod] Mini-Top - ADD for Mini-top in categories] -->
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_title} for this category</td>
<td class="head1" valign="top"align="right"><a href="{url_top_cat_images}" title="Top for current category"><b>{lang_top_images} for this category</b></a></td>
</tr>
</table></td>
</tr>
<tr>
<td class="head1" align="center">{mini_top_images}</td>
</tr>
</table>
<br />
<!-- [ Mod] Mini-Top - ADD for Mini-top in categories] -->

--- END ---

Open your categories and sub-categories, and you will find a mini-top for current category only 8)

Let me know if you meet problems with this part :wink:
Title: Re: [Mod] Mini-Top
Post by: donpedro on September 05, 2005, 10:22:57 AM
Hi folks,

I tried to download the Mini Top MOD but I could not get it.

Can someone support me with the files ?

thx in advance
dp
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on September 05, 2005, 01:56:12 PM
the link works very well for me !!!

 :arrow: http://faces.dalnet.ru/files.php?id=5&l=english
Title: Re: [Mod] Mini-Top
Post by: donpedro on September 05, 2005, 05:00:05 PM
Hi,

yep, the link works now but I receive unreadable files ... with which program can these files be opened ?

thx
dp
Title: Re: [Mod] Mini-Top
Post by: TheOracle on September 05, 2005, 05:49:31 PM
WinRAR most likely. 8)
Title: Re: [Mod] Mini-Top
Post by: donpedro on September 05, 2005, 10:36:39 PM
what I download is not Winrar packed (I have Winrar installed)

I can open the file only with notepad and the result is (I post only some lines):

PK    5R.-m*        install.doc   `SE'iZzzAQ BK[zB%Ғ6   M-吺 \OED@Xſ(.^"ࢋ(\̛hu3'oy%=}ߣB aa2!dn?}y"wqZ5 GnMݚ̐E(H%:xk?qﺻ}[ݍmd%n޷r?s;cJ% ?|!Z짤 4|x٦߶"#I^[B"$| :/w9:v˳;k-5?>?c%`=;]ooKo{>v   ΋rOwnO"]uDKaAibc.ghmvd?0Nz:{9`osǮoV۞IB #d frɉ"5tAcwe:nJY(VMBIՠ1 Sb#z](Sm,BU٢iJQ*hLf0+""=%MkhYBDDNoJu^#4&!9^(Z^YDHlR,^V
K%Q
t


???

regards
dp

Title: Re: [Mod] Mini-Top
Post by: TheOracle on September 05, 2005, 10:40:17 PM
Are you using the latest version of WinRAR ? Looks like you're using an old version.
Title: Re: [Mod] Mini-Top
Post by: donpedro on September 05, 2005, 10:51:22 PM
Yes, I have downloaded a lot of things during the last few days.

what I receive is nothing Winrar packed, only "files 13kb Archive"

dp
Title: Re: [Mod] Mini-Top
Post by: TheOracle on September 05, 2005, 10:54:54 PM
Odd ... I can use the package without any problems. I open the documentation with Wordpad and the PHP files with WinRAR's integrated viewer window. It might be something to do with your downloads ... I assume you're using IE ?
Title: Re: [Mod] Mini-Top
Post by: donpedro on September 05, 2005, 10:59:37 PM
yes I do ...

and now, using Netscape, I GOT IT !

I love IE

thanks
dp
Title: Re: [Mod] Mini-Top
Post by: fuzionative on September 15, 2005, 03:58:29 PM
How in h... do you get the mini top images to be on top of each other   :?:
ex.
most viewed
most ......
most ......
most ......

so i can fit it into my page ?

been lookin for it, but frankly i suck in php

any help ?
Title: Re: [Mod] Mini-Top
Post by: IWS_steffen on September 25, 2005, 03:37:40 AM
HI

This Mod works perfect ... great !!! 

Many thanks   

coooool

Steffen
Title: Re: [Mod] Mini-Top - Hack : Mini-Top in all categories
Post by: JensF on October 12, 2005, 12:02:44 AM
Quote
my problem is, that after editing the template "categories.html", it won't show the mini-top.
although "This Mod shows additional table on the first (and/or any other page) of your gallery, with the thumbnail of one winner from each category ..."
is mentioned in the the install.doc.

 :D here is a way to add mini-top in for categories:

 :arrow: 3 files to edit from 4images root (install : less than 5 min) :

categories.php
mini_top.php
<your_template>/categories.html

--- BEGIN ---

STEP 1:
open categories.php and find:
Quote
//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------

add just before :
Code: [Select]
//-------------------------------------------[ [Mod] Mini-Top ]
include(ROOT_PATH.'mini_top.php'); //---[ Mod] Mini-Top - ADD for Mini-top in categories]
//-------------------------------------------[/[Mod] Mini-Top ]

STEP 2 :
open mini_top.php and find:
Quote
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {

add just before :
Code: [Select]
$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : ""; //---[ [Mod] Mini-Top - ADD for Mini-top in categories]
STEP 2.1 :
still in mini_top.php and find (warning : sql query):
Quote
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

and replace by :
Code: [Select]
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
$cat_match_sql
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

STEP 3 :
open in your template categories.php and find :

Quote
{cat_description} (Hits: {cat_hits})
<hr size="1" />

add after:
Code: [Select]
<!-- [ Mod] Mini-Top - ADD for Mini-top in categories] -->
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_title} for this category</td>
<td class="head1" valign="top"align="right"><a href="{url_top_cat_images}" title="Top for current category"><b>{lang_top_images} for this category</b></a></td>
</tr>
</table></td>
</tr>
<tr>
<td class="head1" align="center">{mini_top_images}</td>
</tr>
</table>
<br />
<!-- [ Mod] Mini-Top - ADD for Mini-top in categories] -->

--- END ---

Open your categories and sub-categories, and you will find a mini-top for current category only 8)

Let me know if you meet problems with this part :wink:


When i have no Pics in a categorie i see this http://www.terraristik-galerie.de/categories.php?cat_id=6 (scroll down). What must i do to invisible the Mini Mod when no Pics are in the categorie...????
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on October 12, 2005, 11:29:22 AM
Quote
What must i do to invisible the Mini Mod when no Pics are in the categorie...????

 :?: what do you want to make invisible? the entire block or only the parts which don't have a classification?
Title: Re: [Mod] Mini-Top
Post by: JensF on October 12, 2005, 11:33:56 AM
I think the best is

the parts which don't have a classification
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on October 12, 2005, 12:54:06 PM
here a fast solution which answers your request... but it will be necessary to improve it:

open mini_top.php and find :
Quote
show_image($result);
 $site_template->register_vars("lang_mini_top_mode", $lang['mini_top_'.$selection[$cnt]]);
 $mini_top_images .= $site_template->parse_template("mini_top_bit");
replace by :
Code: [Select]
if (!$result) {
$mini_top_images .= "<b>".$lang['no_images']."<br><br>";
$mini_top_images .= "<b>".$lang['mini_top_'.$selection[$cnt]]."<b><br>";
} else {
show_image($result);
$site_template->register_vars("lang_mini_top_mode", $lang['mini_top_'.$selection[$cnt]]);
$mini_top_images .= $site_template->parse_template("mini_top_bit");
}

tell me if that is appropriate to you :wink:
Title: Re: [Mod] Mini-Top
Post by: JensF on October 12, 2005, 10:58:13 PM
hhmm,

thanks but......


see -> http://www.terraristik-galerie.de/categories.php?cat_id=6   (scroll down)
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on October 12, 2005, 11:09:19 PM
code updated.

hhmm,

thanks but......


see -> http://www.terraristik-galerie.de/categories.php?cat_id=6 (scroll down)
:?: and the question is ?????
Title: Re: [Mod] Mini-Top
Post by: spellchecker on October 12, 2005, 11:11:43 PM
code updated.

hhmm,

thanks but......


see -> http://www.terraristik-galerie.de/categories.php?cat_id=6   (scroll down)
:?: and the question is ?????


I think JensF was expecting to find something there, even though that category IS empty.

JensF: Subcats are not part of the parent category's minitop.


I guess it would be useful not to display anything, if the category is empty.
Title: Re: [Mod] Mini-Top
Post by: JensF on October 12, 2005, 11:15:37 PM
hhmm,

the Text in the Box are not good. Ok, i can change it but i think it is better than the complete Mini Top is Invisible when no Pics are in the categorie...
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on October 12, 2005, 11:51:55 PM
i think it is better than the complete Mini Top is Invisible when no Pics are in the categorie...

well, look at this link : http://www.terraristik-galerie.de/top.php?cat_id=6
IMO it does not matter that images are present or not in the category, the treatment is the same one.
the principle is identical on this mod except that the user is warned by $lang['no_images'] (and you're right : change this to whatever you want).

I do not see where is the problem :roll:
Title: Re: [Mod] Mini-Top
Post by: JensF on October 16, 2005, 10:31:54 PM
Hello,

what must i do to see in empty categories the main top Images. I mean the pics they i can see on the index.php
Title: Re: [Mod] Mini-Top
Post by: Nasser on October 27, 2005, 11:36:24 AM
great MOD .. thanks
Title: Re: [Mod] Mini-Top
Post by: Nasser on November 03, 2005, 07:18:33 PM
what if I don't want a category to be incloded in mini top ?
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on November 04, 2005, 11:10:46 AM
what must i do to see in empty categories the main top Images. I mean the pics they i can see on the index.php
if I understood your request, you would like that when there are no top images in the category, it shows picture from the general top.
 :? that is likely to be confused for the user who must surely expect to find the shown pics in the category in progress !

the problem is as follows: when you are in a specific category, the parameter of the category is used for the request.
 :arrow: it's possible but the implementation of your request will increase the quantity of SQL requests and will change the code to a significant degree...


what if I don't want a category to be incloded in mini top ?
that's the way the original mod works !!! :wink:
 :arrow: do not install mini-top for all categories (http://www.4homepages.de/forum/index.php?topic=5874.msg45161#msg45161) if you don't want to see the category in your mini-top.

Regards.
Title: Re: [Mod] Mini-Top
Post by: Nasser on November 04, 2005, 07:08:36 PM
Quote
what if I don't want a category to be incloded in mini top ?
that's the way the original mod works !!! :wink:
 :arrow: do not install mini-top for all categories (http://www.4homepages.de/forum/index.php?topic=5874.msg45161#msg45161) if you don't want to see the category in your mini-top.

Regards.
I want the MOD to be working as it is .. but there is an expert artist's gallery that I don't want to be incloded in Mini-Top at the home.html page ..
so is there is a way to do this ?
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on November 04, 2005, 09:40:04 PM
:oops:  sorry... you think about the entire mod...
well, here is the solution to exclude some selected categories from the mini-top.

open/edit mini_top.php file

 :arrow: 1 - find :
Quote
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
 $selection_alt = array('votes DESC', 'rating DESC', 'name ASC', 'name ASC', 'name ASC');

add after :
Code: [Select]
$not_in_cat = ""; //list of categories which should not be included in top image, separated by coma (i.e. "1,2,3,7")
 :arrow: 2 - find in the SQL query:
Quote
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
replace by:
Code: [Select]
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN ($not_in_cat) AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."

it should works :wink:

Cheers.
Title: Re: [Mod] Mini-Top
Post by: Nasser on November 04, 2005, 11:35:11 PM
it's works .. thank you very much :D
Title: Re: [Mod] Mini-Top
Post by: ivan on November 08, 2005, 09:09:09 AM
hello,
the following problem has, with me on the side (mini top) lang_hits and lang_downloads is not indicated.  appear only pay, the language however not.

in which file where do I have to still insert this??

Code: [Select]
"lang_hits" => $lang['hits']
"lang_downloads" => $lang['downloads'],

here again the problem:

now 28 | 1
correctly hits 28 | downloads 1


gruss ivan

http://www.bildergallery.com
Title: Re: [Mod] Mini-Top
Post by: Acidgod on November 08, 2005, 09:40:00 AM
ich antworte mal auf deutsch... *g*

eigentlich ist das schon in der mini_top.php definiert...

Kann man sich das mal anschauen?
Title: Re: [Mod] Mini-Top
Post by: ivan on November 08, 2005, 12:21:45 PM
hallo,

danke fr dein bescheid!

hier das example...

(http://www.igraf.ch/bestof.gif)


code mini_top_bit.html

Code: [Select]
{lang_mini_top_mode}

{thumbnail}

{image_name} {if image_is_new}{lang_new}{endif image_is_new} ({user_name_link})

{cat_name}
{lang_hits} {image_hits} | {lang_downloads} {image_downloads}
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on November 08, 2005, 02:12:36 PM
in which file where do I have to still insert this??

Code: [Select]
"lang_hits" => $lang['hits']
"lang_downloads" => $lang['downloads'],

 :arrow: in mini_top.php file :
 find the line containing :
Quote
$site_template->parse_template("mini_top_bit")

and add BEFORE:
Code: [Select]
$site_template->register_vars(
"lang_hits" => $lang['hits'],
"lang_downloads" => $lang['downloads']
);

try that and tell us if it still does not work :wink:
Title: Re: [Mod] Mini-Top
Post by: ivan on November 08, 2005, 08:41:10 PM
hello, this is my file mini_top


Code: [Select]
<?php

define
('GET_CACHES'1);
define('ROOT_PATH''./');
$user_access get_permission();

$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

 
$mini_top_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
 
$mini_top_images .= "<tr class=\"imagerow1\">\n";

 
$selection = array('hits''downloads''votes''comments''rating');
 
$selection_alt = array('hits DESC''downloads DESC''votes DESC''comments DESC''rating DESC');
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');

 
$num_of_cells $config['image_cells'];
 
$num_of_cells $num_of_cells count($selection) ? count($selection) : $num_of_cells;

 for (
$cnt 0$cnt $num_of_cells$cnt++) {

 
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN ("
.get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_"
.$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

 
$result $site_db->query_firstrow($sql);
 
show_image($result);
 
$site_template->register_vars("lang_mini_top_mode"$lang['mini_top_'.$selection[$cnt]]);
 
$mini_top_images .= $site_template->parse_template("mini_top_bit");
 
$mini_top_images .= "\n</td>\n";
}

 
$mini_top_images .= "</tr>\n";
 
$mini_top_images .= "</table>\n";

 
$site_template->register_vars(array(
  
"mini_top_images" => $mini_top_images,
  
"lang_hits" => $lang['hits'],
  
"lang_downloads" => $lang['downloads'],
  
"lang_mini_top_title" => $lang['mini_top_title']
 ));
unset(
$mini_top_images);

?>

as they see, the code is already original in it.
which is wrong at this code?

greetz ivan


http://www.bildergallery.com
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on November 08, 2005, 08:53:27 PM
hello Mr. mini_top.php! happy to meet you :mrgreen: :mrgreen: :mrgreen:

but more seriously bildergallery, did you make the modification about which I spoke? that seems rather simple.
Title: Re: [Mod] Mini-Top
Post by: ivan on November 08, 2005, 09:04:03 PM
hello, thanks for the fast answer the code is that original file, thus nothing changed.
if I this insert in such a way get I an error.
you can insert me the code rapidly completely.


I thank you for your efforts...

greetz ivan
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on November 08, 2005, 09:23:25 PM
:oops: i forgot a coma ! :arrow: repared.
can you re-apply the modification?
Title: Re: [Mod] Mini-Top
Post by: ivan on November 08, 2005, 09:43:58 PM
thanks for your answer.
I bring this "mod" simply not to run

please help me, this is the original code!

Code: [Select]
<?php

define
('GET_CACHES'1);
define('ROOT_PATH''./');
$user_access get_permission();

$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

 
$mini_top_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
 
$mini_top_images .= "<tr class=\"imagerow1\">\n";

 
$selection = array('rating''votes''hits''comments''downloads');
 
$selection_alt = array('votes DESC''rating DESC''name ASC''name ASC''name ASC');
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');

 
$num_of_cells $config['image_cells'];
 
$num_of_cells $num_of_cells count($selection) ? count($selection) : $num_of_cells;

 for (
$cnt 0$cnt $num_of_cells$cnt++) {

 
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN ("
.get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_"
.$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

 
$result $site_db->query_firstrow($sql);
 
show_image($result);
 
$site_template->register_vars("lang_mini_top_mode"$lang['mini_top_'.$selection[$cnt]]);
 
$mini_top_images .= $site_template->parse_template("mini_top_bit");
 
$mini_top_images .= "\n</td>\n";
}

 
$mini_top_images .= "</tr>\n";
 
$mini_top_images .= "</table>\n";

 
$site_template->register_vars(array(
  
"mini_top_images" => $mini_top_images,
  
"lang_hits" => $lang['hits'],
  
"lang_downloads" => $lang['downloads'],
  
"lang_mini_top_title" => $lang['mini_top_title']
 ));
unset(
$mini_top_images);

?>
Title: Re: [Mod] Mini-Top
Post by: SAD on November 09, 2005, 12:25:27 PM
What to deduce on page the table with two lines (an example here: http://gallery.krugozor.ru), it is necessary to make the following:

1. Find:
Code: [Select]
$num_of_cells = $config['image_cells'];
Change:
Code: [Select]
$num_of_cells = 6;
2. Find:
Code: [Select]
$mini_top_images .= "\n</td>\n";Add after:
Code: [Select]
if ($cnt==2) {
$mini_top_images .= "\n</tr><tr>\n";
}

 :wink:
Title: Re: [Mod] Mini-Top
Post by: hanspys on November 30, 2005, 03:28:07 PM
How in h... do you get the mini top images to be on top of each other :?:
ex.
most viewed
most ......
most ......
most ......

so i can fit it into my page ?

been lookin for it, but frankly i suck in php

any help ?

I would like this very much too and like fuzionative I too suck in php!
Title: Re: [Mod] Mini-Top
Post by: hanspys on December 01, 2005, 10:38:18 AM
Never mind I found the solution myself. Don't know if it's the correct solution seen from a coder's perspective but it does the trick:

In mini_top_bit.html I changed
Code: [Select]
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})<br />
<a href="{cat_url}">{cat_name}</a><br /><br />
<b>{lang_mini_top_mode}</b>

to:
Code: [Select]
<tr> <div align="center">
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})<br />
<a href="{cat_url}">{cat_name}</a><br /><br />
<b>{lang_mini_top_mode}</b>
<tr><br>
Title: Re: [Mod] Mini-Top
Post by: abda53bd on January 25, 2006, 10:37:44 PM
i did it before, but i forget how...

how can i make it so that it will RANDOMLY look at the least OR the most popular
Title: Re: [Mod] Mini-Top
Post by: insane on February 02, 2006, 07:39:48 PM
http://p4ddy-online.de.vu/4images
acc: test pw: test

how can i put the mini-top in the center? (width) so that it stucks just to the 4images copyright frame
(or do you know any better postion?) (vertical for example, but don't know how it works)
Title: Re: [Mod] Mini-Top
Post by: TheOracle on February 02, 2006, 08:24:33 PM
Quote

or do you know any better postion?


Actually, if I may suggest, the way you set your 4images signature and your mini-top, I'd put the signature on a left alignment ' from the 2nd table above (instead of the first which is not quitly aligned right now). ;)

2nd, I believe you could simply center the mini-top's images by playing with your home.html template file. It's a really simple task. ;)
Title: Re: [Mod] Mini-Top
Post by: insane on February 02, 2006, 08:39:39 PM
Whats the "signature"? I'm sorry but i really don't know so much about HTML.
perhaps you can show me your imagination by a code or a pic?
Title: Re: [Mod] Mini-Top
Post by: TheOracle on February 02, 2006, 10:02:04 PM
In that case, please post your home.html file into the Templates & Styles section of the forum by mentionning this topic. I will look into it in order to customize your HTML's home page presentation. ;)
Title: Re: [Mod] Mini-Top
Post by: insane on February 02, 2006, 10:05:51 PM
Thanks my friend xD gonna post it there
Title: Re: [Mod] Mini-Top
Post by: aleem316 on May 13, 2006, 04:59:31 PM
Hi all

I installed this modd and i am only seeing most rated/voted and viewed despite i changed the code to
Code: [Select]
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
$selection_alt = array('votes DESC', 'rating DESC', 'hits DESC', 'comments DESC', 'downloads DESC');

(http://www.trini-ads.com/e.gif)

also how can i remove that grey background
Title: Re: [Mod] Mini-Top
Post by: ivan on May 13, 2006, 06:53:40 PM
hello,
this is not in the php files...
separate in yours templates (index.html)

greets
Title: Re: [Mod] Mini-Top
Post by: aleem316 on May 14, 2006, 01:48:04 AM
ohk i got it 2 work..
Title: Re: [Mod] Mini-Top
Post by: riomolin on June 20, 2006, 06:26:00 PM
Regards
Sorry for my english
The mod works fine.
But Im stupid an I cant format the table (I dont know where). It is in the footer?, not in the body...
my gallery:
http://www.usuarios.lycos.es/riomolin/4images/
thanks in avance
Title: Re: [Mod] Mini-Top
Post by: idijotaz on June 20, 2006, 07:29:15 PM
in home.html add that table  8O
Title: Re: [Mod] Mini-Top
Post by: riomolin on June 21, 2006, 01:53:00 AM
solved
thanks
Now I need center the cells
Title: Re: [Mod] Mini-Top
Post by: idijotaz on June 21, 2006, 09:20:24 AM
what you mean center? <center> </center> ?  :roll:
Title: Re: [Mod] Mini-Top
Post by: riomolin on June 21, 2006, 09:44:19 AM
Regards
I centered the cells, now I need center the thumbs in the cells.
Im modified thumbnail_bit.html and works in the New images table but not in Mas Popular table
Thanks in avance
Title: Re: [Mod] Mini-Top
Post by: riomolin on June 27, 2006, 12:48:38 AM
what you mean center? <center> </center> ?  :roll:

Solved
I put <center> </center> ?
Title: Re: [Mod] Mini-Top
Post by: riomolin on June 29, 2006, 10:47:46 AM
Regards

Now I have three questions:

- I changed the minitop_bit.html vs minitop_bit_alt.html,
but the "image rating" and the "image votes" dont have title:

Comentarios: 0
                   8.00
                 : 1
Impactos: 179
Descargas: 0

Where I can change?

- I have six cells,
Where I change the background color, or whats the code?

- What I can put in the sixth cell?, card most sended?, whats the code?
 
http://www.usuarios.lycos.es/riomolin/4images/

Thanks in avance
Title: Re: [Mod] Mini-Top
Post by: e-trader_2002 on July 16, 2006, 06:15:44 PM
Hi riomolin,

I just solved the same problem you have (problem #1).

In Minitop.php find the bold blue lines and insert the red lines inbetween. This should display the missing titles.

[qcode] $site_template->register_vars("lang_mini_top_mode", $lang['mini_top_'.$selection[$cnt]]);
 $site_template->register_vars(array(
  "lang_hits" => $lang['hits'],
  "lang_downloads" => $lang['downloads'],
  "lang_rating" => $lang['rating'],
  "lang_votes" => $lang['votes'],
 ));
$mini_top_images .= $site_template->parse_template("mini_top_bit_alt");
[/qcode]

I hope this will help you.

Greetings
e-trader_2002
Title: Re: [Mod] Mini-Top
Post by: riomolin on July 17, 2006, 11:26:00 AM
Thanks, e-trader_2002,
Solved
Title: Re: [Mod] Mini-Top
Post by: mstgokcen on July 19, 2006, 09:57:49 PM
why only I got an error...what is wrong with me?


I get this eroor in index page

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'

Title: Re: [Mod] Mini-Top
Post by: e-trader_2002 on July 21, 2006, 10:35:34 PM
Hi mstgokcen,

follow the link below for an explanation why this error occurs. If you are using 4Images with MySQL 5.0.12 or higher it should solve your problem.

http://www.4homepages.de/forum/index.php?&topic=3102.msg71831#msg71831

So this is what you have to do:

In top.php find the 4 SQL-queries producing the error-messages in your post and change them as described in the link. You will have to change in each query

[qcode]... FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c LEFT JOIN ...[/qcode]

to

[qcode]... FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c) LEFT JOIN ...[/qcode]

I hope this will do the trick.

e-trader_2002

PS:
This error may occur in other PHP-modules of 4Images as well. Identify the PHP-module by looking at the URL-entryfield of your browser:
Quote
http://www.domain.xy/4images/index.php?sessionid=...

Always find the related SQL-query (best done by searching for the string LEFT JOIN) in that module and do the modification described above.
Title: Re: [Mod] Mini-Top
Post by: mstgokcen on July 22, 2006, 10:48:52 AM
tnx for your help e-trader but it didnt work

I have the same problem when I install mini top.php MOD..

and now I changed my sql too but it doesnt work

before I changed it was

Code: [Select]
// Votes
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_votes DESC, i.image_name ASC
       LIMIT 20";


then I made
Code: [Select]
// Votes
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name
       FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u )
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_votes DESC, i.image_name ASC
       LIMIT 20";


for 4 times but it didnt work?

any idea
Title: Re: [Mod] Mini-Top
Post by: ivan on July 22, 2006, 11:15:11 AM
hello,
replace old minitop code with

Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];
Title: Re: [Mod] Mini-Top
Post by: e-trader_2002 on July 22, 2006, 11:46:30 AM
Hi mstgokcen,

I'm afraid you changed the wrong SQL-Query. As I said in my post from yesterday evening, you have to change only Queries containing LEFT JOIN from

[qcode]... FROM ... LEFT JOIN ...[/qcode]

to

[qcode]... FROM (...) LEFT JOIN ...[/qcode].

You should find such a query 4 times in top.php, 1 time in minitop.php and 1 time in index.php.

After modification the query in minitop.php should look exactly like quoted in IVANs post just above.

If the errormessage from index.php persists, look into that module too and also find and modify the SQL-Query containing LEFT JOIN.

This really should solve the problem. Wish you success.

e-trader_2002
Title: Re: [Mod] Mini-Top
Post by: mstgokcen on July 22, 2006, 11:56:48 AM
tnx, my mistake I understood that i will change the top.php but ofcourse we are talking about minitop.php

:)

its done...
Title: Re: [Mod] Mini-Top
Post by: nacho-lopez on August 28, 2006, 04:33:54 PM
I have just added this mod to my gallery in detais.html instead of the home.html
I have a problem. I dont know how to center each image in the center of each cell of table. What should I change in the code so this would be posible?
You can see my problem in this picture:
(http://www.photoshop-designs.com/imagenes/tabla.gif)
Thanks for your help and best regards from Spain :D
Title: Re: [Mod] Mini-Top
Post by: chri{Bi} on August 29, 2006, 02:32:32 AM
how to center each image in the center of each cell of table. What should I change in the code so this would be posible?

 :arrow: find this code in mini_top.php:
Quote
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace it by this one :
Quote
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"middle\">\n";
Title: Re: [Mod] Mini-Top
Post by: nacho-lopez on August 29, 2006, 07:43:40 AM
Thanks a lot chri{Bi}   :D
how to center each image in the center of each cell of table. What should I change in the code so this would be posible?

 :arrow: find this code in mini_top.php:
Quote
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace it by this one :
Quote
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"middle\">\n";
Title: Re: [Mod] Mini-Top
Post by: riomolin on August 29, 2006, 10:53:52 AM
Hello,
sorry for my english,
in the mini-top MOD I have six cells,
five with the nacho-lopez format, and the 6th empty
what I can put into the 6th cell, perhaps e-card most downloaded?
How, whats the code and where I can put it?
How I can change the cells color, the blue for the dark grey

Nacho-lopez, si sabes puedes contestarme en espaol

http://www.usuarios.lycos.es/riomolin/4images

Regards
Title: Re: [Mod] Mini-Top
Post by: nacho-lopez on August 29, 2006, 01:17:12 PM
Sorry but I dont know how to do it...  :roll:
(Lo siento pero no tengo ni idea de como se hace. Seguro que alguien te ayuda muy pronto en el foro...)
Regards  :D
Hello,
sorry for my english,
in the mini-top MOD I have six cells,
five with the nacho-lopez format, and the 6th empty
what I can put into the 6th cell, perhaps e-card most downloaded?
How, whats the code and where I can put it?
How I can change the cells color, the blue for the dark grey

Nacho-lopez, si sabes puedes contestarme en espaol

http://www.usuarios.lycos.es/riomolin/4images

Regards
Title: Re: [Mod] Mini-Top
Post by: desperate_housewif on September 24, 2006, 11:44:33 AM
Nachdem ich die gleiche Fehlermeldung hatte wie mstgokcen konnte ich das Problem mit den angesprochenden fehlenden Klammern lsen. Nun kommt keine Fehlermeldung mehr.
Leider wird lediglich in meiner Enddatei eine Headzeile angezeigt, es fehlen die Bilder, Schrift usw. gnzlich. Habe alles so installiert wie angegeben, habe die mini_top.bit.hmtl mit der mini_top.bit_alt.hmtl ausgetauscht. Ohne Erfolg. Woran kann es liegen? Meine einzige Abweichung war, da ich den fr die home.hmtl bestimmten Script in eine andere hmtl.datei eingegeben habe.
Title: Re: [Mod] Mini-Top
Post by: keemo on October 11, 2006, 02:48:56 PM
Great little MOD. Thanks a bunch.

I formatted the mini-top-bit.php to simply use {image_name} and {user_name_link}. Im looking to have, {image_name} link to the image. Can anyone suggest how to go about this?

(Sorry If I missed this somewhere in the thread)

Thanks!
Title: Re: [Mod] Mini-Top
Post by: osnapicture on February 14, 2007, 12:34:41 PM
i absolutly dont get it to work. all i try i get alwas some errors. can anybody please post the correct code for mini_top.php?
Title: Re: [Mod] Mini-Top
Post by: code on March 20, 2007, 08:43:35 PM
I request list most view 10 category at last week, code ? on home.html
what is the solution ?

for example, mini top last week category ?

Thank you.
Title: Re: [Mod] Mini-Top
Post by: egyptsons on March 24, 2007, 03:17:26 AM
I got this on the first page
is that OK
and is that the result for the mode or there is something wrong ?
http://gallery.egyptsons.com
Title: Re: [Mod] Mini-Top
Post by: darvid on April 05, 2007, 08:49:27 PM
I got the following error messages, when installing the mod to 4Images 1.7.4:

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.



I solved the problem by fixing the mini_top.php with the following:

Hi mstgokcen,

follow the link below for an explanation why this error occurs. If you are using 4Images with MySQL 5.0.12 or higher it should solve your problem.

http://www.4homepages.de/forum/index.php?&topic=3102.msg71831#msg71831 (http://www.4homepages.de/forum/index.php?&topic=3102.msg71831#msg71831)

So this is what you have to do:

In top.php find the 4 SQL-queries producing the error-messages in your post and change them as described in the link. You will have to change in each query

[qcode]... FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c LEFT JOIN ...[/qcode]

to

[qcode]... FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c) LEFT JOIN ...[/qcode]

I hope this will do the trick.

e-trader_2002

PS:
This error may occur in other PHP-modules of 4Images as well. Identify the PHP-module by looking at the URL-entryfield of your browser:
Quote
http://www.domain.xy/4images/index.php?sessionid=...

Always find the related SQL-query (best done by searching for the string LEFT JOIN) in that module and do the modification described above.

works fine now!
Title: Re: [Mod] Mini-Top
Post by: darvid on April 05, 2007, 09:21:00 PM
in addition to that, i got a question.

the mod shows the best image either by votes, ratings, comments, hits or random.

i would like to show the REAL BEST IMAGE (the best image of all categories) so i need to combine all the data to find it out. how would i do that?  :roll:
Title: Re: [Mod] Mini-Top
Post by: mstgokcen on May 05, 2007, 10:33:56 AM
I think I found a bug. My minitop was working perfect but I create a private group then I noticed that The user who are involved a private user group are not able to count the mini top values.

I mean althoug the users visit a photo, the count of view never changes...

Do you have any idea for solution?
Title: Re: [Mod] Mini-Top
Post by: darvid on June 28, 2007, 04:27:55 PM
an awesome MOD. Now, how could i show the mini-top mod on an external page outside of 4images directory?
Title: Re: [Mod] Mini-Top
Post by: computer123 on August 07, 2007, 10:10:36 PM
Hello,

I have a question:

How can I add my additional field to the Thumb of Mini-Top?

Noramly you find under the thumb: The name, discription, category..... I want to add more informations.

PS: I could add the additional field to the normal thumb but under the thumb of Mini-top not

I have tried but I got nothing to see.

Thank you for any help
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on August 07, 2007, 10:19:50 PM
Ok so in mini_top.php file,

find:

Quote
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {

add top of it:

Quote
$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

Can use additional image fields (if what mean - no specify ?). ;)
Title: Re: [Mod] Mini-Top
Post by: computer123 on August 07, 2007, 10:49:47 PM
Thank you very much thunderstrike.
It's is now working.
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on August 07, 2007, 10:52:05 PM
Quote
I have also the same problem with Random image. Do I have to follow the procudere to show the additional field under the ramdom image?

Please post topic (precise) and, from topic, post problem and will look.
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on August 07, 2007, 11:00:20 PM
Please post random image topic. Is mini-top here . . .
Title: Re: [Mod] Mini-Top
Post by: computer123 on August 07, 2007, 11:15:01 PM
Oke thunderstrike.

I've already moved it to the Random Image topic.

Thank you for your tip's
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 18, 2007, 10:54:47 PM
Hey!

Is there any way to show more then one "Top Hits" or "Top Rated" .... ?
I want want to use that script to show the TOP 10 "Top Hits" and "Top Rated" images on home.html


Greets, Finn
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on November 18, 2007, 11:07:36 PM
Is say in install doc for this:

Code: [Select]
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');

Edit value and delete # in line.
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 19, 2007, 11:54:02 AM
Is say in install doc for this:

Code: [Select]
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');

Edit value and delete # in line.

I'm sorry but I did so. It doesn't work.

So I want to list the TOP 10 (not only the first) "Most Viewed" and the TOP 10 "Most Rated".
Just like in the "top.php" BUT on the "home.html"

Thanks
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on November 19, 2007, 01:48:47 PM
Quote
I'm sorry but I did so. It doesn't work.

Step 6 - my signature.
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 19, 2007, 02:08:07 PM
You right. ;)

So I want to list the TOP 10 (not only the first) "Most Viewed" and the TOP 10 "Most Rated".
Just like in the "top.php" BUT on the "home.html"

When I change the "#" and the value for eg. to "4" I still get the same thing. Only the FIRST TOP Rated, Dowmloaded...

Thanks
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on November 19, 2007, 02:26:57 PM
After ORDER BY line, add: LIMIT x (change 'x' for value).
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 19, 2007, 03:12:43 PM
After ORDER BY line, add: LIMIT x (change 'x' for value).

Okay, thanks for your help! But now it looks like this:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]
LIMIT 10;

And I get this error:
Code: [Select]
Parse error: syntax error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/007test/mini_top.php on line 31


Thanks for your help! Really THANK YOU!!

....please be kind to me :) I'm not one of these PROFIS :(
Title: Re: [Mod] Mini-Top
Post by: thunderstrike on November 19, 2007, 03:41:39 PM
Code: [Select]
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]
LIMIT 10;

for:

Code: [Select]
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]."
LIMIT 10";

After "; - see for delete old "; (or ;).
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 19, 2007, 05:05:27 PM
Hey, I'm sorry. I did everything you told me.

Now my "$sql section" in "mini_top.php" looks like this:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]."
LIMIT 10";

On my "home.html" I've added this: "{mini_top_images}".

But I still get just ONE image for the different section (Top Viewed, Top Rated...)
please see at: http://007test.00.funpic.de/index.php (http://007test.00.funpic.de/index.php)


But I want TEN images for each section. So 10 Top Viewed (the most viewed at top) 10 for the most Voted (most voted image on top....)


Thanks for you help!
Finn
Title: Re: [Mod] Mini-Top
Post by: SLL on November 19, 2007, 10:17:26 PM
But I want TEN images for each section. So 10 Top Viewed (the most viewed at top) 10 for the most Voted (most voted image on top....)

this mod wont work the way you're willing, just for the reason than it was designed to display a single winning image from each category. you do not need any mod's, take the original top.php and change the layout the way you want it to be.
Title: Re: [Mod] Mini-Top
Post by: FunnyUser on November 20, 2007, 06:21:03 PM
But I want TEN images for each section. So 10 Top Viewed (the most viewed at top) 10 for the most Voted (most voted image on top....)

this mod wont work the way you're willing, just for the reason than it was designed to display a single winning image from each category. you do not need any mod's, take the original top.php and change the layout the way you want it to be.

Okay, thanks! It works.
Title: Re: [Mod] Mini-Top
Post by: Valery on December 31, 2007, 01:49:59 PM
Bug:
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 25, 1, 15, 3, 19, 27, 12, 9, 24, 26, 5, 4, 6, 22, 10, 17, 28, 11, 13, 21, 29, 14, 16, 18, 8, 23) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

mini_top.php

line 27:
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

Replace:
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
Title: need help with mini top
Post by: vrisak on January 17, 2008, 12:01:01 PM
please go on my page

http://mbpower.byethost13.com/mbg/index.php

in the top left got some error  messages after install Mini top

maybe that have something with this>

very good
just one error :

include/ index.php  no files

files index.php in the root


but I dont understand.Can U tell me what to do.
And one more thing >
I have litle more space between MiniTop and name of the site.How can make that space smaller.I was try lot of thigs but ,dont know.And now is litle ugly with this big space between  Minitop and  imestranice.com  title.
PLease tell me how to fix this
thank u
Title: Re: [Mod] Mini-Top
Post by: GeO3x on February 16, 2008, 06:06:40 PM
Bug:
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 25, 1, 15, 3, 19, 27, 12, 9, 24, 26, 5, 4, 6, 22, 10, 17, 28, 11, 13, 21, 29, 14, 16, 18, 8, 23) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

mini_top.php

line 27:
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

Replace:
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

Thx - a lot!

2 questions:
1) I see most voted,  most rated and most viewed.. what about most downloaded and commented?!
2) What should I modify in mini_top.php or elsewhere to act like this:
      I want to see that most ... images like those from new images - reffering to style.. on mouseover ..
      See the attached pic and u will understand.

Title: Re: [Mod] Mini-Top
Post by: OtusDesign on April 21, 2008, 02:10:22 AM
Hi,
I did everything what you tell but I have this error :

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_votes DESC, i.image_rating DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'


How should I do ?

Thanks in advance
Title: Re: [Mod] Mini-Top
Post by: KurtW on April 21, 2008, 05:57:42 AM
Hi,

the modecode is not msql5 compatible :wink:

in modcode:
search:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cchange to:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
You can find more about the msql5 Problems here:
http://www.4homepages.de/forum/index.php?topic=10184.15


Read the thread  :wink: => Antwort #125


KurtW
Title: Re: [Mod] Mini-Top
Post by: OtusDesign on April 21, 2008, 09:50:40 PM
Thanks a million :) I solve the problem
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 01:13:51 AM
why only I got an error...what is wrong with me?


I get this eroor in index page

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_votes DESC, i.image_rating DESC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27) ORDER BY i.image_comments DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'




Now i'm getting this error, it was working good before....anybody has any idea why this happened??
I tried everything to fix it but nothing happens....is it possible its because my hosting company.
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 04:26:15 AM
Plus i tried to remove the mini top mod but NOTHING HAPPENS!!! I STILL SEE THE MINI TOP BOX AND ERRORS!!!!


SOMEONE PLEASE HELP!! PM ME!
Title: Re: [Mod] Mini-Top
Post by: KurtW on June 19, 2008, 05:44:48 AM
Hi xsbucket,

look Reply #129 in this thread => link :wink:


Kurt
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 08:42:02 AM
Hi xsbucket,

look Reply #129 in this thread => link :wink:


Kurt


Hi Kurt!

I have tried everything!!! NOTHING works....i find that strange since it was working perfectly for the past 2 months!!!! Also, i can't even remove the mini top mod!!! I deleted the files and modified the home.html and i still see the mini top and the errors!!!! What could this be?
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 08:45:23 AM
Also...when i'm logged in as admin i see the whole error message but when i'm logged in as a user i only see

unexpected error has occured, please try again later!!!!!!

I really don't understand what happened...is it possible my website got hacked?
Title: Re: [Mod] Mini-Top
Post by: Nicky on June 19, 2008, 09:54:02 AM
xsbucket,

like KurtW already wrote: your host changed mysql version
Hot Shots
you should adjust..


Quote
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/xsbucket/public_html/includes/db_mysql.php on line 39

An unexpected error occured. Please try again later.
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 09:26:27 PM
Hi nicky!

I see that my version of mysql is 4.1.22   I'm not sure if they changed it or it was always the same. I tried making the changes with the () and without and i still get the error.

I even tried to remove the mini top but NOTHING HAPPENS!!! I still see the mini top box even if i remove the code! I really don't understand hows that possible. It was working fine before. I want to know if there is any other explaination for this error or what could cause this other then the mysql version.

I appreciate all your help guys, but can you tell me what other reasons i could be getting this error and behavior?
Title: Re: [Mod] Mini-Top
Post by: Nicky on June 19, 2008, 09:29:46 PM
send ftp details
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 10:11:49 PM
send ftp details

I'm sorry but i'm pretty new to programming....what do you mean ftp details?
Title: Re: [Mod] Mini-Top
Post by: Nicky on June 19, 2008, 10:43:55 PM
send me your FTP account details to see your files..
Title: Re: [Mod] Mini-Top
Post by: xsbucket on June 19, 2008, 10:59:45 PM
Pm sent with ftp info
Title: Re: [Mod] Mini-Top
Post by: e-trader_2002 on July 15, 2008, 11:16:21 PM
Hi folks,

I've added this nice little mod a long time ago to my 4images website. Recently I realized, that the generation of the page with the minitop mod is considerably delayed by one of the mySQL-Queries of this mod. But a small change will speed-up the page generation again.

Find this mySQL-Query in minitop.php
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.image_postcards".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

and change it by adding ."LIMIT 1" at the end of the query:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.image_postcards".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]." LIMIT 1";

Maybe someone will find this little advice useful.

e-trader_2002
Title: Re: [Mod] Mini-Top
Post by: nhomauhoaphuong on November 12, 2008, 07:29:22 PM
how do i add this mini top outside of the 4images gallery??? i want to show new images (thumbnails) on my actual website then people click on those pics will take them directly to this 4images gallery page.
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 14, 2009, 01:32:21 AM
Hello I like this mod a lot , but I didnt manage to make it run

in  index.php after I add :

include(ROOT_PATH.'mini_top.php');

it shows me 4x unexpected error in red on the upper left of the screen- before header on home page,
Does this mod run with 1.7.6 ? , i see that this is very old mod , nobody speaks about new version 1.7.6 so can anybody help me?
i put it away until will know more how to make it run ,or does anybody know about some similar mod already working also in 1.7.6 ?

I see it running on http://faces.dalnet.ru/  but its 1.7.4 version , i also wanted to thank to the owner of this russian site for explanation how to use uniqe icon for every category

my website:
http://www.dancersrecruit.com/pictures/index.php
thanks a lot Daniel
Title: Re: [Mod] Mini-Top
Post by: jopainter on April 20, 2009, 12:55:16 PM
it work man

http://pho2o.net/

thank you
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 21, 2009, 01:14:55 AM
yes in your website it works very nice , I envy you :wink:
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 21, 2009, 02:21:47 AM
Quote
the modecode is not msql5 compatible Wink

in modcode:
search:
Code:  [Select]  [Expand]  [Hide line numbers]
1
   

FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

change to:
Code:  [Select]  [Expand]  [Hide line numbers]
1
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

You can find more about the msql5 Problems here:
http://www.4homepages.de/forum/index.php?topic=10184.15
Read the thread  Wink => Antwort #125
KurtW

I have found my problem with errors and empty not working Mini Top thanks to KurtW answer here on this forum 1year ago , I think that everybody use mysql5 now , so it would be maybe better to change it in original first post code
If anybody will get
red errors in left screen look above for Kurt's  answer  , Thanks KurtW you ve saved me a lot of time :D
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 21, 2009, 01:55:37 PM
Quote
the modecode is not msql5 compatible Wink

in modcode:
search:
Code:  [Select]  [Expand]  [Hide line numbers]
1
   

FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

change to:
Code:  [Select]  [Expand]  [Hide line numbers]
1
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

You can find more about the msql5 Problems here:
http://www.4homepages.de/forum/index.php?topic=10184.15
Read the thread  Wink => Antwort #125
KurtW

I have found my problem with errors and empty not working Mini Top thanks to KurtW answer here on this forum 1year ago , I think that everybody use mysql5 now , so it would be maybe better to change it in original first post code
If anybody will get
red errors in left screen look above for Kurt's  answer  , Thanks KurtW you ve saved me a lot of time :D

I take back my words that it works , visitors part works fine but now I realized that I can't get to admin part anymore,
it only says :

Warning: include(./global.php) [function.include]: failed to open stream: No such file or directory in /home2/dancersr/public_html/pictures/admin/index.php on line 31

Warning: include() [function.include]: Failed opening './global.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/dancersr/public_html/pictures/admin/index.php on line 31

Warning: require(./includes/sessions.php) [function.require]: failed to open stream: No such file or directory in /home2/dancersr/public_html/pictures/admin/index.php on line 32

Fatal error: require() [function.require]: Failed opening required './includes/sessions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/dancersr/public_html/pictures/admin/index.php on line 32

This is my index.php :

30.    define('GET_USER_ONLINE', 1);
31.    include(ROOT_PATH.'global.php');
32.    require(ROOT_PATH.'includes/sessions.php');
33.    include(ROOT_PATH.'mini_top.php');


Mini-Top is gonna kill me , can anybody help me ? visitors part works nice but I cant get to admin part anymore , I really like this very simple mod , I don't want give it up
Title: Re: [Mod] Mini-Top
Post by: V@no on April 21, 2009, 02:33:42 PM
what are the lines above 30? specifically define('ROOT_PATH' ...
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 21, 2009, 03:27:54 PM
Hello V@no thanks again for your very quick respond , i think that it looks like I'm testing you , but now it concerns with my stupidity , from the start I got 4images  I cannot go to sleep without resolving the problem and finishing some MOD and yesterday late night I didnt noticed that I uploaded index.php -visitor to index.php -admin , so everything went fine in visitors part but early morning I noticed that I cant get to admin part anymore .  Im very sorry , if you want I will delete previous post which has nothing to do with Mini-top , Mini -Top works excellent , maybe somebody should change original first post which has old PHP4 query with new  Mysql5 query for the others , thanks again and sorry Daniel
Title: Re: [Mod] Mini-Top
Post by: V@no on April 21, 2009, 03:55:38 PM
Glad you found the problem :)

[offtopic]
From my personal experience I've learned that if there is a problem needs to be fixed, don't push yourself over sleepless night, most of the time you wont fix it, in fact sleepless nights creates more problems then solves anything... but in the morning after good sleep, 9 times out of 10 the solution being found in 10 minutes...talking about wasting time, eh? :D
In russia we have a saying (proverb) "Утро вечера мудреннее" (http://www.wikiproverbs.com/index.php/%D0%A3%D1%82%D1%80%D0%BE_%D0%B2%D0%B5%D1%87%D0%B5%D1%80%D0%B0_%D0%BC%D1%83%D0%B4%D1%80%D0%B5%D0%BD%D0%B5%D0%B5.) ;)
Title: Re: [Mod] Mini-Top
Post by: 4ella on April 21, 2009, 04:28:22 PM
 :D I' m from Czech Rep., I had a russian language for 9 ys. in the school obligatory but now after velvet revolution I forgot totaly everything , by the way , you and other people here know best how it works when you are trying to get new Mod working , I feel like a childboy building his LEGO , never stop until I finish it , yesterday 5 in the morning , 4images is a drug to me , instead of playing games , I build 4images site until somebody will say stop man , its too much !! and I will slowly one by one start to delete them -:) . It doesn't concern to the topic so feel free to delete it or I will make it myself , I'm very happy that this forum exists and compliments for your work because I see that you are succesfully helping to anybody here and I feel when seeing all these threads that when somebody has the last word here , its a V@no
Title: Re: [Mod] Mini-Top
Post by: cookie on September 25, 2009, 02:45:19 AM
For anyone who installs mini-top on a fresh install and can only see 3 images, instead of 5....

In other words, you only see Most Rated, Most Voted, and Most Viewed
You do NOT see Most Commented, and Most Downloaded


Go into your ACP to General/Settings/Image Setting -> Image table cells

Set this field to 5 instead of 3 which is the default.

This took me quite a long time to figure out.

I also tried V@no's suggestion of updating the following array:
Code: [Select]
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
 $selection_alt = array('votes DESC', 'rating DESC', 'hits DESC', 'comments DESC', 'downloads DESC');

However, I still did not see all 5 columns until I changed the setting in the ACP.
Title: Re: [Mod] Mini-Top
Post by: Benny Change on September 29, 2009, 08:36:55 PM
Hallo,

hat das jemand schon bei sich eingebaut?
Die Thread hier sind wiedermal so zerstckelt, dass man nicht weis was man wo kopieren und ersetzen soll. In jedem Thread steht was anderes und auch in jedem Thread ist auf einmal ein anderer Code.

Ich blicke da nicht durch. Ich finde, dass wir mal hier ein Team zusammensuchen sollten, die solche Threads mal aufrumen und zu einem zusammenfassen.
Title: Re: [Mod] Mini-Top
Post by: alekseyn1 on December 24, 2009, 12:32:28 PM
Hi guys, here is the new idea -

to avoid duplications and to draw more attention to different photos i suggest we make a variation of this MOD to show different photos. Now there is a possibility that one photo could be a leader in some areas like most commented and most viewed and most rated...  

What I suggest is to make the following system:

photo a = leader max votes
photo b = leader max comments
if a=b then in place of photo show next one down (i.e photo with max comments - 1)

etc...

the idea is to have this block with different pictures and avoid the possibility to have duplications... The TRUE ratings would still be shown in TOP images section...



I would also love to have different MINI TOPs...

MINI TOP of the DAY
MINI TOP of the WEEK
MINI TOP of the MONTH

I guess that would involve duplicating the MOD three times??

EDIT
Nevermind.. solved...
Title: DB error: bad SQL querry
Post by: MrAndrew on December 26, 2009, 02:41:02 PM
Hi, all

When i install mod photo of the day or mini_top i have a error:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 5images_images i, 5images_categories c LEFT JOIN 5images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND c.cat_id = i.cat_id ORDER BY i.image_votes DESC LIMIT 1
Unknown column 'i.user_id' in 'on clause'

I have done all according with this topic: http://www.4homepages.de/forum/index.php?topic=22668.0

But error was not fixed...

Please help me...

4Images Version 1.7.7
MySQL 5....
Title: Re: DB error: bad SQL querry
Post by: Rembrandt on December 26, 2009, 02:45:28 PM
Hi!

Code: [Select]
FROM 5images_images i, 5images_categories c LEFT JOIN 5images_users5images ... is not yet properly? b.t.w. post the sql query that produced the errors.

mfg Andi
Title: Re: DB error: bad SQL querry
Post by: MrAndrew on December 26, 2009, 02:50:50 PM
Thanks for your answering...

When i reinstalled gallery, and make new tables with names 4images_ have a same problem:

 DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0) ORDER BY i.image_hits DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'


But some days ago it worked normally!!
Title: Re: DB error: bad SQL querry
Post by: Rembrandt on December 26, 2009, 02:59:54 PM
but the errors described here ://www.4homepages.de/forum/index.php?topic=22668.msg123709#msg123709

replace:
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
with:
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

mfg Andi

Title: Re: DB error: bad SQL querry
Post by: MrAndrew on December 26, 2009, 03:11:17 PM
Yes, i`m not to do that, becouse i have  this ( ) symbols yet.. but problem active

Look at this part of my categories.php:

$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";

Maybe replace from:
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

to

FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

???
Title: Re: DB error: bad SQL querry
Post by: Rembrandt on December 26, 2009, 03:26:16 PM
...
Maybe replace from:....
i think not...

and you've checked all your mod?
Title: Re: DB error: bad SQL querry
Post by: MrAndrew on December 26, 2009, 03:38:12 PM
Yes, of course!!! I`m installed new 4images, and new tables. Then installed only one mod mini_top and have the same error:

xxx: drandrew. jino. ru/4images/index. php

Sir, help me please

and else, can you give me working link to this file: fadeslideshow.js???
Title: Re: DB error: bad SQL querry
Post by: Rembrandt on December 26, 2009, 03:45:52 PM
no problem,  wait  a moment

so.... i have installed the mod from the first post and its works, ist very easy.

if you want to give me FTP login details by PM.


EDIT:
so.. i say:
replace:
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
with:
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

and you did not do it !   now it works (http://www.drandrew.jino.ru/4images/index.php)..

the other mod, have i the download link edited..

mfg Andi
Title: Re: DB error: bad SQL querry
Post by: MrAndrew on December 26, 2009, 05:16:04 PM
Rembrandt, THANK YOU VERY, VERY MUCH SIR!!!
Title: Re: [Mod] Mini-Top
Post by: V@no on December 26, 2009, 05:21:50 PM
Fixed version is attached to the first post now.

P.S./me confused how is this discussion also exists as a separate topic in programming section?
Title: Re: [Mod] Mini-Top
Post by: Nicky on December 26, 2009, 07:35:37 PM
V@no thank you for fix..

i merged that one and this one here.
Title: Re: [Mod] Mini-Top
Post by: tennis-ecards on January 23, 2010, 12:33:08 AM
Hi guys, here is the new idea -

to avoid duplications and to draw more attention to different photos i suggest we make a variation of this MOD to show different photos. Now there is a possibility that one photo could be a leader in some areas like most commented and most viewed and most rated...  

What I suggest is to make the following system:

photo a = leader max votes
photo b = leader max comments
if a=b then in place of photo show next one down (i.e photo with max comments - 1)

etc...

the idea is to have this block with different pictures and avoid the possibility to have duplications... The TRUE ratings would still be shown in TOP images section...



I would also love to have different MINI TOPs...

MINI TOP of the DAY
MINI TOP of the WEEK
MINI TOP of the MONTH

I guess that would involve duplicating the MOD three times??

EDIT
Nevermind.. solved...

Das wrde mich auch sehr interessieren. Hat jemand eine Idee und kann helfen?
Title: Re: [Mod] Mini-Top
Post by: alekseyn1 on January 23, 2010, 12:38:22 PM
Das wrde mich auch sehr interessieren. Hat jemand eine Idee und kann helfen?

hi there! no problem. I am willing to share my solution with the world!

I have reworked the entire mini-top mod...

attached is my version (place the files in the root of your 4images)

in your template home.html include the following code:
Code: [Select]
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_day}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_day}</td>
</tr>

</table><br/>
</td>

</tr>

<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_week}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_week}</td>
</tr>

</table><br/>
</td>
</tr>

<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_month}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_month}</td>
</tr>

</table><br/>
</td>
</tr>

<!--<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_title}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_images}</td>
</tr>
</table><br/>
</td>
</tr>-->
</table>

of course the language variables have to be set as well....

maybe this is not the most elegant solution, but it works for me.... please note, the system removes duplications in each rating, so that for example in the mini-top of the day, no identical images will be shown...

now, if somebody will make a separate module to use this code but so that user can select a date and the code would show ratings for this date, that would be great )))
Title: Re: [Mod] Mini-Top
Post by: tennis-ecards on January 23, 2010, 05:17:30 PM
Quote
hi there! no problem. I am willing to share my solution with the world!

I have reworked the entire mini-top mod...

attached is my version (place the files in the root of your 4images)

in your template home.html include the following code:
Code: [Select]
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_day}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_day}</td>
</tr>

</table><br/>
</td>

</tr>

<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_week}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_week}</td>
</tr>

</table><br/>
</td>
</tr>

<tr>
<td valign="top">
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="head1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_month}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_month}</td>
</tr>

</table><br/>
</td>
</tr>

<!--<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top">{lang_mini_top_title}</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="row1">{mini_top_images}</td>
</tr>
</table><br/>
</td>
</tr>-->
</table>

of course the language variables have to be set as well....

maybe this is not the most elegant solution, but it works for me.... please note, the system removes duplications in each rating, so that for example in the mini-top of the day, no identical images will be shown...

now, if somebody will make a separate module to use this code but so that user can select a date and the code would show ratings for this date, that would be great )))

Danke, das geht absolut in die richtige Richtung. Ich bruchte fr meine Seite jedoch eine kleine nderung, da ich den ursprnglichen Code gendert hatte.
Ich mchte gerne die Motive mit den meisten Hits, den meisten verschickten Postkarten, den meisten Downloads und der besten Bewertung einbauen. Fr den "alten Code" hatte ich das so gendert, aber hier bekomme ich das nicht hin. Was muss ich tun?
Title: Re: [Mod] Mini-Top
Post by: Benny Change on August 22, 2010, 07:42:07 PM
4images 1.7.8
Quote
Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name
        FROM 4images_images i,  4images_categories c
        LEFT JOIN 4images_users u ON (u.user_id = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1)
        ORDER BY i.image_rating DESC, i.image_votes DESC
Unknown column 'i.user_id' in 'on clause'
Wo liegt das Problem?

In der Datei sieht das so aus:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];
Title: Re: [Mod] Mini-Top
Post by: Rembrandt on August 23, 2010, 05:05:30 AM
...
Wo liegt das Problem?
....

http://www.4homepages.de/forum/index.php?topic=5874.msg144136#msg144136

mfg Andi
Title: Re: [Mod] Mini-Top
Post by: zakaria666 on August 25, 2010, 04:51:48 PM
@VANO,

HEllo ur link is dead. Can u please re-update, so i can see you demo site please sir. Thank u VANO,
Title: Re: [Mod] Mini-Top
Post by: Foxhound on November 28, 2010, 02:14:30 PM
how can i change the settings how many entries are displayed?

thanks!
Title: Re: [Mod] Mini-Top
Post by: Benny Change on November 28, 2010, 02:16:53 PM
Here (http://www.4homepages.de/forum/index.php?topic=5874.msg35704#msg35704)
Title: Re: [Mod] Mini-Top
Post by: Foxhound on November 28, 2010, 06:49:45 PM
danke dir benny,
aber: man kann nur max. 5 aneziegn lassen obwohl ich 10 eingestellt habe werden auch nur 5 angezeigt?

lg!
Title: Re: [Mod] Mini-Top
Post by: Benny Change on November 29, 2010, 08:41:12 PM
Es sollte auch gehen wenn du da 10 hinschreibst!
Du hast auch mehr als 5 Files gerade online!?
Wenn das so ist, dann wüsste ich pers. jetzt nicht warum das so ist!
Title: i need small php --> sql help
Post by: ilaslan on January 19, 2011, 03:33:45 AM
hello mans
i need your helps.
in this mod have this code
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."


but

i want to exclude some categories numbers.
$cat_ext_adsense = array(84,85,86,87,88,89,95,96);

.......
i  had use this code some files. like this


WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN")."," . implode(",", $cat_ext_adsense) .")




i try some many possible  code . but db error  :oops:





Title: Re: i need small php --> sql help
Post by: Rembrandt on January 19, 2011, 05:50:28 AM

WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]." AND i.cat_id NOT IN (".implode(", ", $cat_ext_adsense).")

mfg Andi
Title: Re: [Mod] Mini-Top
Post by: MrAndrew on September 05, 2011, 08:10:53 AM
I`ve this error:

Fatal error: Call to undefined function get_permission() in ***\Server\root\mini_top.php on line 5

Line 5:

Code: [Select]
$user_access = get_permission();
Strange!
Title: Re: [Mod] Mini-Top
Post by: SweD on November 02, 2011, 01:29:43 PM
Why one is shown and too the image: rating and votes?

But in top.php images The different (see image - top)
Title: Re: [Mod] Mini-Top
Post by: pwa on November 07, 2011, 09:54:35 PM
Das wrde mich auch sehr interessieren. Hat jemand eine Idee und kann helfen?
MINI TOP of the DAY
MINI TOP of the WEEK
MINI TOP of the MONTH

hi there! no problem. I am willing to share my solution with the world!

I have reworked the entire mini-top mod...

..cut...

I use this solution but it has TRAP :-(
for young gallery, with few images per day it has loop without end:

Code: [Select]
//image 3
$mini_top_images_new .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n"; 
$count = 0;
while (($top_image[2][$count]['image_id'] == $image_r1['image_id']) || ($top_image[2][$count]['image_id'] == $image_r2['image_id'])) {
$count++;
}
$image_r3 = $top_image[2][$count];
show_image($image_r3);
$site_template->register_vars("lang_mini_top_mode", $lang['mini_top_hits']);
$mini_top_images_new .= $site_template->parse_template("mini_top_bit");
$mini_top_images_new .= "\n</td>\n";

Im not php programmer - I just commented out this section.


Title: Re: [Mod] Mini-Top
Post by: cabrote on March 28, 2012, 07:53:28 PM
Is there a way to show most viewed, most voted, etc. But only for a period of a Week o r a Month maybe?

 Because if not the Most viewd image would be  probably allways the most viewed one cause its appears in home and the possibilities that a person clicks on it is very hi.
Title: Re: [Mod] Mini-Top
Post by: cabrote on April 01, 2012, 06:02:25 PM
Help please, is there support?  :oops:

I cant modify code for searching only in last 30 days pictures. The code shown in page 12 doesnt work well. It output wrong information. The original Mini top Mod works perfect but I cant figure out how to add in database search onlly image with upload date from 30 days.

Tried with variatons of time() - 60 * 60 * 24 but Im not a programmer and all ends with php errors  :D
Title: Re: [Mod] Mini-Top
Post by: waseem on July 03, 2017, 07:23:20 PM
im getting this error plz help me
Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM igdagesmt_images i, igdagesmt_categories c LEFT JOIN igdagesmt_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 1, 2, 3) AND i.cat_id = '1' ORDER BY i.image_comments DESC, i.image_name ASC
Unknown column 'i.user_id' in 'on clause'
Title: Re: [Mod] Mini-Top
Post by: nobby on July 03, 2017, 08:09:02 PM
Hello,

Please use the search function.
This has all been discussed several times.

Go to the search field: (Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id,)

Helping people help themselves  :wink:

nobby