|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
Not exactly a "new members" question, but probably fits in here best...
Anyway, I'd like to change the titles of the ultimatebb.cgi page and the forum thread listing pages, and I'm having some problems... Namely, I can't seem to find any separation for these sections in public_common.pl, or even for threads themselves. If I add some text to the first title tag in public_common.pl, it'll display that on every single page, from the forum summary, to thread listing and actual posts themselves. I'd like to prevent it from showing on the thread pages, however, since these will generally have long titles already anyway, and the text I'm hacking in wouldn't show whole, so it'd look lame having it there.
In short, is there a way to add some text to the title tags on ultimatebb.cgi and the thread listing pages for forums, and if, how can I do it? Thanks.
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
You have two options.
First, you can alter the calls to generic_wrapper to include a page_title (or page_name...) for each of the pages you wish to modify.
Or second, you can modify generic_wrapper to twiddle with the page title as needed, which'll be a bit more on the complex side.
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
I'm afraid you've lost me there - I'm not that familiar with UBB's code to know where to look for that, or what exactly the page_title/page_name difference is... could you give me some specific instructions here please? Just putting the text in the title of ultimatebb.cgi would already work for me, the forum threads listing pages would just be a bonus. Happy Holidays!
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Bah, slacker! generic_wrapper is the name of the sub in public_common that's responsible for the generation of most of the top of the page. "Top of the page" generally means just the actual visible HTML, but it can also set the page title. Most generic_wrapper calls are in templates. For example, the one for the forum summary is in public_forum_summary. Real shocker there. page_name and page_title? page_title is only the title tag. page_name, if set, is BOTH the title tag AND the name of the page in the breadcrumbs (if no other breadcrumb is specified). The two are often the same... but not always. Compare the generic_wrapper call on line 20 of public_forum_page with the generic_wrapper call on line 10 of public_forum_summary for varying arguments, etc.
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
I've been away for a few days so I couldn't reply sooner...
Regarding page_title/page_name difference; ok, that makes sense... I'll want to edit page_title then.
However, after comparing those two templates, I still have no idea how to force a certain title for a specific page... There's no such thing done there so I could extrapolate from, as far as I can see.
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
Pretty please, with a cherry on top?
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Mmm, cherries. If you want to change the title for a page, change the template that generates the page. Yes, it's really that simple. Be sure to clear the cache after each change, of course.
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
Did I mention that I couldn't find a specific template for ultimatebb.cgi to edit? I've looked everywhere and couldn't find it, so please point me in the right direction...
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
public_forum_summary. Sorry, too subtle above. (There's no one-to-one correlation for scripts and templates.)
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
Ok... so I'm guessing I should be editing this here: my $hf = &generic_wrapper({ page_title => "", before_navbar => qq~</font></td><td align="right"> But how exactly? I want to simply insert a chunk of my own text after the existing page title text.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I believe you'd add it here, wouldn't you?
page_title => "",
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
page_title => "Gizmo is Bestest!",
|
|
|
|
Joined: Mar 2001
Posts: 172
Member
|
Member
Joined: Mar 2001
Posts: 172 |
Oh.... I assumed that'd change the entire page title (which I don't want). I'll give it a try, thanks.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|