The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hook location for headinclude
Hello,
I want to add in headinclude a template (template_hook.headinclude_css), a template with some calls to external css files and javascripts but I can't find out which is the correct hook location. Tried all css relevant locations, global start, parse templates etc but none seems to work. Any idea?? Thank you Christos |
#2
|
|||
|
|||
parse_templates should work, it's just before the header template is rendered.
|
#3
|
|||
|
|||
Quote:
Code:
<link rel="stylesheet" href="christeris/ratemysite/includes/jqModal.css" type="text/css" /> <script type="text/javascript" src="christeris/ratemysite/includes/jqModal.js"></script> <script type="text/javascript"> $().ready(function() { $('#userrate').jqm({trigger: 'a.userrate'}); }); </script> |
#4
|
||||
|
||||
What is the code you are adding to the plugin? Perhaps that is incorrect.
|
Благодарность от: | ||
Christos Teriakis |
#5
|
|||
|
|||
Quote:
1.- Plugin code: Code:
<plugin active="1" executionorder="10"> <title>RateMySite: Includes</title> <hookname>parse_templates</hookname> <phpcode><![CDATA[ $template_hook['headinclude_css'] .= vB_Template::create('ratemysite_headinclude')->render(); ]]></phpcode> </plugin> Code:
<template name="ratemysite_headinclude" templatetype="template" date="1160112327" username="ChrisTERiS" version="1.0.0"> <![CDATA[ <script type="text/javascript" src="christeris/ratemysite/includes/jquery.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script> <script type="text/javascript" src="christeris/ratemysite/includes/skinable_tabs.min.js"></script> ]]> </template> Christos |
#6
|
|||
|
|||
Are you still having a problem with it? I tried creating a plugin using parse_templates with that code, and I created a template called ratemysite_headinclude with the code you posted, and it works for me (I didn't use a product xml file so I can't say that the xml you posted is exactly right).
Did you check the html source of a page to see if anything is there? |
Благодарность от: | ||
Christos Teriakis |
#7
|
|||
|
|||
Quote:
In any case thank you both for your help. I already released my mod yesterday, and I believe that is not good to add this plugin as will confuse the members who already manually added those links. Christos |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|