Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-16 20:11:21

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

How to link articles by ID - Is there any way?

I’m thinking to go on making RSS by myself, but I need to get links to IDs instead of the usual links to the article permalinks. How to get it without a redirect from the ID to the article permalink?
Thanks

Last edited by Bongo-man (2009-10-16 20:41:00)

Offline

#2 2009-10-16 21:22:05

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

I’m sorry, I have finally found the solution searching the keyword: ‘shrt urls textpattern’ —-> http://forum.textpattern.com/viewtopic.php?id=30969

Offline

#3 2009-10-19 09:58:29

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

I have a further question related to the same issue:
I’ve created links on the basis of the ID and placed them in RSS feeds created by myself, but I don’t know why all this links open (very) slowlier than permalinks!?
Anyone can tell me why and what can I do?

Offline

#4 2009-10-19 10:12:13

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: How to link articles by ID - Is there any way?

Maybe a plugin (unknown) can hook into the call of the article ID more efficiently than with the base (native to TXP) call to that identifier (ID). Interesting question. It sounds like your published document links coming through RSS readers take a longer path to get to the source URI. There may be something to do with HTTP on a plain level and then other information I don’t know.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#5 2009-10-19 10:19:32

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

To get links to IDs I’ve updated the Textpattern version and I also use the plugin ‘smd_short_url’, version 0.21. This is my only active plugin.

Offline

#6 2009-10-19 10:31:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: How to link articles by ID - Is there any way?

Bongo-man wrote:

I don’t know why all this links open (very) slowlier than permalinks!?

Hmmm there are a couple of things to consider:

  1. Any calls to site.com/ID have to wait until the browser has delivered a 404 (because that URL technically does not exist). Once the 404 is triggered, the plugin intercepts it and redirects to the permlink — do you have any custom error handling code, either on your server or in your TXP (an error_404 Page template, for example or something specific in your error_default Page?)
  2. If the redirect part is taking some time, try analysing it with Firefox’s LiveHTTPHeaders plugin and / or Firebug to see how long the requests are taking. That might lead to some clues
  3. Check there are no .htaccess rules that might be getting in the way because the rules often run for every URL request — also look at any gbp_permanent_links rules, if any EDIT: ok, so you’re not using that plugin
  4. Do you know which type of redirect the browser/server is issuing? Is it doing it directly or is it doing the fallback HTML redirect that is part of the v0.21 plugin? (see the thread the blue dragon posted and perhaps try some of the diagnostic things suggested in the following posts there to work out what is going on)

Last edited by Bloke (2009-10-19 10:34:26)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2009-10-19 10:53:37

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

I’m sorry, anyway, I forgot two possible major issues:

- I connect to internet by means of a GPRS connection (that is not so slow, but probably every problem wuould not so relevant with a cable connession).
- My blog is in a sub-directory of my site.

Anyway I’m checking carefully all you answered me.
Thanks

Offline

#8 2009-10-19 11:04:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: How to link articles by ID - Is there any way?

Bongo-man wrote:

My blog is in a sub-directory of my site.

Ah, that might be it. The part of the code that determines your site path might need improving for subdirs. If it turns out to be that and you can let me know any info you get out of the diagnostic mods (by e-mail if you do not wish to post them here) or would be able to grant me a login to your site it would be very helpful, thank you.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2009-10-19 14:33:27

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

I can’t understand very well what you mean probably cause of my different language, but probably I’m also not able to do all this.

Are there any ther solution to get links identified by means of an ID?
My necessity is owed to not have the keywords of the article titles in their permalinks, because some of these articles are fetched from other web sites.

I know some people recalls links frm a database by means of a script but I have not found anyone of these now.

So I think I could classify links to articles in categories according with the subject of their RSS feed, but I don’t know if I could recall all the articles by category on the basis of their link ID, by means of the tag <txp:link_feed_link />. In other case I could link manually all the articles by category by means of their IPs.
Anyway I thank you for your help.

Last edited by Bongo-man (2009-10-19 15:18:20)

Offline

#10 2009-10-19 16:17:26

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: How to link articles by ID - Is there any way?

Bongo-man wrote:

Are there any ther solution to get links identified by means of an ID?

You can always use /id/title permlink scheme. That allows you to link to the articles with out using the title, ‘cause the title is optional. Example code to generate those permlink URIs could be <txp:site_url /><txp:article_id />.

Offline

#11 2009-10-19 16:37:46

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: How to link articles by ID - Is there any way?

Thanks, interesting, but I have already redirected all of my site to /section/title links with customized titles. So I cannot do it.
I’ve also downloaded the php script ‘phurls’, but it does not seem (to me) enough secure.

For Bloke: I’m thinking now:

With the redirect through the error 404, is there any possible problem with search engine indexing?

Last edited by Bongo-man (2009-10-20 07:15:46)

Offline

Board footer

Powered by FluxBB