Benutzername    Passwort    Autologin    
  Passwort vergessen       Registrieren  
beeForum Foren-übersicht » hal9000 » mod support
Neues Thema eröffnen   Neue Antwort erstellen Hervorhebung entfernen


UploadPic Add-On - Posted Image Resize
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
Makc666





Titel: UploadPic Add-On - Posted Image Resize
Verfasst am: Mo, 28 Aug 2006, 16:35
Beitrag
Antworten mit Zitat

I write some add-on for this mod.

When you upload some realy BIG picture, let it be 2400x2400.
You select it on you hard drive, hit send and then a new window apperes.

And by default picture in that page is displayed with default size.

This add-on will check pictures size abd if it is bigger than 300x300 it will show that picture on that page with width and height 300x300.
You can change it in code for what you like.



Code:
##############################################################
## MOD Title:   UploadPic Add-On - Posted Image Resize
## MOD Author:  Makc666 < makc666@newmail.ru > ( Maxim ) http://makc666.tripod.com
## MOD Author:  buegelfalte < N/A > ( B.Funke ) http://forum.beehave.de
## MOD Description:
##   This Add-On for UploadPic will resize (virtual) image on Posted page.
##
## MOD Version: 1.4.0
##
## Installation Level: Easy
##
## Installation Time: 5 Minutes
## Files To Edit:
##   templates/subSilver/uploadpic_posted.tpl
##   uploadpic.php
##
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/uploadpic_posted.tpl
#
#-----[ FIND ]------------------------------------------
#
          <td align="center"><img src="{IMG_PICTURE}" width="{L_NEWX}" height="{L_NEWY}"></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
          <td align="center"><img src="{IMG_PICTURE}" width="{L_NEWX_2}" height="{L_NEWY_2}"></td>
#
#-----[ OPEN ]------------------------------------------
#
uploadpic.php
#
#-----[ FIND ]------------------------------------------
#
            $int_newx = $int_size[0];
            $int_newy = $int_size[1];
#
#-----[ AFTER, ADD ]------------------------------------------
#

      $height = $int_size[1];
      $width = $int_size[0];
      if ($height >= $width)
         {
            if ($height > 300)
               {
                     $height = 300;
                     $percent = ($int_size[1] / $height);
                     $width = ($int_size[0] / $percent);
               }
         }
      if ($height < $width)
         {
            if ($width > 300)
               {
                  $width = 300;
                  $percent = ($int_size[0] / $width);
                  $height = ($int_size[1] / $percent);
               }
         }


      $int_newx_2 = $width;
      $int_newy_2 = $height;
      
#
#-----[ FIND ]------------------------------------------
#         
         'L_NEWX' => $int_newx,
         'L_NEWY' => $int_newy,
#
#-----[ AFTER, ADD ]------------------------------------------
#
         'L_NEWX_2' => $int_newx_2,
         'L_NEWY_2' => $int_newy_2,
#
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Nach oben
Rang:
boris



Beiträge: 10136

Titel: (Kein Titel)
Verfasst am: Di, 29 Aug 2006, 16:34
Beitrag
Antworten mit Zitat

Thanks for the AddOn !

I guess I'll include something similar in my next smaller update whenever I get it done ... needs to be configurable via the ACP (other people may have bigger / smaller UploadPic-windows) and needs to have a message that says "resized", otherwise people will upload pictures repeatedly, when they don't know that the picture is resized ("Hey, I wanted it bigger !")


____________
beehave - home of humbug ... [we can't afford to be neutral]

Nach oben
Private Nachricht senden Website dieses Benutzers besuchen Rang:godmode methusalem 3. platz professioneller Sportangler Profi-Winzer (7x Hamm) Arcade-Meister, Rang 16 rainbow-cup
Makc666





Titel: (Kein Titel)
Verfasst am: Mi, 30 Aug 2006, 16:56
Beitrag
Antworten mit Zitat

boris @ Tue, 29 Aug 2006, 16:34 gab folgendes von sich:
Thanks for the AddOn !

I guess I'll include something similar in my next smaller update whenever I get it done ... needs to be configurable via the ACP (other people may have bigger / smaller UploadPic-windows) and needs to have a message that says "resized", otherwise people will upload pictures repeatedly, when they don't know that the picture is resized ("Hey, I wanted it bigger !")

I though about both things you wrote.
- about ACP
- about a note

Smile

1) If you want to add to add it for Admin, it is not hard to make.
2) A note is very easy to make, just edit one note.

