Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: anteprimorac on April 18, 2012, 02:46:59 PM

Title: APImage
Post by: anteprimorac on April 18, 2012, 02:46:59 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3388)
APImage

Info

Mod: APImage
Mod version: 0.3.1
Mod demo: http://smf.anteprimorac.from.hr/index.php?topic=2.0
Compatible: SMF 1.1.x and 2.x.x

License: MPL 2.0
QuoteThis Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.

Author: Ante Primorac
Author URI: http://anteprimorac.from.hr

The orginal code is http://custom.simplemachines.org/mods/index.php?mod=3388

BBcodes:
img - parameters: alt, width i height
gallery - require children: img

Features:
- plugin on/off
- resize the image on the specified size
- klick to zoom
- view in gallery mode
- fullscreen view
- navigation
- key navigation
- slideshow
- watermarks
- turn off mod on a single image
- free advertising, submit your ad here (http://anteprimorac.from.hr/advertising)

Languages:
- English/English UTF-8
- Croatian/Croatian UTF-8
- Portuguese/Portuguese UTF-8 - here (http://www.simplemachines.org/community/index.php?topic=474466.msg3401585#msg3401585) - Thanks @Costa (http://www.simplemachines.org/community/index.php?action=profile;u=169940)

Changes log

Version 0.3.1
! Fixed gallery button description bug in SMF 2.x.x - thx rambomambo (http://www.simplemachines.org/community/index.php?action=profile;u=337784)
+ Added mod description in css file

Version 0.3
! APImage is turned off in signatures and Tinyportal blocks
+ New design
+ Custom scrollbar in gallery
+ Turn off APImage on a single image
+ Watermarks
+ Slideshow
+ Gallery tag button
+ Free advertising, submit your ad here (http://anteprimorac.from.hr/advertising)

Version 0.2.0.1:
! Fixed no defined maximum size bug
+ Improved image resizing algorithm

Version 0.2:
+ Javascript - recoded, object orinted, minimized
+ Better image resizing
+ Navigation and key-navigation
+ Speeded up javascript loading after modify/preview post
* Options:
       + Gallery viewer height
       + Show width and height
! Changed CSS

Version 0.1.8:
+ Added support for SMF 1.1.x
! Fixed loading jQuery bug

Version 0.1.7.1:
! Fixed post modify/preview bug

Version 0.1.7:
! Fixed encoding problem

Version 0.1.6:
+ Added redirection after installation
+ Added default values of mod settings

Version 0.1.5:
! Fixed some bugs

Version 0.1.4:
! Fixed linking bug

Version 0.1.3:
! Fixed small images bug

Version 0.1.2:
! Fixed installation bug

Version 0.1.1:
* First public version :)
! Fixed some bugs

Version 0.1:
* First version, only private ;)

FAQ:

1. Mod isn't working
Clear browser cache(CTRL + R or CTRL + F5) and clear SMF cache (Admin -> Forum Maintenance -> Empty the file cache).
If you have version 1.7.1 or earlier, then check jQuery version (Google Chrome: In Console(CTRL + SHIFT + J) type $().jquery). If you haven't jQuery version 1.7.2 or later, then update jQuery.

2. How to change thumb style?
(Version 0.1.x and 0.2.x) Find in Themes/YOUR THEME/css/index.css or Themes/YOUR THEME/style.css:

.apimage {
   background: #000;
   margin: 5px;
   padding: 10px;
}

and change it!

(Version 0.3.x) Find Themes/YOUR THEME/css/apimage.css and change it!

3. How to remove scrollbar in gallery mode?
(Version 0.1.x and 0.2.x)
Find in Themes/YOUR THEME/css/index.css or Themes/YOUR THEME/style.css:

.apimage-gallery .images {
margin-top: 10px;
overflow: auto;
}
.apimage-gallery .images .list {
width: auto;
white-space: nowrap;
}
.apimage-gallery .images .apimage {
display: inline-block;
margin: 0 5px;
}


replace with:

.apimage-gallery .images {
margin-top: 5px;
overflow: none;
}
.apimage-gallery .images .apimage {
float: left;
margin: 5px 5px;
}


4. How to use APImage in SMF Gallery (http://custom.simplemachines.org/mods/index.php?mod=473)?
Find in Themes/YOUR THEME/Gallery2.template.php: Lines 915, 916 and 917
<tr class="windowbg2">
<td align="center"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="" /></td>
</tr>


replace with:
<tr class="windowbg2">
<td align="center"><div class="apimage loading" data-image="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '"></div></td>
</tr>


5. How to parse and show APImage images on Facebook?
Find in Themes/YOUR THEME/index.template.php:
echo $context['html_headers'];
add after:
if(!empty($modSettings['apimage_enabled']) && function_exists($context['get_message'])) {
$context['get_message'](true);
global $messages_request;
$context['messages_request'] = $messages_request;
while($post = $context['get_message']()) {
$apimages = array();
preg_match_all("/(?<=\<div class\=\"apimage loading\" data\-image\=\")[^\">]*(?=\")/", $post["body"], $apimages);
for($nj=0; $nj < count($apimages[0]); $nj++) {
echo '<meta property="og:image" content="' . $apimages[0][$nj] . '" />';
}
}
$context['get_message'](true);
$messages_request = $context['messages_request'];
}


6. How to turn off APImage on a single image?
Set "off" parameter to "true":
[img off=true width=200 height=200]http://image.com/link.jpg[/img]
Title: Re: APImage
Post by: Dzonny on April 18, 2012, 04:37:46 PM
Nice one, keep up the good work :)
Title: Re: APImage
Post by: anteprimorac on April 18, 2012, 05:19:28 PM
Quote from: Dzonny on April 18, 2012, 04:37:46 PM
Nice one, keep up the good work :)

Thanks!
Title: Re: APImage
Post by: Bugo on April 19, 2012, 03:57:49 AM
Can you make a post-load for images?
Title: Re: APImage
Post by: Shambles on April 19, 2012, 04:45:52 AM
I'm having trouble understanding what exactly this is/does, even after visiting the demo page

Is it just for showing images in full screen, or have I missed something? I'm sure it's just me, but the mod description doesn't elaborate
Title: Re: APImage
Post by: Branko. on April 19, 2012, 05:10:07 AM
Congratulations! ;)
Title: Re: APImage
Post by: anteprimorac on April 19, 2012, 05:44:41 AM
Version 0.1.7.1
! Fixed post modify/preview bug

Quote from: Bugo on April 19, 2012, 03:57:49 AM
Can you make a post-load for images?
Fixed in new version(0.1.7.1)

Quote from: Shambles on April 19, 2012, 04:45:52 AM
I'm having trouble understanding what exactly this is/does, even after visiting the demo page

Is it just for showing images in full screen, or have I missed something? I'm sure it's just me, but the mod description doesn't elaborate

