Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: madman71 on September 21, 2010, 03:24:38 PM

Title: What file path do i change?
Post by: madman71 on September 21, 2010, 03:24:38 PM
i recently moved to a new server, however, the [IMG] tags are not working and are not displaying the image.
And yes, i do have the IMG check box checked  in the BBC settings.

Right now my links look like this:

[IMG]hxxp://mysite/forum/index.php?action=dlattach;topic=39243.0;attach=96296;image[ /IMG]

this should display an image, but it doesnt.  It needs the "WWW" in the url.
I thought the repair settings would take care of this, but it doesnt.

How can i get these links to have the www in them so the image will be displayed?
Title: Re: What file path do i change?
Post by: kat on September 21, 2010, 03:29:04 PM
That just doesn't make sense.

The URL that you have:

hxxp://mysite/forum/index.php?action=dlattach;topic=39243.0;attach=96296;image

Isn't the URL of an image.

hxxp://mysite/forum/image.gif would be...
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 03:31:47 PM
Quote from: K@ on September 21, 2010, 03:29:04 PM
That just doesn't make sense.

The URL that you have:

hxxp://mysite/forum/index.php?action=dlattach;topic=39243.0;attach=96296;image

Isn't the URL of an image.

hxxp://mysite/forum/image.gif would be...
ahhh, i should clarify, it's a link to an attachment.
One of my users copies the link from the attachment somewhere on the forum and posts it on another board within the forum, and now he says the image does not display
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 03:34:02 PM
i have a feeling that we'll just have to manually add the "www"
Title: Re: What file path do i change?
Post by: kat on September 21, 2010, 03:39:16 PM
Any chance of a link, or two, where this is happening?

They'll have to be open for guest-viewing, of course.
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 03:46:19 PM
Ok this appears to be an old issues because each time i copy a link (either an attachment link or a normal forum link) the www is there in the URL. So that's no longer an issue.  However, all of the old links without the www in the url still exist.


