![]() |
How do I insert a template through a plugin
Hi All,
Just a brief about me, I have no coding background whatsoever and I am trying to learn where I am trying to just do simple stuff. I am working on this plugin which I am trying to add in $adv_portal and here is my problem $adv_portal - is the template where I want $adv_portal_rotating_articles to be inserted and this is the full content of it Code:
$stylevar[htmldoctype] The plugin is as follows Product: vBulletin Hook Location: vba_cmps_print_output // which I have tested with debug and I got positive results Code:
$find = '<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">'; I would appreciate the help Regards, Omar |
For including your custom template you will need two plugins.
This article should help https://vborg.vbsupport.ru/showthread.php?t=119933 |
Quote:
Hi valdet, I have already done this and I have also already added the template in "Portal Output Global Variables" in vba settings. I think I am missing something in the PHP code above. Would appreciate the support. Regards, Omar |
This doesn't look correct. You are finding something in a template and replacing it with itself?
Code:
$find = '<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">'; |
Hi Lynne,
So I believe what you are saying I should do this? Code:
$find = '<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">'; |
str_replace (find this, replace with this, in this)
You said "$adv_portal_rotating_articles - is the template I have created and would like to insert within $adv_portal". But, your find/replace statement says you are finding and replacing something in $adv_portal_rotating_articles and assigning it the new value of $adv_portal. That doesn't seem to be what you said you wanted. Seems to me you want it to be: PHP Code:
|
Hey Lynne,
Thanks for explaining that. However after changing it still does not work. Am I doing something wrong? |
You may get more help over on the vbadvanced forum since this is a module for vbadvanced (isn't it?).
|
All times are GMT. The time now is 09:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|