(http://smf.anteprimorac.from.hr/images/thumbnail.png)
(http://smf.anteprimorac.from.hr/images/zoomed2.png)
(http://smf.anteprimorac.from.hr/images/fullscreen.png)
(http://smf.anteprimorac.from.hr/images/gallery.png)


Quote from: Branko. on April 19, 2012, 05:10:07 AM
Congratulations! ;)
Thanks!
Title: Re: APImage
Post by: Branko. on April 19, 2012, 06:35:40 AM
Translation for serbian_latin and serbian_cyrillic (iso/utf8)
serbian_latin
$txt['apimage_enabled'] = 'Aktiviraj APImage';
$txt['apimage_max_thumb_width'] = 'Maksimalna širina smanjene slike<br /><span class="smalltext">Ostavi prazno za nedefinisanu širinu.</span>';
$txt['apimage_max_thumb_height'] = 'Maksimalna visina smanjene slike<br /><span class="smalltext">Ostavi prazno za nedefinisanu visinu.</span>';
$txt['apimage_max_gallery_thumb_width'] = 'Maksimalna širina smanjene slike u galeriji<br /><span class="smalltext">Ostavi prazno za nedefiniranu širinu.</span>';
$txt['apimage_max_gallery_thumb_height'] = 'Maksimalna visina smanjene slike u galeriji<br /><span class="smalltext">Ostavi prazno za nedefinisanu visinu.</span>';


serbian_cyrillic
$txt['apimage_enabled'] = 'Активирај APImage';
$txt['apimage_max_thumb_width'] = 'Максимална ширина смањене слике<br /><span class="smalltext">Остави празно за недефинисану ширину.</span>';
$txt['apimage_max_thumb_height'] = 'Максимална висина смањене слике<br /><span class="smalltext">Остави празно за недефинисану висину.</span>';
$txt['apimage_max_gallery_thumb_width'] = 'Максимална ширина смањене слике у галерији<br /><span class="smalltext">Остави празно за недефинисану ширину.</span>';
$txt['apimage_max_gallery_thumb_height'] = 'Максимална висина смањене слике у галерији<br /><span class="smalltext">Остави празно за недефинисану висину.</span>';
Title: Re: APImage
Post by: Inti31 on April 19, 2012, 03:43:03 PM
first of all - very nice and good work.

i tested it: http://alt.epica-forum.de/index.php?topic=5.0

One thing: these pics are hosted by postimage.org. this is the code is entered in this post:

[gallery][img width=400 height=300]http://s19.postimage.org/h2p31t4dv/Epica_01_695.jpg[/img] [img width=400 height=300]http://s19.postimage.org/jlas2hq43/Epica_02_695.jpg[/img] [img width=400 height=300]http://s19.postimage.org/4qm6obgj7/Epica_03_695.jpg[/img][/gallery]


These pictures are scaled bigger than they are. pic info: 800px × 529px (scaled to 910px × 602px) - means: all pictures are scaled to 910 x 602).
I did a test and reduced max width and height to 400x300 (are set in features & options.
Link: yourforumurl.com/index.php?action=admin;area=featuresettings;sa=layout

Where can I set the size of the black frame around the thumbnails? it is too big (my opinion).

german translation (german/german-utf8):

// APImage plugin text
$txt['apimage_enabled'] = 'Aktiviere APImage';
$txt['apimage_max_thumb_width'] = 'Max. Breite des Vorschaubildes<br /><span class="smalltext">Leerlassen, um keine max. Breite festzulegen.</span>';
$txt['apimage_max_thumb_height'] = 'Max. H&ouml;he des Vorschaubildes<br /><span class="smalltext">Leerlassen, um keine max. H&ouml;he festzulegen.</span>';
$txt['apimage_max_gallery_thumb_width'] = 'Max. Breite des Vorschaubildes im Galerie-Mode<br /><span class="smalltext">Leerlassen, um keine max. Breite festzulegen.</span>';
$txt['apimage_max_gallery_thumb_height'] = 'Max. H&ouml;he des Vorschaubildes im Galerie-Mode<br /><span class="smalltext">Leerlassen, um keine max. H&ouml;he festzulegen.</span>';


Link to my example to see the oversized pics: http://alt.epica-forum.de/index.php?topic=5.0


by the way, if I use the code without width / height - the result is the same...

cheers Inti31
Addition: is it possible instead of of using the sidebar in gallery mode  to see all pictures that they appear in lines , means thumbs are seperated by lines (10 pics at each line)...
Title: Re: APImage
Post by: anteprimorac on April 19, 2012, 04:15:24 PM
Thanks!

Your jQuery version is too old. Please update it on latest version - http://code.jquery.com/jquery-1.7.2.min.js

To change the frame size you need to modify this code in index.css
Quote
.ap-image {
   background: #000;
   margin: 5px;
   padding: 10px;
}

Quote from: Inti31 on April 19, 2012, 03:43:03 PM
Addition: is it possible instead of of using the sidebar in gallery mode  to see all pictures that they appear in lines , means thumbs are seperated by lines (10 pics at each line)...

what you mean?
Title: Re: APImage
Post by: Inti31 on April 19, 2012, 04:23:26 PM
thx for the info i will give it it try tomorrow.

jquery-1.7.2.min.js - I have to save it to /Themes/default/scripts ? just to be sure...

What i mean:

in gallery mode I have to use the scrollbar (not sidebar, sorry) to scroll to pictures if there a more than 10 for example.

example:
now it looks like

pic1 pic2 pic3 ... ... ...                                                         pic x // all pics are in one line

I want to see all pictures whithout using the scrollbar
like
pic 1 pic 2 pic3 ... pic10 - // line1
pic 11 ... pic 20  // line 2
Title: Re: APImage
Post by: anteprimorac on April 19, 2012, 04:35:07 PM
Find in index.css:

.ap-image-gallery .images {
margin-top: 10px;
overflow: auto;
}
.ap-image-gallery .images .list {
width: auto;
white-space: nowrap;
}
.ap-image-gallery .images .ap-image {
display: inline-block;
margin: 0 5px;
}


replace with:

.ap-image-gallery .images {
margin-top: 5px;
overflow: none;
}
.ap-image-gallery .images .ap-image {
float: left;
margin: 5px 5px;
}


Please send me feedback when you do this!

Quote from: Inti31 on April 19, 2012, 04:23:26 PM
jquery-1.7.2.min.js - I have to save it to /Themes/default/scripts ? just to be sure...

Copy/paste code from http://code.jquery.com/jquery-1.7.2.min.js into /Themes/default/scripts/jquery.min.js
Title: Re: APImage
Post by: Inti31 on April 20, 2012, 01:34:24 AM
okay, thx first

quick answer...

So... - I did anges - now thumbs are shown in lines - nice

http://alt.epica-forum.de/index.php?topic=5.msg

Also (I use firefox) seem to have a script problem now because when clicking on a main pic and it zooms - firefox hangs - have to verify it which script - have to go now.

the main pic is oversized than before---

cheers inti31
Title: Re: APImage
Post by: anteprimorac on April 20, 2012, 04:33:30 AM
Find in index.template.php:

<script type="text/javascript" src="http://alt.epica-forum.de/Themes/default/scripts/jquery.min.js"></script>


remove that!

Find in index.template.php:

<script type="text/javascript" src="http://alt.epica-forum.de/Themes/default/scripts/jquery-1.3.2.min.js"></script>


replace with:


<script type="text/javascript" src="http://alt.epica-forum.de/Themes/default/scripts/jquery.min.js"></script>
Title: Re: APImage
Post by: Inti31 on April 20, 2012, 04:55:00 AM
okay, did that

as mentioned yesterday evening I set the allowed resolution to 400x300

Have look to this: http://alt.epica-forum.de/index.php?topic=1.msg5#msg5

if I use img tag -  the width 7 height is set automatically

But now each  pic just in img tag is shown in thumbnail and when I zoom it, the resolution is wrong.
Above is the same pic is hs tag - this is fine

hmmh - thinking of modding your mod so that I just use the gallery mode.... - or maybe a suggestion just to activate the gallery seperately?
Title: Re: APImage
Post by: anteprimorac on April 20, 2012, 05:22:47 AM
You are able to set the maximum width of thumb, not a default.

In this version you aren't able to use the gallery seperately, because gallery uses img tag.


See this(same image but different host) - http://smf.anteprimorac.from.hr/index.php?topic=2.msg20#msg20
Title: Re: APImage
Post by: Inti31 on April 20, 2012, 07:19:46 AM
okay guess it is clear.

hmmh... - in normal, the max resolution is set here:
Link: /index.php?action=admin;area=featuresettings;sa=layout

that means, that width height is set automatical if you submit a pic in an  img-tag

When you edit a post where you entered sth. like [ img ] pic.jpg [ /img ], you will see that height/width is written to the code.

Your mod is fine - for huge pics - have a look to the 2 pics you uploaded  (http://smf.anteprimorac.from.hr/index.php?&topic=2.msg20#msg20)- the resolution is worse if you click on the pic to zoom it. . I've to klick on maximize to see the correct resolution.

Also in gallery mode - where is the size of the big picture located? - this one needs the size is set in /index.php?action=admin;area=featuresettings;sa=layout - in my case 400x300

cheers Inti31
Title: Re: APImage
Post by: anteprimorac on April 20, 2012, 02:30:57 PM
I wasn't working on that features, like advanced image resizing. That features will be available in next version - 0.2.

Please be patience ;)
Title: Re: APImage
Post by: samurai-lupin on April 24, 2012, 11:14:51 PM
Hello, this looks like an excellent mod! Could please also do a SMF 1.1 Version of it? Thank you
Title: Re: APImage
Post by: anteprimorac on April 25, 2012, 04:31:33 AM
Thanks,
I'm working on it!
Title: Re: APImage
Post by: samurai-lupin on April 25, 2012, 05:01:56 AM
Oh! That's great news! This looks like a really good mod indeed!
Title: Re: APImage
Post by: samurai-lupin on April 25, 2012, 06:51:20 AM
Oh, and what I forgot to ask: Is there a set so it will automatically display uploaded images as Gallery?
Title: Re: APImage
Post by: anteprimorac on April 25, 2012, 01:26:47 PM
Only if you use gallery bbc:

[gallery]
[img]http://image link #1[/img]
[img]http://image link #2[/img]
[img]http://image link #3[/img]
...
[/gallery]
Title: Re: APImage
Post by: pixeleyes on April 26, 2012, 01:21:46 AM
SMF 2.0.1

Just installed APImage with no error but gallery isn't working as your enclosed picture in first post.

I use below bbc codes
[gallery]
[ img ].....[ /img ]
[ img ].....[ /img ]
[/gallery]

here is the result.
(http://www.imagedost.com/images/t89jbhsc009xumyzj5l6.gif)

Also zoom feature isn't working.
Title: Re: APImage
Post by: anteprimorac on April 26, 2012, 03:12:05 AM
- Theme?
- Forum link?

EDIT: Press CTRL+R or clear your browser's cache
Title: Re: APImage
Post by: pixeleyes on April 26, 2012, 04:20:44 AM
Here is my site link

http://www.one2onefun.com
Title: Re: APImage
Post by: pixeleyes on April 26, 2012, 04:56:03 AM
thanks its working after clearing browser cache.
Title: Re: APImage
Post by: anteprimorac on April 26, 2012, 07:00:18 AM
UPDATE FAQ:

1. Mod isn't working
Clear browser cache(CTRL + R or CTRL + F5) and clear SMF cache (Admin -> Forum Maintenance -> Empty the file cache).
If you have version 1.7.1 or earlier, then check jQuery version (Google Chrome: In Console(CTRL + SHIFT + J) type $().jquery). If you haven't jQuery version 1.7.2 or later, then update jQuery.

2. How to change thumb style?
Find in index.css

.ap-image {
   background: #000;
   margin: 5px;
   padding: 10px;
}


3. How to remove scrollbar in gallery mode?
Find in index.css:

.ap-image-gallery .images {
margin-top: 10px;
overflow: auto;
}
.ap-image-gallery .images .list {
width: auto;
white-space: nowrap;
}
.ap-image-gallery .images .ap-image {
display: inline-block;
margin: 0 5px;
}


replace with:

.ap-image-gallery .images {
margin-top: 5px;
overflow: none;
}
.ap-image-gallery .images .ap-image {
float: left;
margin: 5px 5px;
}
Title: Re: APImage
Post by: pixeleyes on April 26, 2012, 07:44:46 AM
Is it possible to add NEXT and PREVIOUS button in gallery?
Title: Re: APImage
Post by: anteprimorac on April 26, 2012, 02:19:01 PM
I'm working on it in version 0.2.
Please be patience ;)
Title: Re: APImage
Post by: anteprimorac on April 26, 2012, 04:50:09 PM
UPDATE FAQ

4. How to use APImage in SMF Gallery (http://custom.simplemachines.org/mods/index.php?mod=473)?
Find in Themes/YOUR THEME/Gallery2.template.php: Lines 915, 916 and 917
<tr class="windowbg2">
<td align="center"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="" /></td>
</tr>


replace with:

<tr class="windowbg2">
<td align="center"><div class="ap-image" data-image="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '"></div></td>
</tr>
Title: Re: APImage
Post by: anteprimorac on April 26, 2012, 05:42:14 PM
UPDATE MOD:

Version 0.1.8:
+ Added support for SMF 1.1.x
! Fixed loading jQuery bug
Title: Re: APImage
Post by: Inti31 on April 27, 2012, 01:24:26 AM
will give it it try today - one suggestion: it would be nice to have an noslide-parameter for pics in img tags like alt="ns" for pics...



feedback...
okay, so - my opinion: this mod is usable only for special forums, which is pic-related, means huge pics - my guess.
A lot of mods offer slide functionalities - which work fine and the resolution of these pics is correct.

member post pic in img tags with just a height or width parameter - means if it slides up the resolution is correct.
if they don't use the parameter the pic is shown in the max resolution is set in administration panel.
so there is no need to use apimage for img-tag, because your mod usees  both parameter - so the resolution is not correct

Have a look to your test thread: http://smf.anteprimorac.from.hr/index.php?topic=2.msg20#msg20 - that looks worse
you can't use fixed sizes- also if you click on it - the resolution is also worse...

The gallery-mode looks nice - but here the same - I can't live with the shown clinched thunmbnail preview, here also the  resolution of the thumb is not correct - only the shown big pic above is okay. if you click on that pic pic and it slides up - that looks worse again - there is no need to zoom it up - just my guess. Also: if I set in admin panel a resolution for example maximum picture size to 400x300 this big pic should have this resolution...

In my case, I don't have any usage for that mod - I need slide functionalities which a) slides up pic in a correct way (=resolution) and b) offers key-functionality, means by pressing next or previous key on my keyboard that I can slide through images like I do here: http://epica-forum.de/index.php?action=gallery;sa=view;pic=33 for example...

sorry for that - maybe not that what you want to hear - it is just my opinion - no mean feat about you hard work !

cheers Inti31
Title: Re: APImage
Post by: anteprimorac on April 27, 2012, 06:13:55 AM
I'm working on all that features in version 0.2.
I will reveal some features:
- advanced resizing
- navigation
- key-navigation
- object oriented javascript
...
I'm also developing a premium version.

Coming soon ;)
Title: Re: APImage
Post by: pixeleyes on April 27, 2012, 10:54:30 AM
I just want to give one suggestion.

Your mod is very great but it could be more better if works only when use

APimage BBC Code or Gallery code.

e.g. Many users have pictures in their signatures but after installing APimage

their signatures background and size are automatically changed which is not good i think.

This mod should work only where use APimage BBC or Gallery code

rest forum image should not change.

Just a suggestion.
Title: Re: APImage
Post by: pixeleyes on May 09, 2012, 12:43:13 PM
APimage doesn't work in Firefox and IE8, what could be the reason?
Title: Re: APImage
Post by: anteprimorac on May 10, 2012, 05:06:53 AM
1. Mod isn't working
Clear browser cache(CTRL + R or CTRL + F5) and clear SMF cache (Admin -> Forum Maintenance -> Empty the file cache).
If you have version 1.7.1 or earlier, then check jQuery version (Google Chrome: In Console(CTRL + SHIFT + J) type $().jquery). If you haven't jQuery version 1.7.2 or later, then update jQuery.
Title: Re: APImage
Post by: pixeleyes on May 10, 2012, 01:12:55 PM
Mod is working perfect in Chrome but not working in IE8 and FireFox.

Thumbnail doesn't show in IE8 and Firefox if click on blank thumbnail then large image works.

Only problem is thumbnail not working.

Can you explain or guide me how to update jQuerry?
Title: Re: APImage
Post by: anteprimorac on May 10, 2012, 02:13:55 PM
If it's works on chrome then jQuery was updated.

Post here:
- link of the forum
- jQuery version
- Firefox version
- APImage version
Title: Re: APImage
Post by: pixeleyes on May 11, 2012, 03:36:35 AM
Quote from: anteprimorac on May 10, 2012, 02:13:55 PM
If it's works on chrome then jQuery was updated.
Post here:
- link of the forum
- jQuery version
- Firefox version
- APImage version

- link of the forum   http://www.one2onefun.com
- Check this post     ImagePost (http://www.one2onefun.com/iforumz/index.php/topic,8365.0.html)
- jQuery version      this i don't know how to check
- Firefox version      12.0
- APImage version  0.1.7.1

I have also asked other users of my forum to check in FireFox,
all told me same problem.
Title: Re: APImage
Post by: anteprimorac on May 11, 2012, 06:02:09 AM
Post here a screenshot of APImage options.

Your jQuery version is 1.7.2 ;)

EDIT:
In APImage options set Maximum thumb height to 999999. That will be solve the problem.
Title: Re: APImage
Post by: pixeleyes on May 11, 2012, 06:29:04 AM
Thanks Anteprimorac

Problem has solved now. I changed the height value as you told 999999.
Title: Re: APImage
Post by: pixeleyes on May 11, 2012, 06:34:49 AM
One more thing I would like to ask if  image height is big then how to manage it?

In post preview that image shows perfect but after click on image that become stretched.
Title: Re: APImage
Post by: anteprimorac on May 11, 2012, 06:57:16 AM
That problem will be solve in next version - 0.2. I believe that I would finish that version this weekend or next week.
Title: Re: APImage
Post by: pixeleyes on May 13, 2012, 10:00:57 AM
Quote from: anteprimorac on May 11, 2012, 06:02:09 AM
EDIT:
In APImage options set Maximum thumb height to 999999. That will be solve the problem.

I would like to ask is there any other solution instead of adding height 9999....?

I've checked, your website is working fine in Firefox, you made same changes?
Title: Re: APImage
Post by: anteprimorac on May 13, 2012, 11:50:28 AM
Only if you set Maximum thumb height to 0 then your website will not work fine in Firefox and IE!
Title: Re: APImage
Post by: anteprimorac on May 16, 2012, 05:35:25 AM
Version 0.2:
+ Javascript - recoded, object orinted, minimized
+ Better image resizing
+ Navigation and key-navigation
+ Speeded up javascript loading after modify/preview post
* Options:
       + Gallery viewer height
       + Show width and height
! Changed CSS
Title: Re: APImage
Post by: edgarlim on May 17, 2012, 02:56:02 AM
Hello anteprimorac!

Thank you for writing this plugin :D

I have some questions to ask.


1st question:
.Im very new to SMF, and installed 2.0.2 on my website. After installing APImage, i realised I am unable to write a post with just links to images. without any text at all.

This will popup:
The following error or errors occurred while posting this message:
The message body was left empty.


Previously I did not encounter this, but it can be averted with a simple line of text. But I forsee myself posting a lot of images in the future, so I feel this is a little unnecessary

2nd question:
is it possible to "exclude" certain images posted to be "thumbnail-ed by APImage"? For example, I would like to show a big image (full size) and below will be all the thumbnail images by APimage.

Thanks for reading!

:)

Edgar

Title: Re: APImage
Post by: anteprimorac on May 17, 2012, 04:43:11 AM
Thank you for your comment ;)

1st question:
I'm resolving that problem.

2st question:
In next version you will be able to disable APImage with attribute on img tag.
Title: Re: APImage
Post by: edgarlim on May 17, 2012, 06:53:52 AM
Cool!!

Thanks for everything :)
Title: Re: APImage
Post by: ArkServer on May 22, 2012, 08:07:27 PM
Ive installed and enabled it but nothing happens when i click my image. Any help http://tinyurl.com/cxqb2ap
Title: Re: APImage
Post by: anteprimorac on May 23, 2012, 03:44:54 AM
Link isn't working.
Title: Re: APImage
Post by: Kanado on May 23, 2012, 07:13:26 AM
Nice work!  :)

