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)
-   -   Integration with vBulletin - CES Wiki Conditionals (https://vborg.vbsupport.ru/showthread.php?t=147237)

Wayne Luke 05-18-2007 06:58 PM

Quote:

Originally Posted by majorxp (Post 1249228)
This enables strong functionality that is not normally given to regular users of a site. Furthermore, it is easily broken by a bad edit.

Then don't use it. Quite simply, I see a Wiki as simply another form of content management. I may not want the general public to change my content and integrations like this allow me to lock things down without worrying about protecting every page.

RedGTiVR6 05-25-2007 02:20 PM

Now that I have this installed (after updating everything on our forum with the newest vB release, et. al.)...I'm not sure how to utilize the "condition".

I'm no coder, so I'm a bit lost as to the conditions I would need to use.

Can anyone help me and my ignorant self? :)

thincom2000 05-26-2007 01:11 AM

What are you trying to accomplish?

A frequently used condition on my own and probably most other forums utilizing this hack is

PHP Code:

is_member_of($bbuserinfo, array(USER/MEMBERGROUP IDS SEPARATED BY COMMAS)) 


RedGTiVR6 05-29-2007 10:02 PM

that's what I was looking for!

Thanks!

Now, I've put the following at the beginning of this article:

Code:

<if condition="is_member_of($bbuserinfo, array(6))">
Doesn't work.

You can find the article here:

http://www.mp3car.com/wiki/index.php/Bit-perfect

I'm just using this article as a test since it's a little known article on our forum.

I'm trying to block out text to only be seen by admins right now, but it's not working.

I'm guessing I'm not using the code properly?

thincom2000 05-30-2007 02:58 AM

Well first of all, your </else> should be <else />. Also the condition needs to be wrapped in quotes so the most recent revision is incorrect.

According to your Special:Version page, MediaWiki is not detecting the extension. I had the same problem and released 1.1.0 to fix it, only to realize that the hooks in vbWiki were not parsing.

In fact, I should be the only one with a working installation of this currently thanks to a bug in all current versions of vbWiki Pro. You can fix the bug by doing the following:

In vbwiki/arcane_vbulletin_core.php, find:
PHP Code:

function arcane_vb_fetch_hook$hookname )
{
    
arcane_vb_enter_vbulletin_mode();
    
    
$hook vBulletinHook::fetch_hook$hookname );
    
    
arcane_vb_leave_vbulletin_mode();


Replace with:
PHP Code:

function arcane_vb_fetch_hook$hookname )
{
    
arcane_vb_enter_vbulletin_mode();
    
    
$hook vBulletinHook::fetch_hook$hookname );
    
    
arcane_vb_leave_vbulletin_mode();

    return 
$hook;



RedGTiVR6 05-30-2007 12:59 PM

Code:

Warning: require_once(/.../vbulletin/vbWiki/vbConditions.php) [function.require-once]: failed to open stream: No such file or directory in /.../vbulletin/vbWiki/vbWiki.php(38) : eval()'d code on line 1
 
Fatal error: require_once() [function.require]: Failed opening required '/.../vbulletin/vbWiki/vbConditions.php' (include_path='/.../wiki:/home/mp3car/public_html/wiki/includes:/home/mp3car/public_html/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /.../vbulletin/vbWiki/vbWiki.php(38) : eval()'d code on line 1

That's the error I get when I make the change to the code that you suggested.

thincom2000 05-30-2007 03:38 PM

I remember that in the last version you had to change the single quotes to double quotes to get that error to stop. Try that in the vbw_start plugin.

I still have absolutely no idea why this error is isolated to your installation.

RedGTiVR6 05-30-2007 06:07 PM

Added the double quotes as you suggested.

The wiki page will come up, but this is at the top of it:

Code:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /.../vbulletin/vbWiki/vbWiki.php(38) : eval()'d code on line 1

thincom2000 05-31-2007 02:27 AM

And you do have vbConditions.php in the vbWiki folder?

RedGTiVR6 05-31-2007 02:39 AM

Yes.

if I remove the double quotes, the parse error goes away at the top of the screen but the code still doesn't do anything from within the article.

I've also tried completely reinstalling the mod as well, no dice.

The mod does show up in the special pages now.


All times are GMT. The time now is 11:35 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.01067 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_php_printable
  • (1)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
  • (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