• [Mod] Mini-Top 5 0 5 1
Currently:  

Author Topic: [Mod] Mini-Top  (Read 234978 times)

0 Members and 1 Guest are viewing this topic.

Offline Lord Nite

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [Mod] Mini-Top
« Reply #15 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

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Error MINI-TOP with templates of vierstra.com
« Reply #16 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
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline ACmonKey

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: More translations requested
« Reply #17 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.
:(
Here is the list of my unanswered topics:

http://4homepages.de/forum/viewtopic.php?t=4001
http://4homepages.de/forum/viewtopic.php?t=5305

btw. V@no is a gr8 guy. He's answered almost all my questions. Thanks V@no ;)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Mini-Top
« Reply #18 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 votação";
$lang['mini_top_downloads'] = "Mais downloads";
$lang['mini_top_comments'] = "Mais comentada";
$lang['mini_top_votes'] = "Mais votada";

Offline disparos

  • Full Member
  • ***
  • Posts: 168
    • View Profile
    • http://www.disparos.com
Re: [Mod] Mini-Top
« Reply #19 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???

Offline centopeia

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Mini-Top
« Reply #20 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é

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Mini-Top
« Reply #21 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.
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Mini-Top
« Reply #22 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;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Mini-Top
« Reply #23 on: May 07, 2005, 11:02:52 PM »
Thanks for this.....
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline kindian

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: [Mod] Mini-Top
« Reply #24 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

Offline megalomania

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Mod] Mini-Top
« Reply #25 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?

Offline kindian

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: [Mod] Mini-Top
« Reply #26 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?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Mini-Top
« Reply #27 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');
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kindian

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: [Mod] Mini-Top
« Reply #28 on: July 14, 2005, 05:25:09 PM »
It worked. Thanks man  :mrgreen:

Offline ch€ri{Bi}²

  • Sr. Member
  • ****
  • Posts: 315
  • A PRoBLeM wIthOUt SoLuTioN Is NoT rEAllY a PRoBLeM
    • View Profile
    • Pat's Gallery
Re: [Mod] Mini-Top - Hack : Mini-Top in all categories
« Reply #29 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:
ch€ri{Bi}²