Suggestion:
A function to resize only that picture, which exceeds a specified size. Would be a nice feature. :)
Title: Re: APImage
Post by: loplo on May 23, 2012, 08:09:25 AM
Sounds like a great mod, but on my forum nothing is being shown, but blank rows.
Title: Re: APImage
Post by: ArkServer on May 23, 2012, 08:11:26 AM
site should work, link is in my signature
Title: Re: APImage
Post by: anteprimorac on May 23, 2012, 12:24:40 PM
Quote from: Kanado on May 23, 2012, 07:13:26 AM
Nice work!  :)

Suggestion:
A function to resize only that picture, which exceeds a specified size. Would be a nice feature. :)
Thanks, maybe that feature will be in next version ;)

Quote from: loplo on May 23, 2012, 08:09:25 AM
Sounds like a great mod, but on my forum nothing is being shown, but blank rows.
Post here link.

Quote from: ArkServer on May 23, 2012, 08:11:26 AM
site should work, link is in my signature
APImage is not installed on your forum.
Title: Re: APImage
Post by: ArkServer on May 23, 2012, 01:08:49 PM
reinstalled it now. I took it off cause it wasnt working but if u can take a look that would be awesome
Title: Re: APImage
Post by: anteprimorac on May 23, 2012, 01:37:17 PM
This is working fine. Where is problem?
Title: Re: APImage
Post by: pixeleyes on May 26, 2012, 01:42:51 AM
How to post multi image in a row?
[ ] [ ] [ ] [ ]
Title: Re: APImage
Post by: anteprimorac on May 26, 2012, 06:15:40 AM
With left align: DEMO: http://smf.anteprimorac.from.hr/apimage/test/msg30/#msg30

[left]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
...
[/left]


, right align: DEMO: http://smf.anteprimorac.from.hr/apimage/test/msg31/#msg31


[right]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
...
[/right]


or gallery tag


[gallery]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
[img]IMAGE LINK[/img]
...
[/gallery]
Title: Re: APImage
Post by: pixeleyes on May 26, 2012, 07:00:58 AM
Thanks but it doesn't work if use [ center ] [/ center ]
Title: Re: APImage
Post by: loplo on May 26, 2012, 09:51:44 AM
Quote from: loplo on May 23, 2012, 08:09:25 AM
Sounds like a great mod, but on my forum nothing is being shown, but blank rows.
Post here link.

I'm talking about this (http://forum.fly-ra.com/) forum. At the moment the mod is not installed, because it will "hide" all the images.
Title: Re: APImage
Post by: pixeleyes on May 26, 2012, 09:55:15 AM
[ gallery ] [ /gallery ] code isn't working. Please check out this link.

Link (http://www.one2onefun.com/iforumz/index.php/topic,8441.msg93041/topicseen.html#new)
Title: Re: APImage
Post by: anteprimorac on May 26, 2012, 02:55:25 PM
Quote from: loplo on May 26, 2012, 09:51:44 AM
Quote from: loplo on May 23, 2012, 08:09:25 AM
Sounds like a great mod, but on my forum nothing is being shown, but blank rows.
Post here link.

I'm talking about this (http://forum.fly-ra.com/) forum. At the moment the mod is not installed, because it will "hide" all the images.
If mod is not installed I'm not able to see where is the problem. Install latest version of mod and post here link to topic on your forum.

Quote from: pixeleyes on May 26, 2012, 07:00:58 AM
Thanks but it doesn't work if use [ center ] [/ center ]
It works but images aren't in row ;).

Quote from: pixeleyes on May 26, 2012, 09:55:15 AM
[ gallery ] [ /gallery ] code isn't working. Please check out this link.

Link (http://www.one2onefun.com/iforumz/index.php/topic,8441.msg93041/topicseen.html#new)
Install latest version of APImage and the problem will be solved.
Title: Re: APImage
Post by: ArkServer on May 26, 2012, 03:47:03 PM
Quote from: anteprimorac on May 23, 2012, 01:37:17 PM
This is working fine. Where is problem?

reinstalled it with a fresh copy and works :D
Title: Re: APImage
Post by: pixeleyes on May 27, 2012, 03:33:05 AM
Quote from: pixeleyes on May 26, 2012, 09:55:15 AM
[ gallery ] [ /gallery ] code isn't working. Please check out this link.

Link (http://www.one2onefun.com/iforumz/index.php/topic,8441.msg93041/topicseen.html#new)
Quote
Install latest version of APImage and the problem will be solved.

After update gallery tag issue is solved but another problem start with images.
See the link below:
Link (http://www.one2onefun.com/iforumz/index.php/topic,8391.msg92699.html#new)

Here's the setting:
Maximum thumb width                       650
Maximum thumb height                     9999

(above setting was working fine in old version)

Maximum gallery viewer height         600
Maximum gallery thumb width          80
Maximum gallery thumb height          80
Maximum show width                        0
Maximum show height                       0

2. I have replaced code but still scroll bar showing in gallery.
Title: Re: APImage
Post by: loplo on May 27, 2012, 06:31:01 AM
anteprimorac I can't stay long with the images not showing on the forum. Please tell me when do you have time to check (in GMT time) and I'll install the mod for 30 minutes.
Sorry for being such a PITA, but I can't keep the forum without images.

FYI, my installed mods are:
Pretty URLs, Soundcloud BBcode, Reason For Editing Mod, Google Analytics Code   1.4, Aeva Media, Simple Imageshack Upload Box, RSS Feed Poster 3.0.4, 9.   nCode Image Resizer 1.3.1, GoogAd Mod v.1.4   1.3, Tapatalk SMF 2.0 RC4/RC5/Final Plugin   3.0.1, reCAPTCHA for SMF   0.9.8a
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 11:31:29 AM
@pixeleyes:
I'm working on that problem ;)

@loplo:
APImage and nCode Image Resizer can not work together.
I'm online 17:00 to 22:00 (GMT) ;)
Title: Re: APImage
Post by: loplo on May 27, 2012, 11:37:40 AM
I'll give it a try and disable nCode. Let's see what happens.
I'll keep you posted.
Title: Re: APImage
Post by: pixeleyes on May 27, 2012, 11:51:22 AM
Thanks anteprimorac

There are some suggestions.

Regarding PREVIOUS and NEXT buttons, it will look more good if appear with mouseOVER.

Also Gallery BBCode button should be shown in post so user will know this and can use.

Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 11:58:11 AM
@loplo:
OK

@pixeleyes:
You can change it in CSS ;)
In version 0.3 you will be able to use gallery tag with button
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:03:50 PM
@anteprimorac nCode uninstalled, APImage enabled and installed.
Example of a thread with lots of images: http://forum.fly-ra.com/aeroporturi-civile-60/leipzighalle-(eddplej)/ and no joy :(
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 12:11:59 PM
@loplo:
Add before </head> in Themes/YOUR THEME/index.template.php :

// APImage
echo '
<script type="text/javascript">if(!window.jQuery || parseFloat($().jquery) < 1.7) document.write(unescape("%3Cscript src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"%3E%3C/script%3E"))</script>';
echo '<script language="javascript" type="text/javascript">
var APImage_options = {
"enabled": '.$modSettings['apimage_enabled'].',
"thumb_max_width":  '.(int) $modSettings['apimage_thumb_maxwidth'].',
"thumb_max_height":  '.(int) $modSettings['apimage_thumb_maxheight'].',
"gallery_viewer_max_height":  '.(int) $modSettings['apimage_gallery_viewer_maxheight'].',
"gallery_thumb_max_width":  '.(int) $modSettings['apimage_gallery_thumb_maxwidth'].',
"gallery_thumb_max_height":  '.(int) $modSettings['apimage_gallery_thumb_maxheight'].',
"show_max_width":  '.(int) $modSettings['apimage_show_maxwidth'].',
"show_max_height":  '.(int) $modSettings['apimage_show_maxheight'].'
};</script>
<script type="text/javascript" src="'.$settings['default_theme_url'].'/apimage.js"></script>';
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:14:42 PM
Done, now I have the error you see.
Row 167: <script type="text/javascript">if(!window.jQuery || parseFloat($().jquery) < 1.7) document.write(unescape("%3Cscript src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"%3E%3C/script%3E"))</script>';
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 12:21:06 PM
Attach here index.template.php
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:24:08 PM
Attached.
Title: Re: APImage
Post by: pixeleyes on May 27, 2012, 12:26:55 PM
remove   echo '

after    // APImage
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:29:06 PM
Removed, new error, line 180:</head>
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 12:30:14 PM
Put this instead of index.template.php
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:31:48 PM
Done.
It works, I'll keep testing.
Thanks for now.

LE
while clicking on image, it's shown below the footer.
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 12:36:52 PM
You have not installed the mod in your theme.

Find in index.template.php :
// APImage
echo '
<script type="text/javascript">if(!window.jQuery || parseFloat($().jquery) < 1.7) document.write(unescape("%3Cscript src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"%3E%3C/script%3E"))</script>';
echo '<script language="javascript" type="text/javascript">
var APImage_options = {
"enabled": '.$modSettings['apimage_enabled'].',
"thumb_max_width":  '.(int) $modSettings['apimage_thumb_maxwidth'].',
"thumb_max_height":  '.(int) $modSettings['apimage_thumb_maxheight'].',
"gallery_viewer_max_height":  '.(int) $modSettings['apimage_gallery_viewer_maxheight'].',
"gallery_thumb_max_width":  '.(int) $modSettings['apimage_gallery_thumb_maxwidth'].',
"gallery_thumb_max_height":  '.(int) $modSettings['apimage_gallery_thumb_maxheight'].',
"show_max_width":  '.(int) $modSettings['apimage_show_maxwidth'].',
"show_max_height":  '.(int) $modSettings['apimage_show_maxheight'].'
};</script>
<script type="text/javascript" src="'.$settings['default_theme_url'].'/apimage.js"></script>';


and remove it.

Reinstall mod and check to install mod in your theme.
Title: Re: APImage
Post by: loplo on May 27, 2012, 12:49:11 PM
Done, now it works.
Is there a way to skip the APImage in the signatures?
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 12:52:37 PM
In version 0.3 it will be possible ;)
Title: Re: APImage
Post by: loplo on May 27, 2012, 01:11:15 PM
One more thing.
Is there a way to keep the proportions of the thumbnail, if the image is bigger than "Maximum thumb width"? Or at least to crop the image in such way to keep it centered.
Example: http://forum.fly-ra.com/discutie-generala/test/msg2944/#msg2944
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 02:29:30 PM
That features will be in premium version of mod.
I'm working on premium version ;).
Premium version with ads will cost 6€ and 10€ without ads.
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 03:50:58 PM
Version 0.2.0.1:
! Fixed no defined maximum size bug
+ Improved image resizing algorithm

@pixeleyes:
I fixed your problem ;). Set maximum thumb height to 0
Title: Re: APImage
Post by: pixeleyes on May 27, 2012, 04:25:57 PM
Problem still exist.

Now only black background is showing instead of images.

already update to 0.2.0.1
Title: Re: APImage
Post by: anteprimorac on May 27, 2012, 06:06:25 PM
Everything works well. Do you clear browser cache?
Title: Re: APImage
Post by: pixeleyes on May 29, 2012, 01:21:16 PM
Just wanted to know when v 0.3 will be released?
Title: Re: APImage
Post by: anteprimorac on May 29, 2012, 01:44:28 PM
Next week ;)
Title: Re: APImage
Post by: pixeleyes on May 29, 2012, 02:01:08 PM
Can you add watermark option in v0.3?
Title: Re: APImage
Post by: anteprimorac on May 29, 2012, 02:35:58 PM
Of course ;)
Title: Re: APImage
Post by: loplo on May 30, 2012, 07:13:35 AM
anteprimorac, just confirm, are you able to watermark remotely hosted images?
That sounds pretty science fiction for me, but .... it would be great.
Title: Re: APImage
Post by: anteprimorac on May 30, 2012, 04:59:00 PM
Of course, I'm only able to display image with watermark. If you click on save image then you save original image, but in premium version that problem be also resloved ;)
Title: Re: APImage
Post by: lurkalot on June 02, 2012, 02:03:20 PM
Great mod, but I can't use it.  :'( 

I run a photography based website, and embed images in a poll (in the poll options) for our weekly competition.  Trouble is, when I install this mod, the images stop displaying in my poll. 

Is there a way to stop it doing this please, then I'll be able to use it.
Title: Re: APImage
Post by: anteprimorac on June 02, 2012, 04:08:18 PM
Post here link and list of mods you have installed.
Title: Re: APImage
Post by: lurkalot on June 02, 2012, 06:11:49 PM
Quote from: anteprimorac on June 02, 2012, 04:08:18 PM
Post here link and list of mods you have installed.

Thanks, it was my testsite I tried it on, here, http://cctestsite.info

Mods installed,

1. BBC [you] 1.3
2. Dream Menu 1.0.6
3. TinyPortal 1.107
4. Users Online Today 2.0.1
5. Cumulus Congestus 0.9.1
6. SimpleColorizer 1.1
7. FAQ Mod 1.2
8. Countdown BBCode 2.0.1
9. Vote polls with points 0.1.3
10. Spell Check Custom Words 1.3
11. Stop Spammer 2.3.9
12. Custom_Top_menu 1.4
13. Arcade Skin 2.5 RC1 1.0.0
14. NiceTooltips 1.7
15. SMF Arcade 2.5
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 05:00:37 AM
APImage isn't installed. Install mod then take a screenshot of problem and post here.
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 12:02:15 PM
Quote from: anteprimorac on June 03, 2012, 05:00:37 AM
APImage isn't installed. Install mod then take a screenshot of problem and post here.

Sorry, I un-installed it when I found it removed my poll images.  But, it's not doing what it did the first time I installed it.  Now my poll images display fine, until I turn the APImage mod off in config, then the poll images disappear.  See screengrabs 1 - 2 below

I also have a Tinyportal block on my home page which pulls the images in the poll options, and shows them on the front page, these images disappear when the mod is installed, enabled or disabled.  See screengrabs  pollblock1 & 2 below.
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 03:32:16 PM
Post here code that you use for the Poll block for frontpage.
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 03:49:09 PM
Here you go.


/////////////////////
// Set up the topic where the poll is.
$pollTopic = 3;

// Set poll topic subject
$polltext = "<center><b><h3>Subject = Abstract: Voting closes: 31 October 2010, 07:10:52</h3></b></center>" ;
/////////////////////

// Images per row.
$imagesPerRow = 3;

$pollResults = ssi_showPoll($pollTopic,'array');

// Just a counter..
$imageCount = 0;

global $scripturl, $context;

$patternImg = "/src=[\"']?([^\"']?.*(png|jpg|gif))[\"']?/i";

echo ' <center><b><h2>Poll for the weekly competition</h2></b></center> ';
echo $polltext ;

echo ' <hr> ';
echo '
      <table style="width: 100%">
         <tr>';

foreach ($pollResults['options'] as $pollItem)
{
   preg_match($patternImg, $pollItem['option'], $image);   
   
   $imageCount++;
   
   if ($imageCount > $imagesPerRow)
   {
      echo '
         </tr>
         <tr>';
   
      $imageCount = 1;
   }
   
   echo '
            <td style="width: 25%; text-align: center; padding: 1px 1px 10px 1px;">
               <a href="' , $scripturl , '?topic=' , $pollTopic , '">
                  <img ' , $image[0] , ' alt="Go Vote !" title="Go Vote !" border="0" width="100" />
               </a>
               <br />
               Member : ' , strip_tags($pollItem['option']);
               
   if (!$pollResults['allow_vote'] && !$context['user']['is_guest'])
   {
      echo '
               <br />
               Votes : ' , $pollItem['votes'] , ' (' , $pollItem['percent'] , '%)
               <br />
               ' , $pollItem['bar'];
   }

      echo '
            </td>';
     
}

while ($imageCount < $imagesPerRow)
{
   echo '
            <td style="width: 25%">
            </td>';
   
   $imageCount++;
}

echo '
         </tr>
      </table>';
echo ' <center><b>Please click on any image to take you to the poll</b></center> ';
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 05:53:02 PM
Replace with:
/////////////////////
// Set up the topic where the poll is.
$pollTopic = 3;

// Set poll topic subject
$polltext = "<center><b><h3>Subject = Abstract: Voting closes: 31 October 2010, 07:10:52</h3></b></center>" ;
/////////////////////

// Images per row.
$imagesPerRow = 3;

$pollResults = ssi_showPoll($pollTopic,'array');

// Just a counter..
$imageCount = 0;

global $scripturl, $context;

$patternImg = "/data-image=[\"']?([^\"']?.*(png|jpg|gif))[\"']?/i";

echo ' <center><b><h2>Poll for the weekly competition</h2></b></center> ';
echo $polltext ;

echo ' <hr> ';
echo '
      <table style="width: 100%">
         <tr>';

foreach ($pollResults['options'] as $pollItem)
{
   preg_match($patternImg, $pollItem['option'], $image);   
   
   $imageCount++;
   
   if ($imageCount > $imagesPerRow)
   {
      echo '
         </tr>
         <tr>';
   
      $imageCount = 1;
   }
   
   echo '
            <td style="width: 25%; text-align: center; padding: 1px 1px 10px 1px;">
               <a href="' , $scripturl , '?topic=' , $pollTopic , '">
                  <div class="apimage" data-image="' , $image[0] , '" data-width="100" />
               </a>
               <br />
               Member : ' , strip_tags($pollItem['option']);
               
   if (!$pollResults['allow_vote'] && !$context['user']['is_guest'])
   {
      echo '
               <br />
               Votes : ' , $pollItem['votes'] , ' (' , $pollItem['percent'] , '%)
               <br />
               ' , $pollItem['bar'];
   }

      echo '
            </td>';
     
}

while ($imageCount < $imagesPerRow)
{
   echo '
            <td style="width: 25%">
            </td>';
   
   $imageCount++;
}

echo '
         </tr>
      </table>';
echo ' <center><b>Please click on any image to take you to the poll</b></center> ';
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 06:11:53 PM
my mistake, this will work well:
/////////////////////
// Set up the topic where the poll is.
$pollTopic = 3;

// Set poll topic subject
$polltext = "<center><b><h3>Subject = Abstract: Voting closes: 31 October 2010, 07:10:52</h3></b></center>" ;
/////////////////////

// Images per row.
$imagesPerRow = 3;

$pollResults = ssi_showPoll($pollTopic,'array');

// Just a counter..
$imageCount = 0;

global $scripturl, $context;

$patternImg = "/data-image=[\"']?([^\"']?.*(png|jpg|gif))[\"']?/i";

echo ' <center><b><h2>Poll for the weekly competition</h2></b></center> ';
echo $polltext ;

echo ' <hr> ';
echo '
      <table style="width: 100%">
         <tr>';

foreach ($pollResults['options'] as $pollItem)
{
   preg_match($patternImg, $pollItem['option'], $image);   
   
   $imageCount++;
   
   if ($imageCount > $imagesPerRow)
   {
      echo '
         </tr>
         <tr>';
   
      $imageCount = 1;
   }
   
   echo '
            <td style="width: 25%; text-align: center; padding: 1px 1px 10px 1px;">
               <a href="' , $scripturl , '?topic=' , $pollTopic , '">
                  <div class="apimage" ' , $image[0] , ' data-width="100"></div>
               </a>
               <br />
               Member : ' , strip_tags($pollItem['option']);
               
   if (!$pollResults['allow_vote'] && !$context['user']['is_guest'])
   {
      echo '
               <br />
               Votes : ' , $pollItem['votes'] , ' (' , $pollItem['percent'] , '%)
               <br />
               ' , $pollItem['bar'];
   }

      echo '
            </td>';
     
}

while ($imageCount < $imagesPerRow)
{
   echo '
            <td style="width: 25%">
            </td>';
   
   $imageCount++;
}

echo '
         </tr>
      </table>';
echo ' <center><b>Please click on any image to take you to the poll</b></center> ';


EDIT:
Link problem is resloved!
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 06:16:57 PM
Thanks, it does now work.  But it's showing two images where each image should be. http://cctestsite.info
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 06:21:05 PM
Code in previous post is updated.
Quote from: lurkalot on June 03, 2012, 06:16:57 PM
Thanks, it does now work.  But it's showing two images where each image should be. http://cctestsite.info
What you mean?
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 06:39:27 PM
Here's a screengrab,  ;)
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 06:42:09 PM
try this:
/////////////////////
// Set up the topic where the poll is.
$pollTopic = 3;

// Set poll topic subject
$polltext = "<center><b><h3>Subject = Abstract: Voting closes: 31 October 2010, 07:10:52</h3></b></center>" ;
/////////////////////

// Images per row.
$imagesPerRow = 3;

$pollResults = ssi_showPoll($pollTopic,'array');

// Just a counter..
$imageCount = 0;

global $scripturl, $context;

$patternImg = "/data-image=[\"']?([^\"']?.*(png|jpg|gif))[\"']?/i";

echo ' <center><b><h2>Poll for the weekly competition</h2></b></center> ';
echo $polltext ;

echo ' <hr> ';
echo '
      <table style="width: 100%">
         <tr>';

foreach ($pollResults['options'] as $pollItem)
{
   preg_match($patternImg, $pollItem['option'], $image);   
   
   $imageCount++;
   
   if ($imageCount > $imagesPerRow)
   {
      echo '
         </tr>
         <tr>';
   
      $imageCount = 1;
   }
   
   echo '
            <td style="width: 25%; text-align: center; padding: 1px 1px 10px 1px;">
               <a href="' , $scripturl , '?topic=' , $pollTopic , '">
                  <div class="apimage" ' , $image[0] , ' data-width="100"></div>
               </a>
               <br />
               Member : ' , strip_tags($pollItem['option']);
               
   if (!$pollResults['allow_vote'] && !$context['user']['is_guest'])
   {
      echo '
               <br />
               Votes : ' , $pollItem['votes'] , ' (' , $pollItem['percent'] , '%)
               <br />
               ' , $pollItem['bar'];
   }

      echo '
            </td>';
     
}

while ($imageCount < $imagesPerRow)
{
   echo '
            <td style="width: 25%">
            </td>';
   
   $imageCount++;
}

echo '
         </tr>
      </table>';
echo ' <center><b>Please click on any image to take you to the poll</b></center> ';
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 06:54:00 PM
Really sorry for messing you about. You've spent a lot of time on this for me.

The images show correctly now, but they seem to be aligned to the left and not with the text below them as they used to be. 

Been thinking long and hard over this mod, and although it's a great mod, I'm now wondering if it's going to work out when using it with Tinyportal.  Trouble is it effects all images in my blocks, which I'd rather it didn't.  It would be great if I could make it ignore any images in my blocks.  Or my front page come to think of it.
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 07:05:06 PM
In version 0.3 you will be able to turn off mod on single image.
Title: Re: APImage
Post by: lurkalot on June 03, 2012, 07:16:08 PM
Quote from: anteprimorac on June 03, 2012, 07:05:06 PM
In version 0.3 you will be able to turn off mod on single image.

That sounds good.  Would be great if we could choose which images it's applied to. 

Would love it if it ignored portal blocks, unless required.  And the same for images entered into the poll option fields.  I'll wait for the next version then.  Good luck with that. ;)  Also If you'd like me to test, or you'd like to test yourself in Tinyportal etc, then just give me a shout.
Title: Re: APImage
Post by: anteprimorac on June 03, 2012, 07:17:59 PM
ok, no problem ;)
Title: Re: APImage
Post by: loplo on June 05, 2012, 09:45:33 AM
One more thing. Images are not being parsed and showed on facebook.
Title: Re: APImage
Post by: edgarlim on June 12, 2012, 12:45:58 PM
hello!

don't wanna hurry you, just wanna know when 0.3 is coming  ;)

ed
Title: Re: APImage
Post by: anteprimorac on June 12, 2012, 03:20:07 PM
Quote from: loplo on June 05, 2012, 09:45:33 AM
One more thing. Images are not being parsed and showed on facebook.
That will be resloved in new version.

Quote from: edgarlim on June 12, 2012, 12:45:58 PM
hello!

don't wanna hurry you, just wanna know when 0.3 is coming  ;)

ed
This weekend or next week ;)
Title: Re: APImage
Post by: edgarlim on July 04, 2012, 12:50:49 AM
0.3?  ;)
Title: Re: APImage
Post by: anteprimorac on July 05, 2012, 10:41:48 AM
coming soon
Title: Re: APImage
Post by: anteprimorac on July 06, 2012, 08:22:12 PM
First I want to apologize for the delay development of new versions. I'm sorry but you have to apprehend a few more days.
Title: Re: APImage
Post by: anteprimorac on July 24, 2012, 01:10:56 PM
Version 0.3
! APImage is turned off in signatures and Tinyportal blocks
+ New design
+ Custom scrollbar in gallery
+ Turn off APImage on a single image
+ Watermarks
+ Slideshow
+ Gallery tag button
+ Free advertising, submit your ad here (http://anteprimorac.from.hr/advertising)
Title: Re: APImage
Post by: loplo on July 24, 2012, 01:35:56 PM
Wow, thanks.
Any instructions how to upgrade? Does it need some special moves? like backup some lines of code, delete, etc?
Title: Re: APImage
Post by: anteprimorac on July 24, 2012, 01:40:48 PM
- Uninstall and delete old version
- Upload and install new version

after installation you need to clear cache in your browser
Title: Re: APImage
Post by: loplo on July 24, 2012, 02:56:16 PM
Thanks, works pretty good.
Question:
- how to replace watermarks? I've changed the default ones in /Packages/apimage/apimage/ bot won't change. nevermind, wrong location.
- how to "Turn off APImage on a single image"?
Title: Re: APImage
Post by: anteprimorac on July 24, 2012, 03:20:21 PM
Answare is in FAQ:
6. How to turn off APImage on a single image?
Set "off" parameter to "true":
[img off=true width=200 height=200]http://image.com/link.jpg[/img]
Title: Re: APImage
Post by: loplo on July 26, 2012, 01:35:03 AM
Still can't replace the watermark. Were exactly are located the watermark .PNGs?
Title: Re: APImage
Post by: anteprimorac on July 26, 2012, 10:36:39 AM
Images:
thumb watermark: Themes/YOUR THEME/images/apimage/watermark.png (32x28)
gallery thumb watermark: Themes/YOUR THEME/images/apimage/small-watermark.png (18x16)
gallery viewer and show watermark: Themes/YOUR THEME/images/apimage/big-watermark.png (64x55)

CSS (Themes/YOUR THEME/css/apimage.css):
thumb watermark: find ".apimage .watermark div"
gallery thumb watermark: find ".apimage-gallery .images .list .apimage .watermark div"
gallery viewer watermark: find ".apimage-gallery .viewer .watermark div"
show watermark: find ".apimage-show .watermark div"

YOUR THEME - your current active theme or default theme
Title: Re: APImage
Post by: loplo on July 26, 2012, 11:39:25 AM
I've replaced the PNGs, but still the "ap" is being shown.
For the second part, there's no apimage.css in Themes/mytheme/css/
Title: Re: APImage
Post by: anteprimorac on July 26, 2012, 12:00:28 PM
Clear cache in browser.
maybe Themes/default/css/apimage.css
Title: Re: APImage
Post by: loplo on July 26, 2012, 12:19:30 PM
default/css/apimage.css is there and I think no editing nedded.
I had to replace the images in Themes/default/images/apimage/
It's tricky because the watermark PNGs are present in too many locations.
One more question - is there a way to remove the effect while moving the mouse above the image? It's like loss of focus and it's annoying.
Title: Re: APImage
Post by: anteprimorac on July 26, 2012, 12:30:39 PM
Find in apimage.css:
.apimage:hover .hover {
display: block;
}

and remove it.

Version 0.3.1
! Fixed gallery button description bug in SMF 2.x.x - thx rambomambo (http://www.simplemachines.org/community/index.php?action=profile;u=337784)
+ Added mod description in css file
Title: Re: APImage
Post by: loplo on July 26, 2012, 12:47:34 PM
It deletes the watermark too, so no joy. I'm talking about that layer that appears over the image and changes opacity.

LE
I've forgot to delete on }, now the watermark is displayed but the opacity is still there.
Title: Re: APImage
Post by: anteprimorac on July 26, 2012, 01:14:12 PM
Find in apimage.css:
.apimage .hover {
display: none;
position: absolute;
opacity: .8;
background: rgba(0, 0, 0, .4) url(../images/apimage/enlarge.png) center center no-repeat;
z-index: 5;
}

replace with:
.apimage .hover {display: none}

after that clear your browser cache.
Title: Re: APImage
Post by: Kanado on August 29, 2012, 05:02:08 AM
Firstly great Mod  :)

I have a Question regarding the arrows (left & right) on the gallery mode.

My Forum have a fixed width, so i have the css style ".apimage-gallery .viewer" width 100% changed to width: 83%.
The Image will now displayed right without oversized and scrollbar. But the arrows are on the image instead out of image.

How can i do this, that the arrows will displayed out of image ?

Thanks for any help
Title: Re: APImage
Post by: anteprimorac on August 29, 2012, 07:52:01 AM
In apimage.css find:
.apimage-gallery {
add after:
width: 83%

and change ".apimage-gallery .viewer" width to "100%".
Title: Re: APImage
Post by: Kanado on August 29, 2012, 12:50:25 PM
Thanks, but has no effect on the arrows. I have no idea... :(
Title: Re: APImage
Post by: anteprimorac on September 03, 2012, 01:49:27 PM
Post here link of your forum.
Title: Re: APImage
Post by: Costa on September 06, 2012, 02:33:21 AM
./Themes/default/languages/Modifications.portuguese_pt.php
// APImage
$txt['apimage_enabled'] = 'Ligar APImage';
$txt['apimage_watermark_enabled'] = 'Ligar marca d'água';
$txt['apimage_thumb_maxwidth'] = 'Largura máxima das miniaturas<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_thumb_maxheight'] = 'Altura máxima das miniaturas<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_thumb_watermark'] = 'Ligar marca d'água em miniaturas';
$txt['apimage_gallery_viewer_maxheight'] = 'Altura máxima da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_viewer_watermark'] = 'Ligar marca d'água na Galeria';
$txt['apimage_gallery_thumb_maxwidth'] = 'Largura máxima das miniaturas da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_thumb_maxheight'] = 'Altura máxima das miniaturas da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_thumb_watermark'] = 'Ligar marca d'água em miniaturas da Galeria';
$txt['apimage_show_maxwidth'] = 'Largura máxima da visualização<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_show_maxheight'] = 'Altura máxima da visualização<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_show_watermark'] = 'Ligar marca d'água na vizualização';