I just looked at my old server (it's still up) and it appears to have the same issue.  I know i did some testing (installing and uninstalling)  before i made the move to the new server.

I wonder if this could be a redirect thing or something with my htaccess.

as for an example, unfortunately, it's a closed adult forum. I can give you access if you still wish to look
Title: Re: What file path do i change?
Post by: kat on September 21, 2010, 03:47:31 PM
Yeah, no sweat.

I'll watch my PM box.
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 03:57:55 PM
would any of these rules in my htaccess prevent the www from being in the links?



RewriteCond %{HTTP_HOST} ^MYsite.us$ [OR]
RewriteCond %{HTTP_HOST} ^MYsite.usus$
RewriteRule ^/?$ "http\:\/\/MYsite.\.us\/forum\/" [R=301,L]

RewriteCond %{HTTP_REFERER} !^http://MYsite.us/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://MYsite.us$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.MYsite.us/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.MYsite.us$      [NC]
Title: Re: What file path do i change?
Post by: kat on September 21, 2010, 04:04:19 PM
No idea, at the moment.

It's these images....

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fblahblah.us%2Fforum%2Findex.php%3Faction%3Ddlattach%3Btopic%3D39865.0%3Battach%3D96761%3Bimage&hash=4ca0b4b1fb3638822785cdaa797ba435bb21ec0b) (http://blahblah.us/forum/index.php?topic=39865.msg63134#msg63134)

If these images were working, before the move, somehow their links have been changed.

That URL is NOT to an image. It's to an attachment, kinda.

Were you using SMF v2.RC3 before the move?
Title: Re: What file path do i change?
Post by: Hj Ahmad Rasyid Hj Ismail on September 21, 2010, 04:30:06 PM
Personally, I tried what you've did but the image cannot simply be put in post via such link. It must be a direct link to that image. Just based on my personal "old" experience only.
Title: Re: What file path do i change?
Post by: kat on September 21, 2010, 04:36:18 PM
I get the feeling that people have been right-clicking and "Save link", rather than "Save image address".

So, the URL has been right, but the image url has been wrong.

Odd, though.

I'm looking at a post that was made in September 2009 and those links are wrong.
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 06:29:40 PM
well, instead to taking the time to find where the problem came from, i just whipped out notepad++ and used the find function to fix the links.

That notepad++ is such a time saver.

I'd like to thank everyone  that put in their suggestions.

case closed (i guess)
Title: Re: What file path do i change?
Post by: Adish - (F.L.A.M.E.R) on September 21, 2010, 06:59:41 PM
Lets just do a test here if attachments can be added with the img right tags (https://www.simplemachines.org/community/index.php?action=dlattach;topic=401710.0;attach=157493;image)

EDIT:

Yes, it does work. :P

The format here is:
[img]http://www.simplemachines.org/community/index.php?action=dlattach;topic=401710.0;attach=157493;image[/img]
which seems to be the one you have. Could you just check if the attachment is present?

Additionally, after the move, did you fix the paths correctly? It may be the case that the attachments are at different path.
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 07:04:12 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsimplemachines.org%2Fcommunity%2Findex.php%3Faction%3Ddlattach%3Btopic%3D401710.0%3Battach%3D157493%3Bimage&hash=96c5cba3ed8c30cc4f0bd23ad75fcd8c2d009fd7)

using this code (and with out the www in the link) works here at SMF, but not at my site :(
[img]http://simplemachines.org/community/index.php?action=dlattach;topic=401710.0;attach=157493;image[/img]
Title: Re: What file path do i change?
Post by: Adish - (F.L.A.M.E.R) on September 21, 2010, 07:05:45 PM
Just thought it might be a good idea to mention the edit.

Quote from: (F.L.A.M.E.R) on September 21, 2010, 06:59:41 PM
EDIT:

Yes, it does work. :P

The format here is:
[img]http://www.simplemachines.org/community/index.php?action=dlattach;topic=401710.0;attach=157493;image[/img]
which seems to be the one you have. Could you just check if the attachment is present?

Additionally, after the move, did you fix the paths correctly? It may be the case that the attachments are at different path.
Title: Re: What file path do i change?
Post by: Hj Ahmad Rasyid Hj Ismail on September 21, 2010, 07:07:34 PM
That's what I have said before. It just doesn't work on mine too. And please note, you cannot take picture attachment from another forum too. It just won't work either.
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 07:10:25 PM
Quote from: ahrasis on September 21, 2010, 07:07:34 PM
That's what I have said before. It just doesn't work on mine too. And please note, you cannot take picture attachment from another forum too. It just won't work either.

Are you running any of these mods?


6 Custom buttons / tabs with Sub Menus (
2.    AJAX Recent Topics    
3.    Unread and Replies Tabs in Main Menu    
4.    Anonymize Links (RC3)    RC3    
5.    SimplePortal    2.3.2    [
6.    Search Focus Dropdown    
7.    Thumbnail Topic Mod    1.2    
8.    Tidy Child Boards    1.3    
9.    InLine Attachments    1.06 Beta
Title: Re: What file path do i change?
Post by: Adish - (F.L.A.M.E.R) on September 21, 2010, 07:16:50 PM
Quote from: ahrasis on September 21, 2010, 07:07:34 PM
That's what I have said before. It just doesn't work on mine too. And please note, you cannot take picture attachment from another forum too. It just won't work either.

Unless attachments are publicly available for download and viewing.

@madman
I do see the link has an space at the end of the tag. Is it done on purpose?
Title: Re: What file path do i change?
Post by: Hj Ahmad Rasyid Hj Ismail on September 21, 2010, 07:18:45 PM
I am running SP...
Title: Re: What file path do i change?
Post by: madman71 on September 21, 2010, 09:24:00 PM
Quote from: (F.L.A.M.E.R) on September 21, 2010, 07:16:50 PM
Quote from: ahrasis on September 21, 2010, 07:07:34 PM
That's what I have said before. It just doesn't work on mine too. And please note, you cannot take picture attachment from another forum too. It just won't work either.


yeah, on purpose. For some reason when i pressed preview it didnt show any part of the link in code.  That extra space made the coded link visible.
Unless attachments are publicly available for download and viewing.

@madman
I do see the link has an space at the end of the tag. Is it done on purpose?
Title: Re: What file path do i change?
Post by: Hj Ahmad Rasyid Hj Ismail on September 22, 2010, 05:13:16 AM
Quote from: (F.L.A.M.E.R) on September 21, 2010, 07:16:50 PM
Quote from: ahrasis on September 21, 2010, 07:07:34 PM
That's what I have said before. It just doesn't work on mine too. And please note, you cannot take picture attachment from another forum too. It just won't work either.

Unless attachments are publicly available for download and viewing.

@madman
I do see the link has an space at the end of the tag. Is it done on purpose?
May be I was doing it wrongly. I'll try that again later and see how it goes then.