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

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
  #2  
Old 01-23-2010, 03:11 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshots:
Attached Images
File Type: jpg wikiedits_in_postbit.jpg (35.5 KB, 0 views)
File Type: jpg wikiedits_in_profile.jpg (15.9 KB, 0 views)
Reply With Quote
  #3  
Old 01-23-2010, 06:27 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work!

Bruno
(Tested on vB 4.0.1 + MW 1.14, 7 replaces 'mw_user' -> 'sqlwiki.user' in product-mediawiki-editcount.xml)
Reply With Quote
  #4  
Old 01-23-2010, 11:45 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BRotondi View Post
Nice work!

Bruno
(Tested on vB 4.0.1 + MW 1.14, 7 replaces 'mw_user' -> 'sqlwiki.user' in product-mediawiki-editcount.xml)
glad you like it... remember to mark as installed!
Reply With Quote
  #5  
Old 01-24-2010, 05:20 AM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will as soon I use it on the server.
Reply With Quote
  #6  
Old 01-24-2010, 05:18 PM
Beor Beor is offline
 
Join Date: Dec 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the mod, we have wiki connected to vb4 on my forum.

Is possible to add post directly to the wiki on the future?

Cu
Reply With Quote
  #7  
Old 01-25-2010, 03:20 AM
JAFRI's Avatar
JAFRI JAFRI is offline
 
Join Date: Jun 2009
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks,, installed an nice work,
Reply With Quote
  #8  
Old 02-07-2010, 06:47 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again for you work! Now installed on the server, with this modification, so it appears not for users with 0 Edits and this one, to also link to the Wiki Edits Page.
Code:
<vb:if condition="$post['wikiedits'] > 0">
      <dt>{vb:rawphrase total_wikiedits}</dt> <dd><a title="Beitr?ge Wiki" href="/wiki/Spezial:Beitr%C3%A4ge/{vb:raw post.username}">{vb:raw post.wikiedits}</a></dd>
</vb:if>
Greetings, Bruno
Reply With Quote
  #9  
Old 03-05-2010, 10:11 PM
benjaminlwells's Avatar
benjaminlwells benjaminlwells is offline
 
Join Date: Jan 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know how this works along side vbMediaWiki?
Reply With Quote
  #10  
Old 03-06-2010, 07:52 AM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have vbMediaWiki installed, and now reinstalled this one. Works nice, but you don't have to edit memberinfo_block_aboutme, since this is done by vbMediaWiki.
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 05:43 AM.


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.04470 seconds
  • Memory Usage 2,324KB
  • Queries Executed 26 (?)
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
  • (5)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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