Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-25-2002, 05:19 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default set specific forum have different button

as title....

for example like here the full release forum

ahve different buttons like--install button ect.....

how to do that??
Reply With Quote
  #2  
Old 06-25-2002, 07:02 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no-hack solution: Create a new style and apply this style to that forum. In that style design your pages in anyway you like.

But if it's only one button you'll change you may regard considering the "hack solution" which is:

put a variable in the template where your button is like $my_button_variable.

Then in the .php file where it calls it, put a line to assign the value to that variable like:

if ($forumid==X) {$my_button_variable='<img scr.........>';}
else {$my_button_variable='<img scr.........>';}

(if ($forumid==X) part may change according to the file you apply this code.)
Reply With Quote
  #3  
Old 06-25-2002, 09:48 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician
no-hack solution: Create a new style and apply this style to that forum. In that style design your pages in anyway you like.

But if it's only one button you'll change you may regard considering the "hack solution" which is:

put a variable in the template where your button is like $my_button_variable.

Then in the .php file where it calls it, put a line to assign the value to that variable like:

if ($forumid==X) {$my_button_variable='<img scr.........>';}
else {$my_button_variable='<img scr.........>';}

(if ($forumid==X) part may change according to the file you apply this code.)
first thankz Logician reply...

if i want to do "hack solution" which php file should i edit??

showthread or ??
Reply With Quote
  #4  
Old 06-25-2002, 10:25 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

depends on the location where you want to insert your button. If it's a button like vb.org's INSTALL button which shows up in thread views, yes it's showthread.php that you should edit.
Reply With Quote
  #5  
Old 06-25-2002, 10:28 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great!

I was looking for this

Satan
Reply With Quote
  #6  
Old 06-25-2002, 10:37 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician
depends on the location where you want to insert your button. If it's a button like vb.org's INSTALL button which shows up in thread views, yes it's showthread.php that you should edit.
thankz ur reply.....

but where should i put this code??

and about the variable how do i replace it in showthread template??

replace <img src={XXXXX}......> to the variable(EX:$my_button_variable) is it right?
Reply With Quote
  #7  
Old 06-25-2002, 01:52 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

put before
PHP Code:
// draw nav bar
$navbar=makenavbar($threadid,"thread",0); 
And your replacement sample is correct.
Reply With Quote
  #8  
Old 06-25-2002, 08:12 PM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician i put the code :PS:there have sapce !!
PHP Code:
if ($forumid==X) {$my_button='<img scr={imagesfolder }/XXX.gif>';}
else {
$my_button='<img scr={ imagesfolder}/xxx.gif>';} 
above
PHP Code:
// draw nav bar
$navbar=makenavbar($threadid,"thread",0); 
and in showthread template i replace
PHP Code:
<a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]"> <img src="https://vborg.vbsupport.ru/images/newthread.gif" border="0" alt="?o???s?峹"></a
TO

PHP Code:
<a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]"$my_button</a
and it doesnt work it look like the attachment file......

whats wrong with my code?
Attached Images
File Type: jpg 66.jpg (3.5 KB, 0 views)
Reply With Quote
  #9  
Old 06-25-2002, 08:24 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1- do not use { image folder}, enter full path
2- Replace X with your forumid.
Reply With Quote
  #10  
Old 06-26-2002, 08:16 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician
1- do not use { image folder}, enter full path
2- Replace X with your forumid.
1.full path=<img scr=http://localhost/squawell/images/XXX.gif>

is it right??i test it on my localhost!!

2.i already replace my forumid!!

and Logician the problem still exist!!

i think maybe my first step wrong.........so what is the problem?
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 06:59 PM.


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.04663 seconds
  • Memory Usage 2,290KB
  • Queries Executed 14 (?)
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
  • (5)bbcode_php
  • (3)bbcode_quote
  • (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
  • (1)postbit_attachment
  • (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_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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete