To use this website completely, it is necessary to store cookies on your computer.
 

Strange Issue with PMXBlog overriding Meta Tag Content

Started by Grammy, 10 months ago

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

Grammy

10 months ago Last Edit: 10 months ago by Grammy
I have a strange issue and I can't determine if it happened before or after the custom work Feline was recently gracious enough to do for me. 

I am attaching a screenshot.  In it, you can see two areas with a red line.  You can see my browser tabs at the top.  The first tab is my forum.  You see "List Of Blogs" there.  The second tab is opened to SMF and you can see "Simple Machines Community...."

The tab for my forum shows "List Of Blogs" no matter where you click in the forum.  I can be in the arcade, or the gallery, or reading a post and the tab will say "List Of Blogs".  The code in index.template.php (SMF 2.0.11) for this is:

Code Select
echo '
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '
<title>', $context['page_title_html_safe'], '</title>';


Is there anything within the PMXBlog files or perhaps something added in the recent custom work that would cause PMXBlog to override the SMF meta tag content?  I can't think why else every location and page in my forum shows "List Of Blogs". 

Thank you.   :)

Grammy

#1
10 months ago
Any help would be very appreciated.   :-\

feline

#2
10 months ago
For this in no bug known ...
The Blog don't mdificate the header ..
Many are stubborn in relation to the path, a few in relation to the target.

Grammy

#3
10 months ago
Quote from: feline ,  10 months ago
For this in no bug known ...
The Blog don't mdificate the header ..


Okay, thank you.  I'll ask around, elsewhere.   :)

Grammy

#4
10 months ago
This has been solved by editing PmxBlog.php

Changing this:

Code Select
if($context['PmxBlog']['action'][1] == 'unread')
$context['page_title'] = $txt['PmxBlog_unread_title'];
elseif($context['PmxBlog']['action'][1] == 'tracked')
$context['page_title'] = $txt['PmxBlog_tracked_title'];
else
$context['page_title'] = $txt['PmxBlog_bloglist_title'];


To this:

Code Select
if($context['PmxBlog']['action'][1] == 'unread')
$context['page_title'] = $txt['PmxBlog_unread_title'];
elseif($context['PmxBlog']['action'][1] == 'tracked')
$context['page_title'] = $txt['PmxBlog_tracked_title'];


Of course, it doesn't show "Blogs" in the title when looking at blogs, but it's better than having every page in my forum say "List Of Blogs".   ;)

feline

#5
10 months ago
Better change is this:
Code Select

if($context['PmxBlog']['action'][1] == 'unread')
$context['page_title'] = $txt['PmxBlog_unread_title'];
elseif($context['PmxBlog']['action'][1] == 'tracked')
$context['page_title'] = $txt['PmxBlog_tracked_title'];
elseif($context['PmxBlog']['action'][1] == 'list')
$context['page_title'] = $txt['PmxBlog_bloglist_title'];
Many are stubborn in relation to the path, a few in relation to the target.