vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - MediaWiki Latest Additions & Changes (https://vborg.vbsupport.ru/showthread.php?t=142520)

optrex 01-27-2009 03:35 AM

works great on 3.8 vb and 1.13.3 wiki with 3.1.0 vba

majorxp 02-19-2009 06:22 PM

Thanks for the confirmation Optrex

ReCom 05-20-2009 11:33 AM

Thanks for this mod.

I've modified your SQL query into this:

$query = "SELECT o.rc_title, o.rc_user_text, o.rc_new, o.rc_namespace, o.rc_timestamp FROM " . $prefix . "recentchanges o, (SELECT max(rc_timestamp) as xtimestamp, rc_title, rc_namespace FROM " . $prefix . "recentchanges WHERE ABS(rc_old_len - rc_new_len) > 20 AND rc_namespace IN (0,2,6,14) GROUP BY rc_title, rc_namespace) n WHERE o.rc_title = n.rc_title AND o.rc_namespace = n.rc_namespace AND o.rc_timestamp = n.xtimestamp ORDER BY rc_timestamp DESC LIMIT " . $results;

Improvements:
  • Namespace filtering is done in the nested SELECT
  • Articles with same titles but in different namespaces are not lumped together ("Category:Vehicles" and "Vehicles" are two different articles, are they not?)
  • filter out minute changes (detected by difference in articles length -- ABS(rc_old_len - rc_new_len) > 20 -- change 20 to minimum length difference)


.. and here is how I made the output list into more than one column:

Code:

// set $count = 0 outside this WHILE loop
// also set $columns to the number of columns you want
// owh and you need to set $wikiUrl to be your wiki url

if ($count % $columns == 0) $wik = $wik . '<tr>';
$wik = $wik .'<td class="alt'. (($count%$columns+intval($count/$columns))%2+1) .'" style="width:'. intval(100 / $columns) .'%">';
$wik = $wik . '<a href="' . $wikiUrl . $wTitle . '" title="' . $wTitleName . '"><strong>' . $wTitleName . '</strong></a><span class="smallfont">' . $new . 'by <a href="'. $wikiUrl .'User:'. $row['rc_user_text'] .'">' . $row['rc_user_text'] . '</a>';
$wik = $wik . "</span></td>";
if ($count % $columns == $columns - 1) $wik = $wik . '</tr>';
$count++;

Make sure you set the $results variable to be a multiple of the $columns (e.g. if $columns = 3 then $results = 3 or 6 or 9 or 12 or 15 etc

Sample @ http://www.recom.org/

Bernd 05-26-2009 09:49 AM

Recom, could you share that file? I have no idea at what line your code has to be implemented and what has to be removed. I did change the sql, which did not result in any errors.

AfterWorldForum 11-02-2009 04:39 PM

Never mind me, I am daft.

Just as a note, works fine on 3.8.4, using MediaWiki 1.15.1.

Thank you for the mod :)

majorxp 11-07-2009 01:44 AM

Glad that worked out for ya...and yes I'm still watching. :)

rwoscott 03-13-2010 02:16 AM

Works on VB4 and 1.10.1

Just needed to make a couple of small chgs to makevbmodule.php
find this
Code:

  while($row = @mysql_fetch_array($result, MYSQL_ASSOC))
And add the bit in red
Code:

  $wik = $wik .'<div class="blockrow"><table>';
  while($row = @mysql_fetch_array($result, MYSQL_ASSOC))

And find this
Code:

      $wik = $wik . '</span>';
Replace with

Code:

      $wik = $wik . '</table></div>';


All times are GMT. The time now is 04:31 PM.

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.01127 seconds
  • Memory Usage 1,729KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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