vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Integration with vBulletin - Wiki Edits in Postbits and Profiles (https://vborg.vbsupport.ru/showthread.php?t=170479)

AngelBlue 02-13-2008 10:00 PM

Wiki Edits in Postbits and Profiles
 
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 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:
Code:

SELECT user_editcount
FROM mw_user
WHERE user.username = user_real_name

to
Code:

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

Quote:

Originally Posted by Varsh (Post 1722043)
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

Quote:

Originally Posted by bagh1 (Post 1721404)
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

Quote:

Originally Posted by Varsh (Post 1722043)
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:
Code:

<phrase 1="$prepared[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></li>
insert right after:
Code:

<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

Quote:

Originally Posted by ndahiya (Post 1723448)
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.

Quote:

Originally Posted by ndahiya

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?

Quote:

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:
Code:

<phrase 1="$prepared[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></li>
insert right after:
Code:

<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:
Quote:

Originally Posted by in template 'memberinfo_block_statistics', after
<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>

Quote:

Originally Posted by insert
<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.


All times are GMT. The time now is 09:54 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.03858 seconds
  • Memory Usage 1,767KB
  • 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
  • (6)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete