Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2002, 01:31 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Different Styles and Headers. help!

I have designed a Default Style for my board which has a banner in the header and custom buttons for Register, My Profile etc...

Now.. I created a new Template (so members can have a choice) but after creating a new Replacement Set and Template I lost the look of my board (its got custom menus etc..)
So. I made it run off the oringinal templates BUT it wont change colours then! eek.

What I want to do... is have 2 (maybe more) different styles with different Headers in them.
Is this possible? do I need a hack?
A little help please folks!

Thanx!
Jon
Reply With Quote
  #2  
Old 10-05-2002, 02:51 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, must it be ASAP or can you wait?

because vb3 has divided the header and footer from the templateset , so you can create new styles with different headers and footers, but they all use the same normal templates
Reply With Quote
  #3  
Old 10-05-2002, 03:00 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If theres a way I can do it now, it would be good. I am reopening my site next Saturday you see.

When is vb3 due out?
Reply With Quote
  #4  
Old 10-05-2002, 03:05 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no dateline is set...

well you can hack the gettemplate function to always use the same templateset id except for header/footer

btw. colorchanges have nothing to do with differen templatesets if you've set up the colors in your style.
templates just use replacementvars to get the right colors...
Reply With Quote
  #5  
Old 10-05-2002, 03:12 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx for your help.
Is there a thread that explains how to hack gettemplate ?

(new to vb u see. )
Reply With Quote
  #6  
Old 10-05-2002, 03:34 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, i think there isn't one out as i know..

you have to change two things or your queryammount would rise..

ok, open admin/functions.php find
PHP Code:
    $gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid=" intval($templatesetid). ") ORDER BY templatesetid DESC LIMIT 1"); 
change it to:
PHP Code:
    $gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid=1 OR templatesetid=" intval($templatesetid). ") ORDER BY templatesetid DESC LIMIT 1"); 
then find
PHP Code:
  $temps=$DB_site->query("SELECT template,title
                          FROM template
                          WHERE (title IN ('
$templateslist')
                            AND (templatesetid=-1 OR templatesetid=" 
intval($templatesetid) . "))
                          "
.iif ($loadmaxusers,"OR (title = 'maxloggedin')","")."
                          "
.iif ($loadbirthdays,"OR (title = 'birthdays')","")."
                          ORDER BY templatesetid"
); 
and change it to
PHP Code:
  $temps=$DB_site->query("SELECT template,title
                          FROM template
                          WHERE (title IN ('
$templateslist')
                            AND (templatesetid=-1 OR templatesetid=1 OR templatesetid=" 
intval($templatesetid) . "))
                          "
.iif ($loadmaxusers,"OR (title = 'maxloggedin')","")."
                          "
.iif ($loadbirthdays,"OR (title = 'birthdays')","")."
                          ORDER BY templatesetid"
); 
where i've inserted templatesetid=1 make sure that your main setid is 1, if its another id, change it to that in my code .

then you can create new styles with new templatesets. every template you make custom in your new set would be taken from the new set, everyone you let be original would take from templatesetid=1. if there isn't one it'll use the global one
Reply With Quote
  #7  
Old 10-05-2002, 03:48 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant!
Thankyou so much. It works.

Thanks for your time.
Reply With Quote
  #8  
Old 10-05-2002, 03:53 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default


you're welcome
Reply With Quote
  #9  
Old 10-17-2002, 12:50 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this Xenon.
Reply With Quote
  #10  
Old 10-17-2002, 09:07 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03980 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete