Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] ob1_title
Just need to fix the international chars to upper/lower/etc “bug” in PHP and it’ll be 1.0 and done (if no requests for features are made that is [hint, hint] ;).
If anyone has a way of doing the above I’d be happy to get the info.
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
Re: [plugin] [ORPHAN] ob1_title
Version 1.0 is out with the casechanging “bug” for international chars that had been encoded removed. Or rather, I created another plugin to handle it.
Due note that you need version 1.0 of ob1_title to be able to run ob1_changecase
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
Re: [plugin] [ORPHAN] ob1_title
If you have downloaded the v1.0 prior to now redownload it since it had a bug in it and I’m too tired to release a whole new version for it to get fixed ;)
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
#19 2004-09-28 17:20:04
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: [plugin] [ORPHAN] ob1_title
If this is used on a homepage with showsections, there is no way to keep it from outputting:
“Site title [separator] default”
This seems to have fixed it for me at least (line 54):
<pre>if ($showsection) {</pre>
-›
<pre>if ($showsection && $pageSection!=‘default’ && $section!=‘default’) {</pre>
Also, I haven’t been able to get it to output categories at all, even after explicitly giving <code>showcategories=“1”</code>. It seems that the version currently online doesn’t ever define <code>$category</code>. Adding this line to the init fixes it:
<pre>$category = $_GET[‘c’];</pre>
It’d also be nice if it were possible to do something similar to what tcm_crumbs does with Section aliases (“replacements”), so I can have them display a different way than strictly how the section is named. For instance, a section ‘html’ output to read ‘HTML’ and ‘javascript’ as ‘JavaScript’.
One last thing, is there any control as to where the category name is output in the title order? As of now, it always outputs directly after the sitename, before the section. Category should output after section.
I just moved this line to follow the if->else statements in the ‘order’ definition area (~lines 50/64) and now it seems to make more sense.
<pre>$toReturn .= (strlen($category)>0&&$showcategory) ? $separator.$category : ‘’;</pre>
Cheers ;-)
Last edited by compooter (2004-09-28 18:05:46)
Offline
Re: [plugin] [ORPHAN] ob1_title
> compooter wrote:
> Also, I haven’t been able to get it to output categories at all, even after explicitly giving <code>showcategories=“1”</code>.
Damn! It took me 40 minutes of testing just to find it was not my mistake! Where am I supposed to add the suggested code, compooter? Thanks…
Last edited by Boby Dimitrov (2004-09-29 13:45:45)
Offline
#21 2004-09-29 15:13:46
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: [plugin] [ORPHAN] ob1_title
Well, it looks as though the global variable $c has already been called into the namespace, just not set. So either the $c or the querystring $_GET[‘c’] value could be used. It can be placed anywhere before the plugin starts doing its magic; I just stuck it before the $site & $fetchID definitions.
<pre> $category = $c; // or $_GET[‘c] $site = $sitename; $fetchID = “”;</pre>
Offline
Re: [plugin] [ORPHAN] ob1_title
Did an update to fix the category not coming out. And also altered the order which means category after section which is, ofcourse, the correct way.
Regarding that about aliases I am thinking of implementing support for that section alias plugin. Is that enough or?
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
#23 2004-09-29 20:54:59
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: [plugin] [ORPHAN] ob1_title
That’d work for me :) Thx
Offline
Re: [plugin] [ORPHAN] ob1_title
Now I just gotta learn how it works then :)
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
Re: [plugin] [ORPHAN] ob1_title
Fixed.
Now supports any name set through the spc_section_alias plugin.
Last edited by obeewan (2004-09-29 21:22:08)
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
Re: [plugin] [ORPHAN] ob1_title
<del>Hmm .. I forgot to fix the default output “bug”. I’ll check up on that later.</del>
<ins>Later is now. Fixed.</ins>
Last edited by obeewan (2004-09-29 22:34:28)
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
Re: [plugin] [ORPHAN] ob1_title
Ah, thanks! Works just fine!
A side question – is there a way to display:
Sitename – Category – Articletitle
When browsing a single article?
Offline
Re: [plugin] [ORPHAN] ob1_title
I am thinking of in the upcoming release have a way for the user to set their own order.
Boby,
That should be doable, try:
<code><txp:ob1_title showcategory=“1” /></code>
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
#29 2004-10-01 10:36:23
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] ob1_title
obeewan, thanks for the plugin
I’ve got the spc_section_alias plugin installed and working on my pages. But ob1_title is displaying just the section, not the alias.
is there an attribute for having the alias displayed?
…
I have a “section-prefix” form, with e.g.
<code><txp:spc_section_alias
section=“default”
name=“this is the home page”
description=“page home this is” /></code>
…
thanks
Offline
Re: [plugin] [ORPHAN] ob1_title
> compooter wrote:
> If this is used on a homepage with showsections, there is no way to keep it from outputting:
>“Site title [separator] default”
Hm, my problem is when I’m looking at the default (home) page, I get this as a title:
“Site title [separator] “ (separator is “-”)
Is there a way to not show this trailing separator, as it just doesn’t look good. “My blog – Mozilla Firefox” is better than “My blog – - Mozilla Firefox”, imo :)
Offline