Add Title variable

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Add Title variable

Post by Dragosvr92 »

Hello,

In my opinion the variables that generate the title are too long.
This is the original line from the RC2:

Code: Select all

<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title> 
I think all this should be better placed in a PHP file, and use something like this:

Code: Select all

<title>{FORUM_TITLE}</title>
Or, we could add the first line of code i posted into a javascript var and output it as FORUM_TITLE
Previous user: TheKiller
Avatar on Memberlist 1.0.3

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: Add Title variable

Post by ecwpa »

I believe this was requested and approved, see this thread. Not sure about the IF condition for MCP.
Slightly better English than it was in 2005, still improving :D

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Add Title variable

Post by Dragosvr92 »

I dont think it is the same thing that i request.
I am requesting this because i want the title variable to be simpe and easy. It should be configurated from other places.. JS or PHP.
If you want to output the title somewhere you will have to place all those template statements etc again.. Would be alot prettyer to add a single variable that outputs the title :)
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Add Title variable

Post by Arty »

There is such variable: {PAGE_TITLE}
Other parts of default title are optional

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Add Title variable

Post by callumacrae »

Arty wrote:There is such variable: {PAGE_TITLE}
Other parts of default title are optional
On my mobile skin, I don't use the full title. Having it longer allows more flexibility for the style author.
Made by developers, for developers!
My blog

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Add Title variable

Post by Dragosvr92 »

callumacrae wrote:
Arty wrote:There is such variable: {PAGE_TITLE}
Other parts of default title are optional
On my mobile skin, I don't use the full title. Having it longer allows more flexibility for the style author.
And to do that i guess that you have alot of IF Statements inside the HTML Title tag.
Wouldnt it look prettier if you could configure the title from a other place other than overall_header.html, and have just <title>{FORUM_TITLE}</title>, which will output all the titles, forum title, page title etc... ?
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Add Title variable

Post by imkingdavid »

Ultimately, I don't see the real benefit other than personal preference. IMO, having the structure of the title in the HTML is better than moving it into page_header(), since I'd think most users would expect to find structure in the HTML rather than the PHP. Ultimately, I think it's best in most situations to use PHP to grab the data and inject it into the template for structure and format than to do all of the work on the PHP side.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Add Title variable

Post by Dragosvr92 »

What if we add the html if statements in a javascript variable and we output it into the title tag?
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Add Title variable

Post by callumacrae »

TheKiller wrote:What if we add the html if statements in a javascript variable and we output it into the title tag?
That sounds entirely pointless and horrifically unclean
Made by developers, for developers!
My blog

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Add Title variable

Post by DavidIQ »

:shock:
So users with JavaScript disabled don't get a page title?
Image

Post Reply