Store img tags in database and retrieve it |
I know these possible approaches:
1. If you know how, you may hack CKEditor to paste relative URI's. Long time ago I did such thing on the old FCKEditor, for CKEditor I have not researched how this could be done. 1.1. Then you can add in the head of your master HTML template the tag Code: <base href="<?php echo base_url() ?>" /> Code: <a href="#top">Top</a> 1.2. Or, without touching the HTML template, you can scan the HTML fragments from database for relative URI's of images and to prepend them with the base URL before outputting. (1.) looks like a difficult way. I think, it worths if you create your own CMS that you are going to use multiple times for your projects. 2. The lazy way: You can leave CKEditor to paste absolute URI's, as it does this by default. Before moving your site on the production server, you can open the database dump with a text editor (choose one that is able to edit large files), and using search/replace you can adjust the absolute URI's as the should be in the new place. |
Messages In This Thread |
Store img tags in database and retrieve it - by pb.sajjad - 05-14-2016, 12:39 PM
RE: Store img tags in database and retrieve it - by cartalot - 05-14-2016, 12:57 PM
RE: Store img tags in database and retrieve it - by pb.sajjad - 05-14-2016, 01:25 PM
RE: Store img tags in database and retrieve it - by cartalot - 05-14-2016, 04:12 PM
RE: Store img tags in database and retrieve it - by ivantcholakov - 05-14-2016, 04:39 PM
RE: Store img tags in database and retrieve it - by InsiteFX - 05-15-2016, 06:23 AM
RE: Store img tags in database and retrieve it - by pb.sajjad - 05-15-2016, 06:39 AM
RE: Store img tags in database and retrieve it - by InsiteFX - 05-15-2016, 02:19 PM
RE: Store img tags in database and retrieve it - by CINewb - 05-18-2016, 08:37 AM
|