4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 12, 2018, 09:55:24 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [MOD] Photo Preview Hack
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 ... 4 5 6 7 [8] 9 » »» Print
Current Topic Rating: *****
Author Topic: [MOD] Photo Preview Hack  (Read 178978 times)
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 900

Vienna


View Profile WWW
« Reply #105 on: September 09, 2010, 09:18:24 AM »

so.. i have recoded the photo preview hack

1.) install this mod: http://www.4homepages.de/forum/index.php?topic=25017.msg137021#msg137021
and the addon:   http://www.4homepages.de/forum/index.php?topic=25017.msg138624#msg138624

2.) search in root/details.php:
1
2
3
 //-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
insert above:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//##################################### Start MOD: Photo Preview Hack ###################################

$total "7"// always an odd number e.g. 5,7,9,11... e.t.c
$center 1// for table-width 100% set 0;

  
$result $site_db->query($sql);
    while(
$row $site_db->fetch_array($result)){
      
$image_preview[] = $row['image_id'];
      
$preview_row[$row['image_id']] = $row;
    }

    
$lastPage count($image_preview);

      if (
$center == 1){
        
$t_template "<table align=\"center\" width=\"10%;\">\n";
      }
      else{
        
$t_template "<table width=\"100%;\">\n";
      }  
        
$t_template .= "<tr>";

      if(
$lastPage < ($total 1)){ 
        
$start 0;
        
$end $lastPage -1;
      }
      elseif (
$act_key <= (($total-1)/-1)){
        
$start 0;
        
$end   = ($total 1);
      }
      elseif (
$act_key >= $lastPage - (($total-1)/2)){
        
$start $lastPage $total;
        
$end $lastPage 1;
      } 
      else {
        
$start $act_key - ($total-1)/2;
        
$end   $act_key + ($total-1)/2;
      }

      for(
$i=$start$i<=$end$i++){
        if (
$preview_row[$image_preview[$i]]['image_id'] == $image_row['image_id']) {
          
$t_template .= "<td class=\"minirow1\">\n";
        }
        else {
          
$t_template .= "<td class=\"minirow2\">\n";
        } 
    
        
$t_template .= get_thumbnail_small_code($preview_row[$image_preview[$i]]['image_media_file'], $preview_row[$image_preview[$i]]['image_thumb_file'], $preview_row[$image_preview[$i]]['image_id'], $preview_row[$image_preview[$i]]['cat_id'], format_text(trim($preview_row[$image_preview[$i]]['image_name']), 2), $mode1);
        
$t_template .= "</td>";
      }

      
$t_template .= "</tr>";
      
$t_template .= "</table><br>\n";
      
$site_template->register_vars("preview_box"$t_template);
unset(
$image_preview);
//######################################## End MOD: Photo Preview Hack  #######################################

3.) search in your Templates/details.html:
1
{endif msg}
insert below:
1
2
3
{if preview_box}
  {preview_box}
{endif preview_box}

4.) insert in your Templates/style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.minirow1 {
padding:4px;
background-color : #FFFFFF;
text-align : center;
vertical-align : middle;
border : 1px solid #004C75;
}

.minirow2 {
padding:4px;
background-color : #FFFFFF;
text-align : center;
vertical-align : middle;
border : 1px solid #CCCCCC;
}

in the top of the code, can you set how many images you preview , and the table width.

i think it is all say over the mod.

mfg Andi
« Last Edit: December 07, 2010, 05:56:20 AM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
zakaria666
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 55
-Receive: 2


View Profile
« Reply #106 on: September 09, 2010, 07:53:45 PM »

@Rembrandt

Very amazing 1. Thanks man. It is exactly the way i wanted it. Looks very cool and now it looks very neat. thank you 100x  Good


thanks man
Logged
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #107 on: December 07, 2010, 01:40:50 AM »

Hi Andi,

probier mal folgendes js mit deiner mod aus ist ne nette Ergänzung finde ich:
Hier ne Demo: http://www.dynamicdrive.com/dynamicindex4/expandoimage.htm

EDIT:
Ich hab das mal eingebaut (Bild anklickbar Youtube Video):
(Da wo was passiert ist auch der Mauszeiger... ich hab mal wieder vergessen den für die Aufnahme einzuschalten)


Weißt du wie man die Ecken der Thumb abrunden kann ohne das wirklich zu tun?
Ich habe schonmal an ein div gedacht aber mit einem transparenten png wird das klappen wenn der Hintergrund
an den abgerundeten Ecken sichtbar sein soll) Idee?


EDIT2:

Ich habe was gefunden für die runden Ecken:
http://maestric.com/doc/css/rounded_corners_images

Damit kannst du dem img einfach ne class verpassen und die ecken werden rund.
Frage kann man einem Objekt auch zwei classen verpassen? <-- (Weiß ich schon class="class1 class2")



Schade ist nur das es nicht mit Hintergrundfotos funktioniert, die ecken haben immer einen festen
Farbwert... doof ich dachte eigentlich sowas geht irgendwie... Smile


EDIT3:

...und das hier wäre mein Favorit: http://www.webdesignerwall.com/demo/jquery-css3-rounded-img/
Ist echt schick aber funktioniert im IE garnicht (bleibt aber ansehnlich), der Firefox und Safari spielen mit Smile
Chrome hat dem Stil ohne schwarze border Probleme... Opera mit genau dem anderen... lol

Screenshot:



Funktioniert auch mit Hintergrundfotos:




Gruß Jens
« Last Edit: December 07, 2010, 04:06:05 AM by x23piracy » Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 900

Vienna


View Profile WWW
« Reply #108 on: December 07, 2010, 05:31:54 AM »

das mit den abgerundeten bilder hatten wir schon hier:  http://www.4homepages.de/forum/index.php?topic=26792.msg146041#msg146041
kannst es ja mal mit den versuchen.

und den mac style gibt es hier: http://www.4homepages.de/forum/index.php?topic=27910.msg151065#msg151065
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #109 on: December 07, 2010, 05:54:22 AM »

Hi,

das mit den abgerundeten bilder hatten wir schon hier:  http://www.4homepages.de/forum/index.php?topic=26792.msg146041#msg146041
kannst es ja mal mit den versuchen.

danke das ist interessant.


Wo hab ich denn danach gefragt, du hast da was falsch verstanden es ging darum
den Photopreview Hack im das aufzoomen der Thumbs auf Thumb-Originalgröße das klappt ja.

Video nicht gesehen?


Gruß Jens
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
haider512
Full Member
***
Offline Offline

Posts: 153

Thank You
-Given: 57
-Receive: 2


View Profile
« Reply #110 on: March 06, 2011, 12:06:48 PM »

wow...i like your details page thing..how did you do that mate..??
it is 4images right.. its very kool..

link to video



image removed @Rembrandt
« Last Edit: March 06, 2011, 01:53:24 PM by Rembrandt » Logged
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #111 on: March 11, 2011, 03:39:37 AM »

Hi,

iam no more active here.
If you like contact me via email.

I can give you my source root but you need to customize a lot.

That is not a ready to use template.


Greetz X23
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
mrkaswa
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #112 on: April 30, 2011, 10:37:53 AM »

Hello,  I could use a little help please. 
I have tried to follow along as best I could but,  instead of 7 thumbnails across the top I just get little boxes and I am just not sure where I went wrong. I've attached an image that should explain what I mean.


Thanks

* Clipboard01.jpg (12.08 KB - downloaded 28 times.)
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 900

Vienna


View Profile WWW
« Reply #113 on: April 30, 2011, 10:55:33 AM »

search in the code (step.2):
1
get_thumbnail_small_code
and replace:
1
get_thumbnail_code
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
mrkaswa
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #114 on: April 30, 2011, 12:30:29 PM »

Thank you! That took care of it right away,  tho I suspect you knew that it would Very Happy

I'm perfectly happy with this arrangement but if I can ask...I thought i saw that I changed some code in step 1 to allow for small thumbnails?  Did I make a mistake there?

Also just thought I would ask,  do you know of any mod that allows for the image to be changed without a refresh of the entire page?


Again,  thanks for your help with the thumbnails!

Edited to add that I started over with clean details.php and function.php files and after doing the mod to the functions.php but not the add on yet I can create and display small thumbnails.
« Last Edit: May 10, 2011, 06:39:42 AM by mrkaswa » Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 900

Vienna


View Profile WWW
« Reply #115 on: April 30, 2011, 02:45:38 PM »

..I'm perfectly happy with this arrangement but if I can ask...I thought i saw that I changed some code in step 1 to allow for small thumbnails?  Did I make a mistake there?
...
i think yes, post your functions.php as attachment
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
mrkaswa
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #116 on: May 09, 2011, 01:14:55 PM »

Here is the functions.php
I am pretty happy with the normal sized thumbnails so there is no panic here,  but if I am reading the mod correctly it should be possible to actually use this to make bigger thumbnails by changing the max width to something larger?  that is something I would enjoy.

Thanks again.

* functions.php (68.74 KB - downloaded 2 times.)
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 900

Vienna


View Profile WWW
« Reply #117 on: May 10, 2011, 05:43:10 AM »

... but if I am reading the mod correctly it should be possible to actually use this to make bigger thumbnails by changing the max width to something larger?  that is something I would enjoy.
should work..

mfg Andi

* functions.php (69.05 KB - downloaded 11 times.)
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Nosferatu
Full Member
***
Offline Offline

Posts: 230

Thank You
-Given: 34
-Receive: 7


View Profile WWW
« Reply #118 on: June 20, 2011, 03:38:57 PM »

danke !!

mod lauft super mit 1.7.10
http://www.pj-firepower.com/picgallerie/details.php?image_id=11325
Logged

Nosferatu
Full Member
***
Offline Offline

Posts: 230

Thank You
-Given: 34
-Receive: 7


View Profile WWW
« Reply #119 on: May 26, 2012, 05:09:37 PM »

Hallo,

ich hab da ein komisch problem, bis jetzt hatte ich es nur bei vereinzelten bildern, das oben die fotos nicht angezeigt werden, da wars mir egal, da es mir selbst bei 3 stück aufgefallen ist.

Aber jetzt ist es so das ich auf einmal, bei ganze alben das problem habe lol

Beispiel: Smartphone Gallery
http://www.wallpapers-heaven.com/categories.php?cat_id=421

Klickt irgend ein Bild direkt in der Gallery an z.b.:
http://www.wallpapers-heaven.com/details.php?image_id=10229

Da funktioniert es.

Jetzt klickt ein Album an bei Smartphone
und sucht euch dort ein Bild aus zb.:
http://www.wallpapers-heaven.com/details.php?image_id=32115

Ne ahnung warum, das mal angezeigt wird und dann nicht ? betrifft aber alle alben bei smartphone...

mfg
jeff
Logged

Pages: «« « 1 ... 4 5 6 7 [8] 9 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.233 seconds with 21 queries.
Post your comments here