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

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

0 Members and 2 Guests are viewing this topic.

computer123

  • Guest
Re: [Mod] Mini-Top
« Reply #105 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
« Last Edit: August 08, 2007, 03:59:07 AM by computer123 »

Offline FunnyUser

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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Mini-Top
« Reply #107 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.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline FunnyUser

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: [Mod] Mini-Top
« Reply #108 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
« Last Edit: November 19, 2007, 01:03:51 PM by FunnyUser »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Mini-Top
« Reply #109 on: November 19, 2007, 01:48:47 PM »
Quote
I'm sorry but I did so. It doesn't work.

Step 6 - my signature.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline FunnyUser

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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Mini-Top
« Reply #111 on: November 19, 2007, 02:26:57 PM »
After ORDER BY line, add: LIMIT x (change 'x' for value).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline FunnyUser

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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Mini-Top
« Reply #113 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 ;).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline FunnyUser

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


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

Offline SLL

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

Offline FunnyUser

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

Offline Valery

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

Offline vrisak

  • Pre-Newbie
  • Posts: 1
    • View Profile
need help with mini top
« Reply #118 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

Offline GeO3x

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