I will look into in next week.

Nach oben
Rang:
boris



Beiträge: 10136

Titel: (Kein Titel)
Verfasst am: Mi, 30 Aug 2006, 20:45
Beitrag
Antworten mit Zitat

Both changes are not hard to make, just for the release there are a lot more changes to be made (update-files, etc.) - and it takes a LONG time to get all the translations back from everybody (french, dutch, danish, swedish) ...

I'm glad there are no deadlines for open source big grin


____________
beehave - home of humbug ... [we can't afford to be neutral]

Nach oben
Private Nachricht senden Website dieses Benutzers besuchen Rang:godmode methusalem 3. platz professioneller Sportangler Profi-Winzer (7x Hamm) Arcade-Meister, Rang 16 rainbow-cup
Makc666





Titel: (Kein Titel)
Verfasst am: Di, 05 Sep 2006, 23:16
Beitrag
Antworten mit Zitat

boris @ Wed, 30 Aug 2006, 20:45 gab folgendes von sich:
Both changes are not hard to make, just for the release there are a lot more changes to be made (update-files, etc.) - and it takes a LONG time to get all the translations back from everybody (french, dutch, danish, swedish) ...

I'm glad there are no deadlines for open source big grin

Sorry, where I can find new English language for translating it into Russian?

Nach oben
Rang:
boris



Beiträge: 10136

Titel: (Kein Titel)
Verfasst am: Do, 07 Sep 2006, 11:31
Beitrag
Antworten mit Zitat

Makc666 @ Di, 05 Sep 2006, 23:16 gab folgendes von sich:
Sorry, where I can find new English language for translating it into Russian?

The "new" language ?

All the language-variables are in uploadpix.txt in the UploadPic-archive - the "new" variables (for the next version) are not ready to be translated, yet.


____________
beehave - home of humbug ... [we can't afford to be neutral]

Nach oben
Private Nachricht senden Website dieses Benutzers besuchen Rang:godmode methusalem 3. platz professioneller Sportangler Profi-Winzer (7x Hamm) Arcade-Meister, Rang 16 rainbow-cup
boris



Beiträge: 10136

Titel: (Kein Titel)
Verfasst am: Sa, 30 Sep 2006, 19:27
Beitrag
Antworten mit Zitat

The changes to UploadPic have been made to include this feature ... my code is a little bit slimmer, though big grin

Code:
         $int_factor = min(($board_config['uploadpic_maxdisx']/$int_newx),($board_config['uploadpic_maxdisy']/$int_newy));
         $int_disx = round($int_newx*$int_factor);
         $int_disy = round($int_newy*$int_factor);


____________
beehave - home of humbug ... [we can't afford to be neutral]

Nach oben
Private Nachricht senden Website dieses Benutzers besuchen Rang:godmode methusalem 3. platz professioneller Sportangler Profi-Winzer (7x Hamm) Arcade-Meister, Rang 16 rainbow-cup
Beiträge der letzten Zeit anzeigen:   
Neues Thema eröffnen   Neue Antwort erstellen    beeForum Foren-übersicht » hal9000 » mod support Seite 1 von 1
Gehe zu:  



ähnliche Beiträge
Thema Autor Forum Antworten Verfasst am
Keine neuen Beiträge uploadpic auf orion phpBB instalieren hewika mod support 9 Mo, 03 Jan 2011, 21:18 Letzten Beitrag anzeigen
Keine neuen Beiträge uploadpic Problem -> hilfe benötigt Dakota mod support 1 So, 15 Aug 2010, 15:39 Letzten Beitrag anzeigen
Keine neuen Beiträge limit image dimensions Morpheus mod support 1 Mo, 15 Sep 2008, 10:01 Letzten Beitrag anzeigen
Keine neuen Beiträge UploadPic 1.3.7 Imagerotate Morpheus mod support 2 Mo, 08 Sep 2008, 19:41 Letzten Beitrag anzeigen
Keine neuen Beiträge UploadPic 1.3.7 Besitzer ändern Morpheus mod support 2 Mo, 08 Sep 2008, 15:18 Letzten Beitrag anzeigen


Schreiben: nein. Antworten: nein. Bearbeiten: nein. Löschen: nein. Umfragen: nein.
phpBB © phpBB Group | impressum