Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-08-16 15:22:41

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

swati.miniyar wrote:

i am using <txp:bos_author section=“author” /> in a form where i am dispalying full article .It means along with the article its authors name will be displayed.
My page template “archive-list” uses this from.

Do you use bos_author in the individual article or in an article list? Your explanation sounds confusing to me, because first you say that you’re using the tag in the full article, then you say “archive-list” page…

Now,when i click on authors name ..i want its information should be displayed in some other page-“author link”.
So on this page i have written
<article_custom with limit=“1” section=“author”/> as author section uses this page..

Simply use bos_author section=“author” in the form, where you want the name linking to the bio. And forget article_custom for this usage. It doesn’t make sense. Try and let me know, or answer my question above.

Z-

Offline

#17 2007-08-16 15:35:03

swati.miniyar
Member
Registered: 2007-08-06
Posts: 39

Re: bos_author - author url customization...

actually i am using a form to dispaly full article with its author name..
for this i am using a “default form “..on this form to display authr name-i am using <txp:bos_author section=“author”/>

when i click on this author name it should go to a page (archive_list) where i want to display that authgors info..
What code shpuld i write to link aaauthors name with its bio..I was using <article:custom section=“author”/> ..i have tried it with <txp:article /> also..but have not got proper results..

Offline

#18 2007-08-16 15:39:35

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

The problem is: why do you use article_custom to display a full article?? With limit=“1” it will show always the first article, from the first author…

Use a simple article tag. no limit. No section=“author”. In the article form you put bos_author section=“author”.

Let me know if this solve.

Z-

Last edited by Zanza (2007-08-16 17:14:01)

Offline

#19 2007-08-17 04:26:05

swati.miniyar
Member
Registered: 2007-08-06
Posts: 39

Re: bos_author - author url customization...

noooooooo.still its not solving my problem…what should i do?
for 1st author its showing properly .but or 2nd ,3rd and 4th author its showing always 2 author’s bio..
Pleaaaaaaase help me out..

Offline

#20 2007-08-17 10:15:49

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

I can’t help since I don’t understand. What does “showing always 2 author bio” mean? I thought it showed always the first autor bio. Has then something changed?

Can you paste the code you are using now (without article_custom?)?

If you also have a url I can give a look, because your code usage sound strange to me and I suspect we are not thinking about the same thing.

Z-

Last edited by Zanza (2007-08-17 10:41:07)

Offline

#21 2007-08-17 10:54:43

swati.miniyar
Member
Registered: 2007-08-06
Posts: 39

Re: bos_author - author url customization...

it means its always showing 2 nd authors bio whether clicked on 2 nd ,3rd or 4th author name..

i’ll give u a more detailed explaination…

To dispaly any full article i am using default form.While dispalying full article,i want to show its author name,its posted date along with body..

so i have written
<txp:bos_author section=“author”/>
<h2 style=“margin:0px; padding:0px; border:none;”>
<txp:title/>
</h2>

</txp:php> <div class=“postInfo”> <strong><txp:posted/></strong> <txp:body/>
</div>

this article i am showing on a page template—“archive”

when i click on authors name of this article ..i want to show that authors information..
but that information (of author) should be displayed on page template “author_ link”

so on this page i have written code like this…
<txp:if_sectio name=“author”>
<txp:article form=“about_us”/>
</txp:if_section>

in about form i am showing title and body of the artilce…not anything else..

By problem is..
i am getting 1st authors info..if i click on 1st author name..
but when i click on 2 nd or 3rd or 4th authrs name it always showing bio of 2 nd author …

how to link the bios of all these authors to their names correctly…
sorry for large explaination..but i am searching for this from yeserday..but still not getting any appropriate solution..

please help me..

Offline

#22 2007-08-17 12:24:33

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

Your way of doing now looks correct. The problem must be somewhere else in the middle. Some ideas:

  • Are the article author bio corrected published, if you access them from typing the correct url?
  • Are the articles all assigned to the appropriate author?
  • Are the name of the author proprerly written?
  • Have you tried to change the name of author section? Since this is also the default name txp use for default author listing, I prefer to change it to “contributors“or anything else.

This is working for me and other sites, so the problem need to be caught somewhere. If you could provide an url then it would be great.

Z-

Offline

