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

Pages: 1 ... 15 16 17 18 [19] 20 21 22 23
271
Mods & Plugins (Releases & Support) / Re: [MOD] Multi Download of same image
« on: September 26, 2008, 09:27:17 PM »
Wow !!! This is the MOD I was looking for..  :)  Here I have one question before putting this in my website ..

If I have an image of size 1024x768  and the user selected to download 1280x960 or bigger size , then what will happen ??


Thanks


Just tested this in my test server..  but I got the following error.

Fatal error: Call to undefined function check_big_type() in C:\wamp\www\bhwallpaers\includes\functions.php on line 215

I am using 1.7.4 version and also NOT using BIG mod..   :(



272
Hi,
    Here is a code .. to get more random images outside the gallery.   ( copyright of this script still belongs to original author..  :)  unfortunately I have forgotten the original Author's name..)

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_more_pics.php                                 *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.0 for 4images 1.6.1                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (http://www.4homepages.de/4images/lizenz.php) für       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH''./');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 4;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        ORDER BY a.image_id DESC
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$image_id $row['image_id'];
  
$cat_id $row['cat_id'];
  
$image_name $row['image_name'];
  
$image_comments $row['image_comments'];
  
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
  echo 
"&nbsp;&nbsp;<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"1\" alt=\"$image_name\"></a>&nbsp;&nbsp;";
  echo 
"<b>$image_name</b>\n";
  echo 
"Comments: $image_comments<hr>\n";
}
?>


I think .. you can use this to get the new images thumbnail in external sites.

You can save it in your server and use that link in other websites.


Hope this helps...


273
Discussion & Troubleshooting / Re: virtual Users .. !!!
« on: September 21, 2008, 11:09:19 PM »
Oh !!!  :) 
 
 Thanks to all for the quick reply ..

274
Discussion & Troubleshooting / Re: virtual Users .. !!!
« on: September 21, 2008, 10:40:07 PM »
But.. why this happens ??

275
Discussion & Troubleshooting / virtual Users .. !!!
« on: September 21, 2008, 10:33:22 PM »
Hi All,
            I was noticing this thing for a long time in my 4image gallery. If 1 or 2 users are visiting my website, then I can see atleast 5-6 users are visiting to my site from some fixed Ip address. Do anyone have any idea why this is happening ? Is there any effect on performance for this reason ?


here I have attached the screen shot of my ACP screen while 2-3 users are online.




Thanks,
Batu

276
Thanks V@no,
                     Simply great !!!!  :)  It worked ..   but I did one change then it worked ..

Code: [Select]
$result = $site_db->query($sql);   to
Code: [Select]
$result = $site_db->query_firstrow($sql);
( I have no idea on php, I don't know technically what is the difference between these ..  :) .. but it worked ) ..


Again Thanks... V@no !!!




                   

277
Mods & Plugins (Requests & Discussions) / Selected images in one Category
« on: September 21, 2008, 01:42:16 PM »
Hi,
     I have created one category and I need to show all the images in this category from all other categories where the description of the images  matches to "xyz"

Can anyone tell me how can I do this ?


To achieve this I have done the following changes in category.php and its working ..Its retrieving all the images correctly from other categories but the count of those images and paging is not correct .. Its still displaying the total images of the original category.

Existing code :

Code: [Select]
$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 i.cat_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";


New code:
Code: [Select]
if ($cat_id == 55) {

$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 i.image_description like '%xyz%' and c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";
} else {
$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 i.cat_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";
}


Is there any other place I am missing to make changes ??

Thanks,

278
Discussion & Troubleshooting / Re: Images on Main page?
« on: September 21, 2008, 12:51:57 PM »
Yes, this is possible.

Find  in index.php
Code: [Select]
$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";



Replace this with following

Code: [Select]
$new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
$sql = "SELECT IF(i.image_date >= $new_cutoff,RAND()+1,1) as random_no, 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 random_no DESC, i.image_date DESC
        LIMIT $num_new_images";


It will randomize the new wallpapers ..

Thanks,

279
Templates & Styles (Requests & Discussions) / <html dir="{direction}">
« on: September 20, 2008, 05:12:56 PM »
Hi,
     I just noticed <html dir="{direction}">  in my header.html template. Can anyone tell me what is the use of this ?





Thanks,
batu



280
Installation, Update & Configuration / Re: 2 questions in deleting items
« on: September 13, 2008, 09:26:22 AM »
Hi,
    From ACP you can delete the images by selecting edit image option. If you have logged in as admin in your website then you can see admin links just below all the images as [edit] and [delete].  Click on the delete ..




Thanks,

281
FAQ, Tips / Re: 4images security tips
« on: September 11, 2008, 07:43:09 AM »
Gr8 ... !! Thanks Nicky. !

282
FAQ, Tips / Re: 4images security tips
« on: September 10, 2008, 09:36:05 AM »
HI Kai,
            I didn't get the 3rd  point .. :(

How to protect by using  .htaccess/.htpassword ??





283
Chit Chat / Re: 4images Copyright
« on: September 08, 2008, 12:11:10 AM »
Hi,
    I have just noticed one website... and I think ( 99.99% sure ) it is using 4image. but I can't see any copyright link in that site.



284
One alternate way is there.. ...

          you need to change your  details.html and categories.html.

put the entire content of these templates inside {if no_terms} and {endif no_terms} with one type of adds.

For T&C enabled imaes .. put the entire content inside {if show_terms}  and {endif show_terms} with other type of adds.



hope this helps...

285
Discussion & Troubleshooting / Re: {if..} {endif...} Tutorial
« on: August 25, 2008, 10:53:08 PM »
Hi,
    English version please ..  :)

Pages: 1 ... 15 16 17 18 [19] 20 21 22 23