vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   set specific forum have different button (https://vborg.vbsupport.ru/showthread.php?t=40256)

squawell 06-25-2002 05:19 AM

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

Logician 06-25-2002 07:02 AM

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

squawell 06-25-2002 09:48 AM

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 ?? :D

Logician 06-25-2002 10:25 AM

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.

Chris M 06-25-2002 10:28 AM

Great!

I was looking for this:)

Satan

squawell 06-25-2002 10:37 AM

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

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?

Logician 06-25-2002 01:52 PM

put before
PHP Code:

// draw nav bar
$navbar=makenavbar($threadid,"thread",0); 

And your replacement sample is correct.

squawell 06-25-2002 08:12 PM

1 Attachment(s)
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?

Logician 06-25-2002 08:24 PM

1- do not use { image folder}, enter full path
2- Replace X with your forumid.

squawell 06-26-2002 08:16 AM

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?


All times are GMT. The time now is 01:43 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.01123 seconds
  • Memory Usage 1,747KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete