Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Mod-Utility Request Embed External Images locally
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 February 2010 :  17:46:07  Show Profile  Visit HuwR's Homepage  Reply with Quote
ok, second attemp

Image Grabber

replace all the files with these new ones, and change the database path etc in web.config, should now be ok. Just tested it on a snitz access db and it connects ok
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 23 February 2010 :  19:17:18  Show Profile  Visit Todd's Homepage  Reply with Quote
Thanks, I'm going to try the new code now. It took me 2 hours to get home from work in sleet and snow, whew, I made it home.


Admin for the Tyco Collector's Forum

Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 23 February 2010 :  20:35:53  Show Profile  Visit Todd's Homepage  Reply with Quote
UPDate

It's almost completely working for me. It is reading the forums correctly and scouring the internet for those external images. It is also downloading them and putting them in the appropriate users uploaded folder.

But it isn't modifying the code to point to the new local images which were successfully brought in.


Admin for the Tyco Collector's Forum


Edited by - Todd on 23 February 2010 22:50:08
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 24 February 2010 :  02:11:44  Show Profile  Visit HuwR's Homepage  Reply with Quote
well that's a bit odd, it definately changed them for me.

How large is your database ? any chance you can give me ftp access to download it ? I don't have an access database with any data in so could only test it on sql
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 24 February 2010 :  10:54:56  Show Profile  Visit Todd's Homepage  Reply with Quote
quote:
Originally posted by HuwR

well that's a bit odd, it definately changed them for me.

How large is your database ? any chance you can give me ftp access to download it ? I don't have an access database with any data in so could only test it on sql



Yes I will give you ftp access and email the information to you. Thank you. Database is about 50MB. Incidently, I've run this against the entire forum and it captured over 1000 pics and put them in the appropriate folders. Not sure how the code works but my fear is that it's too late to now actually make the link changes. If it finds an external link and tries to copy to uploaded/user folder and that image is already there, will it still change the topic code?


Admin for the Tyco Collector's Forum

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 24 February 2010 :  13:49:00  Show Profile  Visit HuwR's Homepage  Reply with Quote
yes it will, it will simply overwrite the image, that is the bit I don't understand, in my test it definitely changed the links since when I ran it a second time it no longer found any external images other than the failed ones, so not quite sure why it didn't do that for you.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 24 February 2010 :  14:42:13  Show Profile  Visit HuwR's Homepage  Reply with Quote
figured out the problem, just not used to connecting to access databses in .net have tested against a copy of your db and it seemed to work ok.

Image Grabber update (the updated zip does not contain the web.config file, so use the one you currently have
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 05 May 2010 :  02:56:29  Show Profile  Reply with Quote
I've been trying to get this to work and I come up with this error on debugging

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
SnitzImageGrab.DataAccess..cctor() in D:\Development\SnitzImageGrab\SnitzImageGrab\App_Code\DataAccess.cs:12

[TypeInitializationException: The type initializer for 'SnitzImageGrab.DataAccess' threw an exception.]
SnitzImageGrab.DataAccess.GetForumList() in D:\Development\SnitzImageGrab\SnitzImageGrab\App_Code\DataAccess.cs:41
SnitzImageGrab._Default.BindForumList() in D:\Development\SnitzImageGrab\SnitzImageGrab\Default.aspx.cs:27
SnitzImageGrab._Default.Page_Load(Object sender, EventArgs e) in D:\Development\SnitzImageGrab\SnitzImageGrab\Default.aspx.cs:20
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Any pointers please??

No good at coding, but I can plough a field !!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 May 2010 :  03:05:30  Show Profile  Visit HuwR's Homepage  Reply with Quote
line 12 assigns a value from the web.config file to variable, so the only thing that could cause the error is if you don't have the web.config file.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 05 May 2010 :  05:51:26  Show Profile  Reply with Quote
Thanks Huw, I have just redone all changes made and started again... I now get this error..

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 13: <system.web>
Line 14: <compilation debug="true"></compilation>
Line 15: <authentication mode="Windows"/>
Line 16: </system.web>
Line 17: <system.codedom>

Looking on the net this is something to do with having 2 web.config files??

No good at coding, but I can plough a field !!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 May 2010 :  06:08:52  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Looking on the net this is something to do with having 2 web.config files??

or by a virtual directory not being configured as an application in IIS

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 05 May 2010 :  22:14:38  Show Profile  Visit Todd's Homepage  Reply with Quote
I'm using an Access 2000 database and this utility worked very well. I do however still have one issue. Some people have decided to type the img tags themselves and they did it in all CAPS. The utility is case sensitive and converted every single lowercase instance but the uppercase instances are untouched.

I've tried using Access 2000 to open the database and do replace operations. I have no idea what's going on but it seems anything within the brackets isn't found when doing a find (or replace) So if I search for img or img within brackets, to cut it short I've tried all combinations of case, limitations, etc..

I'm at a loss. Anyone know how to work around this or of another editor that would be capable of just replacing all the uppercase img tags with lowercase?


Admin for the Tyco Collector's Forum

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 06 May 2010 :  02:19:24  Show Profile  Visit HuwR's Homepage  Reply with Quote
that could be because [] is reserved in SQL to do a regular sql search to find [] you probably need to do something like

WHERE COLUMN_NAME LIKE '%[IMG]%' ESCAPE '['

or

WHERE COLUMN_NAME LIKE '%[[]IMG]%'

anyway, I'm pretty sure I fixed the case sensitivity, will dig out my latest copy of the code and post it later today

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 06 May 2010 :  21:50:51  Show Profile  Visit Todd's Homepage  Reply with Quote
quote:
Originally posted by HuwR
anyway, I'm pretty sure I fixed the case sensitivity, will dig out my latest copy of the code and post it later today



Thanks, I didn't want to keep bothering for it, look forward to trying it out.


Admin for the Tyco Collector's Forum

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 07 May 2010 :  17:55:13  Show Profile  Visit HuwR's Homepage  Reply with Quote
I think this should be the latest version, but haven't had chance to check if it fixes the case issue, bit busy building a polytunnel at the moment.

ImageGrab dll

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07