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 - up23

Pages: [1]
2
Does anyone know how to make it so that the search bar that appears on everypage only searches the image names/title and keywords instead of everything? I only want the advanced search to search description.

Also, does anyone know how to take out words in the search string? The common words like "the" or "of" or "to" I want not to search for.

Thanks.

3
Quote
what do you mean?
You mean the email from the user who want to buy the image?
if yes, the users email is already been parsed (if set) in the {buyer_emall} tag
Thanks for the fix icecream. I got the problem solved. I wanted to send the money to the uploader of the image, so I had to get the uploader's email. I added
Code: [Select]
$owner_email = $image_row['user_email']; to details.php after the first sql query:
Code: [Select]
$image_row = $site_db->query_firstrow($sql); and added
Code: [Select]
"owner_email" => $owner_email, under the "Print Out" section. I used
Code: [Select]
{owner_email} on the details.html template file.

4
I've been kind of stress testing 4images, and I've noticed that (with the cache turned on) the mysql query that takes the most time (>70%) is the lines:

Code: [Select]
  $sql = "SELECT cat_id, COUNT(*) AS num_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1
          GROUP BY cat_id";
  $result = $site_db->query($sql);

from global.php. Is there any way to put the result of this in the cache to speed things up?

I believe the time increases linearly with the number of files. I'm running the mysql under xampps with windows xp and 70,000 files in the database. Category pages show up in 0.7 seconds with cache; this mysql query takes 0.55 seconds.

As a side note, I sped up the details.php page by commenting out the next/prev file section, and use include of global2.php where global2.php has the code above commented out. No the most finesse way, I know. Also, the "show new" feature seems to take a lot of resources, but then all 70,000 files in my test database were new.

So if anyone know how to cache the above code, please post it. Thanks.

5
Installed this mod with 1.7.2. I had to make some changes to get it to work. In the .php file, the new column added was named "price2" instead of "price". Also default value of 0.00 should be added. Fixed by installing as normal, and then using phpmyadmin. Changed the column name of price2 to price. Added default value = 0.00 by editing the structure of column from structure tab. Updated all price values with query: update `4images_images` set `price`=0.00 WHERE `image_active`=1. It might have been eaiser to update the query to alter table in the .php file.

This is probably not hard, but does anyone know how to return the user_email variable (like it was used in members.php) onto the details.php? I want to use {user_email} on the details template page as the paypal payment email. Please give the codes needed to be changed. Thanks.

Pages: [1]
Post your comments here