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

Pages: 1 [2] 3 4 5 6 ... 21
16
V@no, Hello!

Is it possible to do same, via edit image? This MOD not work in "admin edit image" page. Photos which has been uploaded in the DB, before MOD installation, now in original size on details page. In case, reuploading via edit page, photo not resized and not saved in the "BIG" folder. Have i solution?

Many thx!

17
Mods & Plugins (Releases & Support) / Re: [Mod] Multiupload V.3.1.1
« on: August 25, 2012, 08:07:29 AM »
Yes, it is! Work perfectly!

19
Mods & Plugins (Releases & Support) / Re: [Mod] Multiupload V.3.1.1
« on: August 20, 2012, 09:36:26 PM »
Rembrandt, Hi! Thanks for this MOD! Please, compare your MOD with this V@no code. With this V@no code, I`m put all uploaded images, to the BIG folder. Your multi-upload, resize photos correct, but didn`t put original into BIG folder! If not difficult, please, make a corrections! MAny Thanks!!!

//--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
                  
if ($config['auto_image'] && !$uploaderror) {
                     
$src_copy MEDIA_PATH."/".$cat_id."/big";
                     if (
$direct_upload) {
                        
$src MEDIA_PATH."/".$cat_id."/".$new_name;
                        
$src_copy MEDIA_PATH."/".$cat_id."/big";
                    }
                    else {
                        
$src MEDIA_TEMP_PATH."/".$new_name;
                    }
                    
$do_resize 0;
               
	
	
	
if (
$image_info = @getimagesize($src)) {
                       if (
$image_info[2] == || $image_info[2] == || $image_info[2] == 3) {
                          
$do_resize 1;
                    
	
	
}
                  
	
}
                  
	
if (
$do_resize) {
                     if (!
function_exists(init_convert_options)) {
                           require(
ROOT_PATH.'includes/image_utils.php');
                        }
                        
$convert_options init_convert_options();
        
	
	
	
	
	
	
	
	
if (!
$convert_options['convert_error']) {
	
	
	
	
	
	
	
	
	
	
	
	
	
if (
$image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
	
	
	
	
	
	
	
	
	
	
	
	
	
	
$result true;
	
	
	
	
	
	
	
	
	
	
	
	
	
  if (!@
is_dir($src_copy)) {
	
	
	
	
	
	
	
	
	
	
	
	
	
    
$oldumask umask(0);
	
	
	
	
	
	
	
	
	
	
	
	
	
    
$result mkdir($src_copy);
	
	
	
	
	
	
	
	
	
	
	
	
	
    
umask($oldumask);
	
	
	
	
	
	
	
	
	
	
	
	
	
    if (!@
is_dir($src_copy) || !$result) {
	
	
	
	
	
	
	
	
	
	
	
	
	
      
$result mkdir($src_copy0755);

	
	
	
	
	
	
	
	
	
	
	
	
	
    }
	
	
	
	
	
	
	
	
	
	
	
	
	
  }
	
	
	
	
	
	
	
	
	
	
	
	
	
	
if (
$result == true){
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
copy($src$src_copy."/".$new_name);
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
	
	
	
                      
$convert_options init_convert_options();
	
	
	
                      if (!
$convert_options['convert_error']) {
	
	
	
                        
$quality = (intval($config['auto_image_quality']) && intval($config['auto_image_quality']) <= 100) ? intval($config['auto_image_quality']) : 100;
	
	
	
                       
	
if (!
resize_image($src$quality$config['max_image_width'], 1)) {
	
	
	
                         
	
 
$msg .= (($msg != "") ? "<br />" "")."<b>".$lang['file_upload_error'].": ".$new_name;
	
	
	
                            
$uploaderror 1;
	
	
	
                         }
	
	
	
                
	
     }
	
	
	
	
                   }else{
	
	
	
	
                   
	
	
$do_resize 0;
	
	
	
	
                   }
                      
	
}
                     }
                  }
//-------------------------------------------


Best Regards,
Andrew

20
Tutorials / Re: [TUT] One Image - Three Sizes
« on: August 20, 2012, 02:02:45 PM »
I`ve a wrong info in this MODs...

{download_width} and {download_height} - shows me resized image parameters...

Also {download_button} - working the same!

How i can fix this?

21
Notice: Undefined offset:  6 in C:\...\root\multiupload_2.php on line 85

Notice: Undefined offset:  5 in C:\...\root\multiupload_2.php on line 85

Notice: Undefined offset:  4 in C:\...\root\multiupload_2.php on line 85
FILEID:cimg0034

What`s wrong?

22
Programming / Total views for lightboxes
« on: May 14, 2012, 02:37:48 PM »
Hello!

This little modification i`ve created for my gallery. I think it might be useful to someone else!

Q: What is that modification do?
A: This mod, will count the number of hits for each album and record the value in the database every time someone would see the photo album. Just 4 steps for modification. P.S. This work in all versions of 4images, and not depends on each installed MODs..

1. Create a table in 4images_lightboxes

ALTER TABLE `4images_lightboxesADD `lightbox_hitsINT(10UNSIGNED AS DEFINED 0;

2. In lightbox.php find

//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------
if ($action == "show")
{


Add after:

//Update lightbox Hits
if ($user_info['user_level'] != ADMIN) {
  
$lightbox_id = (isset($HTTP_POST_VARS['lightbox_id']) && $HTTP_POST_VARS['lightbox_id']) ? $HTTP_POST_VARS['lightbox_id'] : ((isset($HTTP_GET_VARS['lightbox_id']) && $HTTP_GET_VARS['lightbox_id']) ? $HTTP_GET_VARS['lightbox_id'] : 0);
  
    
$sql "UPDATE ".LIGHTBOXES_TABLE." l
          SET l.lightbox_hits = l.lightbox_hits + 1
          WHERE l.lightbox_id = '"
.$lightbox_id."'";
  
$site_db->query($sql);
     
}


3: Directly under 2 step, find sql query and at the end of line paste: l.lightbox_hits

4. Find:
$site_template->register_vars(array(
Paste:
"lightbox_hits" => $row['lightbox_hits'],

5. In the lightbox.html use {lightbox_hits}

This is end! Take a look! Enjoy ;-)

Regards,
Andrew

23
Mods & Plugins (Requests & Discussions) / Re: [addon] DREAMBOARD V 2.1
« on: March 09, 2012, 03:22:49 AM »
If anyone have old version of this ADDON, or have work version of this, send me PM, please. Thx

24
Mods & Plugins (Releases & Support) / Re: [Mod] Trusted Member
« on: February 22, 2012, 06:40:53 AM »
This is very perfect MOD! Many thanks Rembrandt!

This is for English Lang step 4:

$setting['user_trusted_counter'] = "From how many points the user is considered to be trustworthy?";
$setting['user_trusted_images'] = "How many points for a picture:";
$setting['user_trusted_comments'] = "How many points for a comment:";
$setting['user_trusted_rating'] = "How many points for a review:";

25
Mods & Plugins (Releases & Support) / Re: [MOD] Contact Form
« on: February 11, 2012, 09:55:36 AM »
How to get a dropdown list for GUESTs too?

If guest send message, it doesn`t work! Dropdown list with "send to" user name and e-mail not shown!

For login user, work`s fine!

26
Is it possible to use html codes in message? Same with this mod http://www.4homepages.de/forum/index.php?topic=29749...

Thx

27
Discussion & Troubleshooting / I need a suggest!
« on: January 26, 2012, 11:54:50 AM »
Hello to all...

I need your suggest. My gallery have about 16000 photos. I need to download data derictory to my localhost. I`ve a problems with internet. It is not quickly and i`ve traffic limitation! What soft may you recomend me? What programm i need, as most optimal in my situation?

Thanks!

28
Plugins / Re: [Plugin] Rebuild Thumbnails v1.1.1 (2010-07-10)
« on: January 25, 2012, 08:47:56 PM »
When i`m starting this plugin, it dawn my gallery... This is log file... What to do?


29
Hello! V@no, i think this is question for you!

I have an idea, help me please, realize it! This idea, i`ll call avatar for lightbox!

I have created column in my LIGHTBOX TABLE, which call lightbox_thumb

Is it possible, from details page, use button (i.e. "use as lightbox thumb") , which will add to "lightbox_thumb" "image_thumb_file" path, from IMAGES_TABLE??? I know it possible, using SQL query, but i`m not programmer. It`s difficult for me.

May you help me?

Many thanks!

30
Step 12 not work "LIMIT" param... I`ve done some changes with code:

In step 12 search in root/index.php:

//############################################## Start News ###########################################################
  
$sql "SELECT news_id, news_title, news_text, user_name, news_date 
          FROM "
.NEWS_TABLE.
          ORDER BY news_date DESC
          LIMIT 1
        "
;

  
$result $site_db->query($sql);
  
$news_row $site_db->fetch_array($result);

  if (!
$news_row){
    
$news_text $lang['no_news']."&nbsp<a href=\"".$site_sess->url(ROOT_PATH."news.php")."\" >".$lang['news_archive']."</a>"
    
$site_template->register_vars(array(
      
"lang_news_main" => $lang['news_main'],
      
"news_text" =>  format_text($news_text$config['news_html'], 0$config['news_bbcode'], $config['news_bbcodeimg']),
    ));
  }
  else {
    
$admin_links "";
    if (
$user_info['user_level'] == ADMIN){
      
$admin_links_add "<a class=\"smalltext\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("news.php?action=addnews"))."\" >".$lang['add']."</a>&nbsp;";
      
$admin_links .= "<a style=\"font-size:10px;color:silver\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("news.php?action=editnews&amp;news_id=".$news_row['news_id']))."\">".$lang['edit']."</a>&nbsp;";
      
$admin_links .= "<a style=\"font-size:10px;color:silver\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("news.php?action=removenews&amp;news_id=".$news_row['news_id']))."\">".$lang['delete']."</a>";
    }
    
    
$news_text str_replace("/>"">",$news_row['news_text']);

    
$new_is_new = ($news_row['news_date'] > time() - ((isset($config['news_isnew']))? $config['news_isnew']:3)*86400);
    
$site_template->register_vars(array(
      
"lang_news_main" => $lang['news_main']." -- ",
      
"news_title" => "<b>".$news_row['news_title']."</b>".(($new_is_new)?" <sup class=\"new\">".$lang['new']."</sup>":"")."</span>",
      
"news_date" => "<b><span class=\"smalltext\">"format_date($config['date_format']." ".$config['time_format'], $news_row['news_date'])."</span>",
      
"news_text" =>  format_text($news_text$config['news_html'], 0$config['news_bbcode'], $config['news_bbcodeimg'])."&nbsp;&nbsp;<br><br><a class=\"smalltext\" href=\"".$site_sess->url(ROOT_PATH."news.php")."\" > ".$lang['news_archive']."</a>",
      
"admin_links" => $admin_links,
      
"admin_links_add" => ($admin_links_add) ? $admin_links_add:"",
      
"news_id" => $news_row['news_id']
    ));
  }
//#################################################### End News ################################################### 


Then replace this:

//############################################## Start News ###########################################################
  
$news_text "";
  
$num_news 4;
  
  
$sql "SELECT news_id, news_title, news_text, user_name, news_date 
          FROM "
.NEWS_TABLE.
          ORDER BY news_date DESC
          LIMIT 
$num_news";
          
    
$result $site_db->query($sql);
  
$news_row $site_db->get_numrows($result);
  

  while (
$news_row $site_db->fetch_array($result)){

    
$news_date = (isset($news_row['news_date'])) ? format_date($config['date_format'], $news_row['news_date']) : REPLACE_EMPTY;
    
$new_is_new = ($news_row['news_date'] > time() - ((isset($config['news_isnew']))? $config['news_isnew']:3)*86400);
    
$news_text .= "<table border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">"
    
$news_text .= "<td align=\"left\">";
    
$news_text .= "<b><span class=\"smalltext\">".$news_date."</span> | <b> ".$news_row['news_title']."</b>".(($new_is_new)?" <sup class=\"smalltext\"><font color=\"#f6f16e\"> (".$lang['new'].")</font></sup>":"")."</span>";
    
$news_text .= "</td>"
    
$news_text .= "</tr>";
    
$news_text .= "</table>";
     
    }
    
$site_template->register_vars("news_text"$news_text);
    unset(
$news_text);

//#################################################### End News ################################################### 


Change "$num_news = 4" in the code by number how many news do you need!

Pages: 1 [2] 3 4 5 6 ... 21