Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-10-2009, 03:11 AM
DTB Pro DTB Pro is offline
 
Join Date: Sep 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-10-2009, 03:53 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-10-2009, 05:01 AM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 09-10-2009, 01:39 PM
DTB Pro DTB Pro is offline
 
Join Date: Sep 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
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.
Reply With Quote
  #5  
Old 09-10-2009, 01:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would automatically be a link to wherever you link to in your <a> tag.
Reply With Quote
  #6  
Old 09-10-2009, 05:00 PM
DTB Pro DTB Pro is offline
 
Join Date: Sep 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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>
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 12:26 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.12351 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete