MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

MonoX searching for missing icon size for group (Closed) (Mono Support )

Viewed 36475 time(s), 12 post(s) 6/2/2014 4:10:02 PMby Zoomicon

Related topics

Zoomicon

Zoomicon

6/14/2014 1:16:01 PM
since your suggestion didn't work (changed the respective WebPart property and still it was ignoring me) and since in the group edit page and maybe in other places too it was trying to use that same missing size, I created a script to generate all the missing sizes (I'm a bit naughty here in that I don't call some external icon resizer, but just copy the 640_t version over as 576_t one if it is missing - after all they were both JPGs arround 8K in size from what I have seen).

You can place the following batch file anywhere under your site and run it, it will search recursively all subfolders. Best is to place it under Upload folder of MonoX

::-- BATCH file that creates an *_576_5.* file from an *_640_t.* one (copying it)
::-- Author: George Birbilis (http://zoomicon.com)
::-- Credits: String replacement based on http://www.dostips.com/DtTipsStringManipulation.php

@ECHO OFF

::-- Loop for all files recursively --::

FOR /R %%f in (*_640_t.*) DO CALL :process %%f

ECHO(
PAUSE

GOTO :EOF

::-- Per-file actions --::

:process

:: Display progress...
::ECHO Processing %*
<nul (set/p dummy=.)

SETLOCAL ENABLEDELAYEDEXPANSION
SET fromFile="%*"
SET toFile=!fromFile:_640_t=_576_t!

IF NOT EXIST %toFile% CALL :generate %fromFile% %toFile%

GOTO :EOF

::-- Generate missing file --::

:generate

ECHO(
ECHO COPY %*
COPY %*

::PAUSE

GOTO :EOF
This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/2/2014 4:10:02 PM

after upgrading http://social.clipflair.net/MonoX/Pages/SocialNetworking/Groups.aspx?grouppageno=1

I see the group Tradumatica for example missing its icon which ends in 576_t.jpg

Obviously you autogenerate these sizes but didn't do that value for older content the user had (since we just upgraded the site the 576_t is missing from everywhere)

I will see into making a batch process to fix this, but what is worrying me is how it picks to serve that size, since the display there is 126x126, but you pick a much larger file (there was also 144_t you could have picked to serve). What is the mechanism behing that thumb resizing/serving?

This content has not been rated yet. 
2793 Reputation 345 Total posts
khorvat

khorvat

6/4/2014 8:52:39 PM
Hi,

MonoX has default icon sizes defined in the web.config and in ApplicationSettings, so my suggestion would be not to use script at this point and revert to old sizes. Let me check how this can be done without too much effort and we will get back to you.

Regards 
This content has not been rated yet. 
15993 Reputation 2214 Total posts
Zoomicon

Zoomicon

6/5/2014 4:08:01 PM

Only setting I see for thumb size is:

    <!-- indicates if thumbnails are automatically created and saved for all uploaded files; they are alternatively created on the fly on each request-->
</br>    <add key="StoreThumbnails" value="true" />
</br>    <!-- thumbnail size: Small (72px), Medium (144 px), Large (288 px), or you can add custom size in px e.g. "640" -->
</br>    <add key="ThumbnailSize" value="Small" />

which I think is unrelated to the issue (since I see more sizes created for the group icon in the filesystem)

This content has not been rated yet. 
2793 Reputation 345 Total posts
gstadter

gstadter

6/5/2014 7:44:37 PM
This thread is primarily in regards to a re-sized image being used as a "Groups"s icon, but along the same lines, I'm very curious if there is a way to modify or adjust which "version" of a photo is used in photo gallery lists, for album cover?   is the use of "...._144_t" hard-coded?
This content has not been rated yet. 
669 Reputation 67 Total posts
Zoomicon

Zoomicon

6/6/2014 11:52:23 AM

any update on this?

I see in Upload/User/... icons of sizes 72_t, 144_t, 288_t, 640_t, but not the 576_t and don't see in web.config any option to remove that size, neither understand how it tries to pick an icon size (in the HTML page we have 126x126 size in the img tag, but it doesn't try to use 144_t, tries 576_t instead)

This content has not been rated yet. 
2793 Reputation 345 Total posts
khorvat

khorvat

6/9/2014 9:57:26 AM
Hi,

there were some changes around the image sizes on various modules so here is the recap of current defaults:

<!-- thumbnail size: Small (72px), Medium (144 px), Large (288 px), XLarge (576 px), XXLarge (1152 px) or you can add custom size in px e.g. "640" -->
Note: that your uploads are re-sized to all dimensions. 

PhotoGallery album cover image - Medium
PhotoGallery Thumbnail image - Medium
PhotoGallery Empty Thumbnail image - Large
PhotoGallery Photo Preview image - PhotoView
Group Logo - XLarge
User Avatar - Large
File Image Preview - PhotoView

@Zoomicon - You can always change the default group logo size on the "GroupInfo WebPart" by changing the "GroupLogoSize" (it defaults to XLarge).

@gstadter - Yes you can change the thumbnail sizes for the whole PhotoGallery WebPart, you will need to create your own ThumbnailSizeEventArgs and set the pixels for every size (e.g. Large = 1024px) and then assign the newly created instance to the ThumbnailSize property on the PhotoGalleryContainer. You will have to override the following method and set the ThumbnailSize = yourNewThumbnailSize; before you call the base.DataBind(isRebind):

/// <summary>
///  Binds a data source to the invoked server control and all its child controls.
/// </summary>
/// <param name="isRebind">Rebind the data</param>
protected override void DataBind(bool isRebind)
Regards
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
gstadter

gstadter

6/9/2014 7:20:22 PM
This is Zoomicon's thread, so he can decide to mark it 'answered', but wanted to thank you, Kristijan, for such a thorough education on the point!
This content has not been rated yet. 
669 Reputation 67 Total posts
Zoomicon

Zoomicon

6/14/2014 11:15:41 AM

@Zoomicon - You can always change the default group logo size on the "GroupInfo WebPart" by changing the "GroupLogoSize" (it defaults to XLarge).

I changed that property from 576 to 144 at the respective webpart but the page keeps on trying to serve 576_t images (if you have the browser to show broken image placeholders you can right click them and select properties to see that the image urls end in 576_t.jpg)

http://social.clipflair.net/MonoX/Pages/SocialNetworking/Groups/GroupSearch/

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/14/2014 11:17:01 AM
btw, there seems to be a bug with the text editor on this site when pressing CTRL+B and CTRL+I, the buttons are toggled active on the toolbar but the text doesn't change style. Pressing again key combo doesn't untoggle on the toolbar. Only clicking on them on the toolbar directly works ok
This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/14/2014 11:32:06 AM

can see the issue near the end of the page http://social.clipflair.net/MonoX/Pages/SocialNetworking/Groups/GroupSearch/

(for some groups people have added images again)

----

there could be an easy way to fix this issue if at Edit page of group when user saved edits you REGENERATED the image sizes for the group image. That way the missing 576_t one (which didn't exist in previous monox installations) would be regenerated

btw, at the Edit page of group it is also trying to show the 576_t size for the current image of the group

This content has not been rated yet. 
2793 Reputation 345 Total posts
1 2