Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Mediawiki Edits in Postbit & Profile Details »»
Mediawiki Edits in Postbit & Profile
Version: 1.0.0, by ndahiya ndahiya is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.0.1 Rating:
Released: 01-22-2010 Last Update: 01-22-2010 Installs: 12
DB Changes Uses Plugins Template Edits
Re-useable Code  
No support by the author.

This hack enables better integration between MediaWiki and vBulletin.

This hack displays a user's total edits made in mediawiki in their posts and on their profile page (similar to vBulletin post count).

Release Info:
v1.0.0: Initial Release

Requirements:
* MediaWiki
* MediaWiki/vBulletin Single Sign-On integration hack. If there is a problem making it work with vb4, please also see Post 112 in that thread.

To install:
* Add the product using the attached product file.
* Perform the 2 simple template edits outlined below.

Template Edits:
1. postbit_legacy or postbit
Find:
Code:
<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>
Add Below:
Code:
<dt>{vb:rawphrase total_wikiedits}</dt> <dd>{vb:raw post.wikiedits}</dd>
2. memberinfo_block_aboutme
Find:
Code:
<vb:if condition="$prepared['lastposturl']">
	<dl class="stats">
		<dt>{vb:rawphrase last_post}</dt>
		<dd><a href="{vb:raw prepared.lastposturl}">{vb:raw prepared.lastposttitle}</a> {vb:raw prepared.lastpostdate} <span class="time">{vb:raw prepared.lastposttime}</span></dd>
	</dl>
	</vb:if>
Insert Below (change the wiki path to your own: i use /home/):
Code:
<dl class="stats">
<dt>{vb:rawphrase total_wikiedits}</dt><dd><a href="/home/Special:Contributions/{vb:raw userinfo.username}"> {vb:raw userinfo.wikiedits} </a>
</dd>
 </dl>
--
Thats it!


Notes:
1. This hack assumes that your mediawiki install uses a "mw_" table prefix in the same database as vbulletin. If this is not the case, do a search/replace in the product XML file before you install it.
2. If mediawiki is installed in a different database, then replace "mw_user" with "wikidatabase.mw_user" (make sure that the forums' database user has access to the other db).

---
This hack is broadly based off AngelBlue's hack hack for a previous release.

---

ndahiya

Download Now

File Type: xml product-mediawiki-editcount.xml (3.2 KB, 62 views)

Show Your Support

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

Comments
  #12  
Old 03-06-2010, 02:48 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Even better: I disabled this AddOn and the Modification on postbit_legacy still works! Perhaps this means: You don't even have to install this mod, simply change postbit_legacy as desired, vbMediaWiki does the rest:

In Template postbit_legacy (or postbit) search for
Code:
{vb:raw template_hook.postbit_userinfo_right_after_posts}
and add
Code:
<vb:if condition="$post['wikiedits'] > 0">
    <dt>Wiki Edits</dt> <dd><a title="Wiki Edits" href="/wiki/Special:Contributions/{vb:raw post.username}">{vb:raw  post.wikiedits}</a></dd>
</vb:if>
Greetings, Bruno

[Does anyone know how to put this Templatemodification into a plugin instead? {vb:raw template_hook.postbit_userinfo_right_after_posts} seems to give us this possibility]
Reply With Quote
  #13  
Old 03-06-2010, 04:10 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BRotondi View Post
Even better: I disabled this AddOn and the Modification on postbit_legacy still works! Perhaps this means: You don't even have to install this mod, simply change postbit_legacy as desired, vbMediaWiki does the rest:
i think vbmediawiki is using the same field as this. so you are correct. this is somewhat redundant now.
do not uninstall this, as that will delete the field and you will have to reinstall vbmediawiki
Reply With Quote
  #14  
Old 10-13-2010, 05:05 AM
Greight's Avatar
Greight Greight is offline
 
Join Date: Oct 2009
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Installed along with vBMediaWiki (No need for the second edit).
Reply With Quote
  #15  
Old 01-24-2011, 12:01 PM
augrunt augrunt is offline
 
Join Date: Mar 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to go off topic, but what is the best MediaWiki integration to use?

I would like a single-sign on, with Who's Online compatibility & is compatible (or can atleast handle) users with underscores and spaces.

I integrated MediaWiki/vBulletin Single Sign-On as this post asks and it works fine on vBulletin 4.1.1 (after I made changes to it's Whos Online script)-- However I feel as though this stuff isn't supported and people keep throwing names around! Who's leading this development?! lol

ndahiya, you are the expert: what do you recommend?
Reply With Quote
Reply

Thread Tools

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 02:44 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.04057 seconds
  • Memory Usage 2,266KB
  • Queries Executed 20 (?)
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
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete