Switching "/" to "?" in cmsimage.php link

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
trixs
Posts: 6
Joined: Fri 17. Jul 2015, 11:36

Switching "/" to "?" in cmsimage.php link

Post by trixs »

Dear all,
After migration to web hosting I found problem that ,as I supposed AcceptPathInfo Directive is off on my hosting, that why I need to change all my links to images added through Ckeditor for using "?" instead of "/". Even more I need to change it manually every time I add new image to article. As I understand some of features also will not work properly. What should I do to force using "?" for cmsimage.php? in different places like Ckedtior, templates and so on.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Switching "/" to "?" in cmsimage.php link

Post by update »

What version do you run?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Old Boy
Posts: 1203
Joined: Fri 23. Nov 2012, 13:52

Re: Switching "/" to "?" in cmsimage.php link

Post by Old Boy »

The very best way and my TIPP No ONE:

Don't manage images inside the CKeditor anymore!

Instead, use several ContentParts like sandwiches.
If you have a constellation like:

text
image
text


You should use 3 ContentParts:

ContentPart 1: Imagetext
ContentPart 2: image < div>
ContentPart 3: imagetext


BELEEVE ME, IT IS THE BETTER WAY!!!
User avatar
Oliver Georgi
Site Admin
Posts: 9905
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Switching "/" to "?" in cmsimage.php link

Post by Oliver Georgi »

Just use a global replacer in frontend_render:

Code: Select all

$content['all'] = str_replace('cmsimage.php/', 'cmsimage.php?', $content['all']);
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
trixs
Posts: 6
Joined: Fri 17. Jul 2015, 11:36

Re: Switching "/" to "?" in cmsimage.php link

Post by trixs »

Oliver, thank you for your tip, it's the thing I was looking for.
Old Boy, I use images inside of CKeditor ONLY when I need to have few pictures in one line, without any effects. I have not a lot of such pages, but its definetly exist. For all others I use the scheme similar to yours
Post Reply