Welcome to Geeklog, Anonymous Sunday, December 01 2024 @ 01:18 pm EST

Geeklog Forums

preview on editor


Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
Preview for the images that have relative paths for their sources are broken, and they are not broken only when the paths are absolute.

Can you fix this in the future?

Perhaps it is not a problem if you just start using the latest geeklog. But it becomes a problem when html articles are imported from other systems.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
when html articles are imported from other systems.


What do you mean by this? Are you just copying and pasting the articles into the editor? This has always been a tricky prospect for coders and most editors (and word processing programs) can have issues as some editors and programs like MS Word add there own tags and classes.

Did you want to add a bug report for it?

https://github.com/Geeklog-Core/geeklog/issues

and give a few examples.

One of the Geeklog Core Developers.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
Quote by: Laugh

when html articles are imported from other systems.


What do you mean by this?



Think about that you have an old geeklog web site like this:
example.com/index.php
Then you update the website from the old one to a new domain, and also it's subdomain:
newexample.com/mydomain/index.php

Originally, your source codes are something like <img src="http://example.com/images/a.jpg" >
and now you have to modify the url for images.
You can modifiy like this:
<img src="http://newexample.com/mydomain/images/a.jpg" >
All you have to do is replace "example.com/" with "newexample.com/mydomain/"

But someone may consider the future situation and don't want to be bothered, so he/she may want to modify the original codes like this:
<img src="./images/a.jpg" >
Now all you have to do is replace "http://newexample.com/mydomain/" with "./" and this is just once.

For the latter case, if you use geeklog, preview is shown broken, so you have to change the image url to absolute path if you want to use preview .

This is what it meant.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Ok I see what you mean, we already have something that does this built into the install.

It is called migrate and is located in the Geeklog install. For your Geeklog version add the install directory back in the admin directory (make sure to use the install that matches your version). Run it and then choose the migrate option. It will then ask for your new server settings and then proceed to migrate your config settings including checking articles, staticpages, forum posts (and other things if the plugins supports it) for relative paths and updating them.

You can also migrate and upgrade at the same time to the latest Geeklog version but that would obviously require to add all the latest Geeklog files.

One of the Geeklog Core Developers.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
OK I'll try it when the time comes.
 Quote

All times are EST. The time is now 01:18 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content