1
tatane
Publisher and onglet
  • 2012/6/15 13:38

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


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

Look
Resized Image


thank you

2
Mamba
Re: Publisher and onglet
  • 2012/6/15 15:34

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


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

3
tatane
Re: Publisher and onglet
  • 2012/6/15 15:40

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


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

4
tatane
Re: Publisher and onglet
  • 2012/6/18 16:35

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


up

5
Mamba
Re: Publisher and onglet
  • 2012/6/18 19:19

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


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

6
tatane
Re: Publisher and onglet
  • 2012/6/19 14:10

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


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.

7
Mamba
Re: Publisher and onglet
  • 2012/6/19 14:41

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


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

8
tatane
Re: Publisher and onglet
  • 2012/6/19 14:47

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


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

9
Mamba
Re: Publisher and onglet
  • 2012/6/19 15:46

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


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

10
tatane
Re: Publisher and onglet
  • 2012/6/19 16:15

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


is work , thank

Login

Who's Online

230 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 230


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits