vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - CES Parser Permissions (https://vborg.vbsupport.ru/showthread.php?t=138476)

punjabi.king 08-26-2008 02:21 AM

there is a bug in shoutbox and postbit
im using 3.27.2 version can anyone help?

nerofix 08-26-2008 09:39 AM

Quote:

Originally Posted by punjabi.king (Post 1607025)
there is a bug in shoutbox and postbit
im using 3.27.2 version can anyone help?

Only with some more information I think. What kind of bug?

thincom2000 08-26-2008 05:48 PM

The shoutbox fix is located somewhere in this thread. Just do a "Search this mod" for "shoutbox"

As for using raw custom profile fields, I know I have done this for some other members, but don't have a copy of the code myself. If they would be generous enough to post the plugin (member_complete) that I wrote for them, it would help some more people.

nerofix 08-26-2008 07:12 PM

Okay I got it,

I've wrote a new plugin in member_start and added following code:

Code:

if ($userinfo['fieldX'])
{
if (!is_object($bbcode_parser))
{
    require_once(DIR . '/includes/class_bbcode.php');
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['fieldX'] = $bbcode_parser->parse($userinfo['fieldX'],0, true);
}

( X = number of profile field )

Works great in vB 3.7.3 :)

thincom2000 08-26-2008 08:02 PM

Not exactly the official fix, and I'm not sure if it uses the permissions correctly, but I'm glad you worked out something.

nerofix 08-26-2008 08:32 PM

I'm not a plugin professional, so this plugin might be not perfect that's right. I just thought that you perhaps could build a such or better plugin into your $vbulletin->options['ces_parse_fields'] .

:)

punjabi.king 08-26-2008 10:54 PM

its not working for me, the first bug is fixed as thincom2000 replied about shoutbox

but now im trying to let members embed youtube video
but whatever they enter stays the same intead of embeding... please help

nerofix 08-26-2008 11:25 PM

How do you try to embed the youtube video? With <embed> code or BB-code ?

Did you already checked the CES Parser settings in your vbulletin options? Remember to enter the profile field number of the field you want to be parsed.

punjabi.king 08-26-2008 11:28 PM

^ yeah i checked settings in vbulletion options
i want them to embed it using <embed>

do u have a solution??

nerofix 08-26-2008 11:53 PM

I'd have 2 solutions.

The first is not recommend do to higher security risk, but is your choice:

1.) Check your CES Parser Settings again and in the field "Banned HTML tags" remove the word "embed". Then save.

The problem here is that your users can now embed youtube videos, but also they can embed every other flash-applications which can be a security risk.

The second solution I use, ..

2.) Add new BB-Code:

Go Admin CP -> Custom BB Codes -> Add New BB Code

Title - YouTube
Tag - youtube
Replacement:
Code:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
Example - [youtube]zvC8GpOL4Lk[/youtube]

Description - Use the movie code from the YouTube URL in your browser.
For example, http://www.youtube.com/watch?v=zvC8GpOL4Lk


-----------------------------------------

Now after adding the new BB-Code, just enter [youtube]zvC8GpOL4Lk[/youtube] in your profile field and it should work.

punjabi.king 08-27-2008 12:13 AM

^ thanks but that's what i was trying and it didn't work....

punjabi.king 08-27-2008 12:25 AM

well didn't worked for me, so i had to unistall....
but anywayz thanks to nerofix and thincom2000 for your support....

nerofix 08-27-2008 12:36 AM

Both solutions doesn't work for you? That's a bit mysterious then :erm:

punjabi.king 08-27-2008 12:45 AM

yeah still waiting for thincom2000 to reply..
im kinda confused too, tried everything even through the template

nerofix 08-27-2008 08:49 AM

And embedding of other BB-Code like [img] works? Okay then wait for thincoms reply =)

thincom2000 08-27-2008 04:12 PM

EDIT: You already removed the EMBED code from the banned tag list, so I need to investigate this a little further. But it's possible that the unparsed embed is now saved to the post cache, so see if clearing that helps.

punjabi.king 08-27-2008 07:00 PM

may be its cuz im using 3.7.2

anyone else tested on 3.7.2 ???

thincom2000 08-27-2008 08:12 PM

I'm running it on 3.7.2 ... XD

nerofix 08-28-2008 12:50 AM

I'm running 3.7.2 as well :)

Thincom, I need a solution for the plugin code in this reply ..

Special characters like "&" or "<" or ">" are getting transformed in my fields to html code like &lt;

You know a solution?

thincom2000 08-28-2008 04:07 PM

This should do it. Your member_complete plugin should look like this:

PHP Code:

require_once(DIR '/includes/ces_permissions.php');

if (
FILE_VERSION >= '3.7.0')
{
    
$userinfo =& $blockobj->profile->userinfo;
}

if (empty(
$bbcode_parser))
{
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list(true));
    
$bbcode_parser->ces_options = array();
}

$un_parse explode(' '$vbulletin->options['ces_parse_fields']);
$un_parse array_flip($un_parse);
ces_permissions_create($bbcode_parser'ces_profile');

foreach (
$userinfo AS $key => $value)
{
    if (
strpos($key'field') !== 0)
    {
        continue;
    }

    
$keynum str_replace('field'''$key);

    if (empty(
$keynum) OR $un_parse["$keynum"] === null)
    {
        continue;
    }

    
$save_tag_list $bbcode_parser->tag_list;

    if (empty(
$bbcode_parser->ces_options['ces_profile'][$userinfo['userid']]))
    {
        if (
$userperms['ces_parser_permissions'] !== null)
        {
            
$userinfo['permissions'] = $userperms;
        }
        else
        {
            
$userinfo['permissions'] = cache_permissions($userinfo);
        }

        
$bbcode_parser->ces_options['ces_profile'][$userinfo['userid']] = convert_bits_to_array($userinfo['permissions']['ces_parser_permissions'], $vbulletin->bf_ugp['ces_parser_permissions']);
    }

    
$bbcode_parser->ces_options['current_userid'] = $userinfo['userid'];
    
$userinfo["$key"] = $bbcode_parser->parse(htmlspecialchars_decode($value), 'ces_profile');

    
$bbcode_parser->tag_list $save_tag_list;



nerofix 08-28-2008 09:42 PM

Thank you again for your support, so nice of you and works perfect!

marcossalazar 09-12-2008 03:59 PM

Is anyone else getting a DB error when uploading the uploaded vba news fix? It is not working for me and created a DB error when going to the VBA page.

thincom2000 09-13-2008 03:09 AM

Well, what is the DB error?

eviltechie 09-14-2008 05:48 PM

I installed this, and it accomplishes the goal of showing BBCode/HTML, etc in the profile fields. However, I was working on some other things in the admin panel, and saved a usergroup for an unrelated reason...and instead of saving my changes it made a duplicate usergroup with the same name and the changes were saved in that. I worked on this for awhile, even going as far as disabling the product. Nothing worked. I eventually uninstalled it and usergroups started behaving normally again. Saving changes to the group that was being edited, not creating duplicates, etc.

I want to use this, but I can't as long as this bug exists.

I'm on 3.7.3 PL1.

Any ideas?

thincom2000 09-14-2008 06:08 PM

This is not something the mod would do. It only adds bitfields to the admin panel. This would not cause a duplication error. Please check your server logs to see if there were any errors associated with this happening.

theybannedme 10-30-2008 06:09 PM

Quote:

Originally Posted by Detomah (Post 1505077)
Is this hack anywhere near having the "extensive vbulletin blog testing" part being added so that blogs will parse bbcode properly? Or am I missing something?

BBcode appears to parse fine for the blog bits in the tab on the memberinfo page, but nothing at all in the actual blog section itself.

This problem still exists... This is a great mod btw :)

nerofix 10-30-2008 06:20 PM

