Page 1 of 1

roots link ?

Posted: Tue Apr 06, 2010 8:00 pm
by Alex Luthor
Hi Jedi's master :-)

Actually I prepared some forum and I want to make some topic too. All topic will have an image and I would like to have a file with all images in my roots. Till now, no problem.

The problem that I mind is when I will change my hoster, all my link will become dead because address will change. For exemple :
- my old hoster address is : http://www.oldhoster.fr/
- my image link in topic is
Code: Select all
[img]http://www.oldhoster.fr/fileimage/image.png[/img]
- my new hoster address become : http://www.newhoster.fr
- my image link in topic become dead ^^;

I tried this method but couldn't get success :
Code: Select all
[img]/image/image.png[/img]
So I wanted to know if you have a method for solve this problem ?

Re: roots link ?

Posted: Tue Apr 06, 2010 9:19 pm
by spaceace
ok, here's what i've come up with.

upload all your images to your forum root images/ folder.

then, make a new custom bbcode

BBCode usage
Code: Select all
[topicimg]{SIMPLETEXT}[/topicimg]
HTML replacement
Code: Select all
<img src="./images/{SIMPLETEXT}"  />
Help line...
leave blank

then, to post an image that is in the images folder, all you need to do is put in the name of the image in that bbcode. like this
Code: Select all
[topicimg]80spaceace.png[/topicimg]
and it will result in the following...
[topicimg]80spaceace.png[/topicimg]

let me know if you have any issues with this as i might need to adjust something in the bbcode all depending on your host ;)

Re: roots link ?

Posted: Wed Apr 07, 2010 9:54 am
by Alex Luthor
Perfect code ! I thought it was not possible but everything seem possible when people have knowledge. :-D

Thanks a lot, the force is with you. :-)

Re: roots link ?

Posted: Wed Apr 07, 2010 4:46 pm
by spaceace
glad it worked for you. providing you get a full backup of your database and a full backup of all your forum files, you will be able to keep the image links live no matter the host you get ;)