Posted on: 09/17/09 03:21am
By: Pushkar
Hi! Please help me, how to make a topic name to display as title of page?
Now in any of my forum topics the titles is a name of forum
Thanks
Re: Forum topic title
Posted on: 09/17/09 03:27am
By: Dirk
Are you using the latest version of the Forum plugin (2.7.2)? This has been built in for a while now.
bye, Dirk
Re: Forum topic title
Posted on: 09/17/09 03:45am
By: Pushkar
Quote by: DirkAre you using the latest version of the Forum plugin (2.7.2)? This has been built in for a while now.
bye, Dirk
my forum version is 2.7.1
i need to update it?
If so then I did not find the manual "How to update from version 2.7.1 to 2.7.2"
Thank you
Re: Forum topic title
Posted on: 09/17/09 04:03am
By: Dirk
2.7.2 was a
security update[*1] , so you should update ASAP anyway.
Just to confirm: You want things to work like they do here on geeklog.net? I thought this was already built in by now. If that's not the case, I can look up the required modifications.
bye, Dirk
Re: Forum topic title
Posted on: 09/17/09 06:37am
By: Pushkar
i'm sorry, my forum version is 2.7.2. i mean when displaying for that topic for example
http://5mv.ru/forum/viewtopic.php?showtopic=14[*2] (it's called "?????? ????? ????????? Schwinn Gremlin) that title of page will showing like "?????? ????? ????????? Schwinn Gremlin"
in the storytext.thtml it is {story_title}
another example: the name of that topic is "Forum topic title" and title too
How do I make it work on my forum?
sorry for my English
Re: Forum topic title
Posted on: 09/17/09 09:03am
By: ::Ben
Hello Pushkar,
Seems to be ok, your forum topic name is display as the title of page;
Anyway you've got a nice theme.
::Ben
Re: Forum topic title
Posted on: 09/17/09 09:17am
By: Pushkar
Quote by: cordisteHello Pushkar,
Seems to be ok, your forum topic name is display as the title of page;
Anyway you've got a nice theme.
::Ben
no, Cordiste. Still titles of topics is name and slogan of site :banghead:
Re: Forum topic title
Posted on: 09/17/09 09:34am
By: ::Ben
ok you are right.
portalparts forum only display site name and slogan too. Dirk how do you set this function on geeklog.net?
::Ben
Re: Forum topic title
Posted on: 09/17/09 03:34pm
By: Dirk
Okay, I had to download a fresh copy of the Forum to see what's wrong. Looks like a bug / oversight ...
In viewtopic.php, search for the first occurence of gf_siteHeader():
Text Formatted Code
// Display Common headers
gf_siteHeader();
//Check is anonymous users can access
That should read
Text Formatted Code
gf_siteHeader($subject);
I think that's everything that's required.
bye, Dirk
Re: Forum topic title
Posted on: 09/17/09 04:02pm
By: Pushkar
Quote by: DirkOkay, I had to download a fresh copy of the Forum to see what's wrong. Looks like a bug / oversight ...
In viewtopic.php, search for the first occurence of gf_siteHeader():
Text Formatted Code
// Display Common headers
gf_siteHeader();
//Check is anonymous users can access
That should read
Text Formatted Code
gf_siteHeader($subject);
I think that's everything that's required.
bye, Dirk
i make it but in the title still displaying site name and slogan
Re: Forum topic title
Posted on: 09/17/09 04:11pm
By: ::Ben
Something is missing. There is no use of parameter $subject in gf_siteHeader function
Text Formatted Code
function gf_siteHeader() {
global $CONF_FORUM;
// Display Common headers
if (!isset($CONF_FORUM['showblocks'])) $CONF_FORUM['showblocks'] = 'leftblocks';
if (!isset($CONF_FORUM['usermenu'])) $CONF_FORUM['usermenu'] = 'blockmenu';
if ($CONF_FORUM['showblocks'] == 'noblocks' OR $CONF_FORUM['showblocks'] == 'rightblocks') {
echo COM_siteHeader('none');
} elseif ($CONF_FORUM['showblocks'] == 'leftblocks' OR $CONF_FORUM['showblocks'] == 'allblocks' ) {
if ($CONF_FORUM['usermenu'] == 'blockmenu') {
echo COM_siteHeader( array('custom_showBlocks',$CONF_FORUM['leftblocks']) );
} else {
echo COM_siteHeader('menu');
}
} else {
echo COM_siteHeader();
}
}
::Ben
Re: Forum topic title
Posted on: 09/17/09 04:18pm
By: Dirk
Hmm, but that must be it. The only two differences between the file in the 2.7.2 archive and the one running here on geeklog.net are these:
Text Formatted Code
dirk@prospero:Downloads> diff -b -B -w viewtopic.php viewtopic-patched.php
79c79
< gf_siteHeader();
---
> gf_siteHeader($subject);
291c291
< $showtopicpid = $showtopics;
---
> $showtopicpid = $showtopic;
The second difference is something else entirely - not sure that piece of code is even used.
Anyone else have more luck?
bye, Dirk
Re: Forum topic title
Posted on: 09/17/09 04:24pm
By: ::Ben
Ok it is working with this code
Text Formatted Code
function gf_siteHeader($subject = '',$headercode='') {
global $CONF_FORUM;
// Display Common headers
if (!isset($CONF_FORUM['showblocks'])) $CONF_FORUM['showblocks'] = 'leftblocks';
if (!isset($CONF_FORUM['usermenu'])) $CONF_FORUM['usermenu'] = 'blockmenu';
if ($CONF_FORUM['showblocks'] == 'noblocks' OR $CONF_FORUM['showblocks'] == 'rightblocks') {
echo COM_siteHeader('none', $subject,$headercode);
} elseif ($CONF_FORUM['showblocks'] == 'leftblocks' OR $CONF_FORUM['showblocks'] == 'allblocks' ) {
if ($CONF_FORUM['usermenu'] == 'blockmenu') {
echo COM_siteHeader( array('forum_showBlocks',$CONF_FORUM['leftblocks']), $subject,$headercode );
} else {
echo COM_siteHeader('menu', $subject,$headercode);
}
} else {
echo COM_siteHeader('menu', $subject,$headercode);
}
}
::Ben
Re: Forum topic title
Posted on: 09/17/09 04:24pm
By: Dirk
Quote by: cordisteSomething is missing. There is no use of parameter $subject in gf_siteHeader function
Thanks, Ben. Here's our version:
Text Formatted Code
function gf_siteHeader($subject = '') {
global $CONF_FORUM;
// Display Common headers
if (!isset($CONF_FORUM['showblocks'])) $CONF_FORUM['showblocks'] = 'leftblocks';
if (!isset($CONF_FORUM['usermenu'])) $CONF_FORUM['usermenu'] = 'blockmenu';
if ($CONF_FORUM['showblocks'] == 'noblocks' OR $CONF_FORUM['showblocks'] == 'rightblocks') {
echo COM_siteHeader('none', $subject);
} elseif ($CONF_FORUM['showblocks'] == 'leftblocks' OR $CONF_FORUM['showblocks'] == 'allblocks' ) {
if ($CONF_FORUM['usermenu'] == 'blockmenu') {
echo COM_siteHeader( array('custom_showBlocks',$CONF_FORUM['leftblocks']), $subject );
} else {
echo COM_siteHeader('menu', $subject);
}
} else {
echo COM_siteHeader('menu', $subject);
}
}
Hope it works now ...
bye, Dirk
Re: Forum topic title
Posted on: 09/17/09 04:25pm
By: ::Ben
:chestslam:
::Ben
Re: Forum topic title
Posted on: 09/18/09 04:27am
By: Pushkar
Thanks, Ben! Your code is working, but when i used it, the left blocks doesn't displayed.
Thanks, Dirk! Your code is succesfully works! :banana: