User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

Stats

  • *Total Members: 4010
  • *Latest: kuki78

  • *Total Posts: 15656
  • *Total Topics: 2322
  • *Online Today: 23
  • *Most Online: 157
(27 Aug 09, 03:54:53)
  • *Users: 0
  • *Guests: 16
  • *Total: 16

Author Topic: Block title instead of Page name  (Read 1601 times)

0 Members and 1 Guest are viewing this topic.

Offline codebirth

  • PortaMx Supporter
  • *
  • Posts: 263
  • Gender: Male
  • Dark Knight
    • My SMF 2.0 related site
Block title instead of Page name
« on: 04 Jan 10, 23:22:15 »
Hello,

This is not really a feature but something esthetic. It would be possible to show the Block title instead of the Page name on the navigation menu and the browser title bar when you are browsing a Page block?



That way it could show Forum Stats instead of forumstats and if your forum is multi-language and you have a Block title set for each language it would look better in my opinion.

What do you think?

c o d e b i r t h
http://codebirth.com/smf

Offline antechinus

  • PortaMx Supporter
  • *
  • Posts: 677
Re: Block title instead of Page name
« Reply #1 on: 04 Jan 10, 23:30:12 »
Nice idea. ;)
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

Offline jan.s

  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • malawisee.net
Re: Block title instead of Page name
« Reply #2 on: 04 Jan 10, 23:31:44 »
ok for single pages.
but for pages with multiple blocks?
gruss
jan


Ich bin ein grosszügiger Mensch. Jeder darf meiner Meinung sein. ;D

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5224
  • Gender: Female
Re: Block title instead of Page name
« Reply #3 on: 05 Jan 10, 00:52:39 »
That problem is a little bit bigger ...
At the time to fill in the linktree and header title, the block object is not created and so I can't get the block title.
More problem we have on mutiple pages, while you view x pages with the same request.
As example here: index.php?download shows 2 pages, the download header and the stats block.
So I think, this is not practicable.
What we can do is a formed linktree ...
forum_stats -> Forum Stats
or
download.pmxblog -> Download Pmxblog

so we replace the underline and dot with a blank, the first char and the char after a blank to Uppercase

Fel

Many are stubborn in relation to the path, a few in relation to the target.

Offline codebirth

  • PortaMx Supporter
  • *
  • Posts: 263
  • Gender: Male
  • Dark Knight
    • My SMF 2.0 related site
Re: Block title instead of Page name
« Reply #4 on: 05 Jan 10, 02:36:20 »
Thanks for the explanation Fel. I see is not practical to get the block title before the linktree is created. The formed linktree is a great solution, only problem is that doesn't support multi-language...

Since I need multi-language support on the site I'm working on but don't plan to create new pages very often, I will use this solution:

I have added these text strings to index.language.php

Code: [Select]
// PortaMx Pages
$txt['pmxpage_advertising'] = 'Advertising';
$txt['pmxpage_contact'] = 'Contact';
$txt['pmxpage_legal'] = 'Legal';

and in PortaMx.php I have replaced this:

Code: [Select]
else
$context['linktree'] = array_merge(array($pmxhome), array($pmxforum), $context['linktree']);

by this:

Code: [Select]
else
{
if (isset($txt['pmxpage_'.$pmxforum['name']]))
$pmxforum['name'] = $txt['pmxpage_'.$pmxforum['name']];
$context['linktree'] = array_merge(array($pmxhome), array($pmxforum), $context['linktree']);
}

Not very practical if you need to add pages constantly but it works for me. In the worst case it will still show the page name.

c o d e b i r t h
http://codebirth.com/smf

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5224
  • Gender: Female
Re: Block title instead of Page name
« Reply #5 on: 05 Jan 10, 20:34:55 »
Ok .. I will have a eye on this thema for the next release ...

Fel
Many are stubborn in relation to the path, a few in relation to the target.