PDA

View Full Version : Integration with vBulletin - Wiki Edits in Postbits and Profiles


AngelBlue
02-13-2008, 10:00 PM
This addon has been withdrawn.

sub_ubi
02-21-2008, 03:35 AM
Looks good, thanks!

AngelBlue
03-24-2008, 12:41 AM
Removed the 'Beta' tag, as this has been in use on my and a few other forums for months, and no issues have been reported.

Warlord
07-19-2008, 12:50 AM
How do we know if our media wiki uses a "mw_" table prefix? I installed this, but it's not working. I'm assuming that's why. If I don't have access to my sql db at the moment, is there a way to find out what table prefix I used?

Warlord
07-19-2008, 04:26 PM
Ok, I found out that my table prefixes are wiki_ and not mw_ and changed the XML file accordingly. I added the code to my postbit and see no changes. Any ideas?

Warlord
07-19-2008, 05:14 PM
Well I guess I'm an idiot.. I tried a bunch of things to get it to work and ended up deleting my user account at my forums (I created a new one first)... anyway bottom line is I can't seem to get this to work.

PEPITO69
08-01-2008, 05:38 PM
Great, i've been wating for this, can i use it in VB 3.6.5?

Warlord
09-04-2008, 04:12 PM
Tried this again after you PM'ed me and said you updated it. When I went to install the product I get this error.

XML Error: xml declaration not at start of external entity at Line 1

Warlord
09-09-2008, 08:27 PM
bump

Warlord
09-14-2008, 02:05 AM
bump

AngelBlue
11-22-2008, 09:52 PM
Current local version works fine for me (including with vB 3.7).
I've replaced the old XML with it. Try this one instead?

Varsh
12-13-2008, 02:01 AM
Superb simple hack, it'll come in handy for my website thanks. I had to modify the plugin to work with the vB SSO (https://vborg.vbsupport.ru/showthread.php?t=191186) a little to get it to work but otherwise it works without a hitch. I have this now working on vB 3.8 b1 and MediaWiki 1.13.2.

To get this to work with the vB SSO all you need to do is change the query (appears twice in the XML) from:
SELECT user_editcount
FROM mw_user
WHERE user.username = user_real_name
to
SELECT user_editcount
FROM wiki_user
WHERE user.username = user_name
For me wiki_ is my prefix, it may be different for everyone else, the vB SSO however requires you to use user_name rather than user_real_name.

Here's the modified file if you want to add it to the front page AngelBlue, rename the file as you see fit.

bagh1
01-22-2009, 05:19 PM
Hi,
I have two different databases. One for the main forums and the other for WIKI. The forums database isn't able to see mw_user and I start getting errors like this:

'forums.mw_user' doesn't exist

Any ideas on how to fix this?
TIA!

Varsh
01-22-2009, 07:53 PM
Please read my post above yours, it explains it all in there, in fact mine works.

AngelBlue
01-23-2009, 12:43 AM
This mod is no longer supported.
It has always worked fine for me on 3.7 and 3.8, but I lack the time to support it.

Varsh
01-23-2009, 08:14 AM
Is it alright with you if I modify the code, add extras to it, then release for 3.8?

AngelBlue
01-24-2009, 04:36 AM
Is it alright with you if I modify the code, add extras to it, then release for 3.8?

Yes.

ndahiya
01-24-2009, 04:30 PM
Hi,
I have two different databases. One for the main forums and the other for WIKI. The forums database isn't able to see mw_user and I start getting errors like this:

'forums.mw_user' doesn't exist

Any ideas on how to fix this?
TIA!

mysql can access multiple databases in one query.. so name the database wikidatabasename.mw_user ... also make sure that forums-database-user has access to wikidatabasename .

this works fine then.


ndahiya

ndahiya
01-24-2009, 04:38 PM
Is it alright with you if I modify the code, add extras to it, then release for 3.8?

Good that you're taking the lead on this..

some point re 3.8 -


1. Performance improves greatly if there is a(ny) index on real_user_name in the mw_user table. With about 10K users, the database started overrunning max connections and failing the first time hourly cleanup cron job ran (that is what updates the wiki stats).

2. This plugin fails if there are multiple entries for real_user_name (which would happen if you had legacy entries... but it might be better not to make the index unique - might break the linkage. if you fix all the dupes initially, hopefully will not happen again). A way around is to use "SELECT sum(user_editcount) ..... " instead of "SELECT user_editcount ...." in the cron query.

3. the template to be edited for memberinfo is "memberinfo_block_statistics"
wikieditsperday is not showing for some reason (hook location?). the edit i made was:

Find:
<phrase 1="$prepared[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></li>

insert right after:

<li><br>$vbphrase[total_wikiedits]: $userinfo[wikiedits]</li>

<if condition="$userinfo[wikiedits] > 0">
<li><a href="/wikihome/Special:Contributions/$userinfo[username]" rel="nofollow">Click here to see Wiki edits</a></li>
</if>




Hope this helps...

Varsh
01-24-2009, 10:30 PM
I'm not the greatest at PHP/MySQL and this would be my first take on something so please don't expect anything for a while (I am an extremely busy person). However I'll be doing plenty of tests on my site first between now and whenever I get to release it. If someone else manages to do it before me then props to them.

I'll try and get a plugin working but please remember, no promises. I will have a bash at it though. :D

AngelBlue
04-10-2009, 04:07 AM
Good that you're taking the lead on this..

some point re 3.8 -


1. Performance improves greatly if there is a(ny) index on real_user_name in the mw_user table. With about 10K users, the database started overrunning max connections and failing the first time hourly cleanup cron job ran (that is what updates the wiki stats).


Good idea. I wrote this a long time ago, before I became aware of the potential DB issues of running a large forum.



2. This plugin fails if there are multiple entries for real_user_name (which would happen if you had legacy entries... but it might be better not to make the index unique - might break the linkage. if you fix all the dupes initially, hopefully will not happen again). A way around is to use "SELECT sum(user_editcount) ..... " instead of "SELECT user_editcount ...." in the cron query.



Wouldn't that mean that if you had two users A and B with identical real_user_name entries, they'd each be credited with the sum of A+B wiki edits?


3. the template to be edited for memberinfo is "memberinfo_block_statistics"
wikieditsperday is not showing for some reason (hook location?). the edit i made was:

Find:
<phrase 1="$prepared[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></li>

insert right after:

<li><br>$vbphrase[total_wikiedits]: $userinfo[wikiedits]</li>

<if condition="$userinfo[wikiedits] > 0">
<li><a href="/wikihome/Special:Contributions/$userinfo[username]" rel="nofollow">Click here to see Wiki edits</a></li>
</if>




Hope this helps...

Here's how I do it:

<li><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1" rel="nofollow"><phrase 1="$prepared[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></li>


<if condition="$userinfo[wikiedits] > 0">
<li><a href="http://www.myweb.site/wiki/index.php/Special:Contributions/$userinfo[username]" rel="nofollow">$vbphrase[find_all_wikiedits_by_x] $userinfo[username]</a></li>
</if>

X-or
12-27-2010, 10:28 AM
Why is there no file? :(

X-or
12-27-2010, 11:40 AM
for me it works on 3.8 but not on 3.6 without any change

Alfa1
12-27-2010, 04:54 PM
This addon has been withdrawn.