Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sydawn

Pages: [1] 2
1
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 03, 2007, 05:43:41 PM »
Well,

If I put what you suggested earliar:
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", $cat_id).")

Then the video plays but the SAME error code comes and NO thumbnails appear.

2
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 03, 2007, 03:20:39 PM »
Hello

No, even doing it manually or adding into folder and then saying check new images, it adds them all fine, but when it comes to the detail page it has that 404 message.

The problem seems to be in the WHERE.... line

3
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 03, 2007, 01:41:32 PM »
Hello

Did a fresh install and get this:

http://66.79.166.100/raw.JPG

All my files are media files, does that have anything 2 do with it?

Anyhow, the problem is here




Code: [Select]
$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_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
       ORDER BY RAND()
       LIMIT $num_new_images";

Almost done I hope  :D

4
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 03, 2007, 12:52:25 AM »
Hello

Alas...no joy...What I will do is start again on a fresh install, there are ALOT of mods on this one. Is it working for you at the moment?

5
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 03, 2007, 12:40:53 AM »
Thanx

I changed that and the problem is still there  :cry:

6
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 11:19:38 PM »
Hi

Yes in ACP the categories are permitted  (in Category settings correct)

I am getting annoyed with this package, so I may just go back to Joomla, not your fault, but its an important part, Joomla I can set this type of thing up in 5 mins no problems.

 :cry:

7
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 06:15:06 PM »
Hmmmm

Ok, these are the views from the browse of the tables:

http://66.79.166.100/image.htm

http://66.79.166.100/category.htm

 :?


8
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 05:37:04 PM »
Hi

I put that in the SQL query, the tables I got from my Phpmyadmin and are below

http://66.79.166.100/image%20cat.JPG

http://66.79.166.100/cat%20cat.JPG

I really appreciate you helping me out, Im proficient on most things but SQL etc just gets to me  :(

9
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 04:26:21 PM »
Hello

I am not quite sure I understand what you are saying, is that in reference to Categories?

10
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 02:19:48 PM »
Hello

Yes, only that page, on the home page it works fine but I dont need it there

11
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 01:56:51 PM »
Hello

sorry for that...

I keep getting:

An unexpected error occured. Please try again later.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\videohold\includes\db_mysql.php on line 116

Anywhere else?

12
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 02, 2007, 12:08:47 PM »
Hi

Thanx for the suggestion =but the problem is still there. This is what I have:


unset($random_cat_image);

//------------------------------------
//------- Random Images --------------
//------------------------------------
$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").")
        ORDER BY RAND()
        LIMIT $num_new_images";
// end new
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if ($num_rows <= 0)  {
  $random_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
//  $random_images .= $lang['no_new_images'];
  $random_images .= "</td></tr></table>";
}
elseif ($num_rows > 0)  {

  $random_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;
      $random_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $random_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

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

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


$site_template->register_vars("random_images", $random_images);
unset($random_images);

//----- End Random Images---------

13
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 01, 2007, 10:17:24 PM »
Hello there

Thanx for the reply. Now let me get this straight, I put Vano`code into my details.php and change the part you have highligted? Is this correct?

thanking you in advance

14
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: August 01, 2007, 08:05:40 AM »
this is sad, noone to reply...

Maybe if it goes to the paid section someone might reply  :(

15
Mods & Plugins (Requests & Discussions) / Re: Random pictures
« on: July 29, 2007, 11:45:30 AM »
Hello

I have tried all variations of the code in this thread to get ranodm images on my details.php page and I get either:

An unexpected error occured. Please try again later.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/beta/public_html/includes/db_mysql.php on line 116

(and I put the brackets) or it shows the page without errors but showing no thumbs at all

HELP me please.

thank you

Pages: [1] 2