Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: nay27uk on March 23, 2008, 06:43:23 AM

Title: Post screen
Post by: nay27uk on March 23, 2008, 06:43:23 AM
i was wondering, is ther anyway of altering the text on the post screen that says (more attachments) (//http://javascript:addAttachment();%20void(0);)
and changing it to a button so it is esier to see. also wher do i alter the attachements bit so it is permanently shown I.E not aditional options dropdown
Title: Re: Post screen
Post by: Eliana Tamerin on March 23, 2008, 12:57:33 PM
Admin CP > Themes and Layouts > Theme Settings > Default theme > Uncheck "Enable Collapsible Options on Post" or something like that.
Title: Re: Post screen
Post by: nay27uk on March 24, 2008, 06:52:03 AM
thanks and how do i change it to a button for mor atachements
Title: Re: Post screen
Post by: Eliana Tamerin on March 24, 2008, 07:02:06 AM
That will also show the attachments if permission for those is enabled.
Title: Re: Post screen
Post by: Rumbaar on March 27, 2008, 04:43:28 AM
That is controlled by language files

Post.english.php
$txt['more_attachments'] = 'more attachments';
You can alter that to the HTML to link to an image/button if you like.
Title: Re: Post screen
Post by: conectado on April 02, 2008, 11:37:57 PM
QuoteThat is controlled by language files

Post.english.php
Code: [Select]
$txt['more_attachments'] = 'more attachments';You can alter that to the HTML to link to an image/button if you like.

Could you please be a little bit more specific about making the button??

I mean , what should i write instead of
Quote'more attachments';
, if i want to link that option to a button which is in for example: www.hello.com/myfolder/myimage.gif

Thank you very much
Title: Re: Post screen
Post by: conectado on April 03, 2008, 06:54:07 PM
Someone could help me...??

I guess it's not something very complex but i need your help

Thanks
Title: Re: Post screen
Post by: Eliana Tamerin on April 03, 2008, 09:01:56 PM
No, you'd need to alter the line in Post.template.php instead. I'll show you on the default Post.template.php. If your theme has it's own, you will need to alter that too.

Find this:
<span id="moreAttachments"></span> <a href="javascript:addAttachment(); void(0);">(', $txt['more_attachments'], ')</a><br />

Find this part:
(', $txt['more_attachments'], ')

Replace with this:
<img src="http://www.hello.com/myfolder/myimage.gif">

Save and upload the file. That should work.
Title: Re: Post screen
Post by: conectado on April 03, 2008, 10:39:17 PM
Sorry for my ignorance but this sgould work on smf 1.1.4?

and what is the string to modify (put an image to)  "Reply"

Thanks
Title: Re: Post screen
Post by: Eliana Tamerin on April 03, 2008, 10:45:19 PM
You don't modify strings. Do the same thing you did with this, find the name of the text string in the Display.english.php file, then search for it in Display.template.php. It'll probably be something similar to before, just stick in your <img src="url"> tag where the text variable is.
Title: Re: Post screen
Post by: conectado on April 04, 2008, 12:56:01 AM
Problem Solved!

Thanks everyone

I found that the string associated with "Reply" was $txt[146]

So i just replaced this in the index.english.php :

$txt[146] = 'Reply';

with this

$txt[146] = '<img src="http://www.hello.com/myfolder/myimage.gif">';

Thanks again


Title: Re: Post screen
Post by: Eliana Tamerin on April 04, 2008, 01:05:27 AM
I would not advise you to put HTML in the language files. Do what I explained, HTML belongs in the template files, not the english files.
Title: Re: Post screen
Post by: Rumbaar on April 04, 2008, 04:20:25 AM
It should be perfectly fine to place HTML in language strings Eliana Tamerin :)  Also I would say putting it into the languages strings would be better than hard coding it to the template file.  As if you are linking to a image with text you'll want to have a different link for each installed language.