NetMan96SS
Starting Member
15 Posts |
Posted - 09 June 2009 : 17:16:16
|
I did a search of Menu Buttons and didn't find what I'm looking for. Simply put ... I'd like to replace the Home | Profile | Register | ... menu links with a button type menu. I'm not a big asp programmer, but I can edit code without issue. I looked at the inc_header.asp file and found the menu ... but cannot seem to inject or replace the text with a simple .gif image. I know this is an easy thing to do ... but please bear with me. Simple is best. Any suggestions?
Thanks, - Tony |
- Tony |
|
Etymon
Advanced Member
    
United States
2391 Posts |
Posted - 09 June 2009 : 21:19:00
|
You can use either double quotes or no quotes when writing out actual values, but for you to read what I am typing to you in this reply, double quotes are better because they organize your thoughts better to understand me more fully.
Double Quotes:
If your images are stored in your images folder, then write it like this:
Response.Write "<img src=""" & strImageURL & "home.gif"">"
The value for the variable strImageURL is stored in the FORUM_CONFIG_NEW table of your database.
Single Quotes:
Again, if your images are stored in the images folder, then you could also write it like the following. However, without the visual ques of the double quotes (for knowing where something begins and ends) it is more confusing to read and understand in a tutorial:
Response.Write "<img src=" & strImageURL & "home.gif>"
Making an Icon:
If you want to make your navigational images into icons, then create the .gif file, put it in the images folder (or where ever your images are stored) and then open inc_iconfiles.asp and create a new constant. Write the text value of the image along with its numeric width value and numeric height value. For example, if you call the new constant strNavHome, then what you put there may look like this (Note: In the example below the width is 50 and the height is 15):
const strNavHome = "home.gif|50|15"
Using an Icon:
Next, below is how you use the getCurrentIcon function when you want to display your image in your header. The function will know how to handle the constant you added to inc_iconfiles.asp.
In this case you could display the image in the header like this:
Response.Write getCurrentIcon(strNavHome,strAltText,"")
Using the Icon with other Elements:
If you were to added something like a TD tag in front and behind that it would look like this:
Response.Write "<td>" & getCurrentIcon(strNavHome,strAltText,"") & "</td>"
Other Values within the Icon:
For strAltText, you need to write it like this:
Response.Write "<td>" & getCurrentIcon(strNavHome,"This is the home button","") & "</td>"
The additional ,"" is for your image's attributes which can contain more than one attribute like this:
Response.Write "<td>" & getCurrentIcon(strNavHome,strAltText,"hspace=""0"" align=""absmiddle""") & "</td>"
If you have any other questions, just holler!
Cheers,
Etymon
|
Edited by - Etymon on 09 June 2009 21:24:54 |
 |
|