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?

Logician 06-26-2002 09:24 AM

Quote:

Originally posted by squawell


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?

1- put address in double quotes like:
<img scr="http://localhost/squawell/images/XXX.gif">

2- Check if your image path is correct: Call the address http://localhost/squawell/images/XXX.gif from your browser to see if you can see the image. If you cant, find the correct address of the image first and make sure you applied the correct address to the hack code.

3- I dont think there is anything wrong with the hack code. It seems ok. So check your image first..

squawell 06-26-2002 01:26 PM

Quote:

Originally posted by Logician

1- put address in double quotes like:
<img scr="http://localhost/squawell/images/XXX.gif">


yes i already check it and its ok.....
Quote:

2- Check if your image path is correct: Call the address http://localhost/squawell/images/XXX.gif from your browser to see if you can see the image. If you cant, find the correct address of the image first and make sure you applied the correct address to the hack code.
i check it too and it can show up
Quote:

3- I dont think there is anything wrong with the hack code. It seems ok. So check your image first..
but the problem still here whats the problem u think??

Logician 06-26-2002 01:34 PM

ok post the HTML code (relevant part only) of the page and lets see..

squawell 06-26-2002 04:02 PM

PHP Code:

if ($forumid==2) {$my_button='<img scr="http://squawellftp.dns2go.com/squawell/images/installed.gif">';}
else {
$my_button='<img scr="http://squawellftp.dns2go.com/squawell/images/newthread.gif">';}

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

the code here....

Logician 06-26-2002 06:35 PM

no I meant the HTML code of your page not hack code.

Load the page which does not work (the one you took the screenshot) and choose source view in your browser, then post here the code (not all of them, just the section around the image tag we are trying to switch)

BTW. why is your URL "squawellftp.dns2go.com"? Shouldnt you refer to your local host with a line smt. like that:
http://localhost/squawell/images/installed.gif

squawell 06-26-2002 09:27 PM

1 Attachment(s)
Quote:

Originally posted by Logician
no I meant the HTML code of your page not hack code.


sorry..i misunderstand what u mean.....now i post the file see attachment file....
Quote:

BTW. why is your URL "squawellftp.dns2go.com"? Shouldnt you refer to your local host with a line smt. like that:
http://localhost/squawell/images/installed.gif
oh...i builded the forum in my localhost...if i want people visit my

forumi must use the url.....if not use the localhost url....

Logician 06-26-2002 09:38 PM

Quote:

Originally posted by squawell

oh...i builded the forum in my localhost...if i want people visit my
forumi must use the url.....if not use the localhost url....

And this is your problem..

Here is your source code:

PHP Code:

<a href="newthread.php?s=&action=newthread&forumid=2"> <img scr="http://squawellftp.dns2go.com/squawell/images/newthread.gif"></a

See? the hack produced the code exactly as it should. Your problem is the link to your image is broken. I dont know what's wrong with that URL, but it's certain that it links a orphaned image. Anyway hack is working ok..

squawell 06-27-2002 12:58 AM

Quote:

Originally posted by Logician


And this is your problem..

Here is your source code:

PHP Code:

<a href="newthread.php?s=&action=newthread&forumid=2"> <img scr="http://squawellftp.dns2go.com/squawell/images/newthread.gif"></a

See? the hack produced the code exactly as it should. Your problem is the link to your image is broken. I dont know what's wrong with that URL, but it's certain that it links a orphaned image. Anyway hack is working ok..

so the problem is my url link right?

anyway Logician...thnakz for ur help.........

squawell 06-27-2002 12:58 AM

Quote:

Originally posted by Logician


And this is your problem..

Here is your source code:

PHP Code:

<a href="newthread.php?s=&action=newthread&forumid=2"> <img scr="http://squawellftp.dns2go.com/squawell/images/newthread.gif"></a

See? the hack produced the code exactly as it should. Your problem is the link to your image is broken. I dont know what's wrong with that URL, but it's certain that it links a orphaned image. Anyway hack is working ok..

so the problem is my url link right?

anyway Logician...thnakz for ur help.........


All times are GMT. The time now is 07: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.01295 seconds
  • Memory Usage 1,788KB
  • 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
  • (9)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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