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 ... 4 5 6 7 [8] 9 10 11 12 ... 23
106
Hi,
     Try to add this in your .htaccess file, may be it will work for you..

Code: [Select]
RewriteRule .*\.(jpeg|gif|bmp|flv)$ http://www.yourdomain.com [R,NC]


Replace www.yourdomain.com with your actual website name.


Thanks,
batu544

107
Hi All -
               As far as I know, removing the numbers from the category page is not possible, means after installing this mod my category page url looks like this ( k-aishwarya-rai-3.htm). If I will remove the number 3 then, this url will not work..

But Is it possible to get the url  having only category name?? like  www.bhwallpapers.com/aishwaryarai.htm .

I think its possible, because I think one website has already using this type of mod... and its "www. wallpapergate. com/alilarter.html"  ( i believe this website is using 4image )


It would be great, if someone can find out the changes required for this.. :)


108
Mods & Plugins (Requests & Discussions) / Re: Splash page
« on: May 22, 2010, 01:05:49 PM »
Hi,
     Onetime notice can be displayed easily by using javascripts.. Please refer to www.dynamicdrive.com to get couple of scripts in free..

Thanks,
batu544


109
Hiya!

I'll give that a go :)  The script is as I bought it, what/where does copyright go?

Peace
Lee


Well.. If you have purchased the license then its okay.. :)


110
I didn't see any error in your website.. It seems your actual image size is less than the thumbnail size. Instead of creating the thumbnails by the script, if you will upload the same image as thumbnail also, then it will work as you expected..

Also, I noticed there is no copyright link in your website..


thanks,
batu544

111
what is your website url ??

112
Well.. here is a small plug-in that I use to send the news letters to all my user on weekly basis.. May be you can use it..

Please follow below steps to install this news letter functionality..

Files needs to be changed / Created

1. image_notification.php  ==> new file
2. batch_upload_not.html ==> new file
3. \includes\email.php  ==> Old file



Step 1:

1.1==>Save the below code as image_notification.php 
1.2==> Find "www.yourdomain.com" on the 29th line and change it to your own domain name.
1.3==> Upload this file in \admin\plugins folder.


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

$nozip 1;
define('IN_CP'1);
$root_path = (!eregi("\/plugins\/"$_SERVER['PHP_SELF'])) ? "./../" "./../../";
define('ROOT_PATH'$root_path);
define('ROOT''http://www.yourdomain.com/');
require(
ROOT_PATH.'admin/admin_global.php');

//-----------------------------------------------------------------------------------

if ($action == "") {
  
$action "intro";
}

show_admin_header();

if (
$action == "intro") {

   show_form_header("image_notification.php""notify");
show_table_header("Image Notification"2);
    
$new_cutoff time() - 60 60 24 2;
$num_new_images 9;
$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 NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").") AND cat_parent_id IN (152,1,2,110)
        ORDER BY random_no DESC, i.image_date DESC
        LIMIT 
$num_new_images";

$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);
if (!
$num_rows)  {
  echo 
"<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  echo 
$lang['no_new_images'];
  echo 
"</td></tr></table>";
}
else  {
  echo  
"<table width=\"100%\">";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ?  '';
echo "<tr class=\"tablerow".$row_bg_number."\">\n";
    }
    echo 
"<td width=25% valign=\"top\">\n";
     
$file_src ROOT_PATH."".THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']." \n";
    
$image_path  =   ROOT_PATH."details.php?image_id=".$image_row['image_id']." \n";
     echo 
"<a href=\"".$image_path."\" target=\"_blank\"><img src=\"".$file_src."\" border=\"0\" ></a>";
     echo 
"\n</td>\n";
    
$count++;
    if (
$count == 3) {
      echo 
"</tr>\n";
      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        echo 
"<td width=\">\n&nbsp;\n</td>\n";
      }
      echo 
"</tr>\n";
    }
  }
  echo 
