vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Insert text into editor (https://vborg.vbsupport.ru/showthread.php?t=179442)

Boofo 05-16-2008 03:35 PM

The one I did only works on post replies in the postbit, not new posts or new threads.

GameWizard 05-16-2008 03:46 PM

Can you link me to the code anyway? It may provide me with some insight as to how I can maybe adapt it to my existing code.

Lynne 05-16-2008 05:31 PM

Quote:

Originally Posted by GameWizard (Post 1521787)
Can you link me to the code anyway? It may provide me with some insight as to how I can maybe adapt it to my existing code.

I don't believe the mod was ever released. But, I think boofo has seen it in action and then came up with his own version. Perhaps tempt the bear with some salmon to release his mod. :D

Boofo 05-16-2008 06:51 PM

Salmon? That's the best you can come up with? Although that really doesn't sound too bad right now. OK, I'll take it! ;)

Lynne 05-16-2008 07:42 PM

I thought bears liked salmon? ;)

Boofo 05-16-2008 08:06 PM

Actually this bear does! Maybe I really am part bear. :(

GameWizard 05-17-2008 06:46 AM

Quote:

Originally Posted by Boofo (Post 1522046)
Actually this bear does! Maybe I really am part bear. :(

Then only part Salmon for you! You silly bear!

Hopefully someone can help... but I also managed to discover another possible way of getting this to work, rather than using pure javascript, maybe there is another way of doing this via php? In the stencil hack, here are some interresting bits of code I discovered that seem to do what I need, but now need to find a way to actually create a button that performs the actions on demand, rather than pre-defined in the AdminCP as it currently does.

PHP Code:

$foruminfo['stencilmsg'] = str_replace("[username]",$vbulletin->userinfo['username'],$foruminfo['stencilmsg']);

$newpost['message'] = $foruminfo['stencilmsg']; 

This being the code which is responsible for outputing the code into the $newpost['message'] area, which is what I need. Whereas $foruminfo['stencilmsg'] is what I input in the AdminCP to appear in the message area. But I need a way to do this ondemand via button/link. Any help?

Boofo 05-17-2008 06:54 AM

This is what I use for the drop down javascript if it will help you at all:

Code:

<div class="vbmenu_popup" id="rules_$post[postid]_menu" style="display:none">
 <table cellpadding="4" cellspacing="1" border="0">
 <tr>
  <td class="thead">$vbphrase[postbit_rules]</td>
 </tr>
 <tr>
  <td class="vbmenu_option"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]&amp;u=$post[userid]&amp;textsel=1">Bump Thread</a></td>
 </tr>
 </table>
</div>

I have it doing case statements for the various templates.

GameWizard 05-17-2008 07:20 AM

Not quite sure what your code pertains to, but the only difference to regular VB code is at the end of the code you have textsel=1 which seems to do nothing on my board. I guess it's hopeless for me then. :(

Boofo 05-17-2008 08:02 AM

The textsel=1 is from the case statement part of the code. I have different templates to insert into messages. As my setup doesn't work on new threads or posts, it wouldn't do you any good, anyway. I was just showing you the part for the javascript drop down since you said that was the part you were having problems with. Actually there are 2 parts to it but it works like a basic menu dropdown like in the navbar. Maybe I'm misunderstanding what you are wanting to do. That is entirely possible, given my age, and living in the woods. ;)


All times are GMT. The time now is 01:10 AM.

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.01690 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete