vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   adding a pic upload button? (https://vborg.vbsupport.ru/showthread.php?t=221888)

jandb 08-27-2009 02:34 PM

adding a pic upload button?
 
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 [DATE]1251429781[/DATE] at [TIME]1251429781[/TIME] ---------------

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.



Code:

<br /><a href="javascript:void(0);" id="tinypic_show_plugin" onclick="showTinypicPlugin(); document.getElementById(\'tinypic_show_plugin\').style.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:
HTML Code:

title="'.$txt['tinypic_upload'].'"
You would just do this:
HTML Code:

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.


All times are GMT. The time now is 05:11 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01122 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete