PDA

View Full Version : Web geeks! I've got an HTML coding question!



ArkiStan
06-13-2010, 01:56 PM
So I'm working on a friend's website using a service called Indexhibit (http://www.indexhibit.org). It's an online interface that lets you create a minimal website and you can tweak the HTML/CSS, etc to customize it to your liking. Though I have practically no knowledge in HTML, I've still managed to scour their help forums to customize the website to a certain degree. But now I'm stuck. I'm sure the solution is easy with some basic HTML knowledge, but for now I need some help.

Here is the website:
www.nuhana.com

Here you can download the original index.php file before I added any additional code.
http://rapidshare.com/files/401198427/index__original_.php

Here you can download the index.php file that I've edited to customize the website.
http://rapidshare.com/files/401198428/index__edited_.php

If you go to the website, you'll see a menu on the left. The default setting when I began was the menu showing up as basic HTML text. I've managed to make the menu titles clickable images. The code I touched to achieve this is between lines 185-189 in the <index.php> file. For now all the menu items show up as the same image (h2_company.png). I have created other images to go with the other menu items, but don't know where to put the respective code. Any help would be greatly appreciated.

I hope I'm making sense. Thanks in advance!

InfiniteNothing
06-13-2010, 03:21 PM
It might help if you upload the original php. The foreach statement up above means that it's going to use that same text (the image reference) multiple times. You might need a way of getting your image name data into the order array.

As a cheap workaround you might be able to change line 192 to something like this:
<img src='http://www.nuhana.com/ndxz-studio/site/sample/h2_{$key}.png' alt='description | $key' />

Then you have to name your image h2_Company.png and name the next image h2_Photography.png.

ArkiStan
06-13-2010, 06:28 PM
Thanks. I've added a download link to the original index.php file in the original post. In the meantime I'll try out the tip you mentioned.

edit:
i inserted that in line 192 and got the following error:

Parse error: syntax error, unexpected '<' in /home6/ginsengc/public_html/nuhana/ndxz-studio/site/plugin/index.php on line 192

InfiniteNothing
06-13-2010, 09:36 PM
Thanks. I've added a download link to the original index.php file in the original post. In the meantime I'll try out the tip you mentioned.

edit:
i inserted that in line 192 and got the following error:

Parse error: syntax error, unexpected '<' in /home6/ginsengc/public_html/nuhana/ndxz-studio/site/plugin/index.php on line 192

Sorry man, I meant line 187. 192 should go back the way it was. Also, this is php coding not html coding.

ArkiStan
06-20-2010, 08:36 PM
Hmm. I updated the code as you suggested. It's now failing to recognize the image files. Check it out:

www.nuhana.com

It's weird. I have three images (company.png, photography.png, contact.png) that I want to use as the section title images. When I type in the image file locations directly into the browser, the images open. but seems like the $key code is not being associated with their respective image files. the website is just displaying the "description | $key" part of the line of code you gave me.

(BTW, I've edited the style.css file to change the font back to default. Otherwise everything is the same)

Thesifer
06-20-2010, 08:44 PM
The downloads do not work.

ArkiStan
06-20-2010, 09:28 PM
Sorry. The downloads expired. I've updated the links to work again.

ArkiStan
06-20-2010, 09:32 PM
BTW, here is another site which is based on the same indexhibit interface, but has successfully achieved what I'm trying to do, which is to change the default text menus in the left column to be shows as images instead of text.

http://www.avisar.ws/

InfiniteNothing
06-20-2010, 09:49 PM
What do you type in to get to the images? They need to be here or you need to change the base URL in the php.
http://www.nuhana.com/ndxz-studio/site/sample/h2_Contact.png

ArkiStan
06-21-2010, 01:20 PM
What do you type in to get to the images? They need to be here or you need to change the base URL in the php.
http://www.nuhana.com/ndxz-studio/site/sample/h2_Contact.png

that's the right address. you just have to use all lower case. there are a total of three files. the file names are:

h2_company.png
h2_photography.png
h2_contact.png


(just wanna say thanks again for taking the time to look into this.) :bow:

InfiniteNothing
06-25-2010, 07:00 AM
Change the case of your files to match the case you used for all the headers. That is, change h2_contact.png to h2_Contact.png

ArkiStan
06-25-2010, 01:16 PM
Change the case of your files to match the case you used for all the headers. That is, change h2_contact.png to h2_Contact.png
It worked!!! This is great. This has been on my back for such a long time and I can finally finish the website. Thanks so so much for your help, IN.

:bow: