vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   mod bbcode (https://vborg.vbsupport.ru/showthread.php?t=209496)

zero5854 03-26-2009 11:39 AM

mod bbcode
 
Does anyone know how to get custom bbcode to appear not just on a new post but on edit a post?

I use this mod message bbcode along withbbcode permissions so only admins and mods can use the mod message bbcode BUT it only shows up whena new post is made?

thanks

TigerC10 03-26-2009 12:15 PM

How do you mean it "shows up" ?? You mean like a button in the editor?

zero5854 03-26-2009 01:11 PM

yes but when I edit a post the mod bbcode doesnt show up? Only when I make a new post?

TigerC10 03-26-2009 01:26 PM

If your bbCode is defined to have a graphic image, it will only automatically display in the full editor. Furthermore, the button will display for all users. Even if you have advanced permissions to prevent the use, the button still displays.

View this article about adding buttons to the editor:
https://vborg.vbsupport.ru/showthread.php?t=97295

You will use a slight modification... The button code for you will change
Code:

<if condition="can_moderate(0,'',$bbuserinfo[userid])">
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_BBCODE"><img src="$stylevar[imgdir_editor]/YOURBUTTONIMAGE" width="21" height="20" alt="$vbphrase[YOURALTPHRASE]" /></div></td>
</if>

This will hide the button from people who can't moderate.

You will also want to edit more than just the editor_toolbar_on template, since this is the full editor. You will also edit postbit_quickedit.

Note: If you edit these templates this way, you should remove the image in the bbcode manager that is associated with the bbcode (or else the button will appear 2 times in your full editor).

zero5854 03-26-2009 01:55 PM

ok ill look into this thanks! BTW it doesnt show in the full editor either when editing a post!

where do I add that code u posted?

EDIT getting error with ur code

Code:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected '/', expecting ']' in /home/*******/public_html/includes/adminfunctions_template.php(3938) : eval()'d code on line 157

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.



All times are GMT. The time now is 11:48 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.01034 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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