Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 06:35 am EDT

Geeklog Forums

Forum topic title


Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Are you using the latest version of the Forum plugin (2.7.2)? This has been built in for a while now.

bye, Dirk
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Quote 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



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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
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 Oops!
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Quote by: cordiste

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



no, Cordiste. Still titles of topics is name and slogan of site :banghead:
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
ok you are right.

portalparts forum only display site name and slogan too. Dirk how do you set this function on geeklog.net?

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Quote 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



i make it but in the title still displaying site name and slogan Cry
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: cordiste

Something 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
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
:chestslam:

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Pushkar

Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Big Grin 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:
 Quote

All times are EDT. The time is now 06:35 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content