Welcome, Guest. Please Login or Register.
May 02, 2025, 12:20:53 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Having trouble setting title « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Having trouble setting title  (Read 450 times)
Jedi~
Eric
Beta Tester
YaBB God
*****
Posts: 1284


WWW
Having trouble setting title
« on: May 06, 2002, 10:49:18 PM »
Reply with quote

Ok, I have a function, and I'd like to set the title for that function (like the other main functions do), I globalize $yyboardname and $yytitle and I set yytitle to yyboardname, then call template_header() right after that, but it still shows the URL as the title rather than the boardname. What am I doing wrong?

function index() {
   global $db_prefix, $txt, $pptxt, $logo, $pphome, $yytitle, $yyboardname;

   $yytitle = "$yyboardname";
      
   template_header();
   
   echo("$pptext[18] <BR>");
   include("$pphome/index.php?action=news;board=4");
   
   footer();
   obExit();
   }
Logged
Darkshady
Noobie
*
Posts: 40


I'm a llama!

Re:Having trouble setting title
« Reply #1 on: May 07, 2002, 07:50:45 PM »
Reply with quote

In settings.php it has $mbname set to ur boardname so just include settings.php and use $mbname
Logged
Jedi~
Eric
Beta Tester
YaBB God
*****
Posts: 1284


WWW
Re:Having trouble setting title
« Reply #2 on: May 07, 2002, 08:01:47 PM »
Reply with quote

That's not exactly the point though, it doesn't set the title no matter what, I have tried this with no success.
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Having trouble setting title
« Reply #3 on: May 07, 2002, 08:55:00 PM »
Reply with quote

There is no need to globalise those functions.
I just used:
   $yytitle = "$asmtxt[21]";
for my title in the smilies mod, and it set it to $asmtxt[21] in english.lng.  ;)
Logged

PHPNews has been released!!! Download it now!!!
Jedi~
Eric
Beta Tester
YaBB God
*****
Posts: 1284


WWW
Re:Having trouble setting title
« Reply #4 on: May 07, 2002, 09:21:24 PM »
Reply with quote

My point is that it DOESNT. Whether it's globalized or not, it keeps the URL as the title, not what I have it set to.
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Having trouble setting title
« Reply #5 on: May 07, 2002, 09:32:59 PM »
Reply with quote

lol. Then print <title></title> and the var in between!
Still, I don't know why what your saying wont work..
Logged

PHPNews has been released!!! Download it now!!!
Jedi~
Eric
Beta Tester
YaBB God
*****
Posts: 1284


WWW
Re:Having trouble setting title
« Reply #6 on: May 07, 2002, 09:44:29 PM »
Reply with quote

Not to be rude, but it's not that hard.
What I'm saying is that when I set yytitle to anything, it doesn't set the title of the page (in the browser window at the top) to what I have set it too. It simply shows the URL.
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Having trouble setting title
« Reply #7 on: May 07, 2002, 09:56:21 PM »
Reply with quote

Why not use the function as a txt variable? It works that way, no need to use yyboardname, still I don't see why it wont work.

BTW, if its not that hard how come you dont know?
Logged

PHPNews has been released!!! Download it now!!!
Darkshady
Noobie
*
Posts: 40


I'm a llama!

Re:Having trouble setting title
« Reply #8 on: May 07, 2002, 09:57:18 PM »
Reply with quote

can you post the code around where $$yytitle is.
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Having trouble setting title
« Reply #9 on: May 07, 2002, 10:00:57 PM »
Reply with quote

its a function in subs.php  ;)
Logged

PHPNews has been released!!! Download it now!!!
Jedi~
Eric
Beta Tester
YaBB God
*****
Posts: 1284


WWW
Re:Having trouble setting title
« Reply #10 on: May 07, 2002, 10:05:33 PM »
Reply with quote

Hmm.. I tried setting it hardcoded and it works, that's really wierd.

And yytitle is a variable not a function ;)
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Having trouble setting title « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.023 seconds with 20 queries.