vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=326825

VB5 Register Meta
by ctrenks
19 Oct 2018 15:56

I have a ton of Dynamic pages running inside a custom VB4 frame and of course part of the dynamic is altering the page title/Keywords and description then also adding my own meta values.

This does not seem to work under VB5 using the PHP module.

Can we no longer alter data before page generation as searching I found no answers other than to change title in page builder, and that surely is not dynamic!

noypiscripter 20 Oct 2018 00:52

Use the hookFrontendBeforeOutput hook function to do what you want.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There are sample products utilizing hooks in the do_not_upload/development directory.

ctrenks 20 Oct 2018 13:58

Thanks! Ill start digging. Ill register during PHP module then replace / add here.

--------------- Added 20 Oct 2018 at 20:41 ---------------

Maybe I missed this but this is not an actual hook location correct?

Created a product, then went to use this hook in add hooks but not listed, just template hooks unless I am completely missing this. Version 5.4.4

ctrenks 21 Oct 2018 14:08

OK, Not finding any info on this other than the text. Is this a extra test package I need to install for this hook?

ctrenks 22 Oct 2018 18:12

Feeling like Im missing the boat. ALl docs on this are not showing it as an actual hook, I created the product, then went to set hook location and this is not an option, and this would be great but I could inserialize the data before generation as well in index.php modify and re-serialize but that's not very pretty.

delicjous 22 Oct 2018 19:42

You could use the php-hooks with a new mod/ package. Like Glenn mentioned, there is an example-package within the do_not_upload folder. You will not find the hooks in the templatehooks. Iam working on a mod to change every page or channel-meta to your own needs.

In Omnibus 22 Oct 2018 19:59

Quote:

Originally Posted by delicjous (Post 2596952)
You could use the php-hooks with a new mod/ package. Like Glenn mentioned, there is an example-package within the do_not_upload folder. You will not find the hooks in the templatehooks. Iam working on a mod to change every page or channel-meta to your own needs.

Search engines couldn't care less about meta data. They don't even look for it anymore. This is from Google five years ago: https://www.youtube.com/watch?v=W4gr88oHb-k

delicjous 22 Oct 2018 20:06

Quote:

Originally Posted by In Omnibus (Post 2596955)
Search engines couldn't care less about meta data. They don't even look for it anymore. This is from Google five years ago: https://www.youtube.com/watch?v=W4gr88oHb-k

google checks for nofollow and noindex right now. But I don't know how long they will still do that. Content is king an will be in the future. But like the googleguy said, if you haven't a unique meta tag, you should delete it... and thats not possible with vB right now.

In Omnibus 22 Oct 2018 21:20

Quote:

Originally Posted by delicjous (Post 2596956)
google checks for nofollow and noindex right now. But I don't know how long they will still do that. Content is king an will be in the future. But like the googleguy said, if you haven't a unique meta tag, you should delete it... and thats not possible with vB right now.

Even if you delete the metadata Google uses the first 300 characters for the snippet so that's where the important information should be located. But, yes, you are correct in that there should be no duplicate metadata.

ctrenks 23 Oct 2018 03:51

Google still uses my descriptions in snippits

--------------- Added 23 Oct 2018 at 03:57 ---------------

Back to the question though, I see in the docs the hook, but this in not the same as the select hook location right? I know I want that hook described but its not in the available hooks when i go to add hook?


I have never created a product for VB before, I have done all my code outside of it within a wrapper.

noypiscripter 23 Oct 2018 17:29

The one you were referring to is the Template hook. That's not what you need. What you need is to create a PHP hook. PHP hook != Template hook but you can have a product that has both a PHP hook and a template hook.

ctrenks 23 Oct 2018 18:33

OK This is where IM not getting it. So I really do not need a template hook at all, simply create a product, and in the product I can call hookFrontendBeforeOutput($params)

That returns the $params['pageHtml']; , that I can then edit directly correct

noypiscripter 24 Oct 2018 03:22

Correct.


All times are GMT. The time now is 13:42.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.