Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2010, 07:25 PM
Scitz0 Scitz0 is offline
 
Join Date: Jun 2009
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 06-16-2010, 02:46 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #3  
Old 06-16-2010, 07:43 AM
Scitz0 Scitz0 is offline
 
Join Date: Jun 2009
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #4  
Old 06-19-2010, 06:09 AM
Scitz0 Scitz0 is offline
 
Join Date: Jun 2009
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 06-19-2010, 02:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 06-19-2010, 09:53 PM
Scitz0 Scitz0 is offline
 
Join Date: Jun 2009
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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
Reply With Quote
  #7  
Old 06-20-2010, 01:25 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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));
Reply With Quote
  #8  
Old 06-20-2010, 07:29 AM
Scitz0 Scitz0 is offline
 
Join Date: Jun 2009
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 06-22-2010, 03:03 PM
Todo-F1 Todo-F1 is offline
 
Join Date: Nov 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scitz0 View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:56 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
  • Page Generation 0.04324 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete