vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Move "Create New Article" button (https://vborg.vbsupport.ru/showthread.php?t=244684)

Scitz0 06-15-2010 07:25 PM

Move "Create New Article" button
 
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?

Lynne 06-16-2010 02:46 AM

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.)

Scitz0 06-16-2010 07:43 AM

Quote:

Originally Posted by Lynne (Post 2054300)
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.)

Ok thank you, will try this method.

--------------- 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.

Scitz0 06-19-2010 06:09 AM

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.

Lynne 06-19-2010 02:56 PM

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

Scitz0 06-19-2010 09:53 PM

Quote:

Originally Posted by Lynne (Post 2055868)
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

Thanks for the answer but to be honest I didn't get much of that. As I said I'm very new to this, maybe if you could give an example of how to solve my problem above my brain will start to function properly.

Again thanks and I hope you or someone else can push me further in the right direction :)

Lynne 06-20-2010 01:25 AM

And example would be if you were using variable $whatever in an existing template this_template like so:
Code:

{vb:raw whatever}
Then before you could do so, you would have to pre-register it using a plugin:
Code:

vB_Template::preRegister('this_template', array('whatever' => $whatever));

Scitz0 06-20-2010 07:29 AM

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.

Todo-F1 06-22-2010 03:03 PM

Quote:

Originally Posted by Scitz0 (Post 2056221)
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.

I have exactly the same problem. I hope someone can help us.


All times are GMT. The time now is 09:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04595 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete