Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-05 14:40:16

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Modify the comments form to use a full URL?

I’ve been using the excellent if_domain plugin to run to 2 sites off the same TXP installation, and share content. It works a treat, but I’ve come unstuck with the comments system.

The main domain (domain A) works fine, but comments submitted at domain B redirects to domain A. I’ve managed to hack the /publish/comments.php file to create the full URL in the form’s action and backspace attributes, e.g:

<form action="http://sub.domain-b.com/blog/blog-post#cpreview">

rather than

<form action="/blog/blog-post#cpreview">

The HTML has the right URL, but when submitting, the redirected URL is something like:

http://themain.domain-ahttp//sub.domain.com/blog/blog-post?commented=1#c000016

Does anyone have any good ideas of how to get around this? Should I be trying to use an apache redirect on domain B?

The comment is recorded fine, its just that it redirects you to show the post in domain A rather than B.


Cheers,
Jon VC#9

Offline

#2 2007-01-12 11:01:32

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Modify the comments form to use a full URL?

sorry to bump, but just in case anyone can help…


Cheers,
Jon VC#9

Offline

#3 2007-01-12 13:00:26

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Modify the comments form to use a full URL?

Sencer did answer this, but it seems to have gone. Anyway, thanks Sencer, that worked, along with commenting out a line concerning the $backspace variable.


Cheers,
Jon VC#9

Offline

#4 2007-01-12 13:06:56

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Modify the comments form to use a full URL?

Oh, really? After posting the answer, I was sure that the problem was not the action, but in fact the backspace, so I removed my post until I had more time to check it out. Well, I am glad you got it working, though. ;)

Offline

#5 2007-01-12 13:12:19

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Modify the comments form to use a full URL?

It was both! Your way of adding the full URL was much neater than what I’d come up with, but it then needed the backspace line to commented out. Thanks!


Cheers,
Jon VC#9

Offline

#6 2007-01-28 14:04:03

jimpoep
Member
Registered: 2006-02-19
Posts: 33

Re: Modify the comments form to use a full URL?

What was you’re solution then?

Offline

#7 2007-01-28 21:33:16

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Modify the comments form to use a full URL?

I should’ve commented my code better – I’ve just come back to look at the hacked file and I can’t remember what I’ve done! If you need the solution too, drop me an email, and I can send you the hacked file at least!


Cheers,
Jon VC#9

Offline

Board footer

Powered by FluxBB