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

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

0 Members and 1 Guest are viewing this topic.

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
« Reply #60 on: November 08, 2005, 02:12:36 PM »
in which file where do I have to still insert this??

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

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

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

try that and tell us if it still does not work  :wink:
ch€ri{Bi}²


Offline ivan

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.279
    • View Profile
    • Bilder Gallery
Re: [Mod] Mini-Top
« Reply #61 on: November 08, 2005, 08:41:10 PM »
hello, this is my file mini_top


Code: [Select]
<?php

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

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

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

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

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

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

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

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

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

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

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

?>

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

greetz ivan


http://www.bildergallery.com
greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery

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
« Reply #62 on: November 08, 2005, 08:53:27 PM »
hello Mr. mini_top.php!  happy to meet you  :mrgreen:  :mrgreen:  :mrgreen:

but more seriously bildergallery, did you make the modification about which I spoke? that seems rather simple.
ch€ri{Bi}²


Offline ivan

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.279
    • View Profile
    • Bilder Gallery
Re: [Mod] Mini-Top
« Reply #63 on: November 08, 2005, 09:04:03 PM »
hello, thanks for the fast answer the code is that original file, thus nothing changed.
if I this insert in such a way get I an error.
you can insert me the code rapidly completely.


I thank you for your efforts...

greetz ivan
greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery

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
« Reply #64 on: November 08, 2005, 09:23:25 PM »
:oops: i forgot a coma !  :arrow: repared.
can you re-apply the modification?
ch€ri{Bi}²


Offline ivan

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.279
    • View Profile
    • Bilder Gallery
Re: [Mod] Mini-Top
« Reply #65 on: November 08, 2005, 09:43:58 PM »
thanks for your answer.
I bring this "mod" simply not to run

please help me, this is the original code!

Code: [Select]
<?php

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

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

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

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

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

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

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

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

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

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

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

?>
greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery

Offline SAD

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Туристические ФотоАльбомы
Re: [Mod] Mini-Top
« Reply #66 on: November 09, 2005, 12:25:27 PM »
What to deduce on page the table with two lines (an example here: http://gallery.krugozor.ru), it is necessary to make the following:

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

 :wink:
Sergey


Offline hanspys

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Mini-Top
« Reply #67 on: November 30, 2005, 03:28:07 PM »
How in h... do you get the mini top images to be on top of each other   :?:
ex.
most viewed
most ......
most ......
most ......

so i can fit it into my page ?

been lookin for it, but frankly i suck in php

any help ?

I would like this very much too and like fuzionative I too suck in php!

Offline hanspys

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Mini-Top
« Reply #68 on: December 01, 2005, 10:38:18 AM »
Never mind I found the solution myself. Don't know if it's the correct solution seen from a coder's perspective but it does the trick:

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

to:
Code: [Select]
<tr> <div align="center">
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})<br />
<a href="{cat_url}">{cat_name}</a><br /><br />
<b>{lang_mini_top_mode}</b>
<tr><br>

Offline abda53bd

  • Sr. Member
  • ****
  • Posts: 484
    • View Profile
Re: [Mod] Mini-Top
« Reply #69 on: January 25, 2006, 10:37:44 PM »
i did it before, but i forget how...

how can i make it so that it will RANDOMLY look at the least OR the most popular

Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Mini-Top
« Reply #70 on: February 02, 2006, 07:39:48 PM »
http://p4ddy-online.de.vu/4images
acc: test pw: test

how can i put the mini-top in the center? (width) so that it stucks just to the 4images copyright frame
(or do you know any better postion?) (vertical for example, but don't know how it works)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Mini-Top
« Reply #71 on: February 02, 2006, 08:24:33 PM »
Quote

or do you know any better postion?


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

2nd, I believe you could simply center the mini-top's images by playing with your home.html template file. It's a really simple task. ;)

Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Mini-Top
« Reply #72 on: February 02, 2006, 08:39:39 PM »
Whats the "signature"? I'm sorry but i really don't know so much about HTML.
perhaps you can show me your imagination by a code or a pic?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Mini-Top
« Reply #73 on: February 02, 2006, 10:02:04 PM »
In that case, please post your home.html file into the Templates & Styles section of the forum by mentionning this topic. I will look into it in order to customize your HTML's home page presentation. ;)

Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Mini-Top
« Reply #74 on: February 02, 2006, 10:05:51 PM »
Thanks my friend xD gonna post it there