TinyPortal

Development => Support => Topic started by: Resident Geek on March 30, 2007, 12:56:57 AM

Title: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 12:56:57 AM
I've removed buttons I don't want from when people go to post, but I'd like to make my own. Where is the info stored.
in post.template.php, It has

'description' => $txt[#]

where # is a number.

$txt is an array correct? and the number would be the key for the array correct?
Well I can't seem to find where that description info is being stored into the array. Anyone know?
Title: Re: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 12:57:32 AM
ummm. What's up with the weird dot in the middle of my post???
Title: Re: BBC Code Buttons
Post by: rebelrose on March 30, 2007, 01:56:22 AM
If you would have put that in code brackets the dot would not be there

Quote from: Resident Geek on March 30, 2007, 12:56:57 AM



'description' => $txt[#]

where # is a number.




Just one of those things  :)
Title: Re: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 01:59:51 AM
OK. Fixed that, ;D But not what my main question is about.
Title: Re: BBC Code Buttons
Post by: JPDeni on March 30, 2007, 02:04:09 AM
The part of the $txt array which is referenced in Post.template.php is defined in languages/Post.english.php (or other similar language files -- Post.language.php -- if you have other languages installed).
Title: Re: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 02:07:36 AM
Dummdy dee dumm dumm dummmm!
Of course. Anything directly related the words put up on the screen would be in a language file. Thanx. I'll check there now.....
Title: Re: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 02:20:37 AM
Alright! I've fixed that part...
Now where does it declare the image for the button?
It isn't declared in post.template.php.
So where is it declared then?
Title: Re: BBC Code Buttons
Post by: JPDeni on March 30, 2007, 03:06:06 AM
This whole discussion has nothing to do with Tiny Portal. Just sayin'.

Yes, the image is declared in Post.template.php. For example:


'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]),


The image file for that is bold.gif, which is in the images/bbc/ directory in each of your themes. IOW, the first word in the button definition is the name of the associated image file.
Title: Re: BBC Code Buttons
Post by: Resident Geek on March 30, 2007, 03:08:36 AM
Awesome! Thanx. Sorry for asking it here. I sometimes ask the right questions at the wrong forum.
I've asked TP questions at SMF before.
I'm a lame brain for being a Geek sometimes.  :idiot2:
Thanx again!