"</table>\n";
// end else

show_form_footer($lang['submit'],'');
echo 
"<center>Plugin Designed by: <b><a href=\"http:/\/\www.bhwallpapers.com/\">Free Celebrity wallpapers</a></b></center>";
}

if (
$action == "notify")
{
// show_table_header("Image Notification", 2);
echo "Processing your request\n \n<br />";

    
$new_cutoff time() - 60 60 24 2;
$num_new_images 9;
$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 NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").") AND cat_parent_id IN (152,1,2,110)
        ORDER BY random_no DESC, i.image_date DESC
        LIMIT 
$num_new_images";

$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);
if (!
$num_rows)  {
  
$message .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$message .= $lang['no_new_images'];
  
$message .= "</td></tr></table>";
}
else  {
//  $message .=  "<html>\n";
//  $message .=  "<head> Celebrity News Letter </head>";
  
$message .=  "<table width=\"80%\">";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ?  '';
// echo "<tr class=\"".get_row_bg()."\">";
$message .= "<tr class=\"tablerow".$row_bg_number."\">\n";
    }
    
$message .= "<td bgcolor=\"#d4dded\" width=25% valign=\"top\" align=\"center\">\n";
    
$file_src ROOT."".THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_thumb_file']." \n";
    
$image_path  =   ROOT."details.php?image_id=".$image_row['image_id']." \n";
    
$message .= "$image_row[image_name]<br /><a href=\"".$image_path."\" target=\"_blank\"><img src=\"".$file_src."\" border=\"0\" ><br />$image_row[image_description]</a>";
    
$message .= "\n</td>\n";
    
$count++;
    if (
$count == 3) {
      
$message .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$message .= "<td width=\">\n&nbsp;\n</td>\n";
      }
      
$message .= "</tr>\n";
    }
  }
  
$message .= "</table>\n";
//  $message .= "</html>\n";
// end else

//-----------------------------------------
// send email
//-------------------------------------------
if ($user_info['user_level']  == ADMIN ) {
  $sql "SELECT ".get_user_table_field("""user_id").get_user_table_field(", ""user_level").get_user_table_field(", ""user_name").get_user_table_field(", ""user_email")."
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_id")." <> ".GUEST." AND ".get_user_table_field("""user_allowemails")." = 1
          ORDER BY "
.get_user_table_field("""user_level")." DESC";

  $result $site_db->query($sql);
    @set_time_limit(1200);
        include(
ROOT_PATH.'includes/email.php');
    while ($row $site_db->fetch_array($result)) {
     $user_email $row[$user_table_fields['user_email']];
        $site_email = new Email();
 
        $site_email->set_to($user_email);
        $site_email->register_vars(array(
          "message" => $message,
          "site_name" => $config['site_name']
        ));
$site_email->set_subject($lang['newsletter_emails']);
        $site_email->set_body("batch_upload_not"$config['language_dir_default']);
        $site_email->send_email();
      }
  }

echo 
"Notification sent to all the users";
show_admin_footer();
}

?>


Step 2:


2.1 Create a new file called batch_upload_not.html and place the below content on it.

Code: [Select]
Dear member, <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
These are your weekly new celebrity wallpapers/images.<br /><br /><br />

<center>
{message}
</center>
</br></br></br>

<b>Best regards,</b> <br/>
{site_name}</br><br/>


<!-- YOUR EMAIL ADDS GOES HERE  -->
<!-- YOUR EMAIL ADDS GOES HERE  -->
<!-- YOUR EMAIL ADDS GOES HERE  -->

<b>P.N.</b> This is not a SPAM. You are getting this email, because you are a registered member at yourwebsite.com. <br/>
We care your privacy. Please read our Privacy Policy for more details.<br/>
To cancel this new wallpaper notification, please send your request to admin@yourwebsite.com<br/>


2.2: Now put this file in  lang\english\email\ folder


Step 3:

3.1 : Open \includes\email.php file and find

Code: [Select]
if (!empty($this->bcc) && !$this->use_smtp) {

insert above

Code: [Select]
$header .= 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";


Now you are done..

After adding new images.. you can go to your plugin section of your ACP, it will show you randomly selected lastest uploaded 9 images. you need to hit the submit.. then it will start sending the emails to the user. Email sending process will take time depending on the total number of users.


Please respect the users privacy and don't SPAM there inbox..  :mrgreen:


Let me know if you are facing any issues..


113
Thanks V@no.. your fix works great !!.. :)   The number 35 was just an example to describe the page number.. :)

Today, I made the changes and it worked.. !!

In my sessions.php, 'cat' word of below line is replaced by 'k' only.. so I made the new changes accordingly..

Code: [Select]
            $url   = str_replace('categories.php', 'cat'.$matches1[1].'.'.$matches2[1].'.htm', $url);


Thanks again V@no.. !!!



114
Thanks Mawenzi .,.. I already have gone thru that post.. but it seems there are something missing...


V@no,
           In simple words Link-exchange means.. adding your website link in my website's friends list and depending on the incoming traffic, the list needs to be sorted and it can be displayed in all the pages of website.

 ... in all the pages we can display N number of sites and there would be a links or friends page which will list all the added websites.

I have added this link exchange things in my website by integrating 2 external scripts.. You can visit my website's "Top 20 referrers " and "Friends" section to see the live demo..

please let me know  if you need more information..

Thanks,

115
hi All -
            Its already 2 years, I have been using 4image for my wallpaper website and I have noticed link-exchange is a very important thing for search engine ranking and 4image lacks this. 4image doesn't have any inbuilt link-exchange functionality.

   Right now I am using some other scripts to add the links in my gallery. It would be very helpful, if someone can write a MOD for this.. :)


Thanks,
batu544

116
Mods & Plugins (Requests & Discussions) / Re: more random images?
« on: May 11, 2010, 08:57:37 AM »
can i show this on Details.php ?   :roll:

Yes, you can show it on detail page also... you need to use that new tag {random_images} ...




117
Mods & Plugins (Requests & Discussions) / Re: New images on index
« on: May 07, 2010, 01:21:05 PM »
I didn't get your question.. Can you please explain it what exactly you are looking for ?


118
Programming / Tools for debugging PHP scripts line by line..
« on: May 05, 2010, 07:53:29 AM »
HI,
     I am not sure, whether you guys are using any other debug tool.. but today, I found a tool which we can use to debug the php script line by line..

Please follow this link  http://netbeans.org/index.html    and install the required software to start debugging ..


As you guys know.. I am not a PHP developer.. so for me its really very hard to find a mistake in PHP..  :oops:


Please let me know if anyone is using any other debug tool for php...


Thanks,
batu544

119
Hi All,
         I have a little problem with this mod..

Everything works fine.. but when a user is on 2nd page onwards and if he changes the number of image views from 8 to any other number.. , then my url changes to  something like  http://www.mysitename.com/k113.35.htm

Here 113 is the category number and 35 is the page number..



Is there any way to prevent this ??

Thanks,
batu544

120
Hi,
     There are 2 steps to get the reflection...

Step 1.1 :   Visit http://cow.neondragon.net/stuff/reflection/ and download the reflecttion.js file

Step 1.2 :   Upload this file in your template/your_template  folder

Step 1.3:    Add the following line in your header.html file before </head> tag.

Code: [Select]
<script type="text/javascript" src="{template_url}/reflection.js"></script>

Step 2:   Open includes/functions.php file and find
Code: [Select]
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".format_text($image_name, 2)."\" />";

Replace this with
Code: [Select]
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." class=\"reflect rheight33 ropacity20\" alt=\"".format_text($image_name, 2)."\" />";

Thats it...  :)

Let me know if this steps are not working....


Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 23