The template Injection engine...How dose it work?
I've look through BxDolTemplate.php but its not very clear to me how you use it.
I want to to inject some javascript but i'm not sure how to do it. It would be really cool if someone could explain it better.
Give me something to believe in... |
Hello you will need create row in sys_injections
INSERT INTO `sys_injections` VALUES('', 'my_injection', 0, 'injection_header', 'php', 'return "<script>alert(\'coll\')</script>"', 0, 1);
injection_header - name of injection key!
You will can add all you needed key by you self or used already created.
All injections key looked as :
<bx_injection:banner_left /> <bx_injection:banner_right /> <bx_injection:injection_logo_before /> ..... etc
Also you will need to clean all caches
PS: If possible do not write me personally, please try to ask on the forum first |
Thank you for helping Sasha, So if I understand this correctly to inject a banner rotator script I should do it like this?
INSERT INTO `sys_injections` VALUES('',
'xml_banner', 0, 'injection_xml_banner', 'php', 'return
"<script>alert(\'coll\')</script>"', 0, 1);
replace <script>alert(\'coll\')</script> with my code.
Then adding this to my _sub_header.html code will pull my banners in?
<div>
<bx_injection:xml_banner />
</div>
Give me something to believe in... |
Bump... I still haven't got this working. Can someone please explain this clearer? Give me something to believe in... |
Bump... I still haven't got this working. Can someone please explain this clearer?
Hello, yes it's correct, also you will need clean cache.
PS: If possible do not write me personally, please try to ask on the forum first |
Hi Sasha,
i'd need to inject kind of html subheader between Main menu and breadcrumb.
I assume, that i should use injection_between_top_menu_breadcrumb hook.
But how do i make it appear on homepage only, please?
thanx
buzz
buzzdev.com - Mobile Developers Community |
In SashaE's example here.
INSERT INTO `sys_injections` VALUES('', 'my_injection', 0, 'injection_header', 'php', 'return "<script>alert(\'coll\')</script>"', 0, 1);
The second value. The 0 controls the page index the injection is for. 0 meens all pages. So you would change the page index to 1
INSERT INTO `sys_injections` VALUES('', 'my_injection', 1, 'injection_header', 'php', 'return "<script>alert(\'coll\')</script>"', 0, 1);
https://www.deanbassett.com |
In SashaE's example here.
INSERT INTO `sys_injections` VALUES('', 'my_injection', 0, 'injection_header', 'php', 'return "<script>alert(\'coll\')</script>"', 0, 1);
The second value. The 0 controls the page index the injection is for. 0 meens all pages. So you would change the page index to 1
INSERT INTO `sys_injections` VALUES('', 'my_injection', 1, 'injection_header', 'php', 'return "<script>alert(\'coll\')</script>"', 0, 1);
:) I don't know this!
PS: If possible do not write me personally, please try to ask on the forum first |
@deano:
GREAT! many thanxs ;)
buzzdev.com - Mobile Developers Community |
Fantastic! it really works on the index page only :)
thanx again...
I suppose, that the column - replace - is to replace some system injection with my own.
What other types except php are allowed there?
THANX
buzz
buzzdev.com - Mobile Developers Community |