Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#121 2006-10-19 16:57:54
Re: [plugin] [ORPHAN] ob1_title
I haven’t been present for some time I see .. I got some spare time and ofcourse miss the TXP community. I’ll devour the knowledge I need and see if I can prep it TXP4.+ ready.
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#122 2006-10-20 06:50:26
Re: [plugin] [ORPHAN] ob1_title
I know this will probably be of no use, but…
Adding this (from 1.4 code, with a bit of variable name copy-paste):
<pre> // Check if the section alias plugin is available, if so, see if the
// section has a name, otherwise use default
if( is_callable( spc_section_alias_name ) ) {
$ob1SectionName = spc_section_alias_name(
array( “section”=>$s, “group”=>“1”)
);
if( strlen( $ob1SectionName ) == 0
and $b != “default” ) {
$ob1SectionName = $s;
}
}else{
$ob1SectionName = $s;
} </pre>
Before this (in 2.2 code):
<pre> $order = preg_replace($ob1PatternSection,$ob1SectionName,$order);</pre>
Makes it work, but obviously for a single group only :) I’ve hacked it this way for my blog, but now I seem to use more than one group and dunno how to pass the group as a parameter of the ob1_title tag…
Last edited by Boby Dimitrov (2006-10-20 06:51:03)
Offline
#123 2006-10-28 15:26:24
Re: [plugin] [ORPHAN] ob1_title
can’t get this plugin to work in 4.04, not sure if its supposed to, probably not
Regardless, by not using the <txp:page_title /> tag altogether, I can have more control over my title than is possible with this plugin by using <txp:if… > tags, along with a lot of other tags that create the individual elements I want included in my title, all within my <txp:title> tag, and I have full control over the arrangement of the elements, as well as special character separators, as in this example:
<txp:if_section name=”“>
<title><txp:sitename />: <txp:site_slogan /></title>
<txp:else />
<title><txp:if_individual_article>
<txp:sitename /> | <txp:page_url type=“s”/> » <txp:title />
</txp:if_individual_article>
<txp:if_article_list>
<txp:sitename /> | <txp:page_url type=“s”/>
</txp:if_article_list>
</title>
</txp:if_section>
Granted it makes your header a lot bigger, but does that really even matter? For me its all about the end result.
Last edited by aswihart (2006-10-28 16:10:37)
Offline
#124 2006-10-28 16:35:53
Re: [plugin] [ORPHAN] ob1_title
Great replacement. I was using something similar, but more basic, so thanks for the snippet :)
snip snip
Offline
#125 2006-10-28 17:20:47
Re: [plugin] [ORPHAN] ob1_title
aswihart wrote:
can’t get this plugin to work in 4.04, not sure if its supposed to, probably not
Regardless, by not using the <txp:page_title /> tag altogether, I can have more control over my title than is possible with this plugin by using <txp:if… > tags, along with a lot of other tags that create the individual elements I want included in my title, all within my <txp:title> tag, and I have full control over the arrangement of the elements, as well as special character separators, as in this example:
<txp:if_section name=”“>
<title><txp:sitename />: <txp:site_slogan /></title>
<txp:else />
<title><txp:if_individual_article>
<txp:sitename /> | <txp:page_url type=“s”/> » <txp:title />
</txp:if_individual_article>
<txp:if_article_list>
<txp:sitename /> | <txp:page_url type=“s”/>
</txp:if_article_list>
</title>
</txp:if_section>
Granted it makes your header a lot bigger, but does that really even matter? For me its all about the end result.
This is very good aswihart maybe you should also post it on How-tos and examples as it may be of use to a lot of people.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#126 2006-10-29 14:58:10
Re: [plugin] [ORPHAN] ob1_title
Glad you guys found my example useful. Granted all I did was rip the code from the default page and put it up in the head. I’ll post it to Textbook after I get an account, the how-to forum just went read-only as of yesterday.
Last edited by aswihart (2006-10-29 17:21:27)
Offline
#127 2007-02-05 11:37:36
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: [plugin] [ORPHAN] ob1_title
Hello, Obeewan,
I’d love to use this. Do you have an update for us yet?
Offline
#128 2007-09-02 22:02:31
Re: [plugin] [ORPHAN] ob1_title
Good day to you all people.
This plugin has now been updated to fix the bugs in it and for full TXP 4.x support. And it, of course, produces no errors.
Bug reports are as always appreciated.
See the first post of this thread for links.
Edit:
Hmm .. Missed the slogan request though. Shouldn’t be that hard to add in future releases.
Last edited by obeewan (2007-09-02 22:08:12)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#129 2007-09-02 23:18:40
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] ob1_title
That loosks obwonderfull. The code looks pretty too, with the syntax highlighting. Will check out in the nxt couple days.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#130 2007-09-03 08:47:13
Re: [plugin] [ORPHAN] ob1_title
Does it have a section alias plugin support / integration, or do I have to hack it again, as I did with 2.2? Thanks!
Offline
#131 2007-09-03 13:42:40
Re: [plugin] [ORPHAN] ob1_title
Does it have a section alias plugin support / integration, or do I have to hack it again, as I did with 2.2? Thanks!
If you are referring to the section title set it gets that one. If something else, please elaborate.
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#132 2007-09-03 13:55:22
Re: [plugin] [ORPHAN] ob1_title
Erm, sorry, but I don’t really understand your answer…
A while back I used some code from v1.4 of ob1_title into v2.2, so I can get some support of the spc_section_alias, which was lacking in 2.2, but it was present (to some extent) in 1.4.
So now I have a “hacked” ob1_title v2.2 that supports spc_section_alias. Looking at the code of 4.0b, it does not look like it has any support for spc_section_alias. So that’s what I was asking – if I dump my hacked 2.2 and use 4.0b instead, will it work with spc_section_alias?
Last edited by Boby Dimitrov (2007-09-03 13:55:43)
Offline