Well, this problem is default by vbulletin. Only the blog entry itselfs parse bbcode when you watch the entry. In every overview or blog preview, bbcode wont get parsed.

erdiyilmaz 11-08-2008 08:38 AM

aLthough i choose admincp usergroup manager admins can use htmL tags in their messages/theats, it doesn't working (v3.7.4)

so i'm going to unistaLL it. thanks.

marcossalazar 11-08-2008 01:54 PM

Quote:

Originally Posted by erdiyilmaz (Post 1661668)
aLthough i choose admincp usergroup manager admins can use htmL tags in their messages/theats, it doesn't working (v3.7.4)

so i'm going to unistaLL it. thanks.

Is this the only problem? Is the rest of it working okay?

thincom2000 11-08-2008 06:12 PM

You have to have HTML enabled for the particular forum/message type first in vBulletin's own settings. The mod does not attempt to override those settings.

nerofix 11-22-2008 02:47 PM

Hi Thincom,

I got something new for you :)

With 3.8 beta 3, the bb code in social groups threads and in the blog doesnt work anymore.

Deactivating helps, but then in profile fields the bb code wont work anymore and in profiles I get following error:

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4074

Hopefully you have some time left to update your mod :)

thincom2000 11-23-2008 04:31 AM

I haven't tested this completely with 3.8 yet. When I do I'll let you know. Also, I cannot fix the blog without access to someone's blog install. It is not worth it for me to purchase the blog to fix a bug in a free addon.

nerofix 11-23-2008 10:43 AM

Like I said, it's not a problem to provide you access to our blog install and 3.8 vb ... I will send you login details in pm later :)

thincom2000 02-06-2009 03:08 AM

I think I solved the issues in social groups threads and picture comment threads in vb 3.8 series. If you ran into any other issues with 3.8, let me know. Otherwise I will be releasing an update shortly.

The blog should still work. Keep in mind that the "blog fix" that is posted here edits the blog product/plugin, so if you performed an update, you need to reapply the fix.

nerofix 02-13-2009 08:23 PM

Hey thincom,

sorry got to work outsite my country at the moment, I'll be back in some weeks I think, then I'll get back to you... I didn't run into other issues.. Only blog bb-code isn't working, like in social group threads. Everywhere else no problems with 3.8.1

students_forum 02-14-2009 07:25 AM

Quote:

Originally Posted by thincom2000 (Post 1735750)
I think I solved the issues in social groups threads and picture comment threads in vb 3.8 series. If you ran into any other issues with 3.8, let me know. Otherwise I will be releasing an update shortly.

The blog should still work. Keep in mind that the "blog fix" that is posted here edits the blog product/plugin, so if you performed an update, you need to reapply the fix.

Hey, I searched through a few posts here but didn't see this question.
The seems to prevent the reputation received on the usercp from parsing :S
could you please help me, thanks :)

thincom2000 04-03-2009 02:24 AM

I was unaware that reputation comments were supposed to even parse in the first place...

tinycg 07-17-2009 12:02 AM

After installing, for some reason I dont see the options in the Vbulletin options, I've attempted to uninstall and reinstall, but that hasnt helped. I do see the options in the usergroup permissions, and the plugins all seem to have installed from doing an audit of the product-xml.

Does anyone have any suggestions?

imrc 08-06-2009 07:53 AM

Same problem here. AdminCP -> vBulletin Options -> CES Profile Fields doesn't exist. Although everything else seems to work fine. This is on 3.8.3.

thincom2000 08-09-2009 03:22 AM

The setting group "CES Profile Fields" has a Display Order of 0. I believe you will only be able to see these settings if debug mode is active, or if you have modified your options to sort another way (e.g. alphabetically).

To get "CES Profile Fields" to appear without doing either, run the following MySQL query:
Code:

UPDATE settinggroup
SET displayorder = 1000
WHERE product = 'ces_html_profile'



All times are GMT. The time now is 03:31 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.01571 seconds
  • Memory Usage 1,838KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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