Recent Topics

Members
Stats
  • Total Posts: 10,749
  • Total Topics: 1,374
  • Online today: 301
  • Online ever: 879
  • (Jan 21, 20, 05:49:15 PM)
Users Online
Users: 0
Guests: 275
Total: 275

Help adding a button

Started by misstami, Aug 01, 10, 01:55:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

misstami

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)
// 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()

if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum')))


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


Crip

sorry .. Lol..

clicked modify instead of Quote
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

misstami

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/

Crip

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:

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


Add this:

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

...?
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

Crip

Just a thought ..
actually you could add a direct link to your Blog via your Banner image in your Forum  ...
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

misstami

Quote from: Crip on Aug 01, 10, 02:56:17 PM

Add this:

// 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.

Crip

Great , nice theme btw .. :P
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

misstami

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.