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

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 16404
  • *Total Topics: 2518
  • *Online Today: 8
  • *Most Online: 292
(12. Nov 2016, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 1
  • *Total: 1

  • *Yahoo!

Strange Issue with PMXBlog overriding Meta Tag Content

Started by Grammy, 04. Sep 2016, 23:03:20

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

Go Down

Grammy

04. Sep 2016, 23:03:20 Last Edit: 12. Sep 2016, 00:25:40 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
09. Sep 2016, 13:23:26
Any help would be very appreciated.   :-\

feline

#2
09. Sep 2016, 19:16:16
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. Sep 2016, 13:18:54
Quote from: feline on 09. Sep 2016, 19:16:16
For this in no bug known ...
The Blog don't mdificate the header ..


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

Grammy

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

Go Up