TinyPortal

General => Chit chat => Topic started by: Hopeless_Noob on November 27, 2005, 05:50:56 AM

Title: Linking to a block?
Post by: Hopeless_Noob on November 27, 2005, 05:50:56 AM
Hey folks.  I have a center block that shows up only to guests (its an "about us" section)   I would also like to make this available via a link on the top (next to calendar but before logout) to all who would like to see it.

What would be the easiest way to do this?   How would I add an additional button along the top and link it to an html block?  Should I just create an additional html block identical to the first so as not to mess with permissions?  Should I make an article and link back to that?

If this isn't clear then let me know and I'll try to rephrase.  Thanks!!!!  :)
Title: Re: Linking to a block?
Post by: resurgence on November 27, 2005, 07:19:16 AM
just put it in an article that doesn't show up on the front page. just like bloc's button generator page here.
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 27, 2005, 07:55:50 AM
Oh cool! Easy!

Do you know how I would create the button for it along the top?
Title: Re: Linking to a block?
Post by: bloc on November 28, 2005, 12:28:52 AM
It depends on the theme..but you need to look at template_menu() function and copy one of the button code bits there to your own.
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 28, 2005, 12:47:44 AM
Its oxygen.  I'll look for that code, thanks Bloc :)
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 28, 2005, 02:22:49 AM
OK, so....

I wanted it to be after forum and before help.  so I found the line of code for forum and copied it, then altered it, but now I'm facing an odd problem.

I altered the code and expected there just to be a new button, as if it was dynamic or something.  But Now I just have this gaping space between Forum and Help, though if I click on the space the link works.

Do I need to create an "ABOUT US" button??


Here's the code:

<div id="bbabout"  '.$mycode.'><a href="', $scripturl, '?page=4"><img src="' . $settings['images_url'] . '/blank.gif" alt="about us" style="margin: 0px; width: 74px; height: 24px;" border="0" /></a></div>

I made up bbabout, do i have to define that somewhere?
Title: Re: Linking to a block?
Post by: IchBin on November 28, 2005, 03:55:08 AM
You define the bbabout in your class just like the other buttons are defined. :)
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 28, 2005, 03:58:22 AM
I thought I just did that. Doh!    :buck2:   ;)
Title: Re: Linking to a block?
Post by: IchBin on November 28, 2005, 03:59:31 AM
Yes, but in the style.css file. :)
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 28, 2005, 04:42:14 AM
Thanks Ich,  I found that and populated it with the forum.gif for now...


Does anyone know the best way to make a new button?  Any suggested freeware?
Title: Re: Linking to a block?
Post by: IchBin on November 28, 2005, 05:53:28 AM
The best way for TP buttons is to find it in this thread.

http://www.tinyportal.net/smf/index.php?topic=778.0

If your button is not there, feel free to request. :)
Title: Re: Linking to a block?
Post by: Hopeless_Noob on November 28, 2005, 06:01:37 AM
Thanks ich ;)