The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
What code/template do I need to edit to move the "Create New Article" button to the bottom of the page? I searched and found the template vbcms_toolbar and I think its this template I need to edit or maybe the call to load the template need to be moved? Anyone know? |
#2
|
||||
|
||||
![]()
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
|
#3
|
|||
|
|||
![]() Quote:
--------------- Added [DATE]1276678759[/DATE] at [TIME]1276678759[/TIME] --------------- Worked like a charm, found that I needed to edit vbcms_page and move the toolbar row at the bottom of the template. |
#4
|
|||
|
|||
![]()
Ok, back to moving the button once more.
This time I want to move the button(dropdown as of 4.0.4) to the section header. I tried to add the same code used in vbcms_page, ie {vb:raw toolbar} to the vbcms_content_section_page template just before the </h1> tag for the header. But this did nothing. So instead I copied the entire content of vbcms_toolbar and pasted this instead of {vb:raw toolbar}. Now I get the "Create New Article" text & dropdown where I want it but the dropdown box is empty ![]() Anyone able to help me out with this one? I'm very new to template modifications so I'm not sure how it all connects and why I cant use {vb:raw toolbar} in that template and so on. |
#5
|
||||
|
||||
![]()
All variables must be registered for use in the template you want to use them in. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
|
#6
|
|||
|
|||
![]() Quote:
Again thanks and I hope you or someone else can push me further in the right direction ![]() |
#7
|
||||
|
||||
![]()
And example would be if you were using variable $whatever in an existing template this_template like so:
Code:
{vb:raw whatever} Code:
vB_Template::preRegister('this_template', array('whatever' => $whatever)); |
#8
|
|||
|
|||
![]()
Ok thank you, I think I get what your saying but I was thinking of a more specific exampel for my case. Still not sure how to preregister the vbcms_toolbar template in the vbcms_content_section_page template. I'm not even sure how vbcms_page preregister the vbcms_toolbar template in the default vb4 template. Can't find any preregistration of the vbcms_toolbar template anywhere.
I would really love if you could give me a hand in this specific case, maybe all the pieces fall into place after that. Again, thank you for your effort. |
#9
|
|||
|
|||
![]() Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|