Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CES Wiki Conditionals Details »»
CES Wiki Conditionals
Version: 1.1.0, by thincom2000 thincom2000 is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.x Rating:
Released: 05-13-2007 Last Update: 05-20-2007 Installs: 10
Uses Plugins
Additional Files  
No support by the author.

CES WIKI CONDITIONALS
Version: 1.1.0
Requires vbWiki Pro v1.3 RC3 or later (also unsupported).

*** NEWS ***
5/30/2007 - linked first post to a bug fix for vbWiki Pro that prevents this mod from working
5/20/2007 - v1.1.0 released
5/14/2007 - v1.0.3 released on vb.org

Products to Install: 1
Plugins Included: 2
Files to Upload: 1
Template Edits: 0
Files to Edit: 0

What It Does:
Allows you to use vBulletin template conditionals in MediaWiki articles.

HTML Code:
<if condition="code"> ... <else /> ... </if>
Known Issues:
- Because of some bugs in the MediaWiki parser, nesting <if> tags inside each other will result in unexpected behavior.
- Some public versions of vbWiki Pro have a bug where the hooks don't work properly. Until a new build corrects this, use the fix here: https://vborg.vbsupport.ru/showthread.php?p=1257327
- You should NOT be using this mod to hide or show dynamic content based on Usergroup Permissions, since there are holes in the implementation.
- We have abandoned most of our other-party-wiki addons since we started our own wiki project for vBulletin called VaultWiki.

*** Changelog ***
As of Version 1.1.0:
- rewrote the parser function to use vBulletin's code
- fixed bug where the page would cache

As of Version 1.0.3:
- finally compatible with public versions of vbWiki Pro

As of Version 1.0.2:
- uses vBulletin's hook system
- else parameter changed to vBulletin's <else /> tag

As of Version 1.0.1:
- added else parameter

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-18-2007, 06:58 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by majorxp View Post
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.
Reply With Quote
  #13  
Old 05-25-2007, 02:20 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 05-26-2007, 01:11 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)) 
Reply With Quote
  #15  
Old 05-29-2007, 10:02 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #16  
Old 05-30-2007, 02:58 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;

Reply With Quote
  #17  
Old 05-30-2007, 12:59 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 05-30-2007, 03:38 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 05-30-2007, 06:07 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 05-31-2007, 02:27 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And you do have vbConditions.php in the vbWiki folder?
Reply With Quote
  #21  
Old 05-31-2007, 02:39 AM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 06:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05440 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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