The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
VB5 Register Meta
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! |
#2
|
||||
|
||||
Use the hookFrontendBeforeOutput hook function to do what you want.
Code:
/* This hook is called immediately after the output is generated but before it is displayed. This does not include the preheader portion (which may already have been sent to the browser at this point depending on configuration). */ public static function hookFrontendBeforeOutput($params) { //the style used to render the page //this parameter is read only $params['styleid']; //html from the end of the preheader to the end of the page //this include the the entire <body> tag //this parameter is editable $params['pageHtml']; } |
#3
|
|||
|
|||
Thanks! Ill start digging. Ill register during PHP module then replace / add here.
--------------- Added [DATE]1540068065[/DATE] at [TIME]1540068065[/TIME] --------------- 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 |
#4
|
|||
|
|||
OK, Not finding any info on this other than the text. Is this a extra test package I need to install for this hook?
|
#5
|
|||
|
|||
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.
|
#6
|
||||
|
||||
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.
|
#7
|
||||
|
||||
Quote:
|
#8
|
||||
|
||||
Quote:
|
#9
|
||||
|
||||
Quote:
|
#10
|
|||
|
|||
Google still uses my descriptions in snippits
--------------- Added [DATE]1540267063[/DATE] at [TIME]1540267063[/TIME] --------------- 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. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|