Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2006, 11:22 PM
SS9267547's Avatar
SS9267547 SS9267547 is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem with BBcode Removal

I was hoping someone could shed some light on a problem I'm having with my glossary script I'm working on. Now the problem is that I have information being accessed from a function and once that information is accessed and found it is to display the results in the script itself. Now the results is not to show any bbcode, html, quotes, etc. This is the code I want to use in the function.

PHP Code:
$glossarydescription htmlspecialchars_uni(strip_bbcode(fetch_trimmed_title(strip_quotes($foundterms['glossarydescription']), 100), falsetrue)); 
Now the result is that only half the bbcode is removed, for example the formatting tags like '[b]' but none of the tags like '[php], [code]', etc as well as smiles are removed. I've also tried it like this too.

PHP Code:
$glossarydescription strip_tags($foundterms['glossarydescription']); 
$glossarydescription strip_bbcode($foundterms['glossarydescription'], falsetrue);
$glossarydescription strip_strip_quotes($foundterms['glossarydescription']); 
However again only half the bbcodes and quotes are removed. Everything else still loads. Any ideas that someone might have on the issue?
Reply With Quote
  #2  
Old 12-07-2006, 01:13 AM
SS9267547's Avatar
SS9267547 SS9267547 is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So no one here at all has a clue? Ah I need to learn some better programming haha.
Reply With Quote
  #3  
Old 12-11-2006, 06:20 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Come on, help this man.

We are all eagerly awaiting the new version of his hack.

It is this one by the way: https://vborg.vbsupport.ru/showthread.php?p=1136110

StarBuG
Reply With Quote
  #4  
Old 12-12-2006, 12:34 PM
RS_Jelle RS_Jelle is offline
 
Join Date: Jul 2005
Posts: 1,276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To strip BBCode you need to include /includes/functions.php in your script, I think you are forgetting that

The options of the function:
PHP Code:
$stripped strip_bbcode($oldcode$stripquotes false$fast_and_dirty false$showlinks false); 
Don't set fast_and_dirty to true, that's not a very good thing (everyting with [x] [/x] is stripped).
Reply With Quote
  #5  
Old 12-13-2006, 03:37 AM
SS9267547's Avatar
SS9267547 SS9267547 is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

StarBuG: There will be no update ever again!

RS_Jelle: Thanks for the reply on the issue however it dosn't help to much. See normally I'm able to strip info, I know how to do this however in the function where I want it there is a werid problem. The result it shows is only half the bbcode being removed, for example the formatting tags like '[b]' but none of the tags like '[php], [code]', etc and even smiles aren't removed. This is the issue at hand, so I think I will need to figure something else to try. :tired:
Reply With Quote
  #6  
Old 12-15-2006, 09:10 PM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello.

Is there a central location e.g. 'class_bbcode.php' or hook whereby a particular tag (custom or otherwise) and its contents can be stripped globally (across all features e.g. calendar, forums, pm, signatures, etc.)? If so, how?

Thanks in advance.
Reply With Quote
  #7  
Old 12-15-2006, 10:38 PM
SS9267547's Avatar
SS9267547 SS9267547 is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I'm not sure what you want to strip, but the code used to srtip bbcode is in the 'functions.php' file under 'function strip_bbcode'. There are also other 'strip' commands in this file.
Reply With Quote
  #8  
Old 12-15-2006, 11:21 PM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply.

I want to create a custom tag but only want to use it under varying conditions. For example, it may be by usergroup or after a member reaches a certain number of posts, etc.

If I knew 1 location where I can 'unset' that custom tag from the $tag_list array based on one or both conditions previously mentioned, or find that function that nearly all message code regardless of the application (forum, pm, etc.) and strip out that custom tag, then that would be a great help.

Thanks again, in advance.

EDIT: Answer: http://www.vbulletin.com/forum/showthread.php?t=152002
Reply With Quote
  #9  
Old 12-20-2006, 12:20 PM
RS_Jelle RS_Jelle is offline
 
Join Date: Jul 2005
Posts: 1,276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SS9267547 View Post
RS_Jelle: Thanks for the reply on the issue however it dosn't help to much. See normally I'm able to strip info, I know how to do this however in the function where I want it there is a werid problem. The result it shows is only half the bbcode being removed, for example the formatting tags like '[b]' but none of the tags like '[php], [code]', etc and even smiles aren't removed. This is the issue at hand, so I think I will need to figure something else to try. :tired:
I always want to take a look at it on my test site if you send me the files, there should be something else, cause it should work fine normally
Reply With Quote
  #10  
Old 12-21-2006, 05:39 PM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have talked to Andreas, a vBulletin developer.

He said you should try:

Code:
$glossarydescription = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($foundterms['glossarydescription'], true), 100);
(No warranty)

I also send this as PM to you but got no response

Greetings

StarBuG
Reply With Quote
Reply


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 03:19 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.04278 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete