View Full Version : adding a pic upload button?
jandb
08-27-2009, 02:34 PM
Where in the code can I go to add a tinypic image button. So when someone clicks it it wil open a tinypic upload box? I had this on my old smf forum.
https://vborg.vbsupport.ru/external/2009/08/10.jpg
--------------- Added 1251429781 at 1251429781 ---------------
Anyone? I just need to know where the code is for the message reply box.
Lynne
08-28-2009, 03:25 AM
Try searching on "button*" in "articles" "titles only" to find an article on this subject.
jandb
08-28-2009, 03:39 AM
Well the code I have is this. If I edit the editor_toolbaron I keep getting errors and the text box is gone.
<br /><a href="javascript:void(0);" id="tinypic_show_plugin" onclick="showTinypicPlugin(); document.getElementById(\'tinypic_show_plugin\').s tyle.display = \'none\';"><img src="http://www.v-twinlounge.com/img/uploadimage.gif" title="'.$txt['tinypic_upload'].'" alt="'.$txt['tinypic_upload'].'" border="0"/></a>
<script type="text/javascript">
tinypic_layout = "wide";
tinypic_type = "both";
tinypic_links = "forum";
tinypic_language = "en";
tinypic_search = "true";
tinypic_autoload = false;
tinypic_callback_url = document.location.href.substr(0,document.location. href.lastIndexOf("/"))+"/callback.html";
tinypic_callback_text = "'.$txt['tinypic_add_to_post'].'";
</script>
<script src="http://plugin.tinypic.com/j/plugin.js" type="text/javascript"></script>
<br/>
Lynne
08-28-2009, 03:44 AM
Simply saying you "keep getting errors" isnt' going to help anyone help you. You need to say what the exact errors are if you expect help. Unfortunately, I'm not great with javascript, so I can't help with the javascript part.
jandb
08-28-2009, 03:46 AM
The error is this
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jandb/public_html/v-twinlounge.com/testvb/forums/includes/adminfunctions_template.php(3950) : eval()'d code on line 156
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Lynne
08-28-2009, 03:58 AM
I can tell that your syntax is wrong in your html. You can't do this:
title="'.$txt['tinypic_upload'].'"
You would just do this:
title="$txt[tinypic_upload]"
You can't use php in templates which is what you look like you are trying to do.
jandb
08-28-2009, 04:04 AM
How would you suggest I do it? This is what I used in my smf forum and it worked fine. Wich all of thiers is based around php, I know that. So what are my options?
Lynne
08-28-2009, 03:21 PM
Well, I told you how you needed to change those variables. Did you change them? I see it like that in at least three places. After you change it, if you still have problems saving, post exactly the code you used.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.