xoops forums

tatane

Just can't stay away
Posted on: 2012/6/15 13:38
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#1

Publisher and onglet

Hello
In the module publisher, where is the place where the text is displayed in the tab

Look
Resized Image


thank you

Mamba

Moderator
Posted on: 2012/6/15 15:34
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#2

Re: Publisher and onglet

Tatane, it will always help to post in English here.

The "Publisher" is the name of your module. Changed the name, for example to "Tatane", and it will show:

Test - Cat1 - Tatane - XOOPS

The Structure is as follow:

[Article name] - [Category name] - [Module name] - [Site name]
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

tatane

Just can't stay away
Posted on: 2012/6/15 15:40
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#3

Re: Publisher and onglet

sorry I have not taken the right translation file lol
So for publisher I would remove [Category name] - [module name] tab

tatane

Just can't stay away
Posted on: 2012/6/18 16:35
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#4

Re: Publisher and onglet

up

Mamba

Moderator
Posted on: 2012/6/18 19:19
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#5

Re: Publisher and onglet

Tatane, did you try to find it? What steps did you take, and where did you get stuck?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

tatane

Just can't stay away
Posted on: 2012/6/19 14:10
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#6

Re: Publisher and onglet

Quote:

Mamba wrote:
Tatane, did you try to find it? What steps did you take, and where did you get stuck?

If I post my question on the forum is because I did not find. I'm not one to post questions without first doing research.

Mamba

Moderator
Posted on: 2012/6/19 14:41
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#7

Re: Publisher and onglet

Sure, but you can share your research, so it will make it easier for us.

If there are 10 potential ways to fix it, and you've already explored 5 and it didn't work, then I have to focus only on the remaining 5, which saves me time.

Otherwise, I have to explore all 10 of them.

Of course, there are people who look at the problem and know exactly in which line of code it should be fixed because they memorized the whole XOOPS code base. Unfortunately I am not one of them
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

tatane

Just can't stay away
Posted on: 2012/6/19 14:47
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#8

Re: Publisher and onglet

1 - I have reviewed the file header.php and index.php but I have not found
2 - I did a search in PHP files with the word title but I did not find either

Mamba

Moderator
Posted on: 2012/6/19 15:46
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#9

Re: Publisher and onglet

Thanks, Tatane, that was helpful.

That's what I did:

* The text for Tab was coming from the "Title", and I could see it viewing the page's source:

<title>Article Category Publisher XOOPS Site</title>

* Since you've already looked for Title and couldn't find it, I looked for the other element right above it:

<!-- MetasTitles, and Style Sheets -->

I couldn't find it in /publisher, but it had to come from somewhere, so I searched the whole XOOPS installation, and I found it in each theme.html file.

* The title had to be generated from this line:

<{includeq file="$theme_name/xometas.html"}>

* Looking at xometas.html, the line of interest was:

<title><{if $xoops_pagetitle !=''}><{$xoops_pagetitle}> : <{/if}><{$xoops_sitename}></title>

Obviously, $xoops_pagetitle was the variable that was creating the "title"

* So the next step was to search for "xoops_pagetitle", to see how it is being generated. It is in /class/metagen.php

* The line of interest was:

if ($this->_title != '') {$xoopsTpl->assign('xoops_pagetitle'$this->_title);
}

where $xoops_pagetitle was assigned the value of "this->title".

* Now the question was how the "title" was created?

The answer was in the function:

function setTitle($title) {
        
$this->_title $this->html2text($title);
        
$this->_original_title $this->_title;

        
$titleTag = array();

        
$titleTag['module'] = $this->publisher->getModule()->getVar('name');

        if (isset(
$this->_title) && ($this->_title != '') && (strtoupper($this->_title) != strtoupper($titleTag['module']))) {
            
$titleTag['title'] = $this->_title;
        }

        if (isset(
$this->_categoryPath) && ($this->_categoryPath != '')) {
            
$titleTag['category'] = $this->_categoryPath;
        }

        
$ret = isset($titleTag['title']) ? $titleTag['title'] : '';

        if (isset(
$titleTag['category']) && $titleTag['category'] != '') {
            if (
$ret != '') {
                
$ret .= ' - ';
            }
            
$ret .= $titleTag['category'];
        }

        if (isset(
$titleTag['module']) && $titleTag['module'] != '') {
            if (
$ret != '') {
                
$ret .= ' - ';
            }
            
$ret .= $titleTag['module'];
        }

        
$this->_title $ret;
    }

* Since you didn't want to have the "category" and "Publisher" (as module name):

Quote:
<title>Article - Category - Publisher : XOOPS Site</title>

we needed to comment out these two parts from the code above:

//        if (isset($titleTag['category']) && $titleTag['category'] != '') {
//            if ($ret != '') {
//                $ret .= ' - ';
//            }
//            $ret .= $titleTag['category'];
//        }
//
//        if (isset($titleTag['module']) && $titleTag['module'] != '') {
//            if ($ret != '') {
//                $ret .= ' - ';
//            }
//            $ret .= $titleTag['module'];
//        }

and as a result you have now:


<title>Article XOOPS Site</title>

Which I hope, it's what you wanted.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

tatane

Just can't stay away
Posted on: 2012/6/19 16:15
tatane
tatane (Show more)
Just can't stay away
Posts: 649
Since: 2008/5/6 1
#10

Re: Publisher and onglet

is work , thank