./Themes/default/languages/Post.portuguese_pt-utf8.php
// APImage
$txt['apimage_gallery_txt'] = 'Inserir Galeria';




./Themes/default/languages/Modifications.portuguese_pt-utf8.php
// APImage
$txt['apimage_enabled'] = 'Ligar APImage';
$txt['apimage_watermark_enabled'] = 'Ligar marca de &#225;gua';
$txt['apimage_thumb_maxwidth'] = 'Largura m&#225;xima das miniaturas<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_thumb_maxheight'] = 'Altura m&#225;xima das miniaturas<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_thumb_watermark'] = 'Ligar marca de &#225;gua em miniaturas';
$txt['apimage_gallery_viewer_maxheight'] = 'Altura m&#225;xima da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_viewer_watermark'] = 'Ligar marca de &#225;gua na Galeria';
$txt['apimage_gallery_thumb_maxwidth'] = 'Largura m&#225;xima das miniaturas da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_thumb_maxheight'] = 'Altura m&#225;xima das miniaturas da Galeria<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_gallery_thumb_watermark'] = 'Ligar marca de &#225;gua em miniaturas da Galeria';
$txt['apimage_show_maxwidth'] = 'Largura m&#225;xima da visualiza&#231;&#227;o<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_show_maxheight'] = 'Altura m&#225;xima da visualiza&#231;&#227;o<br /><span class="smalltext">Deixe em branco ou coloque "0" para desabilitar isto.</span>';
$txt['apimage_show_watermark'] = 'Ligar marca de &#225;gua na vizualiza&#231;&#227;o';


./Themes/default/languages/Post.portuguese_pt-utf8.php
// APImage
$txt['apimage_gallery_txt'] = 'Inserir Galeria';
Title: Re: APImage
Post by: anteprimorac on September 11, 2012, 06:11:39 AM
@Costa thank you ;)
Title: Re: APImage
Post by: Dutchi00 on November 09, 2012, 11:10:42 PM
How do I delete the advertisements?
Title: Re: APImage
Post by: anteprimorac on November 11, 2012, 04:07:19 AM
currently it is not possible
Title: Re: APImage
Post by: apkandroid.pl on January 28, 2013, 10:26:35 AM
I do not see why e.g. https://lh4.ggpht.com/gS1CUCx7ZK11okItYN_NXBzqNvNFTnWIlni2d7K97cASRSLorILP42ZXVnBYWvKefcg=h230 ? must be an extension?
Title: Re: APImage
Post by: vietravel247.com on January 30, 2013, 08:51:43 PM
hi  anteprimorac,
Thanks for your mod, I'll installed it for my forum (http://hoidulich.com) but don't loading image or loading slowly? What's wrong with this? Please help. Thank you very much.
PS:
Error with image source like this: http://domain.com/ImageView.aspx?ThumbnailID=612740 it ok if image source like http://domain.com/abc.jpg/gif/png.  (http://hoidulich.com/index.php?topic=40061.msg55369;topicseen#msg55369)
Title: Re: APImage
Post by: Dzonny on March 04, 2013, 07:14:37 PM
Everyone who have a scrollbar at the bottom left corner, just open apimage.js file located at Theme/default/ and change:
overflow: scroll;
to:
overflow: hidden;