#23 2017-02-21 02:46:47

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: bos_author - author url customization...

I just recovered this from the wayback machine. I haven’t tested it yet.

# bos_author v1.0
# Simple replacement for the <txp:author />. You can customize the section url to which every author name point to, with author name encoded along the TXP convention ( - instead of + for spaces)
# Maurizio Boscarol
# http://www.zanzareazanzibar.it/

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YTo5OntzOjc6InZlcnNpb24iO3M6MzoiMS4wIjtzOjY6ImF1dGhvciI7czoxNzoiTWF1cml6
aW8gQm9zY2Fyb2wiO3M6MTA6ImF1dGhvcl91cmkiO3M6MzE6Imh0dHA6Ly93d3cuemFuemFy
ZWF6YW56aWJhci5pdC8iO3M6MTE6ImRlc2NyaXB0aW9uIjtzOjE5MjoiU2ltcGxlIHJlcGxh
Y2VtZW50IGZvciB0aGUgPHR4cDphdXRob3IgLz4uIFlvdSBjYW4gY3VzdG9taXplIHRoZSBz
ZWN0aW9uIHVybCB0byB3aGljaCBldmVyeSBhdXRob3IgbmFtZSBwb2ludCB0bywgd2l0aCBh
dXRob3IgbmFtZSBlbmNvZGVkIGFsb25nIHRoZSBUWFAgY29udmVudGlvbiAoIC0gaW5zdGVh
ZCBvZiArIGZvciBzcGFjZXMpIjtzOjQ6InR5cGUiO2k6MDtzOjQ6Im5hbWUiO3M6MTA6ImJv
c19hdXRob3IiO3M6NDoiaGVscCI7czoxNzMwOiIKPGgxPkhlbHA8L2gxPg08cD5TaW1wbGUg
cmVwbGFjZW1lbnQgZm9yICZsdDthdXRob3IgbGluaz0iMSIgLyZndDsgdGFnLiBUaGUgcGx1
Z2luIHJldHVybnMgdGhlIG5hbWUgb2YgdGhlIGF1dGhvciB3aXRoIGEgbGluayB0aGF0IHBv
aW50cyB0byBhIHNlY3Rpb24geW91IGRlZmluZSBpbiAic2VjdGlvbiIgYXR0cmlidXRlLiBZ
b3UgbWF5IGNob29zZSAiYXV0aG9ycyIsICJjb250cmlidXRvciIsICJhYm91dCIsIG9yIHdo
YXQgeW91IHdhbnQuIFNldCBpdCBpbiB0aGUgc2VjdGlvbiB0YWIgZmlyc3QuID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HRzKSk7CgkJJGF1dGhv
cl9uYW1lID0gZ2V0X2F1dGhvcl9uYW1lKCR0aGlzYXJ0aWNsZVsnYXV0aG9yaWQnXSk7CgkJ
cmV0dXJuIChlbXB0eSgkc2VjdGlvbikpCiAgICAgICAgICAgICAgICAgICAgICAgID8gJGF1
dGhvcl9uYW1lCgkJCTogICAnPGEgaHJlZj0iJy5odS5zdHJ0b2xvd2VyKHVybGVuY29kZSgk
c2VjdGlvbikpLicvJy5zdHJ0b2xvd2VyKHN0cl9yZXBsYWNlKCIrIiwgIi0iLCB1cmxlbmNv
ZGUoZHVtYkRvd24oJGF1dGhvcl9uYW1lKSkpKS4nIj4nLiAkYXV0aG9yX25hbWUuJzwvYT4n
OwoJfQoKIjtzOjM6Im1kNSI7czozMjoiNzliYWViMmE4ODlhM2M2NDE4YWFlNTQ5Y2Y3M2Fl
OGUiO30=

Offline

#24 2017-02-21 08:08:36

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

Wow, I’m not sure this is needed anymore, nor that it’s working, but it’s nice to see this coming from the past, thanks… :)

Offline

#25 2017-02-21 15:32:45

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: bos_author - author url customization...

Zanza wrote #304170:

Wow, I’m not sure this is needed anymore

There is also mta_author_section which is very similar.

I am figuring out how to create a custom author page for each author on the site I am working on.

1) Going with a standard <txp:author escape=”“ link=“1” title=“1” /> works if you just want to reuse your homepage template. I don’t want to do that.

2) This works by manually creating an article in the author section and then linking to it via<txp:bos_author section=“author”/>. Except that you can only use section/title urls. I don’t want to do that, either.

My solution for now: Going with option 1 and setting my default page to this:

<txp:variable name="disposable" value='<txp:rah_function call="strpos" value='<txp:page_url />' search="author" _assign="authorpage" />' />

<txp:if_variable name="authorpage" value="FALSE">
	<txp:output_form form="page-default" />
<txp:else />
	<txp:output_form form="page-author" />
</txp:if_variable>

This works (I have used variations on this trick before) but such a kludgey way to do it. I feel like there has to be a better way but there has never been a demand for it.

Offline

#26 2017-02-21 15:51:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,476
Website GitHub

Re: bos_author - author url customization...

michaelkpate wrote #304174:

Going with a standard <txp:author escape=”“ link=“1” title=“1” /> works if you just want to reuse your homepage template. I don’t want to do that.

What about using the front page as a ‘controller’? I do this sort of thing sometimes in my default Page template:

<txp:if_author>
   <txp:output_form form="landing_author" />
<txp:else />
   <txp:if_category>
      <txp:output_form form="landing_category" />
   <txp:else />
      <txp:if_individual_article>
         <txp:output_form form="head" />
         <body>
            <txp:output_form form="nav" />
            <txp:article />
            <txp:output_form form="foot" />
         </body>
         </html>
      <txp:else />
         <txp:output_form form="landing_article" />
      </txp:if_individual_article>
   </txp:if_category>
</txp:if_author>

Thus, any ‘list’ landing pages are redirected to forms (you can also nest search landing pages in there too if you wish) and any articles use the bit inside the <txp:if_individual_article> tags. That could also be entirely offloaded to a Form if you prefer.

The head, foot and nav Forms are all reused on the various landing_* Forms. The head Form especially has the doctype and opening <html> tag and all the meta data usually found in <head>.

Doing it this way, you can pick and choose which landing pages have similar visual representations and farm off the ones that differ to a dedicated Form, while retaining Txp’s convention of “the default Page is the destination for all listy output” and keeping the Page logic less crazy.

ymmv


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

#27 2017-02-21 16:18:22

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: bos_author - author url customization...

Bloke wrote #304175:

What about using the front page as a ‘controller’? I do this sort of thing sometimes in my default Page template:

You know, somewhere along the line last night I became convinced that you couldn’t use if_author for that. Which I knew better.

Mainly, I was focus on making sure the meta information was set correctly but I think I just figured it out.

Still, I wish somebody had figured out a way to implement this idea:

It would perhaps be better if one could redirect the <txp:author /> tag to an arbitrary section that is not the default Page because then this feature goes away. Not sure if that’s possible, though. – Why txp:author links to frontpage only?

Offline

#28 2017-02-21 16:30:49

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: bos_author - author url customization...

michaelkpate wrote #304174:

There is also mta_author_section which is very similar.

I am figuring out how to create a custom author page for each author on the site I am working on.

1) Going with a standard <txp:author escape=”“ link=“1” title=“1” /> works if you just want to reuse your homepage template. I don’t want to do that.

2) This works by manually creating an article in the author section and then linking to it via<txp:bos_author section=“author”/>. Except that you can only use section/title urls. I don’t want to do that, either.

I’m not sure I get it. If you want a page for each author in an “authors” section (the same I wanted when I wrote the plugin), why shouldn’t you want a section/title url? What am I missing?

Offline

#29 2017-02-21 17:19:35

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: bos_author - author url customization...

Zanza wrote #304177:

I’m not sure I get it. If you want a page for each author in an “authors” section (the same I wanted when I wrote the plugin), why shouldn’t you want a section/title url? What am I missing?

I was trying to stick to the Google News inclusion guidelines – which used to encourage a 3-digit serial number. But perhaps it isn’t worth bothering with anymore.

Offline

#30 2017-02-21 17:38:09

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: bos_author - author url customization...

Useful information:

Firstly, don’t make a section called author as that’ll probably break things. But you probably figured that out already :-) – Bloke

Strangely, I hadn’t seen this mentioned anywhere else. I changed author to contributor and that made the 404 go away.

Offline

Board footer

Powered by FluxBB