MyBB Community Forums
[How To?] Add prefix to title metatag - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Add prefix to title metatag (/thread-206447.html)

Pages: 1 2


Add prefix to title metatag - boctulus - 2016-12-06

Hi there

   I've myBB 1.8.6 and I've read several threads about this but no one solve my problem about "how to add a prefix to title metatag" so I will show some screenshots:

[Image: eafc936e66d543199c77122b7052ffa7.png]

<< $thread['displayprefix'] is inside <title></title> but ... no prefix is shown, and it's the same with $thread['threadprefix'], please look:

[Image: c60cd414904d406190bca1ae2ea61799.png]

If you pay attention to the right-top corner "[ Solucionado ]"-prefix is not there!!!

The example thread is this:
http://hardforo.com/thread-1735.html

Please help me  Huh


RE: Add prefix to title metatag - Sazze - 2016-12-06

I will look into this for you once I get home and post a solution later.

Edit: [Image: pdbegb.png]

ACP >> Templates >> Showthread Templates >> showthread

find
<title>{$thread['subject']}</title>

replace with
<title>[ {$thread['threadprefix']}] {$thread['subject']}</title>



RE: Add prefix to title metatag - boctulus - 2016-12-06

Hi, thanks for answer but I will quote myself:

Quote:<< $thread['displayprefix'] is inside <title></title> but ... no prefix is shown, and it's the same with $thread['threadprefix']

I've already tried that Sad  both variables are empty!

[Image: d62218b103ca4310ba82c5776b1e9317.png]


Any ideas ?

I guess it's BUG because $thread['displayprefix'] and $thread['threadprefix'] are EMPTY!


RE: Add prefix to title metatag - KingdomScythe - 2016-12-06

(2016-12-06, 07:03 PM)boctulus Wrote: Hi, thanks for answer but I will quote myself:

Quote:<< $thread['displayprefix'] is inside <title></title> but ... no prefix is shown, and it's the same with $thread['threadprefix']

I've already tried that Sad  both variables are empty!

[Image: d62218b103ca4310ba82c5776b1e9317.png]


Any ideas ?

I guess it's BUG because $thread['displayprefix'] and $thread['threadprefix'] are EMPTY!

Have you tried to hard refresh your cache, flush dns and if you run through cloudflare enable development mode as well as purge cache?


RE: Add prefix to title metatag - boctulus - 2016-12-06

My friend, I've tried using a PROXY SERVER (free-proxyserver.com) with same results: title does not include "[ Solucionado ]" at the beginning Sad

http://hardforo.com/thread-1735.html

Look:

[Image: 27a940421a2e4a3cac3cf2b5cd19ecc6.png]


RE: Add prefix to title metatag - KingdomScythe - 2016-12-07

Do you mind messaging me a temporary admin account so I may take a look at this? (Take a backup before giving anyone anything.)


RE: Add prefix to title metatag - Sazze - 2016-12-07

PM me with an temporary admin account and I'll fix it for you.


RE: Add prefix to title metatag - Eldenroot - 2016-12-07

Use this plugin
https://community.mybb.com/mods.php?action=view&pid=661

works fine and it is compatible with Google SEO.


RE: Add prefix to title metatag - boctulus - 2016-12-08

Ok, I've update showthread.php with no results Sad

---
@KingdomScythe: please check for an PM with instructions -- thanks!


RE: Add prefix to title metatag - KingdomScythe - 2016-12-08

Okay. Well, the site is bad. Like, really bad (template-wise). The template has the correct hooks in it, albeit it took a while to find it. You shouldn't have 10+ copies of the same theme/template that aren't being used by anything. It should be showing, the thing is that it isn't though.


Sorry man, don't know what the issue is. :/
I suggest trying what Eldenroot suggested, here.