4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: SLL on May 25, 2003, 10:32:40 PM
-
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
-
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
-
very good
just one error :
include/ index.php no files
files index.php in the root
:D :D
-
great MOD thxxx
-
im am stupid or what... i cant find index.php file in includes directory :oops:
-
ups didnt see toto1 post...
-
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
-
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.
-
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
-
womit muß ich die download datei öffnen, bekomme nur Hyroglyphen..
-
Very nice hack, but the INSTRUCTIONS seriously needs to be UPDATED
:?
-
:twisted: Instructions!?!?! To add ONE line to the index.php and THREE the language text???
-
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:
-
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 :? )
-
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!
/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]
-
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
-
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
-
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!
/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.
-
portuguese here:
$lang['mini_top_title'] = "As Mais Populares";
$lang['mini_top_hits'] = "Mais vista";
$lang['mini_top_rating'] = "Melhor votação";
$lang['mini_top_downloads'] = "Mais downloads";
$lang['mini_top_comments'] = "Mais comentada";
$lang['mini_top_votes'] = "Mais votada";
-
I have installed this MOD and it works, thanks for the work!!! :wink:
But now I get this notices:
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???
-
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é
-
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.
-
in mini_top.php replace
$num_of_cells = $config['image_cells'];
with $num_of_cells = 4;
-
Thanks for this.....
-
Hi
How do I put each photo inside a table (3 tables)? Instead of them all inside of the same table?
thanks
-
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?
-
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?
-
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): $selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
$selection_alt = array('votes DESC', 'rating DESC', 'name ASC', 'name ASC', 'name ASC');
should be: $selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
$selection_alt = array('votes DESC', 'rating DESC', 'hits DESC', 'comments DESC', 'downloads DESC');
-
It worked. Thanks man :mrgreen:
-
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:
//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------
add just before :
//-------------------------------------------[ [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:
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {
add just before :
$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):
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 :
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 :
{cat_description} (Hits: {cat_hits})
<hr size="1" />
add after:
<!-- [ 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:
-
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
-
the link works very well for me !!!
:arrow: http://faces.dalnet.ru/files.php?id=5&l=english
-
Hi,
yep, the link works now but I receive unreadable files ... with which program can these files be opened ?
thx
dp
-
WinRAR most likely. 8)
-
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þÇ'iZzzA¹áQ”«åÚÒBK[zBË%Ò’6¡ M“š¤-åºÖ\OÖED@XÅ¿»¬º(«.^«"ࢋìÅÿ¯(¨ëÖ\µÿïÌ›œÍñh×u3í'ïÍÌo®÷›ù½yï%óŽ=}ߣÃþ—¸¸B¾ïŽ aa2°Öê‰!d¹înÔºƒî?Ê}¼÷y²"w¨‚óqÏZ5Gÿ¥†¤nMÝšÌÌÒÃE(Hªž%:ã“xk?qﺻ£}î[Ýìómd%nûÞ·rø‡?–Òs;“Æcû¶¿J%Äâ ?|!Z짤’ÿ’4|xÙ¦§»ß¶"§#¦·IØ^[BÈ"$|«:Â/w9:övÛ˳;k¸—-Ë×5?ëÖÖ>îìþ?cûÒ%`•§=ÿ;Â]óééoµ•oK³o{>•ùÀv ¶Ÿ’ëÜ΋rOÌwnO"¶ý±]uæÖDKáaž»½ß†·A¯ó©œÕÙëý¶ibÿc.g¾hm”óvd²û‡ØÊïÙß?”0Nz:{9öþ`oçsòžýÇ®oÛV’óÜÛžíIBƒ#dà —¡üÈífrÌɉì"5tA÷cwe:ƒnJµ±Y(«ÈVMB¦®IÕ 1S„bº#ªôz©](SàmÒ,BU»Ù¢iJQ*—hLfÑ0+""=%M©Ìk±h¦YBDD•N¯oJu‹^#”ªš4&!9^(Z^Y°¨´¸¼DHlRéôã,³^Ÿ«Vé
KŠ©%Q
t
???
regards
dp
-
Are you using the latest version of WinRAR ? Looks like you're using an old version.
-
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
-
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 ?
-
yes I do ...
and now, using Netscape, I GOT IT !
I love IE
thanks
dp
-
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 ?
-
HI
This Mod works perfect ... great !!!
Many thanks
coooool
Steffen
-
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:
//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------
add just before :
//-------------------------------------------[ [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:
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {
add just before :
$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):
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 :
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 :
{cat_description} (Hits: {cat_hits})
<hr size="1" />
add after:
<!-- [ 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 Pic´s 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...????
-
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?
-
I think the best is
the parts which don't have a classification
-
here a fast solution which answers your request... but it will be necessary to improve it:
open mini_top.php and find :
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 :
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:
-
hhmm,
thanks but......
see -> http://www.terraristik-galerie.de/categories.php?cat_id=6 (scroll down)
-
code updated.
hhmm,
thanks but......
see -> http://www.terraristik-galerie.de/categories.php?cat_id=6 (scroll down)
:?: and the question is ?????
-
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.
-
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...
-
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:
-
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
-
great MOD .. thanks
-
what if I don't want a category to be incloded in mini top ?
-
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.
-
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 ?
-
: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 :
$selection = array('rating', 'votes', 'hits', 'comments', 'downloads');
$selection_alt = array('votes DESC', 'rating DESC', 'name ASC', 'name ASC', 'name ASC');
add after :
$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:
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:
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.
-
it's works .. thank you very much :D
-
ich antworte mal auf deutsch... *g*
eigentlich ist das schon in der mini_top.php definiert...
Kann man sich das mal anschauen?
-
in which file where do I have to still insert this??
"lang_hits" => $lang['hits']
"lang_downloads" => $lang['downloads'],
:arrow: in mini_top.php file :
find the line containing :
$site_template->parse_template("mini_top_bit")
and add BEFORE:
$site_template->register_vars(
"lang_hits" => $lang['hits'],
"lang_downloads" => $lang['downloads']
);
try that and tell us if it still does not work :wink:
-
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.
-
:oops: i forgot a coma ! :arrow: repared.
can you re-apply the modification?
-
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:
$num_of_cells = $config['image_cells'];
Change:
$num_of_cells = 6;
2. Find:
$mini_top_images .= "\n</td>\n";
Add after:
if ($cnt==2) {
$mini_top_images .= "\n</tr><tr>\n";
}
:wink:
-
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!
-
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 {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:
<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>
-
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
-
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)
-
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. ;)
-
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?
-
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. ;)
-
Thanks my friend xD gonna post it there
-
Hi all
I installed this modd and i am only seeing most rated/voted and viewed despite i changed the code to$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
-
ohk i got it 2 work..
-
Regards
Sorry for my english
The mod works fine.
But I´m stupid an I can´t format the table (I don´t know where). It is in the footer?, not in the body...
my gallery:
http://www.usuarios.lycos.es/riomolin/4images/
thanks in avance
-
in home.html add that table 8O
-
solved
thanks
Now I need center the cells
-
what you mean center? <center> </center> ? :roll:
-
Regards
I centered the cells, now I need center the thumbs in the cells.
I´m modified thumbnail_bit.html and works in the New images table but not in Mas Popular table
Thanks in avance
-
what you mean center? <center> </center> ? :roll:
Solved
I put <center> </center> ?
-
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" don´t 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 what´s the code?
- What I can put in the sixth cell?, card most sended?, what´s the code?
http://www.usuarios.lycos.es/riomolin/4images/
Thanks in avance
-
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
-
Thanks, e-trader_2002,
Solved
-
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'
-
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:
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.
-
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
// 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
// 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
-
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
-
tnx, my mistake I understood that i will change the top.php but ofcourse we are talking about minitop.php
:)
its done...
-
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
-
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:
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace it by this one :
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"middle\">\n";
-
Thanks a lot ch€ri{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:
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace it by this one :
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"middle\">\n";
-
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, what´s 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 español
http://www.usuarios.lycos.es/riomolin/4images
Regards
-
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, what´s 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 español
http://www.usuarios.lycos.es/riomolin/4images
Regards
-
Nachdem ich die gleiche Fehlermeldung hatte wie mstgokcen konnte ich das Problem mit den angesprochenden fehlenden Klammern lösen. Nun kommt keine Fehlermeldung mehr.
Leider wird lediglich in meiner Enddatei eine Headzeile angezeigt, es fehlen die Bilder, Schrift usw. gänzlich. 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 für die home.hmtl bestimmten Script in eine andere hmtl.datei eingegeben habe.
-
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!
-
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?
-
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.
-
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
-
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:
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!
-
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:
-
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?
-
an awesome MOD. Now, how could i show the mini-top mod on an external page outside of 4images directory?
-
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
-
Ok so in mini_top.php file,
find:
for ($cnt = 0; $cnt < $num_of_cells; $cnt++) {
add top of it:
$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 ?). ;)
-
Thank you very much thunderstrike.
It's is now working.
-
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.
-
Please post random image topic. Is mini-top here . . .
-
Oke thunderstrike.
I've already moved it to the Random Image topic.
Thank you for your tip's
-
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
-
Is say in install doc for this:
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');
Edit value and delete # in line.
-
Is say in install doc for this:
# $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
-
I'm sorry but I did so. It doesn't work.
Step 6 - my signature.
-
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
-
After ORDER BY line, add: LIMIT x (change 'x' for value).
-
After ORDER BY line, add: LIMIT x (change 'x' for value).
Okay, thanks for your help! But now it looks like this:
$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:
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 :(
-
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]
LIMIT 10;
for:
ORDER BY i.image_".$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt]."
LIMIT 10";
After "; - see for delete old "; (or ;).
-
Hey, I'm sorry. I did everything you told me.
Now my "$sql section" in "mini_top.php" looks like this:
$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
-
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.
-
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.
-
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)
-
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
-
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.
-
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
-
Hi,
the modecode is not msql5 compatible :wink:
in modcode:
search:
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
change to:
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
-
Thanks a million :) I solve the problem
-
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.
-
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!
-
Hi xsbucket,
look Reply #129 in this thread => link :wink:
Kurt
-
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?
-
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?
-
xsbucket,
like KurtW already wrote: your host changed mysql version
Hot Shots
you should adjust..
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.
-
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?
-
send ftp details
-
send ftp details
I'm sorry but i'm pretty new to programming....what do you mean ftp details?
-
send me your FTP account details to see your files..
-
Pm sent with ftp info
-
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
$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:
$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
-
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.
-
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
-
it work man
http://pho2o.net/
thank you
-
yes in your website it works very nice , I envy you :wink:
-
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
-
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
-
what are the lines above 30? specifically define('ROOT_PATH' ...
-
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
-
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.) ;)
-
: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
-
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:
$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.
-
Hallo,
hat das jemand schon bei sich eingebaut?
Die Thread hier sind wiedermal so zerstückelt, 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 aufräumen und zu einem zusammenfassen.
-
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...
-
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....
-
Hi!
FROM 5images_images i, 5images_categories c LEFT JOIN 5images_users
5images ... is not yet properly? b.t.w. post the sql query that produced the errors.
mfg Andi
-
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!!
-
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
-
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
???
-
...
Maybe replace from:....
i think not...
and you've checked all your mod?
-
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???
-
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
-
Rembrandt, THANK YOU VERY, VERY MUCH SIR!!!
-
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?
-
V@no thank you for fix..
i merged that one and this one here.
-
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 würde mich auch sehr interessieren. Hat jemand eine Idee und kann helfen?
-
Das würde 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:
<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 )))
-
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:
<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 bräuchte für meine Seite jedoch eine kleine Änderung, da ich den ursprünglichen Code geändert hatte.
Ich möchte gerne die Motive mit den meisten Hits, den meisten verschickten Postkarten, den meisten Downloads und der besten Bewertung einbauen. Für den "alten Code" hatte ich das so geändert, aber hier bekomme ich das nicht hin. Was muss ich tun?
-
4images 1.7.8
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];
-
...
Wo liegt das Problem?
....
http://www.4homepages.de/forum/index.php?topic=5874.msg144136#msg144136
mfg Andi
-
@VANO,
HEllo ur link is dead. Can u please re-update, so i can see you demo site please sir. Thank u VANO,
-
how can i change the settings how many entries are displayed?
thanks!
-
Here (http://www.4homepages.de/forum/index.php?topic=5874.msg35704#msg35704)
-
danke dir benny,
aber: man kann nur max. 5 aneziegn lassen obwohl ich 10 eingestellt habe werden auch nur 5 angezeigt?
lg!
-
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!
-
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:
-
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
-
I`ve this error:
Fatal error: Call to undefined function get_permission() in ***\Server\root\mini_top.php on line 5
Line 5:
$user_access = get_permission();
Strange!
-
Why one is shown and too the image: rating and votes?
But in top.php images The different (see image - top)
-
Das würde 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:
//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.
-
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 it´s appears in home and the possibilities that a person clicks on it is very hi.
-
Help please, is there support? :oops:
I can´t modify code for searching only in last 30 days pictures. The code shown in page 12 doesn´t work well. It output wrong information. The original Mini top Mod works perfect but I can´t 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 I´m not a programmer and all ends with php errors :D
-
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'
-
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