Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-27-2009, 02:34 PM
jandb jandb is offline
 
Join Date: Aug 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.



--------------- Added [DATE]1251429781[/DATE] at [TIME]1251429781[/TIME] ---------------

Anyone? I just need to know where the code is for the message reply box.
Reply With Quote
  #2  
Old 08-28-2009, 03:25 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try searching on "button*" in "articles" "titles only" to find an article on this subject.
Reply With Quote
  #3  
Old 08-28-2009, 03:39 AM
jandb jandb is offline
 
Join Date: Aug 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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/>
Reply With Quote
  #4  
Old 08-28-2009, 03:44 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-28-2009, 03:46 AM
jandb jandb is offline
 
Join Date: Aug 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-28-2009, 03:58 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-28-2009, 04:04 AM
jandb jandb is offline
 
Join Date: Aug 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 08-28-2009, 03:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:10 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.06859 seconds
  • Memory Usage 2,227KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete