Jump to content


Photo
- - - - -

#HMAINS# help & custom template opinions


  • Please log in to reply
9 replies to this topic

#1 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 12 August 2007 - 01:22 AM

Hi Guys/Gals,

I've made some custom templates using Jaun-Vincent Haasbroek's guide as a reference, and would like your opinions as to whether they are any good!!

You can check out the ones that are "ready to go" here:

http://www.jaxpa.co.nz

I do have one issue though regarding the horizontal menu (#HMAINS#).

The menu on my "Golf Horizontal Menu" template displays without any spaces between the menu items.

I'm not sure how/where to fix this.... any help would be greatly appreciated, as well as any comments on the template designs.

#2 NST Inc Designer

NST Inc Designer

    Senior Member

  • Moderators
  • 210 posts

Posted 12 August 2007 - 08:35 PM

Great start!

As for the horizontal menu issue. You need to assign some style in your custom.css. Currently there is no style assigned to the HMAINS links.

Try something like:
td.hmains {
     padding-left: 7px;
     padding-right: 7px;
}
a.hmains {
     display: block;
     padding: 3px 7px;
}

The first example will create 7px of padding to the left and right in the table cell where each link resides. Only the text will be linkable. The second example adds 7px of padding left and right and also adds 3px to the top and bottom. The latter will also make the link behave like a button in that the text and padding area will be linkable.
Soholaunch Templates by tim burroughs

#3 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 12 August 2007 - 11:51 PM

Thanks for that!

Now that you've mentioned it, I can't believe I missed that!! :whoops:

I'll get around to fixing that as well as adding a few more templates to the site once I've finished them.

Thanks again! :)

#4 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 28 August 2007 - 11:43 AM

Hey ho, me again!!

I am running in to a new issue with #HMAINS# and am hoping that what I am trying to achieve is possible.(Hopefully this all makews sense!!!)

On this page here:
http://www.jaxpa.co.....php?pr=Tabtest

I am wanting the background of the current pages menu to be different than the others.

I know the the vert menus you can use .vmenu_main_on, .vmenu_main_off etc but am having trouble trying to get a similar type of thing with the horizontal.

I have pasted below an extract from the custom.css (essentially the "on" versions of the images have a shadow). I can get the other image working with the :hover and :active psuedo-class but these don't quite achieve what I am after

*****************************
div.hmains_off
{
background-image:url(tab_middle_off.jpg);
background-repeat: repeat-x;
background-position:center 0;
}

div.hmains_on
{
background-image:url(tab_middle_on.jpg) ;
background-repeat: repeat-x;
background-position:center 0;
}

td.hmains_on
{
background-image: url(tab_middle_on.jpg);
background-repeat: repeat-x;
background-position: center 0;
padding-left: 7px;
padding-right: 7px;
padding-top: 23px;
padding-bottom: 23px;
}

td.hmains
{
background-image: url(tab_middle_off.jpg);
background-repeat: repeat-x;
background-position: center 0;
padding-left: 7px;
padding-right: 7px;
padding-top: 23px;
padding-bottom: 23px;
}
**************************

If you guys need any more information, just let me know and I'll try and get it to you as soon as I can.

Cheers. :)

PS: I know it looks a bit plain at the moment, but the rest of the GFX are coming... promise!

#5 NST Inc Designer

NST Inc Designer

    Senior Member

  • Moderators
  • 210 posts

Posted 29 August 2007 - 03:57 PM

You need to have pgm-auto_menu.php assign the appropriate class to the "on" menu item. Then you just style the "on" separately from the "off". It does this for vsubs but not for hmains:

// Define on and off SUB MENU classes

		      if ($tmp == $pageRequest || $tmp == $dup) {

		         $subBullet = "vmenu_sub_bull_on";

		         $subClass = "vmenu_sub_on";

		      } else {

		         $subBullet = "vmenu_sub_bull_off";

		         $subClass = "vmenu_sub_off";

		      }

If I knew anything about php I could suggest how to do this. But I don't. Maybe Leh-Wen will chime in and let you know if this is possible.
Soholaunch Templates by tim burroughs

#6 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 29 August 2007 - 10:11 PM

Hey Tim,

Thanks for your help again. :cool:

I understand what you've said but my PHP knowledge sounds on par with yours! :ehheh:

I just tend to tinker with existing scripts to see what results I come up with, like this page...

http://www.jaxpa.co....dex.php?pr=test

It utilizes a script I found(can't remember who/where of the top of my head, but big props and full credit to the author), that take a text input and creates a .png of the text in a font of your choice. I found this a good way to get around the issue of most browsers not supporting embedded fonts (good 'old MS ;) )

Anyway long story short, I'll have a tinker with the custom pgm-auto_menu.php and see what I can come up with.

Again Tim, thanks for the help!

#7 NST Inc Designer

NST Inc Designer

    Senior Member

  • Moderators
  • 210 posts

Posted 30 August 2007 - 09:08 PM

That's neat. Very good work around.

Good luck on the auto_menu mod. It's times like these I wish I went to college to learn things like PHP. When I was younger I had all the time in the world but no ambition. Now that I've got the ambition I don't have any time.
Soholaunch Templates by tim burroughs

#8 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 31 August 2007 - 02:55 AM

Hi Tim,

FYI, here is the where I got the text replacement script from , if you wanna have a play!(or anyone else).

http://www.stewartsp...m/projects/dtr/

All credit for the script goes to Stewart Ulm.

#9 NST Inc Designer

NST Inc Designer

    Senior Member

  • Moderators
  • 210 posts

Posted 04 October 2007 - 03:24 AM

Just thought I would share this info as I found myself in need of an HMAINS on and off style. So to make that happen I added this bit of code on line 400 of pgm-auto_menu.php:

// Define on and off Hmains  classes
		    if ($pagelink == $pageRequest || $pagelink == $dup) {

		         $hmainClass = "hmains_on";
		      } else {

		         $hmainClass = "hmains";
		      }

Then I replaced the hard coded class "hmains" directly below with the new variable $hmainClass like this:
if($subpage_link[$a] == ""){
  	$hmainz .= "  <td class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\"><a href=\"index.php?pr=".$pagelink."\" class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\">".$thispage."</a></td>\n";
  	$main_textmenu .= "<a href=\"index.php?pr=$pagelink\">$thispage</a> | ";
  }else{
	if( eregi("http://", $subpage_link[$a]) || eregi("https://", $subpage_link[$a]) || eregi("mailto", $subpage_link[$a]) ){
	  	$hmainz .= "  <td class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\"><a href=\"".$subpage_link[$a]."\" class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\">".$thispage."</a></td>\n";
	  	$main_textmenu .= "<a href=\"".$subpage_link[$a]."\">$thispage</a> | ";
	}else{
	  	$hmainz .= "  <td class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\"><a href=\"http://".$subpage_link[$a]."\" class=\"[COLOR="RoyalBlue"]".$hmainClass."[/COLOR]\">".$thispage."</a></td>\n";
	  	$main_textmenu .= "<a href=\"http://".$subpage_link[$a]."\">$thispage</a> | ";

Thats it! Now the current page menu link will have a class of "hmains_on". Tested and works so far however, I'm not exactly a PHP wiz so if someones got any comments post 'em up.
Soholaunch Templates by tim burroughs

#10 jaxpa

jaxpa

    Advanced Member

  • Moderators
  • 56 posts

Posted 11 October 2007 - 03:09 AM

Hi Tim,

Awesome! I had all but given up on that particular template, but the mods that you suggested have worked, just a quick fine tune of my images to look right and I should be able to get it looking as I want

Once again, you have been most helpful! :super: :cool:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users