vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Mediawiki Edits in Postbit & Profile (https://vborg.vbsupport.ru/showthread.php?t=233959)

ndahiya 01-22-2010 10:00 PM

Mediawiki Edits in Postbit & Profile
 
1 Attachment(s)
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

ndahiya 01-23-2010 03:11 PM

1 Attachment(s)
Screenshots:

BRotondi 01-23-2010 06:27 PM

Nice work!

Bruno
(Tested on vB 4.0.1 + MW 1.14, 7 replaces 'mw_user' -> 'sqlwiki.user' in product-mediawiki-editcount.xml)

ndahiya 01-23-2010 11:45 PM

Quote:

Originally Posted by BRotondi (Post 1964640)
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! :)

BRotondi 01-24-2010 05:20 AM

I will as soon I use it on the server. :)

Beor 01-24-2010 05:18 PM

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

JAFRI 01-25-2010 03:20 AM

Thanks,, installed an nice work,

BRotondi 02-07-2010 06:47 PM

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

benjaminlwells 03-05-2010 10:11 PM

anyone know how this works along side vbMediaWiki?

BRotondi 03-06-2010 07:52 AM

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.


All times are GMT. The time now is 11:20 AM.

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.01256 seconds
  • Memory Usage 1,735KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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