News: We have *Free 2.0 Gold* Themes for Download & Support.
Welcome, Guest.
Please login or register.
Loading...
  • Home
  • Forum
  • Help
    • TinyPortal
  • Calendar
  • Downloads
  • Login
  • Register
  • Cripzone »
  • Forum »
  • Theme Support »
  • Theme Support (Moderator: Crip) »
  • Help adding a button
* * *

User

Welcome, Guest. Please login or register.
Feb 03, 12, 10:39:41 PM

Login with username, password and session length

CZ Friends

  •      TPsupport
  •      blocWeb
  •      build&Tell
  •      tentDwellers
  •      aRgStudio

“Random Proverb”

PROV 16:7 When a man's ways please the LORD, he maketh even his enemies to be at peace with him.
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Help adding a button  (Read 2112 times)

0 Members and 1 Guest are viewing this topic.

misstami

  • Guest
Help adding a button
« on: Aug 01, 10, 01:55:52 PM »
I know where to go to add a button, and I had no problem adding a button for the contact form on the forum. But I am having problems coding the buttons to point to a page off the forum. I am using SMF 1.1.11 and BlackRain V.2.

Here is the code I added for the contact form (and which works great)
Code: [Select]
// How about the [contact] button?
       echo '<li', $current_action == 'contact' ? ' id="active"' : '', '><a href="', $scripturl, '?action=contact" ><span>', Contact, '</span>[/url]</li>';
How do I code it to point tothis link? I've tried just about everything and I keep getting errors.

hi,
try this:
In: current_array()
Code: [Select]
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum')))

Then:
Code: [Select]
// How about the [forum] button?
       echo '<li',   $current_action == 'forum' ? ' id="active"' : '', '><a href="',   $scripturl, '?action=forum" ><span>FORUM</span>< / a ></li>';
Logged

Offline Crip

  • Administrator/Owner
  • Hero Member
  • *****
  • Posts: 5,390
  • Gender: Male
  • Say it ant true?
    • Cripzone
Re: Help adding a button
« Reply #1 on: Aug 01, 10, 02:32:09 PM »
sorry .. Lol..

clicked modify instead of Quote
Logged
I have become comfortably numb!

Do Not PM me for Support unless invited!
I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -


Donate A Bible! | Quad Link | TOTM Winner.

misstami

  • Guest
Re: Help adding a button
« Reply #2 on: Aug 01, 10, 02:43:21 PM »
That really doesn't solve my problem. I know how to add buttons for pages that are part of the forum. What I want to do is add buttons that point to pages NOT part of the forum (links to other parts of the site).

This is my forum. http://www.bontempsrp.com/smf/  I want to add a buttons with all the others that points to pages like this one http://www.bontempsrp.com/wordpress/
Logged

Offline Crip

  • Administrator/Owner
  • Hero Member
  • *****
  • Posts: 5,390
  • Gender: Male
  • Say it ant true?
    • Cripzone
Re: Help adding a button
« Reply #3 on: Aug 01, 10, 02:56:17 PM »
Quote from: misstami on Aug 01, 10, 02:43:21 PM
That really doesn't solve my problem. I know how to add buttons for pages that are part of the forum. What I want to do is add buttons that point to pages NOT part of the forum (links to other parts of the site).

This is my forum. http://www.bontempsrp.com/smf/  I want to add a buttons with all the others that points to pages like this one http://www.bontempsrp.com/wordpress/

Okay i see , try direct link :

After this:
Code: [Select]
// How about the [forum] button?
       echo '<li',   $current_action == 'forum' ? ' id="active"' : '', '><a href="',   $scripturl, '?action=forum" ><span>FORUM</span>< / a ></li>';

Add this:
Code: [Select]
// How about the [blog] button?
       echo '
        <li><a href="http://www.bontempsrp.com/wordpress/index.php" target="_blank"><span>BLOG</span>< / a></li>';
...?
Logged
I have become comfortably numb!

Do Not PM me for Support unless invited!
I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -


Donate A Bible! | Quad Link | TOTM Winner.

Offline Crip

  • Administrator/Owner
  • Hero Member
  • *****
  • Posts: 5,390
  • Gender: Male
  • Say it ant true?
    • Cripzone
Re: Help adding a button
« Reply #4 on: Aug 01, 10, 03:10:50 PM »
Just a thought ..
actually you could add a direct link to your Blog via your Banner image in your Forum  ...
Logged
I have become comfortably numb!

Do Not PM me for Support unless invited!
I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -


Donate A Bible! | Quad Link | TOTM Winner.

misstami

  • Guest
Re: Help adding a button
« Reply #5 on: Aug 01, 10, 03:19:24 PM »
Quote from: Crip on Aug 01, 10, 02:56:17 PM

Add this:
Code: [Select]
// How about the [blog] button?
       echo '
        <li><a href="http://www.bontempsrp.com/wordpress/index.php" target="_blank"><span>BLOG</span>< / a></li>';
...?

That worked perfectly! Thank you so much.
Logged

Offline Crip

  • Administrator/Owner
  • Hero Member
  • *****
  • Posts: 5,390
  • Gender: Male
  • Say it ant true?
    • Cripzone
Re: Help adding a button
« Reply #6 on: Aug 01, 10, 03:29:56 PM »
Great , nice theme btw .. :P
Logged
I have become comfortably numb!

Do Not PM me for Support unless invited!
I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -


Donate A Bible! | Quad Link | TOTM Winner.

misstami

  • Guest
Re: Help adding a button
« Reply #7 on: Aug 02, 10, 09:57:06 PM »
I really like the theme. It was very easy to work with and modify for my forum. That was the easiest time I've had adding a banner to a forum ever. And switching the link colors.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • Cripzone »
  • Forum »
  • Theme Support »
  • Theme Support (Moderator: Crip) »
  • Help adding a button
 

Recent

  • Can I Sit Next To You Gir... by Crip
    [Feb 03, 12, 02:32:39 PM]
  • Rush! by Scrubmeister
    [Feb 03, 12, 09:13:13 AM]
  • Maxx - Happy Birthday! by Maxx
    [Feb 02, 12, 04:08:15 PM]
  • Quote by Crip
    [Feb 02, 12, 09:59:25 AM]
  • Fine Tuning BR Finale by TLone
    [Feb 01, 12, 08:09:41 PM]
  • Modified CoalBlack? by Lyfing
    [Jan 24, 12, 02:31:55 PM]
  • Tom Petty! by Crip
    [Jan 22, 12, 12:26:45 PM]
  • The Doors! by Crip
    [Jan 21, 12, 11:58:01 AM]
  • Theme Edit Basics finding... by Maxx
    [Jan 20, 12, 07:58:24 AM]
  • Old Man! by Maxx
    [Jan 19, 12, 05:14:50 PM]

Stats

Members
  • Total Members: 516
  • Latest: streic
Stats
  • Total Posts: 5302
  • Total Topics: 844
  • Online Today: 21
  • Online Ever: 146
  • (Feb 15, 11, 07:14:16 PM)
Users Online
Users: 1
Guests: 16
Total: 17
Maxx
  • SMF 2.0.2 | SMF © 2011, Simple Machines
    TinyPortal © 2005-2011
  • XHTML
  • RSS
  • WAP2
Style308 by, Crip