| Pushkar |
 |
September 17 2009 03:21 AM (Read 2320 times) |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
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
|
| |
|
|
| Dirk |
 |
September 17 2009 03:27 AM |
|
|

Admin
 Status: offline
Registered: 01/12/02
Posts: 12713
|
Are you using the latest version of the Forum plugin (2.7.2)? This has been built in for a while now.
bye, Dirk
|
| |
|
|
| Pushkar |
 |
September 17 2009 03:45 AM |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
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
|
| |
|
|
| Dirk |
 |
September 17 2009 04:03 AM |
|
|

Admin
 Status: offline
Registered: 01/12/02
Posts: 12713
|
2.7.2 was a security update, 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
|
| |
|
|
| Pushkar |
 |
September 17 2009 06:37 AM |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
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 (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
|
| |
|
|
| cordiste |
 |
September 17 2009 09:03 AM |
|
|

Full Member
 Status: offline
Registered: 01/14/05
Posts: 772
|
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
Support and French community | http://geeklog.fr
|
| |
|
|
| Pushkar |
 |
September 17 2009 09:17 AM |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
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
|
| |
|
|
| cordiste |
 |
September 17 2009 09:34 AM |
|
|

Full Member
 Status: offline
Registered: 01/14/05
Posts: 772
|
ok you are right.
portalparts forum only display site name and slogan too. Dirk how do you set this function on geeklog.net?
::Ben
Support and French community | http://geeklog.fr
|
| |
|
|
| Dirk |
 |
September 17 2009 15:34 PM |
|
|

Admin
 Status: offline
Registered: 01/12/02
Posts: 12713
|
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(): PHP Formatted Code // Display Common headers
gf_siteHeader ();
//Check is anonymous users can access
That should read PHP Formatted Code gf_siteHeader ($subject);
I think that's everything that's required.
bye, Dirk
|
| |
|
|
| Pushkar |
 |
September 17 2009 16:02 PM |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
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(): PHP Formatted Code // Display Common headers
gf_siteHeader ();
//Check is anonymous users can access
That should read PHP 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
|
| |
|
|
| cordiste |
 |
September 17 2009 16:11 PM |
|
|

Full Member
 Status: offline
Registered: 01/14/05
Posts: 772
|
Something is missing. There is no use of parameter $subject in gf_siteHeader function
PHP 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
Support and French community | http://geeklog.fr
|
| |
|
|
| Dirk |
 |
September 17 2009 16:18 PM |
|
|

Admin
 Status: offline
Registered: 01/12/02
Posts: 12713
|
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: PHP 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
|
| |
|
|
| cordiste |
 |
September 17 2009 16:24 PM |
|
|

Full Member
 Status: offline
Registered: 01/14/05
Posts: 772
|
Ok it is working with this code
PHP 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
Support and French community | http://geeklog.fr
|
| |
|
|
| Dirk |
 |
September 17 2009 16:24 PM |
|
|

Admin
 Status: offline
Registered: 01/12/02
Posts: 12713
|
Quote by: cordisteSomething is missing. There is no use of parameter $subject in gf_siteHeader function
Thanks, Ben. Here's our version:
PHP 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
|
| |
|
|
| cordiste |
 |
September 17 2009 16:25 PM |
|
|

Full Member
 Status: offline
Registered: 01/14/05
Posts: 772
|
::Ben
Support and French community | http://geeklog.fr
|
| |
|
|
| Pushkar |
 |
September 18 2009 04:27 AM |
|
|

Regular Poster
 Status: offline
Registered: 04/14/09
Posts: 70
|
Thanks, Ben! Your code is working, but when i used it, the left blocks doesn't displayed.
Thanks, Dirk! Your code is succesfully works!
|
| |
|
|