Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in DNN 7xxx #1

Open
Velobook opened this issue Feb 17, 2018 · 0 comments
Open

Using in DNN 7xxx #1

Velobook opened this issue Feb 17, 2018 · 0 comments

Comments

@Velobook
Copy link

Velobook commented Feb 17, 2018

Hello
happy to find your ashx because profilepic.ashx is a problem for picture resizing and now my profiles in different sizes are fine
I tried to install , but it took me a lot of time to understand how.
You said: for DNN normal procedure . But I did'nt see anything like .dnn package or specific zip for that
At the end I installed manually .
1- Web config in appsettings
2- Bitboxx.Web.GeneratedImage.dll in the bin folder
3- bbimagehandler.ashx at the DNN root
4- parameter dnn=1 in calling ashx

I tested and but got a problem to retrieve image from database
I looked at your code and saw that in ImageDnTransform.cs where you retrieve image path and name

string imgFile = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Portals\" + this.PortalId.ToString());

The path is built with PortalId. Problem is that I always give a name to the portal directory : Homedirectory
Then I change something
sqlCmd = "SELECT HomeDirectory FROM [dbo].[Portals] " +
"Where PortalID = " + this.PortalId.ToString() ;
object resultportal = SqlHelper.ExecuteScalar(this.ConnectionString, CommandType.Text, sqlCmd);
string homedirectory = ((string)resultportal).Replace('/', '\');
string imgFile = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, homedirectory);
imgFile = Path.Combine(imgFile, ((string) result).Replace('/', '\'));

And now it works fine .
I hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant