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

sweet!

thanks for this!
Reply With Quote
  #3  
Old 05-14-2007, 08:03 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could we have a better description of what this does please?

Template conditionals?
Reply With Quote
  #4  
Old 05-15-2007, 01:06 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use the <if> ... <else /> tags from vBulletin's template system within wiki articles.
Reply With Quote
  #5  
Old 05-17-2007, 12:17 AM
majorxp majorxp is offline
 
Join Date: Aug 2005
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm really not quite sure on what the intended usage would be. I understand the functionality, but could you give an example where you would use it?
Reply With Quote
  #6  
Old 05-17-2007, 12:28 AM
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
I'm really not quite sure on what the intended usage would be. I understand the functionality, but could you give an example where you would use it?
I can think of some examples.

1) You have a documentation Wiki and want to include additional information for staff members outside of the public eye.

2) You want to leave annotations within an article to the author of the page.

3) You want to show different content based on usergroup. e.g. easily include advertising via a Wiki template for regular members and exclude it for paid members.

I am sure there are a million and one things that could be done.
Reply With Quote
  #7  
Old 05-17-2007, 03:02 AM
majorxp majorxp is offline
 
Join Date: Aug 2005
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess I could have spent a bit more time in my prior post and been more clear. Mediawiki is a platform designed to be open as possible. Tools like this that attempt to hide or protect content are inherently rife for problems.

Quote:
Originally Posted by Wayne Luke View Post
1) You have a documentation Wiki and want to include additional information for staff members outside of the public eye.
...and one bad edit by a user and the private information is shared with everyone. If you allow all users to edit, someone will eventually foul it up. If you don't allow users to edit, why are you using a wiki? Also, see below for ways to get around the code parsing to show the entire page anyway.

Quote:
Originally Posted by Wayne Luke View Post
2) You want to leave annotations within an article to the author of the page.
Isn't that what the discussion page is for?

Quote:
Originally Posted by Wayne Luke View Post
3) You want to show different content based on usergroup. e.g. easily include advertising via a Wiki template for regular members and exclude it for paid members.
Again, see #1. If you want to include adverts in the wiki (and you are using vbpro as this tool requires) then just edit the vB templates instead to conditionally include them (or add the logic to the template php page).

Quote:
Originally Posted by Wayne Luke View Post
I am sure there are a million and one things that could be done.
This enables strong functionality that is not normally given to regular users of a site. Furthermore, it is easily broken by a bad edit.

I did install the code on my running server and expected it to fail some simple 'hack' tests.
  • I tried inclusion on pages with code, and the resulting pages also parsed the code. I halfway expected this test to fail, but it didn't. Result = Pass.
  • I accessed the page using action=raw and I was able to see the raw code as well as all the content (including what should have been hidden from me). Result = Fail.
  • I searched pages for code "condition" and other code samples that I knew to exist in my test pages in lots of different ways. I seriously expected this to fail, and still can't figure out how exactly it passes, but no matter what I tried, I could not successfully search for code. Result = Pass.
  • I looked at the rss output of the pages including code and was able to see the fully generated page with all the code in the diffs. No matter how I tried to edit and cover my tracks, it was impossible to hide from rss. Result = Fail.
Two out of for test isn't bad. I expected worse. Not to go on a rant here, but additionally... I'm a little weary of giving users the ability to add vB conditionals to wiki pages at their whim. I'm really not sure why, but it is just waiting for someone to take advantage of somehow....

I'm not trying be difficult here or harsh, but I don't see this as a good solution for what it could be intended to be used for. Furthermore, this isn't anything against thincom2000, many of the extensions for mediawiki also fail these tests as well. Frankly, mediawiki isn't a platform for dynamically hiding or presenting content based on usergroups (which is really what the three examples above are - just in different flavors).
Reply With Quote
  #8  
Old 05-18-2007, 04:22 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using the new hooks available in vbWiki I should be able to get this to pass your other two tests. I will look into this.

And to give you some more ideas, I have used this code to displayed userinfo based on the logged in user. Also, on my site in particular, we run a wiki for editing by higher level Usergroups (when we launched it we pushed it as more of a CMS), and thus this was helpful in show/hiding information from editors, while not showing this content to for example unregistered users.
Reply With Quote
  #9  
Old 05-18-2007, 05:37 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On our site we wanted to use teh Wiki to host owners manuals for new products that are coming out. Sure, we can post them in the forum in a hidden forum then reformat everything to post it in the wiki...but why create more work than you have to?
Reply With Quote
  #10  
Old 05-18-2007, 06:53 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad this newest version is finally working for you, RedGTiVR6.
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 01:17 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.04467 seconds
  • Memory Usage 2,308KB
  • Queries Executed 23 (?)
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)bbcode_html
  • (5)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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