Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Mod-Utility Request Embed External Images locally

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Todd Posted - 15 February 2010 : 03:14:00
If this is the incorrect forum I apologize, I thought this was the best fit.

A big problem I have and probably everyone else is when forum members link to external images that disappear later on. Many topics now have red X's where the now non-existant images should have been.

I have proeders file attachment mod being used but still many members find it easier to just throw up a link to inkfrog or another image hosting company.

My idea is this. I would like an admin utility that will go through a forum at a time and detect all links to external images, all of the IMG tagged lines which are followed by http, indicative of an external image. I would like it to then get that image and place it in the users uploaded folder. The final step would be to change the line of code to point to the forum stored image.

This would be a god send for most of us. Thanks in advance.
15   L A T E S T    R E P L I E S    (Newest First)
Todd Posted - 20 December 2013 : 19:13:59
Todd Posted - 30 November 2013 : 14:39:41
Issue with Image Grabber. Image grabber breaks, actually it removes the img code when run for a second time against a post only IF that post also contains a link to an external webpage.

Update: Done testing. If there is a link to an external webpage it interferes when starting with http:// If I remove the http:// the image grabber seems to ignore it and process the post correctly.

See this post where I worked out the issue.

http://www.tycoforums.com/tyco/forum/topic.asp?TOPIC_ID=14039

CAN THIS BE FIXED?

xseoer Posted - 24 June 2010 : 23:14:53
quote:


this is the grab and save code, and shows the simplicity of using .Net (code is C#)

Grabbing the image is simple, first we declare a byte array to store the image in
Byte[] imagearray;
next we grab the image into the array using the webclient class

using (WebClient client = new WebClient())
{
imagearray = client.DownloadData(urlofimage);
}

next we just save the imagearray to disk using a filestream

using (FileStream writer = new FileStream(destinationpath + filename, FileMode.Create))
{
writer.Write(image, 0, image.Length);

}


I will post the full code for parsing the img tags and grabbing the images later



Thanx for sharing!!



I have a lovely cat named [url=http://www.ghdtradezone.com]GHD[/url].Barin
Todd Posted - 02 June 2010 : 20:30:42
Sorry, I forgot to come back and give an update. Thanks HUWR, it's working correctly. Wonderful utility!
Todd Posted - 08 May 2010 : 18:47:41
quote:
Originally posted by HuwR

try this default.aspx with the new dll I posted.

default.aspx



Worked well with new default.aspx file. It does the job and it's even working with the uppercase IMG tags. Thank you very much for this utility, it's a godsend.

However, (and this existed with the old dll and default.aspx) all pictures that are locally hosted on the forum and are within nested code like;

center img /tyco/forums/uploaded/user/picture.jpg /img /center

get changed to;

/tyco/forums/uploaded/user/picture.jpg


UPDATE: I think I fixed it. I went into inc_code.asp and changed the function back to it's default snitz code. Like I said, I modded this forum alot. I had changed the function for insert image to one that also put the code for centering the image. Now it just inserts the picture. Users will have to center the pics in another step, no big deal.

I think this might be 100% now. I'll follow up with my successes soon, going to try out a few of the real forums now.
HuwR Posted - 08 May 2010 : 08:23:36
try this default.aspx with the new dll I posted.

default.aspx
HuwR Posted - 08 May 2010 : 03:28:03
ok, you may need a new default.aspx, I assumed I had just made a change in the dll, i will zip up the other files and post them later
Todd Posted - 07 May 2010 : 23:34:03
I put back the old dll from Feb 24 and it worked ok again, so it must be the .dll

There was one problem I've had all along. A few months back I modded the forum so that when the image tags are placed around the image location it is also centered. After running the imagegrab utility, the code would be changed from



to

/tyco/forum/uploaded/New_York_Central/train_in_spain.jpg


removing the img tags altogether and leaving nothing but the text

/tyco/forum/uploaded/New_York_Central/train_in_spain.jpg

displayed in the post.


This happens ONLY on images which are located on the forum server already, it does NOT happen to images that are offsite. They are grabbed and the code is changed properly.
Todd Posted - 07 May 2010 : 22:44:44
I replaced the dll and had problems.

New default.aspx listed below by HUWR solved problem with it not working with just the new DLL.
HuwR Posted - 07 May 2010 : 17:55:13
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
Todd Posted - 06 May 2010 : 21:50:51
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.
HuwR Posted - 06 May 2010 : 02:19:24
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
Todd Posted - 05 May 2010 : 22:14:38
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?
HuwR Posted - 05 May 2010 : 06:08:52
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
thermal_seeker Posted - 05 May 2010 : 05:51:26
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??

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07