Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Bill.Ramby - helmikuu 20, 2006, 09:22:11 AP

Otsikko: Looking for a "How-to"
Kirjoitti: Bill.Ramby - helmikuu 20, 2006, 09:22:11 AP
I'm looking for a "How-to" on adding a button next to the "Quote" button in posts. Any wave in the general direction would be appreciated.

Regards
Bill
Otsikko: Re: Looking for a "How-to"
Kirjoitti: gerrymore - helmikuu 20, 2006, 12:27:24 IP
You mean you want a button to input an external link when tou reply with a quote?

Hit quote, then a like below hit
Otsikko: Re: Looking for a "How-to"
Kirjoitti: Bill.Ramby - helmikuu 20, 2006, 12:31:08 IP
No. When viewing the post, like you are now, I want a button next to the quote button that launches a web link. Basically calling up the google translation page in a new window.
Otsikko: Re: Looking for a "How-to"
Kirjoitti: snork13 - helmikuu 20, 2006, 12:37:49 IP
check out the Display.template.php file within yout theme folder

-snork
Otsikko: Re: Looking for a "How-to"
Kirjoitti: JayBachatero - helmikuu 20, 2006, 01:25:07 IP
Ok do this.

Koodi (find) [Valitse]

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="doQuote(', $message['id'], ', \'', $context['session_id'], '\'); return false;">', $reply_button, '</a>';


Koodi (add before) [Valitse]

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="OUTSIDE LINK"><img src="IMGSOURCE" align="middle" alt="ALT TEXT" />TEXT HERE</a>';