Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#361 2008-05-19 21:41:02
Re: gbp_permanent_links
Check if this post helps you: http://forum.textpattern.com/viewtopic.php?pid=161252#p161252
Offline
#362 2008-05-20 06:18:07
Re: gbp_permanent_links
SPenguin wrote:
When I click on the link, I get the error, “The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
are you using zem_redirect as well? that caused similar problems for me a while ago.
Offline
#363 2008-05-20 20:54:00
Re: gbp_permanent_links
maniqui wrote:
Check if this post helps you: http://forum.textpattern.com/viewtopic.php?pid=161252#p161252
I wish it had. I’ve stripped out everything except the code to produce a list or an article. I’ve disabled all other plugins. I’ve followed the instructions. And I still get the “The page isn’t redirecting properly” error. It’s baffling.
Any other suggestions? Is there further code I should show to help?
John
Offline
#364 2008-05-23 13:04:11
Re: gbp_permanent_links
Okay, I’m partway there.
<recap>
What I’m trying to get is for foo.com/representation to have categories foo.com/representation/theatrical and foo.com/representation/voiceover.
</recap>
I’ve set up the rule section/category, precedence 10. Conditions: Section: Representation. Forward to Section: Representation, Page: representation.
I’m now getting all the articles as representation/theatrical/bar or representation/voiceover/zam, regardless of the URL. It’s not ideal, but at least I’m now getting the permlinks to work.
If I’m able to crack it, I’ll provide the full example.
John
Offline
#365 2008-05-27 13:35:52
Re: gbp_permanent_links
I am working on a new version. Will be much improved and easier to extend and maintain – so much so I’m actually getting excited about this plugin again.
Will try get it released as soon as possible.
But now is the time to give me your feature requests. What would you like to be possible which isn’t already?
Offline
#366 2008-05-27 13:42:43
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: gbp_permanent_links
Hi greame,
Don’t know how much work is involved but I’d like to be able to read each part of the permanent link though an IF statement (regardsless of where it acutally comes from (category/section/etc)
example:
my link is: www.domain.com/aaa/bbb/ccc
so
<txp:if_permlink1=“aaa”>
AAA
<txp:end_if>
<txp:if_permlink1=“bbb”>
BBB
<txp:end_if>
am I making any sense? ;)
Offline
#367 2008-05-27 13:45:18
Re: gbp_permanent_links
jelle wrote:
I’d like to be able to read each part of the permanent link though an IF statement (regardsless of where it acutally comes from (category/section/etc)
awesome idea! +1 :)
Offline
#368 2008-05-27 13:48:57
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: gbp_permanent_links
Hi Graeme, I seem to remember that previously on this thread there were some requests for a section1/section2/article url structure (fake subsections). Is this a viable request?
Thanks
Offline
#369 2008-05-27 13:49:55
Re: gbp_permanent_links
jelle wrote:
I’d like to be able to read each part of the permanent link though an IF statement
I could extend smd_if to be able to read the URL (instead of just url variables) if that would help you?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#370 2008-05-27 13:52:52
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: gbp_permanent_links
Bloke wrote:
I could extend smd_if to be able to read the URL (instead of just url variables) if that would help you?
hi bloke,
that would be great!….anything would be fine for me.
however I’m guessing some ppl would prefer and all-in-one solution within permanent_links……???
Offline
#371 2008-05-27 14:02:27
Re: gbp_permanent_links
Bloke wrote:
I could extend smd_if to be able to read the URL (instead of just url variables) if that would help you?
awesome! yes! please! :)
imo it’d be more appropriate to have that in your generic conditional plugin instead of gbp which you’re not using via tags (at least at the moment)…
Last edited by sthmtc (2008-05-27 14:02:45)
Offline
#372 2008-05-27 14:18:13
Re: gbp_permanent_links
OK, in that case, let me think about it and see what I can come up with.
Techie question to graeme then: if I was to “grab” the current URL in order to parse it, where’s the best place to get it? e.g. can I use parts of the $_SERVER variable to obtain your faked URL schema?
Aside from the double slash problem, will:
hu . $_SERVER['REDIRECT_URL']
(or REQUEST_URI) do it? Which is favourable, if any?
Last edited by Bloke (2008-05-27 14:18:34)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#373 2008-05-27 14:19:41
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: gbp_permanent_links
Bloke wrote:
OK, in that case, let me think about it and see what I can come up with.
cool! good luck mate!
Offline
#374 2008-05-27 14:26:26
Re: gbp_permanent_links
Hi Graeme,
exciting news!!!
An often requested “feature” for this plugin is documentation.
Also, I’ve reported an issue that may be useful if you are on a bug hunting.
What I still find “un-intuitive” is when (and why) to use gbp_disable_permlinks. Right now, I find myself having to manually check links on pages to see if they have been (or not) affected by gbp_permanent_links.
Feature request::
To have the option to choose which category (1 or 2) to use when creating permanent links using /category-name/.
This will make the following as possible URLs:
/section/category1/article-title,
/section/category2/article-title,
/section/category1/category2/article-title,
/section/category1-category2/article-title
I’m not totally sure about the last two examples, and them could work flawlessly with TXP.
Currently, a permanent link (done with your plug-in) like this:
/section/category/article-title
will work as a category listing if you go remove the article-title, that is, if you go to this url: /section/category/.
So, the last two examples I posted as possible URLs may not work if visitor points to /section/category1-category2/ or /section/category1/category2/.
Also, related to those two possible URLs, there is this problem: what if category2 (or category1) aren’t defined?. It will be nice that, in that case, the separator (-, /) should be removed, to avoid it on the final URL (/section/category1//article-title or /section/category1-/article-title).
Last edited by maniqui (2008-05-27 14:27:15)
Offline
#375 2008-05-27 15:27:14
Re: gbp_permanent_links
Bloke wrote:
Techie question to graeme then: if I was to “grab” the current URL in order to parse it, where’s the best place to get it? e.g. can I use parts of the $_SERVER variable to obtain your faked URL schema?
You could use the $_SERVER variable but permanent_links uses:
$segments = explode('/', trim(preg_replace('%\?[^\/]+$%', '', $pretext['req']), '/'));
this is good because I don’t have to worry about TxP installs in subdirectories.
Offline