vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Programming Buttons (https://vborg.vbsupport.ru/showthread.php?t=222837)

DTB Pro 09-10-2009 02:11 AM

Programming Buttons
 
Hi. First post and I'm a total noob. Sorry if it's been asked a million times. I'll be happy with a link in the right direction. I'm trying to learn how to create and program buttons. I've seen the button images folder and so forth, but I'm not familiar with the coding. Like, I really just want a button to simply link to another page when it's pressed. Also, I think I read somewhere you can override the button images folder and hard code the location. So, any help here would be much appreciated.

Thanks.

Lynne 09-10-2009 02:53 AM

I'm really not exactly sure what you are talking about in regards to programming buttons and hard coding their locations. Buttons usually have a task of submitting a form which then performs an action. Like, I'll hit the Post Quick Reply button in a moment. Or, I could have hit the Post Reply button to get a new page to reply on. Or, I will be able to hit the Edit button to edit this post once I submit it. So, basically, in order to program a button, you need to create a form and some code to perform an action.

TimberFloorAu 09-10-2009 04:01 AM

Bit like:

Code:

<a href="register.php"><img src="http://myforum.com/forum/images/registerbutton.png" border="0"></a>
I would think he means ? not 100% sure tho

DTB Pro 09-10-2009 12:39 PM

Quote:

Originally Posted by TimberFloorAu (Post 1882389)
Bit like:

Code:

<a href="register.php"><img src="http://myforum.com/forum/images/registerbutton.png" border="0"></a>
I would think he means ? not 100% sure tho

Yeah, I think that's what I'm after. So, if my logo was that image, it would automatically be a button?

Thanks.

Lynne 09-10-2009 12:51 PM

It would automatically be a link to wherever you link to in your <a> tag.

DTB Pro 09-10-2009 04:00 PM

Quote:

Originally Posted by Lynne (Post 1882572)
It would automatically be a link to wherever you link to in your <a> tag.

Great, thanks! Now I'm trying to put a different button when I hover over it. I'm using this:

hoversrc=" pic.gif "

right after img src is done

However, no luck.

--------------- Added [DATE]1252607656[/DATE] at [TIME]1252607656[/TIME] ---------------

Well...I gave this a whirl, but still no dice:

<SCRIPT language="javascript1.1">
gifHome = new Image(54,18)
gifHome.src = "home.gif"
gifHome2 = new Image(54,18)
gifHome2.src = "home2.gif"

function changeImg(cImg,ref) {
document.images[cImg].src = ref.src
}
</SCRIPT>

<a href=url onMouseOver=”changeImg(‘imgHome’ ,gifHome2)” onMouseOut=”changeImg(‘imgHome’ ,gifHome)”><img src="file"
border="0" name=”imgHome” alt="$vboptions[bbtitle]" ></a>


All times are GMT. The time now is 11:47 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.02605 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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