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

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 14942
  • *Total Topics: 2271
  • *Online Today: 12
  • *Most Online: 292
(2016 November 12, 09:37:31 am)

Strange Issue with PMXBlog overriding Meta Tag Content

Started by Grammy, 2016 September 04, 11:03:20 pm

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

Grammy

2016 September 04, 11:03:20 pm Last Edit: 2016 September 12, 12:25:40 am 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
2016 September 09, 01:23:26 pm
Any help would be very appreciated.   :-\

feline

#2
2016 September 09, 07:16:16 pm
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
2016 September 10, 01:18:54 pm
Quote from: feline ,  2016 September 09, 07:16:16 pm
For this in no bug known ...
The Blog don't mdificate the header ..


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

Grammy

#4
2016 September 12, 12:25:22 am
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
2016 September 18, 12:44:12 am
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.