Author Topic: Random pictures  (Read 196254 times)

0 Members and 1 Guest are viewing this topic.

Offline sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #60 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?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #61 on: August 02, 2007, 01:57:58 PM »
Is happen only that page ?
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #62 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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #63 on: August 02, 2007, 03:28:00 PM »
Can say if cat ID on cat table have it too on image table ? (All of them same) . Random SQL query say i.cat_id = c.cat_id.
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #64 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?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #65 on: August 02, 2007, 04:36:10 PM »
CATEGORIES_TABLE - > cat_id
IMAGES_TABLE - > cat_id

have all match cat_id with both table ?

Random SQL query say in code - > i.cat_id = c.cat_id two of cat_id must match same (CATEGORIES_TABLE + IMAGES_TABLE).
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #66 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  :(

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #67 on: August 02, 2007, 05:41:32 PM »
Good but select structure. Just left - Browse and post screenshots another.  :mrgreen:

Get there good. Keep at it. :)
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #68 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

 :?


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #69 on: August 02, 2007, 09:59:26 PM »
See 4 activate cats (1,2,3,4) but rest in IMAGES_TABLE compare CATEGORIES_TABLE not there. All image activate. Good. ;)

This MOD check permission for view cats. Do you perm the cats too from ACP ? Can be prob if no.
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #70 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:

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #71 on: August 02, 2007, 11:50:49 PM »
Ok so change:

Quote
$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", $cat_id).")
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #72 on: August 03, 2007, 12:40:53 AM »
Thanx

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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Random pictures
« Reply #73 on: August 03, 2007, 12:45:40 AM »
Just see thing:

Quote
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).")

replace:

Quote
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")."))

know not much for this MOD but hope works.
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 sydawn

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Random pictures
« Reply #74 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?

 

Post your comments here