That should do the trick! :)
Title: Re: APImage
Post by: ElectroPheonix on May 03, 2013, 11:46:12 PM
Firstly, thanks for the awesome mod. I installed it last week and it was working perfectly.

There is a small issue today (that maybe I didn't pick up before) but I can't figure out why because there are no related errors in the logs for this mod and the issue doesn't occur everywhere for everyone. The problem is that sometimes it keeps trying to load the image but even after a long time, it doesn't load. If you post the same image somewhere else, then it works perfectly ??? Does anyone know why that may happen? (I have SMF 2.0.4)

Also, for some images it crops when in thumb mode - is it meant to do that?

Finally, to turn off the mod for single images, where does one look for
Code: [Select]
[img off=true width=200 height=200]http://image.com/link.jpg[/img]
to set "off" parameter to "true" ?

Thanks in advance.
Title: Re: APImage
Post by: foropimiento on August 07, 2013, 06:04:15 AM
first of all .... nice mod , works like a charm  :D

I only have 1 problem.... when I click on imageshack image link a new window opens the image and furthermore the viewer shows perfectly in the same window, only with imageshack links.

1 question........ is possibly use my adwords code in viewer?

thanks :)
Title: Re: APImage
Post by: nordi on August 14, 2013, 09:43:23 AM
I have the theme Gainda in SMF and have installed APImage. I can't find the place where to change the code. There is no

Themes/Gainda/Gallery2.template.php

or similar files, which contains the lines with <tr class "windowbg2"> ... and the following. There is no file with so many lines (915 - 917) at all. So where I have to change the code?

Bye,
Norbert
Title: Re: APImage
Post by: senyor35 on April 23, 2014, 05:40:49 PM
Hello, Thx for this nice mod. When I install the mod my forum's menu go wrong! What may I do please?
Title: Re: APImage
Post by: senyor35 on April 25, 2014, 06:02:54 AM
Nobody support this mod?
Title: Re: APImage
Post by: becometa on March 07, 2018, 05:49:18 PM
jQuery .live() has been removed in version 1.9 onwards.

Using newer themes that are build on top of jQuery +1.9 is making this mod unusable.