Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.
Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

Stats

  • *Total Members: 4319
  • *Latest: thygrim

  • *Total Posts: 15775
  • *Total Topics: 2381
  • *Online Today: 3
  • *Most Online: 157
(27.08.09, 03:54:53)
  • *Users: 1
  • *Guests: 2
  • *Total: 3

Author Topic: Remove site name  (Read 2444 times)

0 Members and 0 Guests are viewing this topic.

Offline BurakG

  • PortaMx Language
  • *
  • Posts: 240
  • Gender: Male
Remove site name
« on: 02.02.12, 08:20:10 »
Hi,

Is it possible to remove site name from an article's and category's page title and description ?

Currently I have ;

Code: [Select]
<meta name="description" content="Mazda Club TR - Mazda sevenlerin buluşma noktası - Yeni Mazda2" />
<title>Mazda Club TR - Mazda sevenlerin buluşma noktası - Yeni Mazda2</title>

I believe it would be better if we have it this way

Code: [Select]
<meta name="description" content="Yeni Mazda2" />
<title>Yeni Mazda2</title>
Destiny. The design is clearly Ancient ..

http://www.mazdaclubtr.com
http://www.subaruclubtr.com

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Remove site name
« Reply #1 on: 02.02.12, 12:41:26 »
The page title is given by that what you setup.
But .. you can make manually changes in PortaMx.php ... beginning at the line ~322
Many are stubborn in relation to the path, a few in relation to the target.

Offline BurakG

  • PortaMx Language
  • *
  • Posts: 240
  • Gender: Male
Re: Remove site name
« Reply #2 on: 02.02.12, 12:45:53 »
The page title is given by that what you setup.
But .. you can make manually changes in PortaMx.php ... beginning at the line ~322

Fel, I know the string comes from the setup, what I am asking is how can 'forum_name' be removed from article and category page title and description ?
Destiny. The design is clearly Ancient ..

http://www.mazdaclubtr.com
http://www.subaruclubtr.com

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Remove site name
« Reply #3 on: 02.02.12, 23:31:28 »
In PortaMx.php ...
find:
Code: [Select]
if(array_key_exists('art', $context['pmx']['pagenames']))
{
$context['page_title'] .= ' - '. $context['pmx']['pagenames']['art'];
if(array_key_exists('child', $context['pmx']['pagenames']))
$pmxforum[] = array('url' => $scripturl . '?cat='. $_GET['cat'] .';child='. $_GET['child'] .';art='. $_GET['art'], 'name' => $context['pmx']['pagenames']['art']);
elseif(array_key_exists('cat', $context['pmx']['pagenames']))
$pmxforum[] = array('url' => $scripturl . '?cat='. $_GET['cat'] .';art='. $_GET['art'], 'name' => $context['pmx']['pagenames']['art']);
else
$pmxforum[] = array('url' => $scripturl . '?art='. $_GET['art'], 'name' => $context['pmx']['pagenames']['art']);
}

add after:
Code: [Select]
if(array_key_exists('cat', $context['pmx']['pagenames']) || array_key_exists('art', $context['pmx']['pagenames']))
$context['page_title'] = str_replace($context['forum_name'], 'yourshortname', $context['page_title']);
replace 'yourshortname' with that what you want ..
Many are stubborn in relation to the path, a few in relation to the target.

Offline BurakG

  • PortaMx Language
  • *
  • Posts: 240
  • Gender: Male
Re: Remove site name
« Reply #4 on: 03.02.12, 13:10:41 »
Thanks Fel,

According to your post I have solved my problem

I replaced following code

Code: [Select]
$context['page_title'] .= ' - '. $context['pmx']['pagenames']['cat'];
}
if(array_key_exists('child', $context['pmx']['pagenames']))
{
$pmxforum[] = array('url' => $scripturl . '?cat='. $_GET['cat'] .';child='. $_GET['child'], 'name' => $context['pmx']['pagenames']['child']);
$context['page_title'] = $context['forum_name'] .' - '. $context['pmx']['pagenames']['child'];
}
if(array_key_exists('art', $context['pmx']['pagenames']))
{
$context['page_title'] .= ' - '. $context['pmx']['pagenames']['art'];

with this

Code: [Select]
$context['page_title'] = $context['pmx']['pagenames']['cat'];
}
if(array_key_exists('child', $context['pmx']['pagenames']))
{
$pmxforum[] = array('url' => $scripturl . '?cat='. $_GET['cat'] .';child='. $_GET['child'], 'name' => $context['pmx']['pagenames']['child']);
$context['page_title'] = $context['pmx']['pagenames']['child'];
}
if(array_key_exists('art', $context['pmx']['pagenames']))
{
$context['page_title'] = $context['pmx']['pagenames']['art'];

Now, only page name is displayed as page title and description :)
Destiny. The design is clearly Ancient ..

http://www.mazdaclubtr.com
http://www.subaruclubtr.com

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Remove site name
« Reply #5 on: 03.02.12, 13:17:04 »
Ok  ;) .. But note, that your change is lost on each PortaMx update ...
Many are stubborn in relation to the path, a few in relation to the target.

Offline BurakG

  • PortaMx Language
  • *
  • Posts: 240
  • Gender: Male
Re: Remove site name
« Reply #6 on: 04.02.12, 14:46:22 »
Ok  ;) .. But note, that your change is lost on each PortaMx update ...

I am aware but isnt this way  better for google or other search engines ?

I mean this can be set as default :) or you may even set an option for this :)
Destiny. The design is clearly Ancient ..

http://www.mazdaclubtr.com
http://www.subaruclubtr.com

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Remove site name
« Reply #7 on: 04.02.12, 16:33:16 »
No .. not better, because the forum name is missing ..
Many are stubborn in relation to the path, a few in relation to the target.

Offline BurakG

  • PortaMx Language
  • *
  • Posts: 240
  • Gender: Male
Re: Remove site name
« Reply #8 on: 04.02.12, 20:50:46 »
No .. not better, because the forum name is missing ..

Forum name is also missing in forum topics' description and title :)
Destiny. The design is clearly Ancient ..

http://www.mazdaclubtr.com
http://www.subaruclubtr.com