News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Adding links to post editor

Started by derekjwhitten, April 26, 2015, 08:01:10 AM

Previous topic - Next topic

derekjwhitten

Hi everyone.

I have an image uploader script running on my site, and I'd like to add a hyperlink on the new post page which will open the image uploader in a new window.

The uploader won't interact with the new post editor, it will just allow users to upload an image and display a URL on the screen. The user will then need to copy/paste the URL into the editor if they wish to embed the image.

My question is, where can I find the template file for the new post page so that I can add a hyperlink near the BBC buttons?

Thanks in advance for your help.

margarett

If you want to add a new button, like if you add a new BBC, the best you can do is to look at how existing MODs add said button ;)

If you just want to add a link below the BBC buttons, then look at Post.template.php, find this code
// What about smileys?
if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
echo '
<div id="smileyBox_message"></div>';

You can add the link after this "div". It will show up between the smileys and the post area ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

derekjwhitten

Great thanks! I was looking in that file but couldn't quite work out where to put my link.

It doesn't need to be a button like the BBC icons so adding a link in the template file will meet my needs.

Thanks for your help!

Advertisement: