Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2005-09-01 07:00:27

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

I have my txp installed in a subdirectory and it works jus fine without the slash… I’m not saying that it shouldn’t be there. I’m just thinking:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#77 2005-09-01 09:36:37

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

Yeah. I think that isn’t needed, because the variable should contain the slash. For example, on my site where Textpattern is in the root folder, my variable is set to “/”. But if it was in a directory called weblog, it would be set to “weblog/”.

Offline

#78 2005-09-01 11:23:22

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: rsx_frontend_edit: Frontend Edit Link

@ramanan: put a str_replace(‘//’,’/’, $varnameoftheurl) around the url and the // will be gone if someone has put the trailing slash in the settings. it is better to do this, because without slash it could be really a problem and you never know what the user put there :) (it could also be a “/path/to/subdirectory” without the end-slash.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#79 2005-09-01 13:39:59

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: rsx_frontend_edit: Frontend Edit Link

in 4.0, i don’t think there’s a separate option for setting a subdirectory… you just put the whole home url in one field, which instructs that a closing slash is not necessary.

i don’t doubt that it’s working for for you guys without the slash — i’d wondered why i should be the first to mention it. but it definitely was on tworking for me until i noticed the missing slash. it worked when i used the ‘frontend edit’ link from my first page, but from any other page, it would just tag textpattern/index.php?event=article&step=edit&ID=889 onto the end of the existing URL already up in the address bar… so it wasn’t working for me at all. Now that the one slash is added in the plugin code, it’s working dandily for me. i wonder if there might be anything different with my installation to cause this different result for me. i’ve not experienced it besides, though..

anyway, that’s my experience.


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#80 2005-09-03 00:18:44

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

Thanks Alicson. I’ll work on that when I get home then. I had only tested things from the front page and assumed it was all good.

Offline

#81 2005-09-03 06:12:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

hi all just to let you know that mine works everywhere ie front page, article lists, individual articles and search results.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#82 2005-09-03 14:15:05

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

I’m not at home for the weekend, so I can’t test out my txp 4.0 install till i’m back. I need to look up where the $hu variable is set.

update: The $hu variable should always contain a trailing slash as far as I can tell. Can anyone else confirm this problem? I might be misreading the source code. (See index.php line 64)

Last edited by ramanan (2005-09-04 02:05:04)

Offline

#83 2005-09-04 07:37:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

A very small unimportant thing… The &s in the last line create a non valid html document
ie In the line
<code><a href=”’.$pfr.‘textpattern/index.php?event=article&step=edit&ID=’.$thisarticle[‘thisid’].’”>’.parse($thing).’</a>’.$suffix.’\’;} ?>’;</code>
all the “&“s could be replaced with <code>& amp;</code>

Last edited by colak (2005-09-04 07:40:45)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#84 2005-09-04 13:18:08

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

Oh true. Mind you, someone would have to have turned on the frontend edit cookie before being shown any of the mark-up. I can fix that also while I look in to this missing slash thing more.

Offline

#85 2005-09-10 18:41:08

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

Alright, I’ve fixed the ampersands in the generated link ‘bug’. As I have mentioned, this is probably not such a big deal, but I hate invalid pages as much as the next guy, so it has been fixed.

The issue of a having that initial slash or not I haven’t changed. I still don’t believe this is a bug. Heh. Let me know if people are having trouble. As far as I can tell, the default value for $hu should be to have that trailing slash.

Offline

#86 2005-09-12 06:35:33

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

I have fixed the abersands manually but it is always cool to be working with the official version. Thanks for the update ramanan…


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#87 2005-09-14 14:59:40

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

The ‘edit’ link works in list and search views but not in individual articles
I think i got where it is going wrong
the first url is the url of the article under the write tab, the second is the url requested by the front end edit

http://neme.org/main/textpattern/index.php?event=article&step=edit&ID=182
http://neme.org/main/182/textpattern/index.php?event=article&step=edit&ID=182

And here is the actual url of the article (front end)

<a href=“http://neme.org/main/182/mobile-utopia”>http://neme.org/main/182/mobile-utopia</a>
It seems that the frontend edit link does not recognise the url schema (ie. /id/title/)

>Edit apologies for not noticing and reporting this before. i actually normally use the list views.
re the prefix and suffix, they are just fine in my install 4.01/svn895

Last edited by colak (2005-09-14 15:44:32)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#88 2005-09-14 17:52:24

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

I think the variable I am using to generate the URL is incorrect. Someone had mentioned earlier in this thread I need to use $hu in Textpattern 4.0, and I had assumed they were correct. I now think they are wrong.

I am using an older version of the plugin on my site, and it works. If you want to test something out, please edit the plugin you have installed, replacing $hu with $pfr. This occurs once in the plugin. I think this will fix your problems.

Offline

#89 2005-09-15 05:44:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: rsx_frontend_edit: Frontend Edit Link

Thanks again ramanan,
<code>$pfr;</code> did the trick


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#90 2005-09-15 13:55:52

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_frontend_edit: Frontend Edit Link

Strange. Mary was the one who recomended the switch to $hu, and it sounded like it worked for some people. I’ll need to look up in the source where the values are set, and what they are set to. I’ll update the plugin soon.

Last edited by ramanan (2005-09-15 14:04:25)

Offline

Board footer

Powered by FluxBB