Author Topic: Trouble with setperpage_dropdown_form  (Read 10958 times)

0 Members and 1 Guest are viewing this topic.

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Trouble with setperpage_dropdown_form
« on: April 09, 2007, 06:04:34 PM »
Mine is not working. I have read the suggestions regarding changing the numbers in the settings in the admin panel, but still I cannot get it to show two or more rows of thumbnails. I have it set for 3 cells and 3 rows, and I have 6 images uploaded, but when I change the dropdown to 6, I still only get three images. At one point I changed it to something that made 6 images go across in one row, but I want several rows. The style sheet calls for .imagerow1 and .imagerow2, so there ought to be a second row made, shouldn't there?  :?

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #1 on: April 10, 2007, 12:44:57 PM »
Give me the URL and Admin Account! (PN)

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #2 on: April 11, 2007, 10:14:14 AM »
Should I expect to see a second row or not? Have I misinterpreted this function?

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #3 on: April 11, 2007, 11:42:25 AM »
Give me the URL and Admin Account! (PN)

 8O 8O 8O

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #4 on: April 11, 2007, 12:42:52 PM »
I read what you said, but I don't want to give you an url or an admin account. I want to know how to fix this; what I should look for, etc. But first, I need to know whether or not I have even interpreted this function correctly in the first place. Should it be showing a second row if I have specified two rows, or not? Not everything is clear-cut around here, so I'm asking.

If it should be showing a second row, what files should I look at to see what is wrong?

What files would you look at if you had an admin account at my site?

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #5 on: April 11, 2007, 01:07:21 PM »
without the url... no support...  :twisted:

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #6 on: April 11, 2007, 06:54:43 PM »
I'll get the answer elsewhere, and will post it here. And without support, no contribution.  :twisted:

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #7 on: April 13, 2007, 09:33:25 PM »
And without support, no contribution.  :twisted:

I/We don't have to stand for that!  :lol:

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #8 on: April 14, 2007, 09:42:38 PM »
This is from index.php. Is this where the problem is?
Code: [Select]
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(

));

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

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

$num_new_images = $config['image_cells'];
$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 NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $new_images .= $lang['no_new_images'];
  $new_images .= "</td></tr></table>";
}
else  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row);
    $new_images .= $site_template->parse_template("thumbnail_bit");
    $new_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $new_images .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $new_images .= "</tr>\n";
    }
  }
  $new_images .= "</table>\n";
} // end else

$site_template->register_vars("new_images", $new_images);
unset($new_images);
:|

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #9 on: April 14, 2007, 10:19:09 PM »
I'll get the answer elsewhere, and will post it here. And without support, no contribution.  :twisted:

 :lol:

And:
without the url... no support...  :twisted:

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #10 on: April 15, 2007, 03:08:18 AM »
I get the impression you don't know the answer! Ha! Where's V@no? He used to know the answers and was not too petty to share them. Maybe he left because you are such an ass? Yes? Yes.

Offline gls

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Trouble with setperpage_dropdown_form
« Reply #11 on: April 17, 2007, 03:07:41 PM »
I have figured out that the setperpage dropdown does work on the categories page,the lightbox page, and even the search page --- just not the index page. Does this information narrow it down for anyone who might care to help me, hopefully? I have "newness" set to 100 days, images per row at only 1, and rows per page at 100 and still I get only one image showing on the index page. I have 11 images uploaded! All 11 should be showing with those settings, I think?

I just did a file comparison of the original download of index.php vs. my current index.php. The only difference is that the original said, on line 89:
Code: [Select]
$site_template->register_vars(array(
  "has_rss"   => true,
  "rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':', '', $lang['new_images']).")",
  "rss_url"   => $script_url."/rss.php?action=images"
));

and my index.php says:
Code: [Select]
$site_template->register_vars(array(

));

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Trouble with setperpage_dropdown_form
« Reply #12 on: April 17, 2007, 07:09:44 PM »
Where's V@no? He used to know the answers and was not too petty to share them. Maybe he left because you are such an ass? Yes? Yes.

Kai?
Könntest Du da mal was gegen machen? Das ist wirklich anstrengend sich über sowas ärgern zu müssen...

Selbst wenn man nicht mehr reagiert...

Ich schließe das hier mal, weil ich denke das hier sonst auch niemand mehr helfen möchte...

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: Trouble with setperpage_dropdown_form
« Reply #13 on: April 17, 2007, 08:36:36 PM »
I get the impression you don't know the answer! Ha! Where's V@no? He used to know the answers and was not too petty to share them. Maybe he left because you are such an ass? Yes? Yes.

Calm down my friend. :)
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search